Cisco "show spanning-tree" Command Explained
show spanning-tree — shows STP status per VLAN — who the root bridge is, this switch's role, and each port's state — the loop-prevention picture. Runs in privileged EXEC mode.
Syntax and common variants
| Variant | Purpose |
|---|---|
show spanning-tree | All VLAN instances |
show spanning-tree vlan 10 | One VLAN |
show spanning-tree root | Root bridge summary per VLAN |
show spanning-tree interface gi0/1 | One port's role/state |
Reading the output
| Output field | Meaning |
|---|---|
Root ID | The root bridge (priority + MAC). “This bridge is the root” if it's you |
Bridge ID | This switch's priority + MAC |
Role | Root / Desg / Altn (blocked backup) |
STS | FWD forwarding or BLK blocking |
Cost | Path cost toward root |
When to use it
Answers the two questions that matter: is the RIGHT switch root (core, not a random access switch), and which ports are blocking (your redundancy standing by). During loop hunts, port roles and sudden topology-change counts tell the story. Browse more in the command reference or practise in the free labs.
Frequently asked questions
How do I know which switch is root?
show spanning-tree root — or look for “This bridge is the root” in a VLAN's output. Lowest bridge ID (priority+MAC) wins.
Is a blocking port a problem?
No — it's the design working: a redundant link held in reserve to prevent loops, ready to forward on failure.
How do I force a switch to be root?
Lower its priority: spanning-tree vlan 10 priority 4096 (or use the root primary macro).
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.