Spanning TreePrivileged EXEC

show spanning-tree detail

Displays detailed Spanning Tree Protocol (STP) information for all VLANs or a specific VLAN, including port roles, states, timers, and bridge IDs, used for troubleshooting STP convergence and topology changes.

Syntax·Privileged EXEC
show spanning-tree detail

When to Use This Command

  • Verify the root bridge and port roles after a network change to ensure proper STP convergence.
  • Troubleshoot a loop or connectivity issue by checking port states (e.g., blocking vs forwarding) and timers.
  • Monitor topology change notifications (TCNs) to identify flapping links or unstable STP topology.
  • Audit STP parameters like bridge priority, hello time, and max age for compliance with network design.

Command Examples

Show spanning-tree detail for all VLANs

show spanning-tree detail
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0011.2233.4455
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     0011.2233.4455
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/0            Desg FWD 4         128.1    P2p
Gi0/1            Desg FWD 4         128.2    P2p
Gi0/2            Desg FWD 4         128.3    P2p
Gi0/3            Desg FWD 4         128.4    P2p

VLAN0002
  Spanning tree enabled protocol ieee
  Root ID    Priority    32770
             Address     0011.2233.4455
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32770  (priority 32768 sys-id-ext 2)
             Address     0011.2233.4455
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/0            Desg FWD 4         128.1    P2p
Gi0/1            Desg FWD 4         128.2    P2p
Gi0/2            Desg FWD 4         128.3    P2p
Gi0/3            Desg FWD 4         128.4    P2p

VLAN0001: Shows STP is enabled with IEEE 802.1D. Root ID: priority 32769 (32768+1), MAC 0011.2233.4455, and 'This bridge is the root' indicates this switch is root. Bridge ID: same as root (since it's root). Timers: Hello 2s, Max Age 20s, Forward Delay 15s. Interface table: Gi0/0-3 are all designated (Desg) and forwarding (FWD), cost 4 (1 Gbps), port priority 128, type P2p. VLAN0002: Similar but sys-id-ext 2 (priority 32770). All ports are designated forwarding.

Show spanning-tree detail for a specific VLAN

show spanning-tree vlan 10 detail
VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    32778
             Address     00a3.d1e2.f3c4
             Cost        4
             Port        1 (GigabitEthernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    49162  (priority 49152 sys-id-ext 10)
             Address     0011.2233.4455
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/0            Root FWD 4         128.1    P2p
Gi0/1            Altn BLK 4         128.2    P2p
Gi0/2            Desg FWD 4         128.3    P2p

VLAN0010: Root ID shows priority 32778 (32768+10), MAC 00a3.d1e2.f3c4, cost 4 to root, via port Gi0/0. This switch is not root (Bridge ID different). Bridge ID priority 49162 (49152+10). Interface table: Gi0/0 is Root port (Root) and forwarding (FWD). Gi0/1 is Alternate (Altn) and blocking (BLK) — this is the backup path. Gi0/2 is Designated (Desg) and forwarding. Cost 4 for all (1 Gbps).

Understanding the Output

The output is organized per VLAN. The 'Root ID' section shows the root bridge's priority (including VLAN ID offset), MAC address, and if this switch is the root. If not root, it shows cost to root and the root port. 'Bridge ID' shows this switch's priority and MAC. Timers (Hello, Max Age, Forward Delay) are displayed. The interface table lists each port with Role (Root, Designated, Alternate, Backup), State (FWD=Forwarding, BLK=Blocking, LIS=Listening, LRN=Learning), Cost (path cost to root), Prio.Nbr (port priority and number), and Type (P2p=point-to-point, Shr=shared). Good values: Root ports and Designated ports should be FWD; Alternate/Backup should be BLK. Watch for unexpected blocking ports or high cost values that may indicate suboptimal paths. Topology changes are not shown in this command; use 'show spanning-tree detail' to see TCN counters if needed.

CCNA Exam Tips

1.

CCNA exam tip: The root bridge is identified by the lowest bridge ID (priority + MAC). If all priorities are equal, the lowest MAC wins.

2.

CCNA exam tip: Port roles: Root port is the best path to root; Designated port is the best path from a segment; Alternate/Backup ports are blocking.

3.

CCNA exam tip: Port states: Blocking (20s) -> Listening (15s) -> Learning (15s) -> Forwarding. Know the timers and that Forward Delay is 15s by default.

4.

CCNA exam tip: The 'show spanning-tree detail' command shows per-VLAN STP info. For PVST+, each VLAN has its own STP instance.

Common Mistakes

Mistake 1: Assuming all ports should be forwarding. In a stable STP topology, some ports must be blocking to prevent loops.

Mistake 2: Forgetting that STP timers (Hello, Max Age, Forward Delay) must be consistent across all switches in the same VLAN to avoid convergence issues.

Mistake 3: Misinterpreting 'This bridge is the root' — if multiple switches claim to be root, there is a misconfiguration (e.g., different VLANs or priority mismatch).

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions