Under 802.1D, two switches share two equal-cost parallel links; which downstream port becomes root port, and which port priority setting changes it?
answer
- both BPDUs come from one bridge
- the third tie-breaker
- whose port ID counts
- change it upstream, not downstream
basics
~20 sThe downstream switch's root port is the one hearing the upstream switch's lower port ID, because sender port ID breaks the tie; so port priority must be lowered on the upstream switch's port, not the downstream one.
solid answer
~50 sUnder IEEE 802.1D, downstream bridge B receives two BPDUs with the same root path cost and the same sender bridge ID, because both come from upstream bridge A. The next tie-breaker is the **sender's port ID**: A's port priority (128 by the IEEE's default), then A's port number. So B's root port is whichever of its ports is cabled to A's lower port ID, whatever B's own numbering; B's other port blocks, and both of A's ports stay designated. To move traffic to the other link, lower the port priority on **A's** port for that link — for example to 112, a legal value under 802.1t's steps of 16 — or raise the path cost on B's currently preferred port. Changing B's own port priority does nothing: B's port ID is only the last tie-breaker, used when two B ports hear the same sender port.
go deeper
Recall that two links between the same switches cannot both forward under 802.1D, and that a tie-breaker leaves one blocked.
Explain the full tie-breaker order and why the sender's port ID, not the receiver's, decides between parallel links.
Choose the right knob on the right switch — upstream port priority or downstream path cost — and predict the outcome before you change it.
Judge whether parallel links should be steered by spanning-tree knobs at all, or bundled so both carry traffic.
## The setup Bridge A sits nearer the root (it may be the root itself). Bridge B hangs below it on two parallel 1 Gb/s links, cabled crosswise on purpose: | Link | A's port | B's port | Path cost at B's port | |---|---|---|---| | Link 1 | A port 1 (port ID 128.1) | B port 2 | 20,000 | | Link 2 | A port 2 (port ID 128.2) | B port 1 | 20,000 | Both links are equal, so B hears two configuration BPDUs that agree on almost everything. ## Walking the tie-breakers IEEE 802.1D picks B's root port by comparing, in order, lowest first: 1. **Root path cost** — A's advertised cost plus 20,000 on either B port: a tie. 2. **Sender bridge ID** — both BPDUs come from A: a tie. 3. **Sender port ID** — 128.1 through B port 2 against 128.2 through B port 1: **B port 2 wins**. 4. **Receiving port ID** — never reached. So B port 2 is the root port and B port 1 blocks, even though B port 1 has the lower number. A's two ports are both designated, because A advertises the lower root path cost on both links. ## What a port ID is - **802.1D-1998:** two octets, the first carrying the port priority and the second the port number; RFC 4188 describes `dot1dStpPortPriority` as the value of that first octet, 0–255. - **802.1t and the rapid protocol:** the priority shrinks to the high four bits and the port number gets twelve; RFC 4188 states the permissible priorities as 0–240 in steps of 16. - The default priority, 128, is the IEEE's. With equal priorities the port number decides. ## Which knob works | Change | Where | Effect on B's root port | |---|---|---| | Lower port priority to 112 on A port 2 | upstream | moves to B port 1: sender port ID 112.2 beats 128.1 | | Lower port priority on B port 1 | downstream | none: step 3 decides before step 4 | | Raise path cost on B port 2 | downstream | moves to B port 1: step 1 now differs | | Raise path cost on A port 1 | upstream | none: costs are added on receiving ports, and A's advertisement excludes its own sending port | | Lower A's bridge priority | upstream | none on this tie: both BPDUs carry the same sender bridge ID | The port priority knob belongs to the **sender**, and the path cost knob to the **receiver**. Interviewers like the crosswise cabling because it separates the two. ## Why the sender's port ID decides The comparison B makes is not "which of my ports is best" but "which designated port upstream should I hang from". Each BPDU describes the port that sent it: the root it believes in, its bridge's root path cost, its bridge ID and its own port ID. B ranks those advertisements, adds its own receiving cost, and takes the best. Its own port ID enters only when two of its ports hear the very same upstream port, which happens on a shared segment, not on two point-to-point links. That is why the knob for steering B sits on A. ## Why one link stays idle Two forwarding links between the same two bridges form a loop: a broadcast leaving A on link 1 would come back on link 2. 802.1D therefore leaves one of them blocked. To use both, the links have to be bundled into one logical link that the spanning tree sees as a single port — link aggregation, a different mechanism. ## Common slips - "The lowest-numbered local port becomes root port": true only when the cabling happens to line up with the sender's numbering. - Tuning port priority on the downstream bridge and seeing nothing change. - Reaching for bridge priority, which moves the root election, not this tie. - Expecting the parallel links to share load under 802.1D.
- If the same two links are cabled straight through (A port 1 to B port 1), which 802.1D root port does B pick?B port 1, because it hears A's port ID 128.1. The rule has not changed — the sender's port ID still decides — but now the result looks like 'B's lowest port wins', which is why the crosswise cabling is the better test of whether someone knows the rule.
- Why can't 802.1D simply let both parallel links forward?Two forwarding links between the same pair of bridges are a loop: a broadcast sent by A on one link arrives at B and is flooded back to A on the other, with no hop limit to stop it. 802.1D keeps one root port and blocks the other. Using both requires bundling them into one logical link that the spanning tree treats as a single port.
saying these in an interview costs you the question
- The downstream switch's lowest-numbered port always becomes its root port.
- Lowering port priority on the downstream switch moves its root port.
- Bridge priority decides between two links to the same neighbour.
- Both parallel links forward and share the load under 802.1D.
- Raising the path cost on the upstream port shifts the downstream root port.