This is a presentation on Layer 2 engineering, Spanning Tree from the Campus Network Design and Operations workshop. Let us start by looking at the switching loop in this diagram. We have three switches: switch A, switch B and switch C. So there's a loop. There are multiple ways to go around this this ring so the question is knowing what you know about how switching works, when there's more than one path between two switches, what are the potential problems? Let's look at a couple. If there's more than one path between two switches, the first problem is your forwarding tables are going to become unstable. So remember switches work by recording which port they saw a source MAC address coming from. So that if they see a packet going to that destination they know which port to send it out through. But if you have a loop then a particular packet from a particular source could come from more than one port and then the switch has to keep updating its MAC address table. And if there are lots of devices then the switch is spending a lot of time updating MAC address tables. Secondly is switches will broadcast each other's broadcasts and this can quickly utilize all the available bandwidth. And also the switch processors cannot handle the load in cases where the switch processor is also the main processor for control. It means that you cannot even log into the switch to shut it down or shut down the port. Let us look at a detailed example of how this broadcast storm works. So in this diagram we have three switches: switch A, switch B and switch C. Node 1 is connected to switch C at the bottom and it sends a broadcast packet, for example an arp request, because it's a broadcast packet meaning the destination mark address is all Fs. Switch C is going to broadcast the node once frame out of every port except the one it received it on where node one is when switch A and switch B each receive this broadcast they are going to send it to each other. Then when switch A and switch B receive the broadcast that they each sent to each other they are now going to send it down to switch C. Switch C receives both broadcasts from switch A and switch B and sends two copies down to node 1 and then a copy of switch A to switch B and a copy of switch B to switch A. So now we have two sets of packets going round. When switch A and switch B receive these two copies they both send it to each other and this goes on and on and on. So this broadcast keeps going round and round and round and each time the number of packets increases. So this is now creating an infinite loop of broadcast which is what we call a broadcast storm and it will eat up all the available bandwidth on all the links between these switches. The thing is though you can take advantages of loops within your network so they're good switching loops. Now when you have more than one path it means you have some redundancy and this improves resilience when either a switch fails or the wiring breaks. For example maybe the cable gets cut if it's fiber. So the question is: ow do I achieve redundancy without creating dangerous traffic loops? And the answer of course is this presentations topic and that is Spanning Tree.

© Produced by Philip Smith and the Network Startup Resource Center, through the University of Oregon.

Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
This is a human-readable summary of (and not a substitute for) the license. Disclaimer. You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.