Cisco 2600, 3660, and 3845 Series Switches
To display spanning-tree information for the specified spanning-tree instances, use the
showspanning-tree command in privileged EXEC mode.
Cisco 6500/6000 Catalyst Series Switches and Cisco 7600 Series Routers
show spanning-tree [bridge-group] [active | backbonefast | blockedports | bridge | brief | inconsistentports | interface interface-type interface-number | root | summary [totals] | uplinkfast | vlan vlan-id]
show spanning-tree [bridge-group | active | backbonefast | bridge [id] | detail | inconsistentports | interface interface-type interface-number [portfast [edge]] | mst [list | configuration [digest]] | root | summary [totals] | uplinkfast | vlan vlan-id | port-channel number | pathcost method]
Syntax Description
bridge-group
|
(Optional) Specifies the bridge group number. The range is 1 to 255.
|
active
|
(Optional) Displays spanning-tree information on active interfaces only.
|
backbonefast
|
(Optional) Displays spanning-tree BackboneFast status.
|
blockedports
|
(Optional) Displays blocked port information.
|
bridge
|
(Optional) D isplays status and configuration of this switch.
|
brief
|
(Optional) Specifies a brief summary of interface information.
|
configuration
digest
]
|
(Optional) D isplays the multiple spanning-tree current region configuration.
|
inconsistentports
|
(Optional) Displays information about inconsistent ports.
|
interface
interface-type
interface-number
|
(Optional) Specifies the type and number of the interface. Enter each interface designator, using a space to separate it
from the one before and the one after. Ranges are not supported. Valid interfaces include physical ports and virtual LANs
(VLANs). See the “Usage Guidelines” for valid values.
|
list
|
(Optional) Specifies a multiple spanning-tree instance list.
|
mst
|
(Optional) Specifies multiple spanning-tree.
|
portfast
edge
]
|
(Optional) Displays spanning-tree PortFast edge interface operational status. Beginning with Cisco IOS Release 12.2(33)SXI,
the
edge keyword is required. In earlier releases, the
edge keyword is not used.
|
root
|
(Optional) Displays root-switch status and configuration.
|
summary
|
(Optional) Specifies a summary of port states.
|
totals
|
(Optional) Displays the total lines of the spanning-tree state section.
|
uplinkfast
|
(Optional) Displays spanning-tree UplinkFast status.
|
vlan
vlan-id
|
(Optional) Specifies the VLAN ID. The range is 1 to 1005. Beginning with Cisco IOS Release 12.4(15)T, the valid VLAN ID range
is from 1 to 4094.
If the
vlan-id value is omitted, the command applies to the spanning-tree instance for all VLANs.
|
id
|
(Optional) Identifies the spanning tree bridge.
|
detail
|
(Optional) Shows status and configuration details.
|
port-channel
number
|
(Optional) Identifies the Ethernet channel associated with the interfaces.
|
pathcost
method
|
(Optional) Displays the default path-cost calculation method that is used. See the “Usage Guidelines” section for the valid
values.
|
Command Modes
Privileged EXEC (#)
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.0(5.2)WC(1)
|
This command was integrated into Cisco IOS Release 12.0(5.2)WC(1).
|
12.1(6)EA2
|
This command was integrated into Cisco IOS Release 12.1(6)EA2. The following keywords and arguments were added:
bridge-group ,
active ,
backbonefast ,
blockedports ,
bridge ,
inconsistentports ,
pathcost method ,
root ,
totals , and
uplinkfast .
|
12.2(14)SX
|
Support for this command was introduced on the Supervisor Engine 720.
|
12.2(15)ZJ
|
The syntax added in Cisco IOS Release 12.1(6)EA2 was implemented on the Cisco 2600 series, Cisco 3600 series, and Cisco 3700
series routers.
|
12.2(17d)SXB
|
Support for this command on the Supervisor Engine 2 was extended to Cisco IOS Release 12.2(17d)SXB.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.3(4)T
|
The platform support and syntax added in Cisco IOS Release 12.2(15)ZJ was integrated into Cisco IOS Release 12.3(4)T.
|
12.4(15)T
|
This command was modified to extend the range of valid VLAN IDs to 1-4094 for specified platforms.
|
12.2(33)SXI
|
This command was modified to require the
edge keyword after
portfast . The command output was modified to show the status of Bridge Assurance and PVST Simulation.
|
Usage Guidelines
The keywords and arguments that are available with the
showspanning-tree command vary depending on the platform you are using and the network modules that are installed and operational.
Cisco 2600, 3660, and 3845 Series Switches
The valid values for
interface interface-type are:
Cisco 6500/6000 Catalyst Switches and 7600 Series Routers
The
port-channel number values from 257 to 282 are supported on the Content Switching Module (CSM) and the Firewal Services Module (FWSM) only.
The
interface-number argument designates the module and port number. Valid values for
interface-number depend on the specified interface type and the chassis and module that are used. For example, if you specify a Gigabit Ethernet
interface and have a 48-port 10/100BASE-T Ethernet module that is installed in a 13-slot chassis, valid values for the module
number are from 2 to 13 and valid values for the port number are from 1 to 48.
When checking spanning tree-active states and you have a large number of VLANs, you can enter the
showspanning-treesummarytotal command. You can display the total number of VLANs without having to scroll through the list of VLANs.
The valid values for
interface interface-type are:
-
fastethernet
--Specifies a Fast Ethernet IEEE 802.3 interface.
-
port-channel
--Specifies an Ethernet channel of interfaces.
-
atm
--Specifies an Asynchronous Transfer Mode (ATM) interface.
-
gigabitethernet
--Specifies a Gigabit Ethernet IEEE 802.3z interface.
-
multilink
--Specifies a multilink-group interface.
-
serial
--Specifies a serial interface.
-
vlan
--Specifies a catalyst VLAN interface.
The valid values for keyword
pathcoast method are:
-
append
--Appends the redirected output to a URL (supporting the append operation).
-
begin
--Begins with the matching line.
-
exclude
--Excludes matching lines.
-
include
--Includes matching lines.
-
redirect
--Redirects output to a URL.
-
tee
--Copies output to a URL.
When you run the
showspanning-tree command for a VLAN or an interface the switch router will display the different port states for the VLAN or interface. The
valid spanning-tree port states are listening, learning, forwarding, blocking, disabled, and loopback. See the table below
for definitions of the port states:
Table 22. show spanning-tree vlan Command Port States
Field
|
Definition
|
BLK
|
Blocked is when the port is still sending and listening to BPDU packets but is not forwarding traffic.
|
DIS
|
Disabled is when the port is not sending or listening to BPDU packets and is not forwarding traffic.
|
FWD
|
Forwarding is when the port is sending and listening to BPDU packets and forwarding traffic.
|
LBK
|
Loopback is when the port recieves its own BPDU packet back.
|
LIS
|
Listening is when the port spanning tree initially starts to listen for BPDU packets for the root bridge.
|
LRN
|
Learning is when the port sets the proposal bit on the BPDU packets it sends out
|
Examples
The following example shows that bridge group 1 is running the VLAN Bridge Spanning Tree Protocol:
Router# show spanning-tree 1
Bridge group 1 is executing the VLAN Bridge compatible Spanning Tree Protocol
Bridge Identifier has priority 32768, address 0000.0c37.b055
Configured hello time 2, max age 30, forward delay 20
We are the root of the spanning tree
Port Number size is 10 bits
Topology change flag not set, detected flag not set
Times: hold 1, topology change 35, notification 2
hello 2, max age 30, forward delay 20
Timers: hello 0, topology change 0, notification 0
bridge aging time 300
Port 8 (Ethernet1) of Bridge group 1 is forwarding
Port path cost 100, Port priority 128
Designated root has priority 32768, address 0000.0c37.b055
Designated bridge has priority 32768, address 0000.0c37.b055
Designated port is 8, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 184, received 0
The following is sample output from the
showspanning-treesummarycommand:
Router# show spanning-tree summary
UplinkFast is disabled
Name Blocking Listening Learning Forwarding STP Active
-------------------- -------- --------- -------- ---------- ----------
VLAN1 23 0 0 1 24
-------------------- -------- --------- -------- ---------- ----------
1 VLAN 23 0 0 1 24
The table below describes the significant fields shown in the display.
Table 23. show spanning-tree summary Field Descriptions
Field
|
Description
|
UplinkFast
|
Indicates whether the spanning-tree UplinkFast feature is enabled or disabled.
|
Name
|
Name of VLAN.
|
Blocking
|
Number of ports in the VLAN in a blocking state.
|
Listening
|
Number of ports in a listening state.
|
Learning
|
Number of ports in a learning state.
|
Forwarding
|
Number of ports in a forwarding state.
|
STP Active
|
Number of ports using the Spanning-Tree Protocol.
|
The following is sample output from the
showspanning-treebriefcommand:
Router# show spanning-tree brief
VLAN1
Spanning tree enabled protocol IEEE
ROOT ID Priority 32768
Address 0030.7172.66c4
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
VLAN1
Spanning tree enabled protocol IEEE
ROOT ID Priority 32768
Address 0030.7172.66c4
Port Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
------- ------- ---- ---- --- ---- -------------- -------
Fa0/11 128.17 128 100 BLK 38 0404.0400.0001 128.17
Fa0/12 128.18 128 100 BLK 38 0404.0400.0001 128.18
Fa0/13 128.19 128 100 BLK 38 0404.0400.0001 128.19
Fa0/14 128.20 128 100 BLK 38 0404.0400.0001 128.20
Fa0/15 128.21 128 100 BLK 38 0404.0400.0001 128.21
Fa0/16 128.22 128 100 BLK 38 0404.0400.0001 128.22
Fa0/17 128.23 128 100 BLK 38 0404.0400.0001 128.23
Fa0/18 128.24 128 100 BLK 38 0404.0400.0001 128.24
Fa0/19 128.25 128 100 BLK 38 0404.0400.0001 128.25
Fa0/20 128.26 128 100 BLK 38 0404.0400.0001 128.26
Fa0/21 128.27 128 100 BLK 38 0404.0400.0001 128.27
Port Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
------- ------- ---- ---- --- ---- -------------- -------
Fa0/22 128.28 128 100 BLK 38 0404.0400.0001 128.28
Fa0/23 128.29 128 100 BLK 38 0404.0400.0001 128.29
Fa0/24 128.30 128 100 BLK 38 0404.0400.0001 128.30 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
The table below describes the significant fields shown in the display.
Table 24. show spanning-tree brief Field Descriptions
Field
|
Description
|
VLAN1
|
VLAN for which spanning-tree information is shown.
|
Spanning tree enabled protocol
|
Type of spanning tree (IEEE, IBM, CISCO).
|
ROOT ID
|
Indicates the root bridge.
|
Priority
|
Priority indicator.
|
Address
|
MAC address of the port.
|
Hello Time
|
Amount of time, in seconds, that the bridge sends bridge protocol data units (BPDUs).
|
Max Age
|
Amount of time, in seconds, that a BPDU packet should be considered valid.
|
Forward Delay
|
Amount of time, in seconds, that the port spends in listening or learning mode.
|
Port Name
|
Interface type and number of the port.
|
Port ID
|
Identifier of the named port.
|
Prio
|
Priority associated with the port.
|
Cost
|
Cost associated with the port.
|
Sts
|
Status of the port.
|
Designated Cost
|
Designated cost for the path.
|
Designated Bridge ID
|
Bridge identifier of the bridge assumed to be the designated bridge for the LAN associated with the port.
|
The following is sample output from the
showspanning-treevlan1 command:
Router# show spanning-tree vlan 1
Spanning tree 1 is executing the IEEE compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 00e0.1eb2.ddc0
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32768, address 0010.0b3f.ac80
Root port is 5, cost of root path is 10
Topology change flag not set, detected flag not set, changes 1
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Interface Fa0/1 in Spanning tree 1 is down
Port path cost 100, Port priority 128
Designated root has priority 32768, address 0010.0b3f.ac80
Designated bridge has priority 32768, address 00e0.1eb2.ddc0
Designated port is 1, path cost 10
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 0, received 0
The table below describes the significant fields shown in the display.
Table 25. show spanning-tree vlan Field Descriptions
Field
|
Description
|
Spanning tree
|
Type of spanning tree (IEEE, IBM, CISCO).
|
Bridge Identifier
|
Part of the bridge identifier and taken as the most significant part for bridge ID comparisons.
|
address
|
Bridge MAC address.
|
Root port
|
Identifier of the root port.
|
Topology change
|
Flags and timers associated with topology changes.
|
The following is sample output from the
showspanning-treeinterfacefastethernet0/3 command:
Router# show spanning-tree interface fastethernet0/3
Interface Fa0/3 (port 3) in Spanning tree 1 is down
Port path cost 100, Port priority 128
Designated root has priority 6000, address 0090.2bba.7a40
Designated bridge has priority 32768, address 00e0.1e9f.4abf
Designated port is 3, path cost 410
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 0, received 0
Examples
This example shows how to display a summary of interface information:
Router#
show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0004.9b78.0800
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
Address 0004.9b78.0800
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15
Interface Port ID Designated Port ID
Name Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr
---------------- -------- --------- --- --------- -------------------- --------
Gi2/1 128.65 4 LIS 0 4097 0004.9b78.0800 128.65
Gi2/2 128.66 4 LIS 0 4097 0004.9b78.0800 128.66
Fa4/3 128.195 19 LIS 0 4097 0004.9b78.0800 128.195
Fa4/4 128.196 19 BLK 0 4097 0004.9b78.0800 128.195
Router#
The table below describes the fields that are shown in the example.
Table 26. show spanning-tree Command Output Fields
Field
|
Definition
|
Port ID Prio.Nbr
|
Port ID and priority number.
|
Cost
|
Port cost.
|
Sts
|
Status information.
|
This example shows how to display information about the spanning tree on active interfaces only:
Router#
show spanning-tree active
UplinkFast is disabled
BackboneFast is disabled
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 0050.3e8d.6401
Configured hello time 2, max age 20, forward delay 15
Current root has priority 16384, address 0060.704c.7000
Root port is 265 (FastEthernet5/9), cost of root path is 38
Topology change flag not set, detected flag not set
Number of topology changes 0 last change occurred 18:13:54 ago
Times: hold 1, topology change 24, notification 2
hello 2, max age 14, forward delay 10
Timers: hello 0, topology change 0, notification 0
Router#
This example shows how to display the status of spanning-tree BackboneFast:
Router# show spanning-tree backbonefast
BackboneFast is enabled
BackboneFast statistics
-----------------------
Number of transition via backboneFast (all VLANs) : 0
Number of inferior BPDUs received (all VLANs) : 0
Number of RLQ request PDUs received (all VLANs) : 0
Number of RLQ response PDUs received (all VLANs) : 0
Number of RLQ request PDUs sent (all VLANs) : 0
Number of RLQ response PDUs sent (all VLANs) : 0
Router#
This example shows how to display information about the spanning tree for this bridge only:
Router# show spanning-tree bridge
VLAN1
Bridge ID Priority 32768
Address 0050.3e8d.6401
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
.
Router#
This example shows how to display detailed information about the interface:
Router#
show spanning-tree detail
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 4096, address 00d0.00b8.1401
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 9 last change occurred 02:41:34 ago
from FastEthernet4/21
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 213 (FastEthernet4/21) of VLAN1 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.213.
Designated root has priority 4096, address 00d0.00b8.1401
Designated bridge has priority 4096, address 00d0.00b8.1401
Designated port id is 128.213, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 4845, received 1
Router#
This example shows how to display information about the spanning tree for a specific interface:
Router# show spanning-tree interface fastethernet 5/9
Interface Fa0/10 (port 23) in Spanning tree 1 is ROOT-INCONSISTENT
Port path cost 100, Port priority 128
Designated root has priority 8192, address 0090.0c71.a400
Designated bridge has priority 32768, address 00e0.1e9f.8940
This example shows how to display information about the spanning tree for a specific bridge group:
Router#
show spanning-tree 1
UplinkFast is disabled
BackboneFast is disabled
Bridge group 1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 00d0.d39c.004d
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32768, address 00d0.d39b.fddd
Root port is 7 (FastEthernet2/2), cost of root path is 19
Topology change flag set, detected flag not set
Number of topology changes 3 last change occurred 00:00:01 ago
from FastEthernet2/2
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0 bridge aging time 15
Port 2 (Ethernet0/1/0) of Bridge group 1 is down
Port path cost 100, Port priority 128
Designated root has priority 32768, address 0050.0bab.1808
Designated bridge has priority 32768, address 0050.0bab.1808
Designated port is 2, path cost 0
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 0, received 0
Router#
This example shows how to display a summary of port states:
Router#
show spanning-tree summary
Root bridge for: Bridge group 1, VLAN0001, VLAN0004-VLAN1005
VLAN1013-VLAN1499, VLAN2001-VLAN4094
EtherChannel misconfiguration guard is enabled
Extended system ID is enabled
Portfast is enabled by default
PortFast BPDU Guard is disabled by default
Portfast BPDU Filter is disabled by default
Loopguard is disabled by default
UplinkFast is disabled
BackboneFast is disabled
Platform PVST Simulation is enabled
Pathcost method used is long
Name Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
1 bridge 0 0 0 1 1
3584 vlans 3584 0 0 7168 10752
Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
Total 3584 0 0 7169 10753
Router#
This example shows how to display the total lines of the spanning-tree state section:
Router#
show spanning-tree summary total
Root bridge for:Bridge group 10, VLAN1, VLAN6, VLAN1000.
Extended system ID is enabled.
PortFast BPDU Guard is disabled
EtherChannel misconfiguration guard is enabled
UplinkFast is disabled
BackboneFast is disabled
Default pathcost method used is long
Name Blocking Listening Learning Forwarding STP Active
-------------------- -------- --------- -------- ---------- ----------
105 VLANs 3433 0 0 105 3538
BackboneFast statistics
-----------------------
Number of transition via backboneFast (all VLANs) :0
Number of inferior BPDUs received (all VLANs) :0
Number of RLQ request PDUs received (all VLANs) :0
Number of RLQ response PDUs received (all VLANs) :0
Number of RLQ request PDUs sent (all VLANs) :0
Number of RLQ response PDUs sent (all VLANs) :0
Router#
This example shows how to display information about the spanning tree for a specific VLAN:
Router#
show spanning-tree vlan 200
VLAN0200
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address 00d0.00b8.14c8
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address 00d0.00b8.14c8
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Status
---------------- ---- --- --------- -------- --------------------------------
Fa4/4 Desg FWD 200000 128.196 P2p
Fa4/5 Back BLK 200000 128.197 P2p
Router#
The table below describes the fields that are shown in the example.
Table 27. show spanning-tree vlan Command Output Fields
Field
|
Definition
|
Role
|
Current 802.1w role; valid values are Boun (boundary), Desg (designated), Root, Altn (alternate), and Back (backup).
|
Sts
|
Spanning-tree states; valid values are BKN* (broken)2, BLK (blocking), DWN (down), LTN (listening), LBK (loopback), LRN (learning), and FWD (forwarding).
|
Cost
|
Port cost.
|
Prio.Nbr
|
Port ID that consists of the port priority and the port number.
|
Status
|
Status information; valid values are as follows:
-
P2p/Shr--The interface is considered as a point-to-point (resp. shared) interface by the spanning tree.
-
Edge--PortFast has been configured (either globally using the
default command or directly on the interface) and no BPDU has been received.
-
*ROOT_Inc, *LOOP_Inc, *PVID_Inc and *TYPE_Inc--The port is in a broken state (BKN*) for an inconsistency. The port would
be (respectively) Root inconsistent, Loopguard inconsistent, PVID inconsistent, or Type inconsistent.
-
Bound(type)--When in MST mode, identifies the boundary ports and specifies the type of the neighbor (STP, RSTP, or PVST).
-
Peer(STP)--When in PVRST rapid-pvst mode, identifies the port connected to a previous version of the 802.1D bridge.
|
This example shows how to determine if any ports are in the root-inconsistent state:
Router#
show spanning-tree inconsistentports
Name Interface Inconsistency
-------------------- -------------------- ------------------
VLAN1 FastEthernet3/1 Root Inconsistent
Number of inconsistent ports (segments) in the system :1
Router#