Command Reference

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

VariantPurpose
show spanning-treeAll VLAN instances
show spanning-tree vlan 10One VLAN
show spanning-tree rootRoot bridge summary per VLAN
show spanning-tree interface gi0/1One port's role/state

Reading the output

Output fieldMeaning
Root IDThe root bridge (priority + MAC). “This bridge is the root” if it's you
Bridge IDThis switch's priority + MAC
RoleRoot / Desg / Altn (blocked backup)
STSFWD forwarding or BLK blocking
CostPath 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).

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.