Score:0

Spanning Tree Protocol: How are ports selected to be designated or non-designated?

tc flag

I have read a lot about STP now. Perhaps not enough yet, but it starts to get difficult to get details.

I have understood the mechanism how all bridges select their root port. After having exchanged enough BPDUs containing information about potential root bridges, the information about the real root bridge will have seeped through the network providing each bridge with path cost information to the root bridge. Each bridge will then set their root port to the one with the least path cost. But that alone does nothing to prevent a loop. Of all its other ports the bridge has to set some to designated and some to non-designated role. The latter ones will stay blocked while the designated ones will eventually be switched to forwarding mode.

I do not understand, how the differentiation is done between designated and non-designated ports. In my opinion there must be some information about the different direction. Let's say bridge A is rather far from the root bridge and bridge B is a peer to A. At some point bridge A has to tell bridge B: "hey, my root port now points to you, so you have to make the opposing port of yours a designated one."

But I did not find any reference and as far as I can see there's no information in a BPDU regarding this issue. However there must be a mechanism, but I can't see it yet.

Edit

To make it more concise: On a network segment there can be many ports of many bridges attached. Per bridge attached to this segment there may be 0 or 1 port a root port. And as soon as one single root port is attached to this segment exactly one port of another bridge has to be turned into a designated port. I understood that very well, however I felt I had to write it more clearly.

My question is still: How is determined which port on that segment will be turned into a designated port? What part of the STP algorithm is making this decision and how?

Edit

enter image description here

I added a sample picture to make the problem once more visible. Let's say there's a segment where the two switches A and G in the upper half have each a minimal path cost on their ports pointing up. Hence their interfaces to the segment under inspection can only be designated or non-designated. We have one or more other switches below which have a port on the network they chose as root port.

I have understood that the switches below including B send BPDUs which make clear, that there is at least one root port attached to the segment. This makes clear that exactly one designated port is needed to satisfy the root ports of B and the others with connectivity. However, as BPDUs are multicast, there is no such thing as a "link partner". How do A and G know which one has to make its port designated or non-designated?

Score:1
ru flag

Essentially, a port is designated when it is a root port on the other side (for an STP bridge) or an edge port (end node, no STP bridge).

802.1Q clause 13.4 says

A Port Role (13.12) of Root Port is assigned to the one port on each Bridge that provides that lowest cost path to the Root Bridge, and a Port Role of Designated Port to the one Bridge Port that provides the lowest cost path from the attached LAN to the Root Bridge.

[edit] While all ports nowadays use full-duplex mode (half-duplex mode only exists up to 100 Mbit/s), you are asking about shared-media links. Well, that's where the point-to-point status of a port comes into play. Full-duplex links are considered point-to-point (see 802.1Q clause 13.4) and my simplified statement root port or edge node on the other side applies.

Shared-media links use the more universal rule from the IEEE 802.1Q quote above: if any STP bridge on that collision domain chooses the port in question as its root path, the local port becomes designated. Note that other STP bridges on the same segment would either choose the same bridge for providing their root path or use another, lower-cost port towards the bridge.

Ariser avatar
tc flag
I know that, and it doesn't answer my question. How does a bridge B get to know, that another bridge A connected to it via a network segment has its port connected to that network segment turned into a root port?
Zac67 avatar
ru flag
STP bridges exchange BPDUs and the port role is marked in a BPDU.
Ariser avatar
tc flag
Ok, I slowly get an idea. I have to think about it. Your comment is close to an answer.
Zac67 avatar
ru flag
I don't see where your problem lies, sorry. When the link partner signals its port is its root port, the port becomes designated. It also becomes designated when no BPDUs were received (edge port) after a timeout.
Ariser avatar
tc flag
That may be an easy answer for microsegmented environments but STP should AFAIK work as well, when it's not mircosegmented, e.g. when there's a yellow cable with many bridge ports attached to it.
Ariser avatar
tc flag
Now it makes sense to me. Schöne Grüße aus Rostock.
Zac67 avatar
ru flag
Moin moin aus Franken. ;-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.