Network loop can create a huge problem in a network. Routing protocols such as RIP and IGRP have their own techniques to stop network loops from occurring at the Network layer of the OSI model. Unfortunately, they (routing protocols) cannot be used to stop loops from occurring at the Data Link layer of the OSI model. If you have a network based on layer 2 switches and if the switches are interconnected using the redundant links, your network may suffer from the switching loops (network loops). But there is a protocol called Spanning-Tree Protocol (STP) that is used to stop switching loops in a layer 2 switched network.
STP helps to avoid the switching loops. It discovers all links in the network and shut down any redundant ones in order to prevent the network loops. STP elects a Root Bridge (switch) on the network through which it passes all the network traffic. The switch with the lowest MAC address becomes the root bridge if the priority of all the switches is set as default, which is 32678 plus number of VLANs. However, you can change the priority value of a switch to forcefully make it as a root bridge. The lower value means higher preference in the root bridge election. [Read more…]