Co-worker Pete Welcher recently helped a customer whose network experienced a spanning tree loop (i.e. a melt-down). Several things can be learned from thinking about the experience and how to avoid it.
Lesson #1: Adequately plan the task.
Rush jobs carry a higher risk of problems than well-planned tasks. In this case, the server operations team needed to bring up a new server for a project and decided to not wait for an access-layer switch to provide connectivity. Instead, a couple of ports on a core switch were used. Something (not sure what) was misconfigured and a spanning tree loop was created. The new server had high speed interfaces, so there was nothing that would limit the volume of forwarded traffic.
Lesson #2: Limit failure domain size.
The new server was connected to the data center core switch and the resulting forwarding loop took out the entire data center network, affecting all business operations. Implementing smaller spanning tree domains would limit the scope of potential failures, allowing unaffected business operations to continue to operate. Such separation may need to be pushed into the distribution or access layer to prevent a potential spanning tree loop from touching the core switches.
Lesson #3: Implement safety mechanisms.
Take advantage of various safety mechanisms like UDLD, loopguard, rootguard, and bpduguard to prevent the formation of STP loops. While these mechanisms help prevent the formation of loops, they are not a replacement for limiting the size of an STP domain. By limiting the size of an STP domain, you limit the number of systems affected by a failure.
Lesson #4: Don’t put servers for a single function in a single subnet.
When one broadcast domain is affected by an STP problem or by a denial-of-service attack, the backup servers should be accessible in a separate subnet, hopefully in a backup data center. Minimizing common infrastructure reduces the opportunity for complete system failure due to the failure of one or two key components. A key example is the DNS servers, which are required these days for the proper function of many applications (hopefully the apps don’t use hard-coded IP addresses).
Lesson #5: Know your STP topology
Know your STP topologyand how to quickly disconnect sections of the topology so that you can quickly identify the part of the network that contains the source of the STP loop. You can then return the rest of the network to production while you fix the cause of the STP loop.
In summary, STP loops will quickly congest a network and drive the switch CPUs to 100% utilization. Implement safety mechanisms and topologies to minimize the impact when they occur and be prepared to act quickly to diagnose them when they happen.
Re-posted with Permission
NetCraftsmen would like to acknowledge Infoblox for their permission to re-post this article which originally appeared in the Applied Infrastructure blog under http://www.infoblox.com/en/communities/blogs.html