A root bridge is the central reference point STP uses to create a loop-free Layer 2 topology. Every other switch selects exactly one active path toward it, while redundant connections can be blocked. section 14.3.1 section 14.6
Switches elect the root bridge by exchanging BPDUs. Each BPDU carries the sender’s bridge identifier (BID) and its believed root BID. A switch initially claims to be root, then accepts a switch advertising a numerically lower BID. section 14.3.1 section 14.6
The BID determines which switch becomes root:
- Uses a 64-bit identifier containing a 16-bit bridge priority and a 48-bit MAC address. section 14.3.1
- Combines the configurable priority with Cisco’s Extended System ID, which represents the VLAN ID. section 14.3.1
- Selects the switch with the lowest complete BID; lowering priority is the usual way to influence the election. section 14.6
- Creates a separate spanning tree for each VLAN when Cisco PVST+ is used. section 14.6
Electing and verifying a root bridge
If SW3 is configured with priority 24576 for VLAN 1 and SW4 with 28672, SW3 has the lower BID and becomes root. On SW4, show spanning-tree reports Root ID Priority 24577 and Bridge ID Priority 28673; the extra value reflects VLAN 1’s Extended System ID. Configure the priority with spanning-tree vlan 1 priority 24576, using an allowed increment of 4096. section 14.3.1 section 14.6
The root bridge influences the rest of STP: non-root switches choose root ports using the best path toward it, and designated ports point away from it. Every root-bridge port is designated. section 14.3.2 section 14.3.3
Figure 14.5 SW1, SW2, SW3, and SW4 boot up simultaneously, each switch declaring itself the root bridge. The switches send BPDUs out of their ports, containing information such as the switch’s own BID and the BID of the switch it believes to be the root bridge (itself, in this case).
Use the startup scenario to visualize how switches initially declare themselves root and exchange BPDUs containing their BIDs. section 14.3.1
