lsw3的配置
[Huawei]dis cu
vlan batch 10 20
stp instance 1 priority 4096 设置lsw3的实例1的优先级低于lsw4 使其成为1的根
stp instance 2 priority 8192
cluster enable
ntdp enable
ndp enable
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 设置实例1映射的vlan
instance 2 vlan 20
active region-configuration 激活
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
interface Vlanif20
ip address 192.168.2.1 255.255.255.0
interface MEth0/0/1
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
stp instance 2 cost 40000 配置实例2的开销值大于默认的 使其成为堵塞端口
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
lsw4的配置
[Huawei]dis cu
sysname Huawei
vlan batch 10 20
stp instance 1 priority 8192
stp instance 2 priority 4096
cluster enable
ntdp enable
ndp enable
drop illegal-mac alarm
diffserv domain default
stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
stp instance 1 cost 40000
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
查看端口情况
[Huawei] dis stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet0/0/1 DESI FORWARDING NONE
0 GigabitEthernet0/0/2 DESI FORWARDING NONE
0 GigabitEthernet0/0/3 DESI FORWARDING NONE
0 GigabitEthernet0/0/4 DESI FORWARDING NONE
1 GigabitEthernet0/0/1 DESI FORWARDING NONE
1 GigabitEthernet0/0/2 DESI FORWARDING NONE
2 GigabitEthernet0/0/1 ALTE DISCARDING NONE
2 GigabitEthernet0/0/2 ROOT FORWARDING NONE
[Huawei]dis stp instance 1
-------[MSTI 1 Global Info]-------
MSTI Bridge ID :4096.4c1f-cc26-6bc6
MSTI RegRoot/IRPC :4096.4c1f-cc26-6bc6 / 0
MSTI RootPortId :0.0
Master Bridge :32768.4c1f-cc26-6bc6
Cost to Master :0
TC received :6
TC count per hello :0
Time since last TC :0 days 23h:6m:26s
Number of TC :8
Last TC occurred :GigabitEthernet0/0/2
----[Port1(GigabitEthernet0/0/1)][FORWARDING]----
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :4096.4c1f-cc26-6bc6 / 128.1
Port Times :RemHops 20
TC or TCN send :3
TC or TCN received :2
----[Port2(GigabitEthernet0/0/2)][FORWARDING]----
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :4096.4c1f-cc26-6bc6 / 128.2
Port Times :RemHops 20
TC or TCN send :2
TC or TCN received :2
[Huawei]display stp interface GigabitEthernet 0/0/3
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.4c1f-cc26-6bc6
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.4c1f-cc26-6bc6 / 0
CIST RegRoot/IRPC :32768.4c1f-cc26-6bc6 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :29
TC count per hello :0
STP Converge Mode :Normal
Time since last TC :0 days 2h:10m:14s
Number of TC :51
Last TC occurred :GigabitEthernet0/0/4
----[Port3(GigabitEthernet0/0/3)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :32768.4c1f-cc26-6bc6 / 128.3
Port Edged :Config=default / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :147 packets/hello-time