Switching on a LAN provides some of the most basic network connectivity options, and are often overlooked. Nonetheless most switches (Cisco, HP, Dell and others) support these configurations, but one thing I can guarantee is that you will find limitations on pretty much every platform. If you’re after inter-operability, do your testing so you can understand these limitations.
Spanning Tree Protocol
I discussed STP in an earlier article, but I would like to go into a little more detail here.
Spanning Tree Protocol can help us design fault-tolerant networks in two ways; primarily by detecting and disabling port misconfigurations, and secondly by allowing administrators to build failover network links.
STP is a complicated protocol, and it comes with a suite of different applications that can help fine-tune the system. I highly recommend a network engineer studies the Cisco documentation on STP, and then builds a lab environment before deploying.
I also recommend Cisco’s STP Problems and Design Considerations document. It just might help identify why things are happening the way they are.
Loops in Layer 2 networks are very, very bad. The layer 2 header has no time-to-live value, so a looped frame can continue to loop forever. Add in some broadcast traffic and you have a recipe for disaster, Cisco calls it LAN meltdown.
A key element of STP is that it prevents loops — STP is designed to detect and resolve Layer 2 loops. It is not enough to run STP on the core switches of a network (although it helps), to fully protect a LAN all switches must be able to run STP.
If you configure two switches with two network connections, STP will detect the loop and block one of the ports. There are calculations that help STP decide which interface to block, but that is for a more technical review of STP.
In the example on the left, I’ve configured two switches to use two links between them. As long as the configuration stays simple; this would actually work with a STP capable switch and a dumb switch or even a hub.
STP detects the second link and blocks the port. The calculation of which port to block is determined by an algorithm based on a interface speeds. This is customizable, so you can make sure that STP opens and fails predictably.
If something happens to the active interface, STP detects this change and stops passing traffic so it can recalculate the topology. Once it is complete things look as they do on the left.
Here STP detected a failure on the active interface, and opened the secondary connection.
STP doesn’t depend on physical failures to detect network changes — each switch is constantly sending out Hello frames to the root switch. If any switch on the network is disconnected from the root switch for 3 Hello frames the entire network stops and recalculates the topology.
When designing a network, you must always consider the complexity if your design and the requirements of your client. Sometimes for a client without a network savvy administrator to maintain the network, relying on STP for redundancy is a bad idea; and there are other options.