Show Spanning-Tree: Syntax Description

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

https://www.cisco.com/c/m/en_us/techdoc/dc/reference/cli/n5k/commands/show-spanning-tree.

html

show spanning-tree
To display information about the Spanning Tree Protocol (STP), use the show spanning-tree command.

show spanning-tree [blockedports | inconsistentports | pathcost method]

Syntax Description

blockedports (Optional) Displays the alternate ports blocked by STP.


inconsistentports (Optional) Displays the ports that are in an inconsistent STP
state.
pathcost method (Optional) Displays whether short or long path cost method is
used. The method differs for Rapid Per VLAN Spanning Tree
Plus (Rapid PVST+) (configurable, default is short) and Multiple
Spanning Tree (MST) (nonconfigurable, operational value is
always long).

Command Default

None

Command Modes
EXEC mode

Command History

Release Modification
4.0(0)N1(1a) This command was introduced.

Usage Guidelines

The STP port type displays only when you have configured the port as either an STP edge port or an STP
network port. If you have not configured the STP port type, no port type displays.

Table 3-3 describes the fields that are displayed in the output of show spanning-tree commands.

Table 3-3 show spanning-tree Command Output Fields 


Fiel
d Definition
Role Current port STP role. Valid values are as follows:

• Desg (designated)

• Root

• Altn (alternate)

• Back (backup)


Sts Current port STP state. Valid values are as follows:

• BLK (blocking)

• DIS (disabled)

• LRN (learning)

• FWD (forwarding)


Type Status information. Valid values are as follows:

• P2p/Shr—The interface is considered as a point-to-point (shared)


interface by the spanning tree.

• Edge—The port is configured as an STP edge port (either globally


using the default command or directly on the interface) and no BPDU has
been received.

• Network—The port is configured as an STP network port (either


globally using the default command or directly on the interface).

• *ROOT_Inc, *LOOP_Inc, *PVID_Inc, *BA_Inc, and *TYPE_Inc—The


port is in a broken state (BKN*) for an inconsistency. The broken states are
Root inconsistent, Loopguard inconsistent, PVID inconsistent, Bridge
Assurance inconsistent, or Type inconsistent.

Note  Display output differs slightly depending on whether you are running Rapid Per VLAN Spanning
Tree Plus (Rapid PVST+) or Multiple Spanning Tree (MST).

Examples

This example shows how to display spanning tree information:

switch# show spanning-tree


VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 1
Address 000d.ecb0.fdbc
Cost 2
Port 4096 (port-channel1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 61441 (priority 61440 sys-id-ext 1)


Address 0005.9b78.6e7c
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- --------------------------------
Po1 Root FWD 1 128.4096 (vPC peer-link) Network P2p
Po3 Root FWD 1 128.4098 (vPC) P2p
Po123 Desg FWD 4 128.4218 Edge P2p
Eth1/11 Desg BKN*2 128.139 P2p *TYPE_Inc
Eth1/12 Desg BKN*2 128.140 P2p *TYPE_Inc
Eth1/15 Desg BKN*2 128.143 P2p *TYPE_Inc
Eth1/16 Desg BKN*2 128.144 P2p *TYPE_Inc
Eth1/33 Desg FWD 2 128.161 Edge P2p
Eth1/35 Desg FWD 2 128.163 Edge P2p
Eth1/36 Desg FWD 2 128.164 Edge P2p
Eth1/38 Desg FWD 2 128.166 Edge P2p
Eth100/1/1 Desg FWD 1 128.1025 (vPC) Edge P2p
Eth100/1/2 Desg FWD 1 128.1026 (vPC) Edge P2p
Eth100/1/3 Desg FWD 1 128.1027 (vPC) Edge P2p
Eth100/1/4 Desg FWD 1 128.1028 (vPC) Edge P2p
--More--
switch#

This example shows how to display the blocked ports in spanning tree:

switch# show spanning-tree blockedports

Name Blocked Interfaces List


-------------------- ------------------------------------
VLAN0001 Eth1/11, Eth1/12, Eth1/15, Eth1/16

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

switch#

This example shows how to determine if any ports are in any STP-inconsistent state:

switch# show spanning-tree inconsistentports

Name Interface Inconsistency


-------------------- ---------------------- ------------------
VLAN0001 Eth1/11 Port Type Inconsistent
VLAN0001 Eth1/12 Port Type Inconsistent
VLAN0001 Eth1/15 Port Type Inconsistent
VLAN0001 Eth1/16 Port Type Inconsistent

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

switch#

This example shows how to display the path cost method:

switch(config)# show spanning-tree pathcost method Spanning tree default


pathcost method used is short
switch#

Related Commands

Command Description
show spanning-tree Displays information about STP active interfaces only.
active
show spanning-tree Displays the bridge ID, timers, and protocol for the local
bridge bridge on the switch.
show spanning-tree Displays a brief summary about STP.
brief
show spanning-tree Displays detailed information about STP.
detail
show spanning-tree Displays the STP interface status and configuration of
interface specified interfaces.
show spanning-tree Displays information about Multiple Spanning Tree (MST)
mst STP.
show spanning-tree Displays the status and configuration of the root bridge for
root the STP instance to which this switch belongs.
show spanning-tree Displays summary information about STP.
summary
show spanning-tree Displays STP information for specified VLANs.
vlan

You might also like