Spanning Tree Basics – Part 1

Posted on Posted in Routing and Switching
Locating Root Ports

After the switches have identified the root bridge, they must determine their root port (RP). The root bridge continues to advertise configuration BPDUs out all of its ports. The switch compares the BPDU information to identify the RP. The RP is selected using the following logic (where the next criterion is used in the event of a tie):

  1. The interface associated to lowest path cost is more preferred.
  2. The interface associated to the lowest system priority of the advertising switch is preferred next.
  3. The interface associated to the lowest system MAC address of the advertising switch is preferred next.
  4. When multiple links are associated to the same switch, the lowest port priority from the advertising switch is preferred.
  5. When multiple links are associated to the same switch, the lower port number from the advertising switch is preferred.

Based on the above STP root port selection listed above let’s take a look at AL-1 to see who is the root of the STP and which interface will forward or blocked.

Remember that only 1 interface will forward traffic, if both interfaces were to be in a forwarding state a spanning tree loop would occur


First run show the spanning tree command on AL-1.

  1. Who is the root bridge and why? By default he root bridge will be device with the lowest MAC address of all the switches. Looking at the diagram we can see that CORE-1 has a MAC address of 5000.0001.000
  2. What is the bridge ID of AL-1? The bridge ID = 5000.0005.0000
  3. Which port is the root port? The output below indicates that port G0/0 is the root port and is in the forward (FWD) state. Port G0/1 is the alternate (ALTN) port and is in the blocking (BLK) state.

In order to evaluate how the root port selection was made we’ll look at the output of the show spanning-tree vlan 1979 detail.

  1. Interface with the lowest path cost is preferred. In this case the cost is “equal”, so a better selection must be made.

2. The interface associated to the lowest system priority of the advertising switch is preferred next. Based on the output below there is still a tie so on to the next criterion


3. The interface associated to the lowest system MAC address of the advertising switch is preferred next.

Finally we have a “match”, since DL-1 has a lower MAC address than DL-2 the uplink to DL-1 will be selected as the port to be in the forward (FWD) state.

Part 1 conclusion – spanning tree logic can be tricky so the best way to help figure out why a switching is selecting a particular interface, get into the habit of using the “show spanning-tree vlan X detail” command. Always reference the spanning-tree documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *