
A switch understands that there is a loop when it receives BPDUs from the Root-Bridge on more than one interface.

Once the Root election is completed, the switches start identifying loops. Once SW2 gets this inferior message, it discards it.Īt the end of this process, all switches within the topology must agree that there is only one Root Bridge and it is the same from the perspective of each bridge.

A BPDU message that has the same or higher Root BID value than your own is called an Inferior BPDU. When SW2 compares this to the Root Bridge value known to him at the moment 32769:0000.0000.0002 - it is obviously higher. Downstream means that it stops sending BPDUs toward the Root but only to other bridges. Once SW2 gets this superior message, it stops advertising itself as root and starts forward this Superior BPDU downstream to all other switches. A BPDU message that has a lower Root BID value than your own is called a Superior BPDU. When SW2 compares this value to the Root Bridge value known to him at the moment 32769:0000.0000.0002 - it is obviously lower. The BPDU from SW1 says that the Root Bridge has a value of 32769:0000.0000.0001.SW2 receives two BPDU messages, one from SW1 and one from SW3. Let's now look at the example in figure 2 and see what happens when they exchange the first BPDU messages. Each switch is basically saying "I am the Root".įigure 2. Root-Bridge Election process step 2 In the BPDU messages, they put their own BID value and the BID of the root bridge known to them at the moment. The Spanning-Tree process starts with all switches electing and advertising themselves as Root Bridge of the topology. It shows three switches with default configurations that have been connected in a triangle and just powered on. Once it receives a BPDU with a Root BID value lower than its own, it immediately stops advertising itself as root and starts forwarding the superior Root Bridge value.įigure 1. Root-Bridge Election process step 1 Thus it elects itself as the Root Bridge of the topology. When a switch boots up, it does not know the BID values of all other switches in the topology.
#Spanning tools mac
In this case, the election process is decided by choosing the switch with the lowest Systems MAC address. This typically happens when all switches are left with their default values, therefore all switches have a priority of 32768. The second part of the BID value is only used when there is a tie, meaning when there are at least two switches that have the same priority value. The first portion of the BID value is configurable and is used by network administrators to set up a particular switch as a Root Bridge. BID is not a single value, but it is composed of two different value types.īID = (Priority + VLAN number) : (System MAC address) The switch that has the lowest BID value is elected the Root Bridge of the topology. Switches elect a Root Bridge based on a value called Bridge ID. Let's now look at each step in more detail. This is a simplified summary of the STP algorithm. However, in the context of STP, both terms are really synonymous and interchangeable. That is why most protocol terms like Bridge-Priority and Bridge-ID are not Switch-Priority and Switch-ID. NOTE The term Bridge appears a lot in the context of Spanning-Tree because the protocol was created in times when switches had not even existed and local networks were using devices called bridges. If a link or a switch goes down, the switches execute step 2 and step 3 again to make sure the new topology is loop-free. Re-converge around failures - The switches continue to exchange messages in order to keep track of links and adjacent switches' availability.Setup port roles - After the looped part of the topology is identified, each switch places as many switch ports as needed in order to ensure that the topology is loop-free.

Based on these messages the switches find the looped parts of the topology.
