Root bridge election is the first step in the Spanning Tree Protocol (STP) algorithm. Switches elect one switch as the LAN’s central reference point; every other switch later maintains exactly one active path to it. section 14.3 section 14.3.1
The election works as follows:
- Switches exchange Bridge Protocol Data Units (BPDUs), normally every 2 seconds. Each BPDU includes the sender’s Bridge ID (BID) and the BID of its believed root. section 14.3.1
- When a switch boots, it initially declares itself the root by placing its own BID in both fields. section 14.3.1
- The switch advertising the numerically lowest BID wins. A BID contains a 16-bit bridge priority and a 48-bit MAC address; Cisco’s Extended System ID includes the VLAN ID. section 14.3.1
Making SW3 the root
Configure SW3 with a lower priority than its neighbors: `SW3(config)# spanning-tree vlan 1 priority 24576`. SW4 can use 28672. The resulting output shows SW3’s root priority as 24577—24576 plus VLAN 1—while SW4 reports its own priority as 28673. Because SW3 has the lowest BID, it becomes the root; if it fails, SW4 becomes the next root candidate.
