Description

Identify the Root Bridge in a Spanning Tree network.

Symptoms

For troubleshooting purposes, there may be a requirement to identify the root-switch or root bridge in a spanning-tree environment.

Solution

The root bridge in a spanning-tree network is the bridge with the smallest or the lowest bridge ID.

This can be verified by issuing the following command.

Switch@juniper>show spanning-tree bridge

STP bridge parameters
Context ID : 0
Enabled protocol : RSTP
Root ID : 32768.28:c0:da:3d:50:40  <--------------------
Hello time : 2 seconds
Maximum age : 20 seconds
Forward delay : 15 seconds
Message age : 0
Number of topology changes : 2
Time since last topology change : 3218 seconds
Topology change initiator : ge-0/0/4.0
Topology change last recvd. from : 2c:6b:f5:8b:23:04
Local parameters
Bridge ID : 32768.28:c0:da:3d:50:40   <--------------------
Extended system ID : 0
Internal instance ID : 0

If values of the Root ID and the Bridge ID have equal values as in the above example, then we confirm that this is the Root Bridge or the Root Switch.

The example below shows that the values of the Root ID and the Bridge ID are different, indicating that this switch is not a Root switch.
Switch@juniper# run show spanning-tree bridge

STP bridge parameters
Context ID : 0
Enabled protocol : RSTP
Root ID : 32768.28:c0:da:3d:50:40    <--------------------
Root cost : 20000
Root port : ge-0/0/4.0
Hello time : 2 seconds
Maximum age : 20 seconds
Forward delay : 15 seconds
Message age : 1
Number of topology changes : 4
Time since last topology change : 3396 seconds
Topology change initiator : ge-0/0/4.0
Topology change last recvd. from : 28:c0:da:3d:50:44
Local parameters
Bridge ID : 32768.2c:6b:f5:8b:23:00   <--------------------
Extended system ID : 0
Internal instance ID : 0

Note:  The bridge priority is used to control which bridge is elected as the root bridge and also to control which bridge is elected as the root bridge when the initial root bridge fails.  For more information, refer to technical documentation on bridge-priority (Spanning Trees)

 

Modification History

2020-08-03: Updated link to bridge-priority tech doc.