STP Root & Port Election Deep Reference
Cheat sheet · https://pcornel.dk/topic.php?topic=233
Answer
Spanning tree runs three elections: one root bridge, one root port on every other switch, one designated port on every link. Each compares the same values in the same order — lowest wins — and a port that wins none is blocked.
Remember
Root: lowest priority, then lowest MAC address. Root port: lowest path cost, then the neighbour's bridge ID, then the neighbour's port ID. To pick between two parallel links, port priority must be set on the switch nearer the root.
First checks
show spanning-tree vlan <id>— root ID, own bridge ID, root port and cost, and each port's role, cost and port ID.show spanning-tree root— the same summary for all VLANs.show spanning-tree vlan <id> detail— the designated bridge and port heard on each port.
Commands
show spanning-tree rootshow spanning-tree blockedports
Verify in this order
bridge priorities set on root and backup root → lowest bridge ID becomes root → each switch: lowest root path cost → tie: neighbour bridge ID → tie: neighbour port ID → one designated port per link → the rest blocked
Where it usually breaks
physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=233