Network diagram showing spanning tree configuration with bridge IDs and VLANs

How to Configure Spanning-Tree Bridge ID – Briefly Explained

When configuring a specific switch as a Root Bridge, the bridge ID priority value must be adjusted to be lower than the bridge priority values of all the other switches on the network. There are two different methods for configuring the bridge priority value on a Cisco Catalyst switch.

Method 1

To ensure the switch has the lowest bridge priority value, use the spanning-tree vlan vlan-id root primary command in global configuration mode. The command set the priority for the switch to the predefined value of 24,576 or the highest multiple of 4,096, less than the lowest bridge priority detected on the network.

We can also configure the alternate root bridge to use the “spanning-tree vlan vlan-id root secondary” command in global configuration mode. The predefined bridge priority value for the secondary root bridge is 28,673.

This value ensures the alternate switch becomes the root bridge if the primary root bridge fails. This configuration assumes that the rest of the network switches have defined the default 32,768 priority value.

RSTP 1 1
How to Configure Spanning-Tree Bridge ID - Briefly Explained 7

Bridge ID Configuration

Now, look at the figure above. Switch-1 is elected as the Root Bridge in the spanning tree process. The bridge ID priority is the same in all switches, 32769. The switch-1 MAC address is the lowest among all switches.

So, the spanning tree was elected switch-1 as a Root Bridge based on the lowest MAC address. However, we want to configure switch-3 as the root bridge and switch-2 as the secondary root bridge. The configuration of switch-3 for the root bridge is as follows:-

Switch-3>enable

Switch-3#config terminal

Switch-3(config)#spanning-tree vlan 1 root primary

Switch-3(config)# do wr

Now, we will configure switch-2 as the secondary root bridge. If the primary root bridge becomes faulty, the switch will act as the root bridge immediately, and the network should not need to elect the root bridge. The configuration of switch-2 is as under:-

Switch-2>enable

Switch-2#config terminal

Switch-2(config)#spanning-tree vlan 1 root secondary

Switch-2(config)# do wr

Now we can verify the configuration all switches. The output of the “show spanning-tree” command on all switches is as under:

Screen Shot 2024 05 16 at 105729 PM
How to Configure Spanning-Tree Bridge ID - Briefly Explained 8
Secondary Root Bridge
How to Configure Spanning-Tree Bridge ID - Briefly Explained 9
Spanning tree member
How to Configure Spanning-Tree Bridge ID - Briefly Explained 10

Method 2

Another method for root bridge configuration is the configuration bridge priority value. The command configuring the bridge priority value is “spanning-tree vlan vlan-id priority value” in global configuration mode. The priority value is configured in the increase of 4,096, and the range is between 0 and 61,440.

Now I will cancel the previous command in switch-3 and switch2 and want to configure the bridge priority values. The switch-3 configuration is as under:-

Switch-3>enable

Switch-3#config terminal

Switch-3# no spanning-tree vlan 1 root primary

Switch-3(config)#spanning-tree vlan 1 priority 24576

Switch-3(config)# do wr

We can do the same for the secondary root bridge. To verify the bridge priority of a switch, we can use the same “show spanning-tree” command. After configuring the root bridge priority of the switch-3, the output of the show spanning-tree command is the following:-

Bridge Priority configuration
How to Configure Spanning-Tree Bridge ID - Briefly Explained 11

The switch’s priority has been set to 24,576. Also, notice that the switch is designated as the root bridge for the spanning-tree instance. The Bridge ID priority is set to 24577 because it is 24576 +1 = 24577. The 1 is the value of the VLAN, which is added to the bridge priority to construct the extended system ID.

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!"