Root Port
Cheat sheet · https://pcornel.dk/topic.php?topic=1019
Answer
A root port is the one port on each non-root switch with the lowest total cost to the root bridge. It forwards and points towards the root.
Remember
Lowest root path cost wins; ties are broken by the lowest neighbour bridge ID, then the lowest neighbour port priority and port number. The cost is the sum of port costs on the way to the root, counted on the receiving ports. The root bridge has no root port.
First checks
show spanning-tree vlan <id>— root ID, local bridge ID, and each port's role, state and cost.show spanning-tree root— the root bridge, root cost and root port per VLAN.show spanning-tree vlan <id> detail— BPDUs sent and received, topology changes and their source.show spanning-tree summary— mode, enabled features and port counts per state.show spanning-tree inconsistentports— ports blocked by root guard, loop guard or type inconsistency.
Commands
show spanning-tree [vlan vlan-id]- Inspect STP root, port roles and states.
show spanning-tree vlan <vlan>
Verify in this order
BPDUs received on each uplink → advertised root cost + local port cost → lowest total wins → tie-breakers if equal → root port forwards
Where it usually breaks
physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path
Root Port operational reference
| Root-port factor | Known-good interpretation | Suspicious | Next check |
|---|---|---|---|
| Root ID | Same intended root for all candidates | Candidates see different root context | BPDU/VLAN/instance scope |
| Root path cost | Intended path is superior | Unexpected manual/speed-derived cost | Interface/port-channel cost |
| Sender Bridge ID | Used when earlier factors tie | Unexpected upstream switch wins | Topology + priority |
| Port ID / priority | Final deterministic tie-breaker | Hidden local priority change | Interface STP config |
| Role/state | Root + forwarding | Inconsistent/blocking | Guard/loop/link evidence |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1019