So let us talk about spanning tree protocol states of the different ports. So first is Disabled and this is when a port is shut down. The second one is Blocking and for example when spanning tree has decided that this particular port is going to be put in the Blocking state. So in this state it is not forwarding frames but it still receives BPDUs so it's able to calculate spanning tree. Listening, it's not for adding frames but it's sending and receiving BPDUs. Learning, you're not forwarding frames, you are sending and receiving BPDUs but you're learning new MAC addresses. And then for Forwarding is full um operations you're forwarding frames you're sending and receiving BPDUs and you're learning new mac addresses at the same time so the spanning tree topology will change under certain conditions for example a new switch is introduced it could end up being the root bridge um or switch fails or a link fails or a link that failed comes back online or a new link is introduced so now let us look at root bridge placement using default stp parameters might result in an undesired situation in that traffic will flow in non-optical ways or an unstable or slow switch might become your root bridge so you need to plan your assignment of breed priorities carefully and let us look at an example we have four switches in this network your distribution switches are switches b and d at the top and on bridge switch d you have a link out to your core router and then switch a and switch c are your edge switches or your access switches and this is where you connect n nodes which are the ones in blue the bridge ids are given in the diagram the priorities are the defaults and the mac address is what is going to pick what the root bridge is in terms of links switch c and switch a both have links to both b and d and switch b and d of course are also interconnected with a cable but because of the mac addresses switch a has been picked as a root bridge so the links which have dotted lines are on ports which have been set to blocking state so the only active links are the bold ones so if you have a node in switch c sending a packet out to the router it's going to bounce to switch b then bounce down to switch a then up to switch d and then out through the port that's going to the router what you'd want instead is to set the priorities and these are some examples so instead of the default 32768 you set the bridge priorities for your distribution switches to 102.08 for switch d or 12k on 16k 16384 for switch b so that switch b is your alternate route and your route bridge is switch d it even allows you to have a second link to the qual router on switch b in case switch d fails but if we look at that packet that comes from switch c going out to the router now because switch d is there is the root bridge the packet will go straight to switch d and out into the core the dotted lines would be the disabled the ports the the links which have ports that are put inside a disabled state so to protect the spanning tree topology some vendors have included extra features and you can investigate turning them on for example root guard which will tell the switch that the route can be on particular ports and not on other ports ppdu card is where the switch will drop bpdus that it receives on certain ports loop guard is a way to detect and it works together with udld it's a way to detect an error where a port is up but it's not receiving bpdus so a port that is in the blocking state is it can it can sense that there is a link so the link is active but it is not receiving BPDUs so ideally without loop guard it would assume that the switch on the other side is dead and it moves to forwarding and it could potentially create a loop so loopcat prevents that UDLD which is also implemented in ethernet om is a way if you have for example fiber links and the links usually come with two pairs one for transmit one for receive and it's possible for a problem to happen on just one pair so you have an error in one direction so either it's the transmit is working and the receive is down or the receiver is working and the transmitter is down so your dld will detect this and it will not attempt to move a pot from blocking to forwarding and there are others.

© 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.