# Interesting Spanning-Tree Question

Aug 15th, 2007

dear users,

I walked into an interesting spanning-tree issue today. I read a lot of docs about stp, but none of the articles explain the following situation:

(i have included a .vsd drawing)

Imagine you have three switches A-B-C connected in a star topology, A connects to B, B to C and C back again to A.

Link A-B = 10mbit, link B-C = 100mbit, and link C-A = 100mbit. Imagine all 3 switches have the default prio set, and A has the lowest BID, and so will become the root. Both ports on A will become designated ports.

B and C will have to discuss which ports will be root ports and which will become designated and non-designated (blocking) ports.

Because the link between A and B is 10mbps, the cost for switch B to the root is 100 (according to the new stp values). However the cost for switch B to the root via switch C will be 19+19=38. Is it the correct conclusion that switch B will block the port to switch A, the root, because of the higher cost, or are the other sides of the links from the root switch ALWAYS root ports, despite the slower link speed?

Thank you for any replies!

Greets

Attachment:

Yes, B will block its direct connection to the root. Do you have a live network that is not behaving that way, or is it just that you don't think this STP choice is logical?

Regards,

Francois

Overall Rating: 4 (2 ratings)

## Replies

Francois Tallet Wed, 08/15/2007 - 10:30

Yes, B will block its direct connection to the root. Do you have a live network that is not behaving that way, or is it just that you don't think this STP choice is logical?

Regards,

Francois

diondohmen Wed, 08/15/2007 - 10:41

Hi francois,

Yes, i really thought this wasn't logical. If i remember correctly, i read an article which mentioned that ports connected directly to the root, are root ports by default, but according to the STP mechanism would not be correct.

http://www.nikmakris.com/cisco_spanning_tree.asp

Quote:

"Step 2 : Elect Root Ports - Locate redundant paths to root bridge; block all but on root. Root Path Cost is cumulative cost of path to root bridge. Ports directly connected to Root Bridge will be root ports, otherwise lowest root path cost used"

strange...

Francois Tallet Wed, 08/15/2007 - 10:53

Very often, when guessing where STP is going to block the ports in a particular network, you assume that all the links have equal costs. If all links had equal costs, B would use its direct link to the root as a root port. Hopefully, this is not a rule (and your scenario is a simple counter-example). I say hopefully, because you want to have the ability to put the blocked ports where you want in your network.

Tuning the cost is the simplest way of enforcing a particular topology, and STP gives you maximum flexibility by allowing you to put your blocked ports anywhere (well, almost anywhere: it's impossible to block ports on a root bridge, unless you loop them back with another port on the root bridge itself).

Regards,

Francois

diondohmen Wed, 08/15/2007 - 11:39

Thanks for the clear response.

I just found out i had some old 2900 + 1900 switches laying around, so i could this setup, and it was just as we thought it would, switch B blocked it's directly connected port to the root, because of the better cost path via switch C.

Thanks again for your quick response.