Spanning Tree Protocol (STP) would be used to make a loop-free network by monitoring the network to track all the links as well as shut down the least redundant ones. The root bridge is a switch in a single VLAN or whole topology (according to the type of STP standard used) which is responsible for distributing BPDUs and block the least redundant port.
Election procedure (the root bridge)
All the switches in the network declare themselves as the root bridge and start exchanging their own BPDUs. The BPDU with the lowest bridge I’d be considered as superior. Now the switch receiving the superior BPDU make changes in its own BPDU and carry forward to its neighbor switches. It changes the value of root Bridge Id with its superior BPDU Bridge Id. This process would be going on until all the switches are satisfied with which bridge would be having the lowest bridge I’d and hence that switch will be declared as the root bridge.
Types of Spanning Tree Protocol (STP) –
- 802.1D – This is also known as CST (Common Spanning Tree). It is a spanning tree standard developed by IEEE which elects only one root bridge per the whole topology. All the traffic flows over the same path, which is also the best path to the root bridge, but this doesn’t hold good always as there can be scenarios in which the optimized path to reach a VLAN is different than the path obtained on electing the root bridge. It is very slow as it would take only 32 seconds to converge.
- Less CPU and memory required.
- Lesser optimization as the path calculated as the best cost to root bridge might not be the best path to reach a network.
- No load balancing.
- Per VLAN Spanning Tree + (PVST+) – It is a spanning tree standard developed by Cisco for its devices which finds the root bridge per VLAN. It is a Cisco default version of STP. It would be finding separate 802.1d spanning-tree instance for each VLAN. It also provides backward comparability with 802.1d or CST. This is more optimized to the IEEE because it provides optimal path selection as a separate instance of STP per VLAN is find. This is as slow as CST.
- PVST+ provides more optimization on the performance of a network than CST as it selects root bridges per VLAN.
- Bandwidth consumption is lesser than CST.
- Optimum load balancing is achieved.
- This is slow as CST i.e. convergence time is going to be slow. By default, Cisco switches would be taking about 50 seconds for converging.
- More resources, CPU and memory, are required.
- 802.1w – Rapid Spanning Tree Protocol (RSTP) – It is considered as a spanning standard which would be developed by IEEE that provides faster convergence than CST but holds the similar idea of finding a single root bridge in the topology. The bridge resources are required in RSTP is quite higher than CST but lesser than PVST+.
- Rapid Per VLAN Spanning Tree + (RPVST+) –This Spanning Tree standard is developed by Cisco which provides faster convergence than PVST+ and finds a separate instance of 802.1w per VLAN. It would be requiring much more CPU and memory than other STP standards.
- 802.1s (Multiple Spanning Tree): -This standard is developed by IEEE in which grouping of VLANs is done and for every single group, RSTP is run. This is basically considered to be a Spanning Tree Protocol running over another Spanning Tree Protocol.
- High redundancy
- load balancing can be achieved.
- lower CPU and memory usage is required
- More configuration would be required not it is not easy to implement.