Lab topology
Experimental demand
- All devices running STP
- Change a blocked port
Experimental Procedure
1. All devices are running STP, until convergence is completed, observe the state
[SW1]stp mode stp
[SW2]stp mode stp
[SW3]stp mode stp
2, view the STP state in SW1, SW1 found to be the root bridge
Analysis: Spanning Tree convergence election principle is to compare root bridge ID, root path cost (cost), designated bridge ID (forwards bridge ID), port ID, once compare the size, will determine the role, we will not continue to compare subsequent arguments
root bridge ID = switch priority (32768) + MAC address of the
root path cost = the non-root switch reaches through which the root for all path cost of the
designated bridge ID = switch priority (32768) + MAC address
port ID = port priority (128) + port number
[Huawei]dis stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.4c1f-cc40-5e35
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-cc40-5e35 / 0
CIST RegRoot/IRPC :32768.4c1f-cc40-5e35 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :13
TC count per hello :0
STP Converge Mode :Normal
Time since last TC :0 days 1h:4m:16s
Number of TC :8
Last TC occurred :Ethernet0/0/1
3. Review the port role and status of each device
SW3 on the look and found E0 / 0/2 interface blocked.
[SW1]dis stp brief
MSTID Port Role STP State Protection
0 Ethernet0/0/1 DESI FORWARDING NONE
0 Ethernet0/0/2 DESI FORWARDING NONE
[SW2]dis stp brief
MSTID Port Role STP State Protection
0 Ethernet0/0/1 DESI FORWARDING NONE
0 Ethernet0/0/2 ROOT FORWARDING NONE
[SW3]dis stp brief
MSTID Port Role STP State Protection
0 Ethernet0/0/1 ROOT FORWARDING NONE
0 Ethernet0/0/2 ALTE DISCARDING NONE
4. Change in the overhead SW3, so that the blocked port is switched to e 0/0/1
Observed, E0 / 0/1 port becomes preparatory port
[Huawei-Ethernet0/0/1]stp cost 400001
[Huawei-Ethernet0/0/1]dis stp brief
MSTID Port Role STP State Protection
0 Ethernet0/0/1 ALTE DISCARDING NONE
0 Ethernet0/0/2 ROOT FORWARDING NONE
Analysis: To make changes to the blocked port E0 / 0/1, we need to SW3 to SW1 through SW3 SW2 overhead than larger LW1 reach overhead, Huawei's default port cost of 200,000, we connect SW1 of E0 / 0/1 cost of the interface into the line 400001