Spanning Tree Show Commands – After configuring Spanning Tree Protocol, which is usually configured on Layer 2 Switches, it may be necessary to verify the settings made. When configuring Cisco Switches, we usually use the CLI command prompt.
Spanning Tree Show Commands

Spanning Tree Show Commands

Cisco Switch Spanning Tree Show Commands

After configuring the Spanning Tree Protocol (STP), we can learn which Switch is the Root Bridge or which Switch has Blocked Port with the CLI show commands. We can also examine STP PortFast, STP UplinkFast and STP BackboneFast with Spanning Tree show commands.

By using GNS3 or Cisco Packet Tracer program you can create a redundancy network and apply the following Spanning Tree show commands on the Switch Privileged Mode to see what the Spanning Tree Protocol does.

   Show Spanning-Tree ? Command

Show spanning-tree? command shows the show commands of the STP protocol supported on the Switch. With Show spanning-tree ? command, you can view the output that belongs to it by selecting the feature you want to view from the commands listed.

Switch#show spanning-tree ?
  WORD               bridge group list, example 1,3-5,7,9
  active             Report on active interfaces only
  backbonefast       Show spanning tree backbonefast status
  blockedports       Show blocked ports
  bridge             Status and configuration of this bridge
  detail             Detailed information
  inconsistentports  Show inconsistent ports
  interface          Spanning Tree interface status and configuration
  mst                Multiple spanning trees
  pathcost           Show Spanning pathcost options
  root               Status and configuration of the root bridge
  summary            Summary of port states
  uplinkfast         Show spanning tree uplinkfast status
  vlan               VLAN Switch Spanning Trees
  |                  Output modifiers
  

Switch#show spanning-tree 

 

Our Recommendation

You can purchase “CCNP Switching” from Amazon.

   Show Spanning-Tree Command

With Show spanning-tree command, you can view the general information of the STP protocol on the Switch. You can view the Switch’s Root ID, Root Bridge, and Interface ports and view the port states of the Switch‘s interfaces.

Also, if the Root Bridge is configured manually, you can use the show spanning-tree command to examine the Priority value of the Switch.

Switch#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0012.6620.0800
             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     0012.6620.0800
             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    Shr 
Gi0/1               Desg FWD 4         128.2    Shr 
Gi0/2               Desg FWD 4         128.3    Shr 
Gi0/3               Desg FWD 4         128.4    Shr 


Switch#

 

   Show Spanning-Tree Summary Command

Show spanning-tree summary command displays the connection status for VLANs created on the Cisco Switch. You can also view the activated properties of the Standard STP (PVST) protocol with this command. If you have performed the Cisco Switch BackboneFast configuration steps, you can view the BackboneFast feature information with this command.

Switch#show spanning-tree summary 
Switch is in pvst mode
Root bridge for: VLAN0001
Extended system ID           is enabled
Portfast Default             is disabled
PortFast BPDU Guard Default  is disabled
Portfast BPDU Filter Default is disabled
Loopguard Default            is disabled
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast                   is disabled
BackboneFast                 is disabled

Name                   Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0001                     0         0        0          4          4
---------------------- -------- --------- -------- ---------- ----------
1 vlan                       0         0        0          4          4
Switch#

 

   Show Spanning-Tree Root Command

With show spanning-tree root command you can display Root Bridge information. For example, you can see the Root Bridge ID and Address (0012.66b3.c800) when you execute this command on a Switch that is not a Root Bridge.

Switch#show spanning-tree root 

                                        Root    Hello Max Fwd
Vlan                   Root ID          Cost    Time  Age Dly  Root Port
---------------- -------------------- --------- ----- --- ---  ------------
VLAN0001         32769 0012.6620.0800         0    2   20  15                  
Switch#

 

   Show Spanning-Tree Detail Command

With show spanning-tree detail command, you can see detailed information of all ports of the Switch. You can view Priority and Root Bridge information, Hello Time, Max Age Timer, and Forward Delay times of Cisco Switch interfaces as well as sent and received BPDU packet numbers.

Switch#show spanning-tree detail 

 VLAN0001 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, sysid 1, address 0012.6620.0800
  Configured hello time 2, max age 20, forward delay 15
  We are the root of the spanning tree
  Topology change flag not set, detected flag not set
  Number of topology changes 1 last change occurred 00:25:15 ago
          from GigabitEthernet0/0
  Times:  hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15 
  Timers: hello 1, topology change 0, notification 0, aging 300

 Port 1 (GigabitEthernet0/0) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.1.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.1, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 773, received 3

 Port 2 (GigabitEthernet0/1) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.2.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.2, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 771, received 0

 Port 3 (GigabitEthernet0/2) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.3.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.3, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 771, received 0

 Port 4 (GigabitEthernet0/3) of VLAN0001 is designated forwarding 
   Port path cost 4, Port priority 128, Port Identifier 128.4.
   Designated root has priority 32769, address 0012.6620.0800
   Designated bridge has priority 32769, address 0012.6620.0800
   Designated port id is 128.4, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is shared by default
   BPDU: sent 773, received 3

Switch#

 

   Show Spanning-Tree Interface Command

The show spanning-tree interface command is not used alone. If you want to examine which interface while running this command, you need to write that interface.

In the following show spanning-tree interface ? command output, the interfaces you want to select display. Once you have selected the interface you want to view, you can see the interface states as in the output below.

Switch#show spanning-tree interface ?
  GigabitEthernet  GigabitEthernet IEEE 802.3z
  Multilink        Multilink-group interface
  Port-channel     Ethernet Channel of interfaces
  Vlan             Catalyst Vlans

Switch#show spanning-tree interface gigabitethernet 0/0

Vlan                Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
VLAN0001            Desg FWD 4         128.1    Shr 
Switch#show spanning-tree interface gigabitethernet 0/1

Vlan                Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
VLAN0001            Desg FWD 4         128.2    Shr 
Switch#

 

   Show Spanning-Tree Blocked Command

With show spanning-tree blocked command, you can see the interfaces that are put into Blocked Mode by the Spanning Tree Protocol. In short, it shows the ports that are blocked by STP.

Switch#show spanning-tree blockedports 

Name                 Blocked Interfaces List
-------------------- ------------------------------------

Number of blocked ports (segments) in the system : 0

Switch#

 

   Show Spanning-Tree Active Command

The show spanning-tree active command shows only those interfaces that are active on the Cisco Switch. For example, if idle interfaces are turned off by the system administrator, you can only display the currently active interfaces with this command.

Switch#show spanning-tree active 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0012.6620.0800
             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     0012.6620.0800
             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    Shr 
Gi0/1               Desg FWD 4         128.2    Shr 
Gi0/2               Desg FWD 4         128.3    Shr 
Gi0/3               Desg FWD 4         128.4    Shr 


Switch#

 

   Show Spanning-Tree Bridge Command

The show spanning-tree bridge command displays the Bridge ID information of the Cisco Switch.

Switch#show spanning-tree bridge 

                                                   Hello  Max  Fwd
Vlan                         Bridge ID              Time  Age  Dly  Protocol
---------------- --------------------------------- -----  ---  ---  --------
VLAN0001         32769 (32768,   1) 0012.6620.0800    2    20   15  ieee        
Switch#

 

   Show Spanning-Tree Inconsistentports Command

With show spanning-tree inconsistentport command displays ports that are in an inconsistent STP state. For example, if a port between two Switches are configured as a Trunk or an Access port, the STP protocol will call this port inconsistent.

Switch#show spanning-tree inconsistentports 

Name                 Interface                Inconsistency
-------------------- ------------------------ ------------------

Number of inconsistent ports (segments) in the system : 0

Switch#

 

   Show Spanning-Tree BackboneFast Command

The show spanning-tree backbone command shows whether the BackboneFast feature is enabled on a Switch or not.

Switch#show spanning-tree backbonefast 
BackboneFast is disabled
Switch#

 

   Show Spanning-Tree UplinkFast Command

The show spanning-tree uplinkfast command also shows whether the UplinkFast feature is enabled on the switch or not.

Switch#show spanning-tree uplinkfast
UplinkFast is disabled
Switch#

 

   Show Spanning-Tree Vlan Command

Finally, for the spanning tree show commands, show spanning-tree vlan + (vlan number) displays the STP details such as Root ID, Root Bridge, Priority according to the selected VLAN number.

Switch#sh spanning-tree vlan 1

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0012.6620.0800
             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     0012.6620.0800
             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    Shr 
Gi0/1               Desg FWD 4         128.2    Shr 
Gi0/2               Desg FWD 4         128.3    Shr 
Gi0/3               Desg FWD 4         128.4    Shr 


Switch#

 
  Final Word 

Spanning Tree Show Commands – The show commands for troubleshooting on Cisco Switches or Routers are fully known and understandable. In this article, we examined the Cisco Switch Spanning Tree show commands and outputs.

If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!

Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!

Articles Related to Spanning Tree Show Commands

Products Related to Spanning Tree Show Commands
Related Products

Leave a Reply

Your email address will not be published. Required fields are marked *

ten − six =