Spanning TreePrivileged EXEC

show spanning-tree

Displays the Spanning Tree Protocol (STP) state and configuration for all VLANs or a specific VLAN, used to verify root bridge, port roles, and STP topology.

Syntax·Privileged EXEC
show spanning-tree

When to Use This Command

  • Verify which switch is the root bridge in a VLAN after a network change.
  • Troubleshoot a loop by checking if a port is in blocking or forwarding state.
  • Confirm STP port roles (root, designated, alternate) after adding a new switch.
  • Check for STP convergence issues when a link flaps.

Command Examples

Basic show spanning-tree for VLAN 1

show spanning-tree vlan 1
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

VLAN0001: The VLAN being displayed. Root ID: Shows root bridge priority (32769 = 32768 + VLAN 1) and MAC address. 'This bridge is the root' indicates this switch is root. Bridge ID: Local switch's bridge ID. Interface table: Role (Desg=Designated, Root, Altn=Alternate), Sts (FWD=Forwarding, BLK=Blocking), Cost (path cost to root), Prio.Nbr (port priority.number), Type (P2p=point-to-point).

Show spanning-tree with a non-root switch

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

  Bridge ID  Priority    32778  (priority 32768 sys-id-ext 10)
             Address     0011.2233.4477
             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            Desg FWD 4         128.2    P2p
Gi0/2            Altn BLK 4         128.3    P2p

Root ID includes Cost (path cost to root) and Port (local port reaching root). Bridge ID is local. Interface table: Gi0/0 is Root port (forwarding), Gi0/1 is Designated (forwarding), Gi0/2 is Alternate (blocking) – this is a redundant link providing backup.

Understanding the Output

The output shows STP details per VLAN. The Root ID section identifies the root bridge: priority (default 32768 + VLAN ID), MAC address, and optionally cost and port if this switch is not root. 'This bridge is the root' indicates the local switch is root. The Bridge ID section shows the local switch's bridge priority and MAC. The Interface table lists each port with Role (Root, Designated, Alternate, Backup), Status (FWD=Forwarding, BLK=Blocking, LRN=Learning, LIS=Listening), Cost (path cost to root), and Type (P2p, Shr). Good values: Root and Designated ports should be FWD; Alternate/Backup should be BLK. Watch for unexpected blocking or forwarding that could indicate a loop or misconfiguration.

CCNA Exam Tips

1.

CCNA exam tip: Remember that the root bridge has all ports as Designated (except the root port which doesn't exist on root).

2.

CCNA exam tip: The priority shown includes the VLAN ID (sys-id-ext). Default priority is 32768 + VLAN ID.

3.

CCNA exam tip: A port in 'BLK' (blocking) is normal for redundant links; a port stuck in 'LRN' or 'LIS' may indicate convergence issues.

4.

CCNA exam tip: The 'Cost' field is the port's path cost to the root bridge; lower is better.

Common Mistakes

Mistake 1: Assuming all ports should be forwarding – blocking ports are normal for redundancy.

Mistake 2: Confusing the root bridge's MAC with the local bridge's MAC – check 'This bridge is the root'.

Mistake 3: Forgetting that STP runs per VLAN; a switch can be root for one VLAN and non-root for another.

Related Commands

Practice for the CCNA 200-301

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

Practice CCNA Questions