Root Bridge Election in Spanning Tree Protocol - GeeksforGeeks (2024)

Last Updated : 16 Jun, 2022

Summarize

Comments

Improve

Redundant links are used to provide a backup path when one link goes down but a Redundant link can sometimes cause switching loops. The main purpose of Spanning Tree Protocol (STP) is to ensure that you do not create loops when you have redundant paths in your network.

Spanning Tree Protocol (STP) –
As IEEE STP is used to make a loop-free network by monitoring the network to track all the links and shut down the redundant ones. These are some important terms related to Spanning Tree Protocol:

  • Bridge Priority Data Unit (BPDU) – It contains the Bridge ID, Sender’s Bridge ID, Cost to the Root Bridge, Timer values on Root Bridge. All switches exchange BPDU in order to elect root bridge. The switch with the lowest Bridge ID become the root bridge.
  • Bridge ID – It is an 8-byte field that is a combination of bridge priority (2 bytes) and Base Mac address (6 bytes) of a device. If there is a tie on bridge priority then the Base Mac address is considered.
  • Bridge Priority – It is a priority, which is assigned to every switch, 32768 by default.
  • Root Bridge – The root bridge is the bridge with the lowest Bridge ID. All the decisions like which ports are the root ports (the port with the best path to the root bridge) are made from the perspective of the root bridge.
  • Path cost – A switch may encounter one or more switches in the path to the root bridge. All the paths are analyzed and the path with the lowest cost will be selected.
SpeedLink Cost
10 Mbps100
100 Mbps19
1 Gbps4
10 Gbps2

Designated port – The port which sends the best BPDU i.e ports on the root bridge will be in a forwarding state.
Root port – The port which receives the best BPDU on a non-root bridge. Criteria for selecting root port:

  1. Lowest path cost to reach the root bridge
  2. Lowest sender bridge ID
  3. Lowest sender port ID

(Port priority + Port number) – Port priority is by default 128 and port number is the switch interface number.

Election procedure –
All the switches in the network declare themselves root bridges and start exchanging their own BPDU. The BPDU with the lowest bridge ID is considered as superior. Now the switch receiving the superior BPDU makes changes in its own BPDU and carries forward to its neighbours. It changes the value of root Bridge ID with its superior BPDU bridge ID. This process goes on until all the switches are satisfied with which bridge has the lowest bridge ID and hence that switch will be declared as the root bridge.

Now according to the criteria, the root ports will be selected and then the port left will be in blocking mode.

Example –

Root Bridge Election in Spanning Tree Protocol - GeeksforGeeks (1)

Here is a small topology with three switches switch A (mac address-0000.0ACA7.A603), switch B(0030.F222.2794), and switch C(000A.41D5.7937) with all having default priority (32768).

Root Bridge election –
As all the switches have default priority therefore there is a tie on the basis of priority. Now, the switch with the lowest Mac address will become a root bridge. Here, switch A will become the root bridge as it has the lowest Mac address. Therefore, the ports of switch A will be in forwarding state i.e designated port.

Root Bridge Election in Spanning Tree Protocol - GeeksforGeeks (2)

Root Ports Election –
The root ports are selected on non-root bridges, i.e. switch B and switch C. Now, for instance, if switch C choose the path through switch B then the cost will be (4+4=8) but if it chooses the directly connected path to switch A then the cost will be 4, therefore, both switch B and switch C will choose the ports connected to switch A as their root ports.

Now, the only thing left is to find which port will be in forwarding mode and blocking mode respectively. Now as the link between switch B and switch C has the same cost as the root bridge, therefore, the switch with the lowest bridge I’d be in forwarding mode therefore switch C port will be in forwarding mode and switch B port will be in block mode.


saurabhsharma56

Root Bridge Election in Spanning Tree Protocol - GeeksforGeeks (4)

Improve

Previous Article

Working of Spanning Tree Protocol (STP)

Next Article

How Spanning Tree Protocol (STP) Select Designated Port?

Please Login to comment...

Root Bridge Election in Spanning Tree Protocol - GeeksforGeeks (2024)
Top Articles
The Top 5 IMEI Phone Tracker Apps: Which One is Right for You?
What is TRON Stake 2.0: Complete Guide
Poe T4 Aisling
Minooka Channahon Patch
Melson Funeral Services Obituaries
Odawa Hypixel
Craftsman M230 Lawn Mower Oil Change
News - Rachel Stevens at RachelStevens.com
His Lost Lycan Luna Chapter 5
Emmalangevin Fanhouse Leak
Tlc Africa Deaths 2021
Which Is A Popular Southern Hemisphere Destination Microsoft Rewards
12 Best Craigslist Apps for Android and iOS (2024)
Edible Arrangements Keller
Skylar Vox Bra Size
Bjork & Zhulkie Funeral Home Obituaries
Five Day National Weather Forecast
Conan Exiles Thrall Master Build: Best Attributes, Armor, Skills, More
Chastity Brainwash
Beebe Portal Athena
Walmart stores in 6 states no longer provide single-use bags at checkout: Which states are next?
Hocus Pocus Showtimes Near Amstar Cinema 16 - Macon
Golden Abyss - Chapter 5 - Lunar_Angel
Bridge.trihealth
Empire Visionworks The Crossings Clifton Park Photos
Melendez Imports Menu
Dark Entreaty Ffxiv
Jordan Poyer Wiki
Integer Division Matlab
Wiseloan Login
Sienna
Criterion Dryer Review
Pixel Combat Unblocked
Healthy Kaiserpermanente Org Sign On
Delta Math Login With Google
LG UN90 65" 4K Smart UHD TV - 65UN9000AUJ | LG CA
Vip Lounge Odu
Restaurants Near Calvary Cemetery
L'alternativa - co*cktail Bar On The Pier
The 50 Best Albums of 2023
Los Garroberros Menu
Www Craigslist Com Brooklyn
Vocabulary Workshop Level B Unit 13 Choosing The Right Word
Updates on removal of DePaul encampment | Press Releases | News | Newsroom
Tricia Vacanti Obituary
Levi Ackerman Tattoo Ideas
Honkai Star Rail Aha Stuffed Toy
How To Get To Ultra Space Pixelmon
Paperlessemployee/Dollartree
Booknet.com Contract Marriage 2
Used Auto Parts in Houston 77013 | LKQ Pick Your Part
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 6149

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.