Quick question: Lets say I have two switches connected together with two links (equal cost). How does STP deside which link to block? I've heard that it comes down to whichever port is lowest... but is that on the Root bridge side? Or the other switches side?
I'm still learning this myself so with that caveat in mind here's my thinking...
In the configuration you describe you are right that if all else is equal then the it comes down to the port number to decide which port to put in blocking mode. In line with the 'lowest wins' concept it is the highest port which gets blocked.
As to which side this occurs on remember that a key aspect of a root bridge is that by definition all of its ports are always in forwarding mode and hence it is down to the non-root bridge to block its highest port(s).
P.S. I've just noticed my thinking is completely out of phase with Conwyn's so I'd seek a third opinion if I were you!
I too think that the decision would be made on the non-root switch. I'm not sure if the algorithm for selecting the port to block is specified in the standard or if that is left up to vendors. Really the root switch just sources BPDU's.
I have two switches with two cross overcables. What every I do the non-root switch always forwards to the lowest port on the root. I seem to remember that port priority also comes from the other end as well.
Assuming all equal costs, the port on the non root bridge that is connected to the highest port on the root bridge will go into blocking.
I've just tried it myself and am seeing the same as Conwyn - the forwarding port selection on the non-root bridge is dictated by the lowest port number on the root bridge if all other parameters are equal.
Can anyone cite an unambiguous authoritive reference for this? I'm only keen to find out for certain as this behaviour does not align with how I've been taught (although perhaps it's merely a case of ambiguity that explains the difference rather than a fundamental disagreement).
Mike, you just know that if we don't get to the bottom of this then it'll be on the exam for sure!!
Just in case we might be talking at cross purposes, I've set the following up which echoes Mike's hypothetical situation:
As you can see, port Fa0/1 on the non-root switch has gone in to blocking mode.
Why is this? I had been taught that in situations like this, with all other factors equal, it is the lowest port number that would win the tie when selecting which parallel port to put into forwarding mode... I understood this to mean that the lowest port number on the switch that is making the decision but it would appear that the non-root switch is actually electing to use the lower port number of the root switch (presumably learnt from the BDPUs) to settle the tie.
P.S. Sorry if the picture appears out of whack - it doesn't appear like that when composing the post! (come on CLN - why is the forum software so borked?!)
Correct it is the lowest port number FA0/1 on the other end (the root). As I said port priority has similar logic.
I would be curious to see a link to the other thread where this was discussed. Conwyn's first post stated, "The root is in charge and he will pick his lowest choice." In his second post he stated, "What every I do the non-root switch always forwards to the lowest port on the root." When I read the second post, I interpreted that to mean it used the lowest port to get to the root. That is my error, as I can see that he says it always forwards to the lowest port on the root. I think the non-root switch would block one port and forward on the other one.
If this is true, it could make for an interesting trivia or test question, but doesn't really matter. I thought the cost should come from the port that received the BPDU. If these were equal, I didn't know if it is a vendor specific or a standard for selection. With additional switches, it wouldn't matter which port this first hop uses. As far as selection, I think the IEEE's equivalent of an RFC is not free. I do not have ready access to see if that is a standard. If it is a standard, it may be found in Radia Perlman's book (Interconnections).
I have done a little bit of research on this now.
So here were my questions, and the answers that I believe are correct.
Which switch would have a port that goes into blocking mode? I think this would the non-root switch. The root bridge should be in forwarding mode on all ports.
Which switch controls this? I think the non-root makes the decision, however I think the decision is made from information in the BPDU it receives. I think it would first decide based on the cost but in the event of a tie I'm guessing a little more has to be looked at. The BPDU has a PortID field which probably explains the behavior Conwyn is seeing.
When is the path cost incremented? I thought this was incremented as the BPDU was received, but it actually looks like this is incremented as it leaves a bridge based on the port configuration.
The URL Below has a sample BPDU format.
The Next URL explains in a different context how to determine if a BPDU is superior.
A BPDU is superior if
A lower Root Bridge ID. A lower path cost to the Root. A lower Sending Bridge ID. A lower Sending Port ID.
A lower Root Bridge ID.
A lower path cost to the Root.
A lower Sending Bridge ID.
A lower Sending Port ID.
That's good reading. I think I understand much better.
On another note, the url has the "http" on it twice. I don't know if that is a bug on the new site, or just how it happened to be pasted in. It looks fine, but when you click it you get nothing.
The root switch forwards on all ports. It does not choose who blocks which port. It may influence it (via priority) or lowest interface number, but it does not "make" the decision. The non-root switch makes the decision based on information it has gathered (via BPDUs).