1-5
When the network topology is stable, only the root port and designated ports forward traffic, while other
ports are all in the blocked state – they only receive STP packets but do not forward user traffic.
Once the root bridge, the root port on each non-root bridge and designated ports have been
successfully elected, the entire tree-shaped topology has been constructed.
The following is an example of how the STP algorithm works. The specific network diagram is shown in
Figure 1-2. The priority of Device A is 0, the priority of Device B is 1, the priority of Device C is 2, and the
path costs of these links are 5, 10 and 4 respectively.
Figure 1-2 Network diagram for STP algorithm
AP1 AP 2
Device A
With priority 0
Device B
Device C
BP1
BP 2
CP1
CP 2
510
4
With priority
1
With priority 2
z Initial state of each device
The following table shows the initial state of each device.
Table 1-4 Initial state of each device
Device Port name BPDU of port
AP1 {0, 0, 0, AP1}
Device A
AP2 {0, 0, 0, AP2}
BP1 {1, 0, 1, BP1}
Device B
BP2 {1, 0, 1, BP2}
CP1 {2, 0, 2, CP1}
Device C
CP2 {2, 0, 2, CP2}
z Comparison process and result on each device
The following table shows the comparison process and result on each device.