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!
Solved! Go to Solution.
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.
Check this page:
"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"
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).
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.