如下图,按要求配置各个区域。防止出现环路。
配置文件:
SW1:SW2和3与SW1类似。
dis current-configuration
#
sysname SW1
#
vlan batch 2 to 20
#
stp instance 0 root primary
stp instance 1 root primary
stp instance 2 root secondary
#
stp region-configuration
region-name HCNA
revision-level 1
instance 1 vlan 1 to 10
instance 2 vlan 11 to 20
active region-configuration
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 20
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass