show spanning-tree

STP topology: root bridge, port roles and which ports are blocking.

switching

What it does

Shows which switch is root per VLAN and the role of each port. A blocking port is STP doing its job; the question is always whether it is blocking the link you intended.

Per vendor

PlatformCommand
Cisco IOSshow spanning-tree
Aruba AOS-CXshow spanning-tree
Juniper JunOSshow spanning-tree bridge
MikroTik RouterOS/interface bridge monitor

Useful variations

  • One VLANshow spanning-tree vlan 20
  • Where the root isshow spanning-tree root
  • Recent topology changesshow spanning-tree detail | include ieee|occurr

Pitfalls

The misreadings that actually cost people time.

  • If the root is a random access switch, no one set a priority — the lowest MAC address won by default.
  • Frequent topology changes usually trace to a port flapping without portfast.
  • Per-VLAN STP means the root can differ per VLAN; check the VLAN you care about.