Network Bytes · Episode 99 · CCNA 2.5
"STP port roles: root, designated, blocked"
After spanning tree elects a root bridge, every other switch picks one root port, every link gets one designated port, and any leftover port is blocked so no loop can form.
Why ports need jobs
Switches wired in a loop would pass broadcasts around forever. Spanning tree fixes that by keeping every link in place but switching some ports off for user traffic. It starts by electing a root bridge, the switch with the lowest bridge ID (priority first, then MAC address). Every other decision is measured from that switch.
Roads to the capital
Think of the root bridge as a capital city and the links as roads. Every switch wants one good road to the capital, every road needs one end in charge of traffic, and any road that would let traffic go round in circles gets a closed gate.
Root port and designated port
- Root port: every non-root switch picks exactly one, the port with the lowest total path cost to the root bridge. Ties go to the neighbor with the lower bridge ID, then the lower port ID.
- Designated port: every link (segment) has one, on the switch with the lowest cost to the root. It forwards frames onto that link. The root bridge sits at cost 0, so all of its ports are designated.
In a triangle of switches S1 (root), S2 and S3, S2 and S3 each have a root port toward S1, and both of S1's ports are designated. On the S2-S3 link both ends are one hop from the root, so the lower bridge ID wins and that end becomes designated.
Blocked ports
Any port that is neither root nor designated is blocked. It still receives BPDUs, so it hears what the rest of the tree is doing, but it doesn't forward user frames. If the active path fails, the blocked port moves to forwarding and takes over. Classic 802.1D calls it a non-designated port; Rapid PVST+ calls it an alternate (or backup) port in the discarding state, which is why the output shows Altn BLK:
`` S3#show spanning-tree Interface Role Sts Gi1/0/1 Root FWD Gi1/0/2 Altn BLK Gi1/0/24 Desg FWD ``
Try it yourself
In Cisco Packet Tracer, wire two switches together with two cables and leave both links up. Run show spanning-tree on each switch: find the root bridge, the root port on the other switch, and the port that shows Altn BLK. Then unplug the forwarding cable on the non-root switch and run the command again to watch the blocked port take over.
Good to know
- CCNA 2.5 covers Rapid PVST+: the root port, root bridge, other port names (designated and blocked or alternate) and port states (EP32 covers loops, EP33 the root bridge election, EP88 PortFast and BPDU Guard).
- Every non-root switch chooses exactly one root port, the lowest total path cost to the root (ties broken by the neighbor's bridge ID, then port ID).
- Every network segment has one designated port, on the switch with the lowest cost to the root; all ports on the root bridge are designated.
- The remaining ports are blocked. 802.1D calls them non-designated (blocking); Rapid PVST+ (802.1w) calls them alternate or backup ports in the discarding state, shown as "Altn BLK" (simplified to "blocked" in the short).
- A blocked port still receives BPDUs but does not forward user frames; when the active path fails it moves to forwarding (quickly in RSTP, after timers in 802.1D).
- "Roads to the capital" is the analogy.
For CCNA learners
CCNA exam topic 2.5 asks you to interpret basic Rapid PVST+ operations. Be able to look at a small topology or show spanning-tree output and name the root bridge, each root port, each designated port and the alternate (blocked) ports.
Answer to the comment question
3. Only non-root switches have a root port, and each one has exactly one. In a ring of four switches, one is the root bridge (it has no root port), so the other three switches give three root ports in total.
Test your knowledge
Quick quiz: "STP port roles: root, designated, blocked"
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- Network Academy, "Spanning Tree States and Timers": the port roles (root, designated, blocked or alternate) and how a blocked port takes over
- Cisco Meraki documentation, "Spanning Tree Protocol (STP) Overview"_Overview): root bridge, port roles and blocking to prevent loops
- Cisco, "CCNA 200-301 v1.1 exam topics": 2.5 interpret basic operations of Rapid PVST+ Spanning Tree Protocol
Video transcript
Once spanning tree picks a root bridge, what job does every other port get?
Spanning tree stops loops. First, switches elect a root bridge: the lowest bridge ID.
Think of roads to a capital city. Every port gets one of three jobs.
Each other switch picks one root port: its cheapest path toward the root bridge.
On every link, one end is designated: the end closest to the root. It forwards onto that link. All root bridge ports are designated.
Any leftover port is blocked. It listens but doesn't forward, so no loop forms. If a link fails, it can take over.
See every role with show spanning-tree.
Four switches are wired in a ring. How many root ports are there in total? Comment your answer below!
That's your byte.