cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9992
Views
38
Helpful
8
Replies

What determines STP port blocking?

To some this may be quite simple but I cant seem to find a convincing answer in Odom's ICND guide.

Basically What determines that a port enters the blocking state in a redundant switch topology using STP?

Take a basic environment of 3 switches. Switch A, B, and C. A has a link to both B and C. C and B are linked to one another. A is your root bridge. According to Odoms book the port on switch C that connects to Switch A is put in the blocking state by STP to prevent loops, but why that is Odom fails to explain. His explanation on why forwarding occurs is very good though.

If anyone can assist me on understanding this it would be very helpful. Thank you.

Keith

8 Replies 8

Kevin Dorrell
Level 10
Level 10

I don't think he is right, unless the cost of the C-A link is greater than A-B and B-C put together.

In simplistic terms, the switch will listen to BPDUs advertising paths to the root. It will hear different costs on different ports, and will go for the cheapest. That is, it will tend to block all ports that are more expensive than the cheapest.

So, getting back to the triangle .... if all the links are equal cost, then C will use the direct link to A (the root) and will block the path through B (unless B gets there first and blocks it from its end). But, if the link from C to A is very expensive, and the links A-B-C are cheaper, then C will hear a cheaper path from B, and so will block the port to A instead.

Sorry to present it simplistically, but I find it often helps, even if it is not thorough.

Kevin Dorrell

Luxembourg

Kevin,

I agree with you. Odom doesnt make a specific point about why his link from C to A is blocked. Your reply is reassuring. Thanks.

Keith

I think we have sorted it between the three of us. As I said on another posting today, finding the misprints in the CiscoPress books is part of the adventure!

I was a bit glib in my explanation about what happens on the segment between B and C, ( ... unless B gets there first ... ) and Scott's explanation is rather better - designated port and all that. I'll do that bit better next time ;-)

Kevin Dorrell

Luxembourg

We still love you Kevin! j/k You explain your topics in excellent detail. :)

Scott

:-)

It prompted me to look at Radia Perlman's book again, which has got to be a good thing.

KJD

sevans1979
Level 4
Level 4

Let me see if I can explain this without confussing you or myself.

We will use your basic environment of 3 switchs, A,B,C. Lets also say that A,B,C all are using ports 26 and 27 to connect to the other switchs. For example, Switch A port 26 connect to Switch B port 26, Switch A port 27 connects to port 27 on Switch C and Switch B port 27 connects to port 26 on Switch C. I would recommand drawing this out, I did before I replied to this post :)

First off all the switchs send out Bridge ID's (BPDU) claming to be the "root bridge". The BPDU is a combination of the switchs MAC address and its priority. Once a switch is found to be the root, all of the ports in that switch is put into forwarding state. So for are example lets say Switch A is the root switch. So all of switch A's ports are in forwarding. If you are drawing this out, you can draw a "F" next to Switch A's port 26 and port 27.

Another reason why STP buts ports into forwarding state is if a port is the root port on a switch.

Each switch has one root port, which is the port that is currently receiving the lowest cost BPDU from the root switch.

So say in our diagram, port 27 on Switch C recieves a port cost of 0 from the root switch and a cost of 200 on port 26, then port 27 is put into forwarding state and is determined as the "root port" on switch C.

Same if Switch B, say it receives a low cost on port 26 then that port is placed in forwarding state.

Then only link and ports you have left is from Switch B to C, Switch B port 27, Switch C port 26

Last decision for STP is placing a port into forwarding state if it is a destination port, or if they advertise the lowest-cost BPDU hello onto a LAN segment.

So back to the diagram, Switch B, port 27 adds the costs. Like I said earlier, port 26 on the root switch has a cost of 0, and say port 26 on Switch B had a cost of 50, then the cost of BPDU hello to port 26 on Switch C would be 50.

Say on Switch C that the cost of port 27 is 200, 200 plus the cost on the root switch, which is 0, would be 200.

Since Switch B, port 27 had the lower cost BPDU, it is placed into forwarding state and is considered the designated port on that segment.

Only port left is Switch C port 26. Since this port is not the root bridge, no a root port, nor is it a designated LAN port, it is put into blocking state.

Hope this helps! Like I said, would make it easier to go along with this if you made a diagram.

Please rate if this helps

Scott

Scott,

That does help. thank you for your reply. Odom's book gives a similar explanation except that he would have placed Port 27 on switch C in your example in the blocking state. This is why I wanted to know what the factor is for putting a port in blocking state.

I definately agree with you in thinking that STP would determine port 26 on switch C to be in the blocking state. For some reason Odom doesnt...go figure.

Keith

Yeah, basically in a nutshell, if the port is not in the root switch, if it is not a root port, or if it is not the low cost LAN Destination port, then it is put into blocking state

:)

Scott