Root Port
Cheat sheet · https://pcornel.dk/topic.php?topic=1029
Answer
A non-root bridge chooses one root port per VLAN by comparing received rapid spanning-tree information. Lowest accumulated root path cost wins; ties are broken using upstream sender Bridge ID, then sender Port ID and finally local receiving Port ID as needed. The root bridge itself has no root port for that VLAN.
Remember
One root port per VLAN on every non-root switch: lowest total cost to the root, then lowest upstream bridge ID, then lowest upstream port ID (priority.number), then lowest local port ID. Cost is added on the receiving port. Default short costs: 10 Gb = 2, 1 Gb = 4, 100 Mb = 19.
First checks
show spanning-tree vlan 10 → the port with role Root, and Cost/Port under Root ID. show spanning-tree vlan 10 interface <if> detail → designated bridge and port ID received on each uplink. show spanning-tree pathcost method → short or long costs; must match on all switches.
Commands
show spanning-tree interface <interface> detail- Inspect per-interface STP role/state, cost, port ID and guard-related evidence.
show spanning-tree vlan <vlan>show spanning-tree vlan <vlan> interface <uplink> detailshow interfaces statusshow interfaces trunk
Verify in this order
BPDUs received on each uplink → root path cost + local port cost → lowest total wins → tie: upstream bridge ID → upstream port ID → local port ID → that port is Root/FWD, other uplinks become Altn/BLK
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
| Boundary | Known-good for Root Port | Suspicious signature | Next proof |
|---|---|---|---|
| Intent | Matches root-port selection design | Configuration differs from peer/design | Compare effective config |
| Control state | Stable expected role/route/member state | the wrong uplink becoming root port, equal-cost paths breaking differently than expected, or the root port changing after cost/priority drift | Inspect protocol/RIB detail |
| Forwarding | Expected egress/Port-Channel/VLAN path | State exists but traffic path disagrees | FIB/MAC/adjacency |
| Closure | Original test passes for explained reason | Symptom merely moved or was bypassed | Regression test |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1029