Network diagram with switches, root bridge priority settings, and STP port roles (root, designated, blocked) labeled for clarity.

Spanning Tree – Root Bridge

Every spanning tree switched network or broadcast domain has a switch designated as the root bridge. It serves as the reference point for all spanning-tree-enabled switches. The spanning tree algorithm determines which redundant paths to block. It is selected as an election process.

The figure below illustrates the bridge ID (BID) fields. BID is a unique identity when the switch is part of a network. It is a 64-bit field divided into three parts: the 4 4-bit Bridge Priority field, the 12 12-bit Extended System ID field, and the switch’s 48-bit MAC address. The Bridge Priority field is configurable, while the MAC address is unique among all switches. The sum of these two ensures a unique Bridge ID.

Root Bridge election

All switches in the broadcast domain join the election process. When switches complete their booting process, they send out BPDU frames every two seconds containing the switch BID and the root ID. The adjacent switches receive the BPDU frames and read the root ID information from them. If the root ID of the BPDU sending switch is lower than the root ID on the receiving switch, the receiving switch updates its root ID, identifying the adjacent switch as the root bridge.

Spanning Tree Protocol Root Bridge
Spanning Tree - Root Bridge 3

It doesn’t need to be the adjacent switch. It could be any other switch in the broadcast domain. The switch then sends new BPDU frames with the lower root ID to the adjacent switches. Finally, the switch with the lowest BID is selected as the root bridge for the spanning tree instance.

Now, look at the election process from another angle. Before manually configuring the bridge priority, all the switches have a default priority. Therefore, it is a tie based on priority. The switch with the lowest Mac address will become a root bridge. In the figure below, switch-3 is elected as the Root-Bridge because the bridge priority ID is the default, which is 32769; so, the switches elect the root-bridge based on the MAC address. The switch-3 is the lowest MAC address, so all the root-bridge ports become in the forwarding state, i.e., designated port.

FAQs

  • How does STP elect the root bridge?

    Enable BPDU Guard on edge ports and use root guard on critical switches.

  • Can I force a specific switch to be the root bridge?

    Yes! Use the spanning-tree vlan [ID] root primary command or manually set a lower priority value.

  • What happens if the root bridge fails?

    STP triggers a reconvergence, and the backup root bridge (secondary) takes over.

  • How do I prevent unauthorised switches from becoming root?

    Enable BPDU Guard on edge ports and use root guard on critical switches.

  • Why is my network slow after root bridge changes?

    Frequent STP reconvergence causes delays. Stabilise by setting a static root bridge.

Avatar of Asad Ijaz

Asad Ijaz

NetworkUstad's lead networking architect with CCIE certification. Specializes in CCNA exam preparation and enterprise network design. Authored 2,800+ technical guides on Cisco systems, BGP routing, and network security protocols since 2018. Picture this: I'm not just someone who writes about tech; I'm a certified expert in the field. I proudly hold the titles of Cisco Certified Network Professional (CCNP) and Cisco Certified Network Associate (CCNA). So, when I talk about networking, I'm not just whistling in the dark; I know my stuff! My website is like a treasure trove of knowledge. You'll find a plethora of articles and tutorials covering a wide range of topics related to networking and cybersecurity. It's not just a website; it's a learning hub for anyone who's eager to dive into the world of bits, bytes, and secure connections. And here's a fun fact: I'm not a lone wolf in this journey. I'm a proud member and Editor of Team NetworkUstad. Together, we're on a mission to empower people with the knowledge they need to navigate the digital landscape safely and effectively. So, if you're ready to embark on a tech-savvy adventure, stick around with me, Asad Ijaz Khattak. We're going to unravel the mysteries of technology, one article at a time!"