Courseiva
Spanning TreePrivileged EXEC

show spanning-tree brief

Displays a summary of Spanning Tree Protocol (STP) information for all VLANs, showing the root bridge, port states, and roles in a compact format, used to quickly verify STP topology and identify blocked ports.

Definition: show spanning-tree brief is a Cisco IOS privileged exec command. Displays a summary of Spanning Tree Protocol (STP) information for all VLANs, showing the root bridge, port states, and roles in a compact format, used to quickly verify STP topology and identify blocked ports.

Overview

The 'show spanning-tree brief' command is a staple in the Cisco IOS toolkit for network engineers managing switched networks. It provides a concise, per-VLAN summary of the Spanning Tree Protocol (STP) state, including the root bridge, port roles (Designated, Root, Alternate, Backup), and port states (Forwarding, Blocking, Listening, Learning). This command is essential for quickly verifying the STP topology, identifying blocked ports that prevent loops, and ensuring that the network converges correctly after changes.

Unlike the full 'show spanning-tree' output, which includes detailed timers and bridge IDs, the brief version is optimized for rapid assessment, especially in environments with many VLANs. Network engineers reach for this command when troubleshooting connectivity issues that may stem from STP misconfigurations, such as unexpected blocking or forwarding on certain ports, or when verifying that a newly added switch has correctly elected a root bridge. It fits into the broader workflow as a first-line diagnostic tool after configuration changes (e.g., adjusting bridge priority, enabling PortFast, or modifying cost) and before more granular commands like 'show spanning-tree interface' or 'debug spanning-tree events'.

Important IOS behaviors: the command runs in Privileged EXEC mode (enable) and does not alter the running configuration. Output is buffered and may be truncated in long sessions; use 'terminal length 0' to disable paging. The command requires no special privilege beyond enable access.

It is supported across IOS, IOS-XE, and some Catalyst OS versions, but not in NX-OS (which uses 'show spanning-tree brief' with different syntax). Understanding this command is fundamental for CCNA and CCNP candidates, as STP is a core topic in switching exams and real-world network design.

Syntax·Privileged EXEC
show spanning-tree brief

When to Use This Command

  • After configuring STP, verify that the expected root bridge is elected and that redundant links are properly blocking.
  • Troubleshoot a network loop by checking for unexpected port roles or states.
  • Quickly assess STP status across multiple VLANs when deploying new switches.
  • Monitor STP convergence after a link failure or topology change.

Command Examples

Basic STP brief output for all VLANs

show spanning-tree brief
VLAN             Root ID          Cost    Port
---- ------------------------------ ------  ----
   1   32769.aaaa.bbbb.cccc          4      Gi0/1
   1   32769.aaaa.bbbb.cccc          4      Gi0/2
   1   32769.aaaa.bbbb.cccc          4      Gi0/3
   1   32769.aaaa.bbbb.cccc          4      Gi0/4
   1   32769.aaaa.bbbb.cccc          4      Gi0/5
   1   32769.aaaa.bbbb.cccc          4      Gi0/6
   1   32769.aaaa.bbbb.cccc          4      Gi0/7
   1   32769.aaaa.bbbb.cccc          4      Gi0/8
   1   32769.aaaa.bbbb.cccc          4      Gi0/9
   1   32769.aaaa.bbbb.cccc          4      Gi0/10
   1   32769.aaaa.bbbb.cccc          4      Gi0/11
   1   32769.aaaa.bbbb.cccc          4      Gi0/12
   1   32769.aaaa.bbbb.cccc          4      Gi0/13
   1   32769.aaaa.bbbb.cccc          4      Gi0/14
   1   32769.aaaa.bbbb.cccc          4      Gi0/15
   1   32769.aaaa.bbbb.cccc          4      Gi0/16
   1   32769.aaaa.bbbb.cccc          4      Gi0/17
   1   32769.aaaa.bbbb.cccc          4      Gi0/18
   1   32769.aaaa.bbbb.cccc          4      Gi0/19
   1   32769.aaaa.bbbb.cccc          4      Gi0/20
   1   32769.aaaa.bbbb.cccc          4      Gi0/21
   1   32769.aaaa.bbbb.cccc          4      Gi0/22
   1   32769.aaaa.bbbb.cccc          4      Gi0/23
   1   32769.aaaa.bbbb.cccc          4      Gi0/24

VLAN: VLAN number. Root ID: Bridge priority and MAC address of the root bridge (32769.aaaa.bbbb.cccc). Cost: Path cost to the root bridge (4 indicates a 10 Gbps link). Port: Local port. All ports show the same root ID, meaning this switch is not the root (the root would show its own MAC). All ports are in forwarding state (no 'BLK' or 'ALT' shown).

STP brief with alternate/blocked ports

show spanning-tree brief
VLAN             Root ID          Cost    Port
---- ------------------------------ ------  ----
   1   32769.aaaa.bbbb.cccc          4      Gi0/1
   1   32769.aaaa.bbbb.cccc          4      Gi0/2
   1   32769.aaaa.bbbb.cccc          4      Gi0/3
   1   32769.aaaa.bbbb.cccc          4      Gi0/4
   1   32769.aaaa.bbbb.cccc          4      Gi0/5
   1   32769.aaaa.bbbb.cccc          4      Gi0/6
   1   32769.aaaa.bbbb.cccc          4      Gi0/7
   1   32769.aaaa.bbbb.cccc          4      Gi0/8
   1   32769.aaaa.bbbb.cccc          4      Gi0/9
   1   32769.aaaa.bbbb.cccc          4      Gi0/10
   1   32769.aaaa.bbbb.cccc          4      Gi0/11
   1   32769.aaaa.bbbb.cccc          4      Gi0/12
   1   32769.aaaa.bbbb.cccc          4      Gi0/13
   1   32769.aaaa.bbbb.cccc          4      Gi0/14
   1   32769.aaaa.bbbb.cccc          4      Gi0/15
   1   32769.aaaa.bbbb.cccc          4      Gi0/16
   1   32769.aaaa.bbbb.cccc          4      Gi0/17
   1   32769.aaaa.bbbb.cccc          4      Gi0/18
   1   32769.aaaa.bbbb.cccc          4      Gi0/19
   1   32769.aaaa.bbbb.cccc          4      Gi0/20
   1   32769.aaaa.bbbb.cccc          4      Gi0/21
   1   32769.aaaa.bbbb.cccc          4      Gi0/22
   1   32769.aaaa.bbbb.cccc          4      Gi0/23
   1   32769.aaaa.bbbb.cccc          4      Gi0/24

This output shows all ports in forwarding state. In a real network with redundancy, some ports would show 'ALT' (alternate) or 'BLK' (blocked). The absence of such indicates either no redundant links or all ports are forwarding (possible loop if multiple paths exist).

Understanding the Output

The 'show spanning-tree brief' command outputs a table with columns: VLAN (VLAN ID), Root ID (bridge priority and MAC address of the root bridge for that VLAN), Cost (path cost from this switch to the root bridge), and Port (local interface). The Root ID format is 'priority.mac-address'. A lower priority value (default 32768) indicates a better candidate for root bridge.

The cost value depends on link speed: 4 for 10 Gbps, 19 for 100 Mbps, 100 for 10 Mbps. If a port is in blocking or alternate role, it will be indicated in the Port column (e.g., 'Gi0/1 BLK' or 'Gi0/2 ALT'). In the basic output, only forwarding ports are listed; blocked ports are omitted unless explicitly shown.

To see all ports including blocked, use 'show spanning-tree' without 'brief'. In a well-designed network, you should see exactly one forwarding port per redundant link and the rest blocking. If all ports are forwarding on a switch with multiple uplinks, a loop may exist.

Configuration Scenarios

Verify STP Root Bridge Election After Priority Change

After configuring a specific switch to be the root bridge for VLAN 10 by setting its priority to 4096, you need to confirm that the switch is indeed the root and that all other switches have recognized it.

Topology

SW1(Gi0/1)---Gi0/1(SW2)---Gi0/2(SW3) SW1(Gi0/2)---Gi0/1(SW3)

Steps

  1. 1.Step 1: Enter privileged EXEC mode on SW1: SW1> enable
  2. 2.Step 2: Run the command: SW1# show spanning-tree brief vlan 10
  3. 3.Step 3: Examine the output. Look for the line 'Root ID' and verify that the bridge ID matches SW1's priority and MAC address. Also check that SW1's ports are in the appropriate roles (Designated or Root).
  4. 4.Step 4: Repeat on SW2 and SW3 to confirm they see SW1 as the root.
Configuration
! On SW1, set priority to 4096 for VLAN 10
SW1(config)# spanning-tree vlan 10 priority 4096

Verify: SW1# show spanning-tree brief vlan 10 VLAN10 Spanning tree enabled protocol ieee Root ID Priority 4096 Address 0011.2233.4455 This bridge is the root Bridge ID Priority 4096 (priority 4096 sys-id-ext 10) Address 0011.2233.4455 Interface Role Sts Cost Prio.Nbr Type ---------- ---- --- --------- -------- -------------------------------- Gi0/1 Desg FWD 4 128.1 P2p Gi0/2 Desg FWD 4 128.2 P2p

Watch out: If the root bridge is not the expected switch, verify that the priority was applied to the correct VLAN and that no other switch has a lower priority (including default 32768). Also check that the VLAN exists on all switches.

Identify Blocked Ports in a Redundant Topology

In a network with redundant links between switches, STP should block one link to prevent loops. Use this command to quickly identify which ports are blocking and confirm that the expected port is in the Alternate role.

Topology

SW1(Gi0/1)---Gi0/1(SW2) SW1(Gi0/2)---Gi0/2(SW2)

Steps

  1. 1.Step 1: Enter privileged EXEC mode on SW1: SW1> enable
  2. 2.Step 2: Run: SW1# show spanning-tree brief vlan 1
  3. 3.Step 3: Look at the 'Sts' column. A port in 'BLK' (Blocking) state indicates it is blocking traffic. The 'Role' column should show 'Altn' (Alternate) or 'Back' (Backup) for blocked ports.
  4. 4.Step 4: Verify that only one of the two redundant links is blocking. If both are forwarding, there is a loop; if both are blocking, connectivity is lost.
Configuration
! No configuration needed; this is a default behavior check.

Verify: SW1# show spanning-tree brief vlan 1 VLAN1 Spanning tree enabled protocol ieee Root ID Priority 32768 Address 0011.2233.4455 This bridge is the root Bridge ID Priority 32768 (priority 32768 sys-id-ext 1) Address 0011.2233.4455 Interface Role Sts Cost Prio.Nbr Type ---------- ---- --- --------- -------- -------------------------------- Gi0/1 Desg FWD 4 128.1 P2p Gi0/2 Altn BLK 4 128.2 P2p

Watch out: If both ports are forwarding, check for misconfigurations like disabling STP or setting PortFast on trunk links. If both are blocking, verify that the root bridge is reachable and that the VLAN is active.

Troubleshooting with This Command

When troubleshooting STP issues, the 'show spanning-tree brief' command is your first line of defense. A healthy output shows a single root bridge per VLAN, with all ports in either Forwarding (FWD) or Blocking (BLK) state, and roles correctly assigned: Designated (Desg) for ports that send BPDUs, Root for the port closest to the root, and Alternate (Altn) or Backup (Back) for blocked ports. Key indicators of problems include: multiple root bridges (if different VLANs show different root IDs unexpectedly), ports stuck in Listening or Learning states (indicating convergence issues), or ports that are Forwarding but should be Blocking (potential loop).

Focus on the 'Role' and 'Sts' columns. For example, if a port is 'Root FWD' but the switch is not the root, that's normal; but if a port is 'Desg BLK', that's unusual and may indicate a configuration error. Common symptoms this command helps diagnose: (1) Connectivity loss: if all ports on a switch are blocking, the switch is isolated; check root bridge reachability. (2) Broadcast storms: if no ports are blocking, there is a loop; look for two ports in Forwarding on the same VLAN between two switches. (3) Slow convergence: if ports remain in Listening/Learning for too long, check for high BPDU loss or timer misconfiguration.

Step-by-step diagnostic flow: 1. Identify the VLAN experiencing issues. 2. Run 'show spanning-tree brief vlan <vlan>' on all switches in that VLAN. 3.

Verify that the root bridge is consistent across all switches (same Root ID). 4. On each switch, check that the port connecting to the root is in 'Root FWD' state. 5. Look for any ports in 'Altn BLK' or 'Back BLK' that should be forwarding (e.g., if a redundant link is blocked but the primary fails, the blocked port should transition to Forwarding). 6.

Correlate with 'show spanning-tree interface <interface>' for detailed timers and BPDU counts, and 'show spanning-tree vlan <vlan>' for full details. Also use 'debug spanning-tree events' to see real-time BPDU exchanges. Remember that STP is VLAN-aware; always specify the VLAN.

In multi-VLAN environments, use 'show spanning-tree brief' without VLAN to see all VLANs at once, but be prepared for lengthy output. If you see 'This bridge is the root' on multiple switches for the same VLAN, you have a root bridge conflict—check priorities and MAC addresses. If a port is 'Altn BLK' but the primary path fails and it doesn't transition, check for UplinkFast or BackboneFast configuration, or verify that the port is not administratively disabled.

The command is also useful for verifying STP extensions like PortFast (ports in 'FWD' with 'P2p Edge' type) and LoopGuard (ports in 'BLK' with 'Lrg' type). Always ensure that the output is from the current state; STP can change rapidly, so run the command multiple times if needed.

CCNA Exam Tips

1.

CCNA exam often tests that the root bridge is the switch with the lowest bridge ID (priority + MAC). Use 'show spanning-tree brief' to quickly identify the root by looking at the Root ID column.

2.

Remember that 'brief' output only shows forwarding ports by default; if you need to see blocked ports, use 'show spanning-tree' without 'brief'.

3.

The path cost in the output is the cost to reach the root bridge, not the cost of the local link. For example, a cost of 19 means the path to the root includes a 100 Mbps link.

4.

Be aware that PVST+ runs per VLAN; the root bridge can differ per VLAN. 'show spanning-tree brief' shows all VLANs; look for different Root IDs across VLANs.

Common Mistakes

Assuming all ports in the output are forwarding; the brief output may omit blocked ports. Always use 'show spanning-tree' to see full port states.

Misinterpreting the cost column as the cost of the local port instead of the cumulative cost to the root bridge.

Forgetting that the root bridge itself will show its own MAC in the Root ID column and a cost of 0 (though brief may not show cost 0 explicitly).

show spanning-tree brief vs show spanning-tree

Both commands display STP information, but 'show spanning-tree brief' provides a condensed summary for all VLANs, while 'show spanning-tree' shows detailed per-VLAN or per-port information. They are often confused because they share a similar base command and both show root bridge and port roles.

Aspectshow spanning-tree briefshow spanning-tree
Output DetailCompact, single line per portFull per-VLAN detail with timers
VLAN ScopeAll VLANs alwaysAll or specific VLAN with optional VLAN ID
Port State InformationQuick state/role per portDetailed state, cost, counters
Root Bridge InfoShows root bridge ID per VLANFull root bridge details including priority and sys ID
Typical UseQuick topology checkDetailed troubleshooting

Use show spanning-tree brief when you need a fast, high-level overview of STP topology and to quickly identify blocked ports across all VLANs.

Use show spanning-tree when you need detailed STP information for a specific VLAN, including timer values, port costs, and historical state changes.

Platform Notes

In IOS-XE (e.g., Catalyst 3650/3850/9300), the 'show spanning-tree brief' command syntax and output are nearly identical to classic IOS, but the output may include additional fields like 'Type' (P2p, P2p Edge, Shr) and 'Cost' in a slightly different column order. The command is fully supported. In NX-OS (e.g., Nexus 9000), the equivalent command is 'show spanning-tree brief' but with different output formatting; notably, NX-OS uses 'show spanning-tree vlan <vlan>' for detailed output, and the brief version may not show all VLANs by default.

For ASA firewalls, STP is not typically used; the command is not applicable. In IOS-XR (e.g., ASR 9000), STP is not supported in the same way; instead, use 'show spanning-tree' in the context of bridging domains, but the command is not standard. Between IOS versions, the output format has remained consistent from 12.x through 16.x, but in 15.x and later, the 'sys-id-ext' is shown in the Bridge ID line, and the 'Type' column may include 'Edge' for PortFast-enabled ports.

In Catalyst OS (CatOS), the equivalent command is 'show spantree brief' on the supervisor. Always check the specific platform documentation, as some switches (like 2960-X) may have minor display differences. For CCNA/CCNP studies, focus on classic IOS as the baseline, but be aware that IOS-XE is increasingly common in modern networks.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions