
80
Figure 25 The STP algorithm
, the priority values of Device A, Device B, and Device C are 0, 1, and 2,
respectively. The path costs of links among the three devices are 5, 10, and 4.
1.
Device state initialization.
In
, each configuration BPDU contains the following fields: root bridge ID, root path cost,
designated bridge ID, and designated port ID.
Table 7 Initial state of each device
Device Port
name
Configuration BPDU on
the port
Device A
Port A1
{0, 0, 0, Port A1}
Port A2
{0, 0, 0, Port A2}
Device B
Port B1
{1, 0, 1, Port B1}
Port B2
{1, 0, 1, Port B2}
Device C
Port C1
{2, 0, 2, Port C1}
Port C2
{2, 0, 2, Port C2}
2.
Configuration BPDUs comparison on each device.
In
, each configuration BPDU contains the following fields: root bridge ID, root path cost,
designated bridge ID, and designated port ID.
Table 8 Comparison process and result on each device
Device Comparison
process
Configuration BPDU
on ports after
comparison
Device A
Port A1 performs the following operations:
1.
Receives the configuration BPDU of Port B1 {1, 0, 1,
Port B1}.
2.
Determines that its existing configuration BPDU {0, 0,
0, Port A1} is superior to the received configuration
BPDU.
3.
Discards the received one.
Port A2 performs the following operations:
1.
Receives the configuration BPDU of Port C1 {2, 0, 2,
•
Port A1: {0, 0, 0, Port
A1}
•
Port A2: {0, 0, 0, Port
A2}