STP

STP Toolkit Reference: Every show and debug Command You Need

Troubleshooting STP requires knowledge of dozens of show and debug commands. This article provides a reference for every relevant command in Cisco IOS XE, with annotations explaining what each output means and when to use it.
STP Toolkit Reference: Every show and debug Command You Need
In: STP

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.

Written by
More from Ping Labz
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Ping Labz.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.