Essential STP Show Commands Quick Reference
This article is a comprehensive reference for STP show and debug commands. Each section includes:
- Command syntax
- Sample output from real deployments
- Interpretation of each field
- When and why to use the command
- Troubleshooting tips
show spanning-tree [vlan VLAN-ID]
Basic STP status for a VLAN. Shows root bridge, this switch's bridge ID, and all port roles/statuses.
Usage: First command to run on any switch to understand its STP position.
show spanning-tree summary
Compact summary of all VLANs and STP mode. Shows which VLANs have this switch as root, global PortFast and BPDU Guard settings.
Usage: Quick check of global STP configuration.
show spanning-tree root
Roots bridge ID and path cost for each VLAN. Cost 0 means this switch is root.
Usage: Verify intended root bridge is in place.
show spanning-tree interface Gi1/0/1 [detail]
Detailed STP state for a specific port: role, status, cost, timers, BPDU counts, guard status.
Usage: Investigate unexpected port behavior.
show spanning-tree inconsistentports
Ports blocked by Root Guard or Loop Guard. Shows why port is blocked (Root/Loop Inconsistent).
Usage: When a port suddenly stops forwarding.
debug spanning-tree events
Log all STP topology changes, BPDU receptions, port transitions in real time.
Usage: Watch convergence during link changes or troubleshoot topology instability.
debug spanning-tree bpdu
Log every BPDU sent/received. Verbose - shows raw BPDU details.
Usage: Deep diagnosis of silent link failures or erratic topology calculations.
Related STP Articles
- Troubleshooting STP Loops and Broadcast Storms on Cisco Switches
- Troubleshooting STP Root Bridge Issues: Wrong Root, Unexpected Topology Changes
- Troubleshooting STP Convergence Problems and Slow Failover
- Troubleshooting Errdisable and STP Guard Features
- STP Configuration Checklist: Hardening Spanning Tree Before Go-Live