Header Ads


Switching Basics : STP Root Bridge Election Procedure

Today I am going to talk about the STP (Spanning tree) Root bridge selection procedure. It is one of the most important topic in the Switching and you guys should know about it. I am taking the case where we have three different switches with the MAC addresses and i will talk about how these switches communicate with each other to finally get the root bridge.

Before I will start with the Root bridge in the STP switched network, I would like to tell you guys that we have our own youtube channel for various network videos that can further help you guys to study further. I will going to add many more videos soon on the channel, Please subscribe to the channel for the study network related videos.

Subscribe us on Youtube: http://y2u.be/-5cF6JaNO68 

What is the purpose of the Root Bridge ?
The idea is to have all the communication from source to destination from the root bridge so that we can avoid the loop in the switched LAN network. So before starting the communication in the switched network we need to setup a root bridge.

Spanning-tree election occurs when a switch declares itself a root switch. That usually happens when the switch is only coming up online and starts sending out BPDUs out all of its active ports. If the switch receives a BPDU on one of its ports, it compares that BPDU to its own BPDUs and if that BPDU is inferior, the switch keeps its root status and continues to send out BPDUs each hello interval (2 secs). The other switch will also compare the received BPDU and will find it superior to its own and will stop sending its own BPDUs, recognising other switch as a root.

I wrote one more article on RSTP (Rapid Spanning Tree Protocol). Please check the below mentioned link for the further information

Rapid Spanning Tree Protocol and Configurations - RSTP

How Root bridge Elected in the LAN switched network ?

Imagine that TTL-Bits Sw-1 and TTL-Bits Sw-2 both boot up at the same time, while TTL-Bits Sw-3 is turned off. TTL-Bits Sw-1 starts sending out BPDUs, presuming it is the root. So does TTL-Bits Sw-2. Once they both receive each other's BPDUs, TTL-Bits Sw-2 finds out that because TTL-Bits Sw-1's BID is better, it is the root switch and designated switch on the segment between TTL-Bits Sw-1 and TTL-Bits Sw-2. TTL-Bits Sw-1 finds out that TTL-Bits Sw-2's BPDU is inferior, so it is still the root. At this point, TTL-Bits Sw-2 stops sending its own BPDUs and just starts forwarding TTL-Bits Sw-1's BPDUs out all of its designated ports.
Fig 1.1- Root Bridge Election 
Few minutes later TTL-Bits Sw-3 boots up. It starts sending out its own BPDUs, claiming to be the root. TTL-Bits Sw-1 and TTL-Bits Sw-2 both compare the BPDU from TTL-Bits Sw-3 to the BPDUs stored on the ports facing it. They both find TTL-Bits Sw-3's BPDUs to be superior and thus TTL-Bits Sw-3 is the new root. Now the topology changes and TTL-Bits Sw-1 and TTL-Bits Sw-2 select their ports facing TTL-Bits Sw-3 as their root ports.

There is a bit more to the whole process, but this is it in the nutshell. The switches don't run root election every 2 seconds, they send out BPDUs (root does) every 2 seconds.
Powered by Blogger.