So this is going to be a demonstration of spanning tree and how it breaks loops. So right here I have a Cisco switch, Cisco sbs switch sg300 and I have plugged into it my laptop which you can see just here on the screen and it has an ip address and it's configured just basically and i shall be using a wireless keyboard to connect to my laptop which is seated off camera to the right. This is a normal Cat5 ethernet cable just a normal ethernet cable which i shall leave plugged into one of the ports of this switch and then we shall see how spanning tree will help us deal with the issues of loops so first if we look at the laptop i will start by logging into the switch and if i can get the username and password right i'm logged into the switch right now and on a different window this one i'm just going to run tcp dump tcp dump is a packet capture tool it will allow us to see the different packets that it sees on the interface en7 is my ethernet interface and this is the one that goes out into this cable so i'll start tcp dump and as you can see on the screen you have some rapid spanning tree messages by default this switch comes with rapid spanning tree enabled and if i on the window on the top right if you just look at that window if i now start a ping to some address which doesn't exist on the left you will see some packets including erp packets and nothing happens because it can't find no one responds because that ip address does not exist the only two ip addresses on this network but in terms of packets forwarding it happens at a normal rate if i connect this cable and create a loop by just plugging it into the switch like if i can see what i'm doing connect this cable and create a loop like this the link comes up it will take 30 seconds spanning tree still continues doing whatever it's doing and you can see here inside the window you can see that there's a message that the link g5 is up but then that is it and if i try pinging again for this non-existent ip i have a few packets which are going around some spanning tree but nothing serious and you can notice that it says that g5 had a forwarding status and then it was dropped after that for spanning tree um so g5 is hard to see but this is g5 this one g6 is this one um it's still in blocking state it's only g5 which is forwarding g6 is um blocked and this breaks the the the the loop so i will stop the ping so that we don't have arp packets and then inside my configuration window and you can notice that each time i type there's a lot of tcp packets inside the tcp dump window and this shows us the it's also capturing the tcp ssh packets um that i'm using so i'm just going to enter configuration mode and then i'm going to say no spanning tree okay and this will turn off spanning tree and at this point if i exit or if i i still have connectivity to the switch but remember spanning tree is off right now but we do not have any broadcast packets on the network yet so there is no problem yet we do have a loop so if i come to this window and again try to ping that very same ip you'll notice that there's lots of arp packets and that's what we call the broadcast storm because these packets are being repeated and repeated and repeated and on this window which has the console if i try now to log in to turn off i can't really log in because it's using all the cpu resources so i can't ssh to the switch and i can't change the spanning tree status for machines that do this you have to come and find where it is and physically remove the cable and as you can see the arp flood has stopped and if i put the cable back in in any port doesn't have to be the same port instantly in a short amount of time as soon as the arp packet comes in you will get another loop it will take maybe 30 seconds for this to come online because they don't have podfast enabled and there we go we have the loop so when i take this out then i will be able to log into the switch I can enter configuration mode and then i can just say spanning tree and that will turn on spanning tree one of the side effects of doing this is it usually kills it kills your ssh session because the port will change status remember that we still have that ping session going up inside the window and if i create a new loop again any port maybe the first one that we used this loop here you do not see a flood of packets inside the left window so this is just a small demonstration of spanning tree on your network now if you connect a switch like this to other switches then you also get like a broadcast storm on those switches. So on your network even though you've enabled spawning tree if there's a switch which does not have spanning tree and it has a loop inside that switch and it creates a broadcast storm that storm will affect your switches which have spanning tree enabled so you need to look at the other features that we talked about including loop guard into there's also a broadcast storm protection that you can turn on on edge ports so that if somebody plugs in something that does not do spanning tree and creates a loop that those broadcast storms that the device itself is creating don't try um go all the way through your network. Thank you.
© 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.