In a typical network topology, we have redundant connections between switches. Redundant connections play a very crucial role as it eliminates the single point of failure in the network. However, redundant connections create loop in the network. And to prevent those loops in networks the Spanning Tree Protocol chooses the best link while blocking the redundant links.
Root Bridge is the most important switch in a Spanning Tree Network. And all the other switches choose the best way to reach a Root Bridge and block the redundant links. Therefore, it is very important to choose the best switch in the network as a Root Bridge.
Root is selected on the basis of a Bridge ID. So, whichever switch will have the lowest Bridge ID, that very switch will be selected as a Root Bridge. Basically, Bridge ID is made up of a priority number and the MAC Address. And by default, all switches have the same priority number – 32768 to be precise – so the Spanning Tree relies on a MAC address for the selection of Root Bridge. But the problem is that by default any switch which has the lowest Bridge ID can be automatically selected as a Root Bridge. And if that switch is slow then it will slow down the entire network because its network traffic will pass through that switch. Hence, it is very important that every Spanning Tree Network has the best Switch as a root.
By default, the Spanning Tree is enabled on the switches so if we create a redundant connection on switches then the Spanning Tree Protocol will automatically come into action to prevent a loop in the network. Therefore, for maximum optimization it is very important to select the right switch as a Root Bridge.
We cannot however, change the MAC address of a switch so we will have to change the priority number of switches to influence the selection of a Root Bridge.
In this lab, we will try changing the priority of a switch to be able to select the switch of our choice as a Root Bridge. Root Bridge is selected as per the VLAN number so we have to mention that for which VLAN, the switch is a root. We will also enable a newer version of the Spanning Tree which is a Rapid Spanning Tree.
Spanning tree protocol configuration in packet tracer.
1. Select switch 1 as a root bridge
2. Enable rapid spanning tree protocol
Switch(config)#spanning-tree vlan 1 priority 0
Switch(config)#spanning-tree vlan 1 root primary
Switch(config)#spanning-tree mode rapid-pvst