Content

| 3.2 |  | STP Processes |
| 3.2.3 |  | Electing the root bridge |

As a first step in the STP process, the switches need to elect a single Root Bridge by looking for the bridge with the lowest BID. This process of selecting the bridge with the lowest BID is sometimes called the “root war.”

As discussed in the earlier “Bridge ID” section, a BID is an 8-byte identifier that is composed of two subfields, the Bridge Priority and a MAC address. In Figure , it can be seen that Cat-A has a default BID of 32,768.AA-AA-AA-AA-AA-AA, Cat-B assumes a default BID of 32,768.BB-BB-BB-BB-BB-BB, and Cat-C uses 32,768.CC-CC-CC-CC-CC-CC. Because all three bridges use the default Bridge Priority of 32,768, the lowest MAC address, AA-AA-AA-AA-AA-AA, serves as the tiebreaker, and Cat-A becomes the Root Bridge. The process of how to configure a switch to become the Root Bridge will be examined in the following topics. Normally, the default settings should not be allowed to determine the location of the Root Bridge. How did the bridges learn that Cat-A has the lowest BID? This is accomplished through the exchange of BPDUs. As discussed earlier, BPDUs are special frames that bridges use to exchange spanning tree information with each other. By default, BPDUs are sent out every two seconds. BPDUs propagate between bridges, which includes switches and all routers configured for bridging. BPDUs do not carry end-user traffic. Figure illustrates the layout of a BPDU.

For the purposes of the root war, this discussion involves only the Root BID and Sender BID fields. When a bridge generates a BPDU every two seconds, it places what it thinks is the Root Bridge at that instant in the Root BID field. The bridge always places its own BID in the Sender BID field. Initially, before the switch knows any better, it populates the Root BID field with its own BID. Suppose that Cat-B boots first and starts sending out BPDUs announcing itself as the Root Bridge every two seconds. A few minutes later, Cat-C boots and announces itself as the Root Bridge. When the Cat-C BPDU arrives at Cat-B, Cat-B discards the BPDU because it has a lower BID saved on its ports (its own BID). As soon as Cat-B transmits a BPDU, Cat-C learns that it is not as important as it initially thought. At this point, Cat-C starts sending BPDUs that list Cat-B as the Root BID and Cat-C as the sender BID. The network now agrees that Cat-B is the Root Bridge. Five minutes later, Cat-A boots. Cat-A initially thinks it is the Root Bridge and starts advertising this fact via BPDUs. As soon as these BPDUs arrive at Cat-B and Cat-C the switches hand over the Root Bridge position to Cat-A. All three switches now send out BPDUs that announce Cat-A as the Root Bridge and themselves as the sender BID.