display stp
Use display stp to display spanning tree status and statistics. Based on the information, you can analyze and maintain the network topology or determine whether the spanning tree is working correctly.
Syntax
display stp [ instance instance-list | vlan vlan-id-list ] [ interface interface-list | slot slot-number ] [ brief ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
instance instance-list: Specifies a space-separated list of up to 10 MSTI items. Each item specifies an MSTI or a range of MSTIs in the form of instance-id1 [ to instance-id2 ]. The value for instance-id2 must be equal to or greater than the value for instance-id1. The value range for the instance-id argument is 0 to 4094, and the value 0 represents the CIST.
vlan vlan-id-list: Specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 [ to vlan-id2 ]. The value for vlan-id2 must be equal to or greater than the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.
interface interface-list: Specifies a space-separated list of up to 10 interface items. Each item specifies an interface or a range of interfaces in the form of interface-type interface-number 1 [ to interface-type interface-number 2 ]. The interface number for interface-number 2 must be equal to or greater than the interface number for interface-number 1.
brief: Displays brief spanning tree status and statistics. If this keyword is not specified, the command displays the detailed spanning tree status and statistics.
slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays spanning tree status and statistics for all member devices.
Usage guidelines
In STP or RSTP mode, the command output is sorted by port name.
If you do not specify a port, this command applies to all ports.
If you specify a port list, this command applies to the specified ports.
In PVST mode, the command output is sorted by VLAN ID and by port name in each VLAN.
If you do not specify a VLAN or port, this command applies to all ports in all VLANs.
If you only specify a VLAN list but not a port, this command applies to all ports in the specified VLANs.
If you only specify a port list but not a VLAN, this command applies to the specified ports in all VLANs.
If you specify both a VLAN list and a port list, this command applies to the ports in the specified VLANs.
In MSTP mode, the command output is sorted by MSTI ID and by port name in each MSTI.
If you do not specify an MSTI or port, this command applies to all MSTIs on all ports.
If you specify an MSTI list but not a port, this command applies to all ports in the specified MSTIs.
If you specify a port list but not an MSTI, this command applies to all MSTIs on the specified ports.
If you specify both an MSTI list and a port list, this command applies to the specified ports in the specified MSTIs.
During network convergence, the most recent spanning tree information is not displayed.
Examples
# In MSTP mode, display the brief spanning tree status and statistics for MSTI 0 on ports Ten-GigabitEthernet 1/0/1 through Ten-GigabitEthernet 1/0/4.
<Sysname> display stp instance 0 interface ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/4 brief MST ID Port Role STP State Protection 0 Ten-GigabitEthernet1/0/1 ALTE DISCARDING LOOP 0 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE 0 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE 0 Ten-GigabitEthernet1/0/4 DESI FORWARDING NONE
# In PVST mode, display the brief spanning tree status and statistics for VLAN 2 on ports Ten-GigabitEthernet 1/0/1 through Ten-GigabitEthernet 1/0/4.
<Sysname> system-view [Sysname] stp mode pvst [Sysname] display stp vlan 2 interface ten-gigabitethernet 1/0/1 to ten-gigabitethernet 1/0/4 brief VLAN ID Port Role STP State Protection 2 Ten-GigabitEthernet1/0/1 ALTE DISCARDING LOOP 2 Ten-GigabitEthernet1/0/2 DESI FORWARDING NONE 2 Ten-GigabitEthernet1/0/3 DESI FORWARDING NONE 2 Ten-GigabitEthernet1/0/4 DESI FORWARDING NONE
Table 28: Command output
Field | Description |
---|---|
MST ID | MSTI ID in the MST region. |
Port | Port name, corresponding to each MSTI or VLAN. |
Role | Port role:
|
STP State | Spanning tree status on the port:
|
Protection | Effective spanning tree protection feature on the port:
|
# In MSTP mode, display the detailed spanning tree status and statistics for all MSTIs on all ports.
<Sysname> display stp -------[CIST Global Info][Mode MSTP]------- Bridge ID : 32768.000f-e200-2200 Bridge times : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20 Root ID/ERPC : 0.00e0-fc0e-6554, 200200 RegRoot ID/IRPC : 32768.000f-e200-2200, 0 RootPort ID : 128.48 BPDU-Protection : Disabled Bridge Config- Digest-Snooping : Disabled TC or TCN received : 2 Time since last TC : 0 days 0h:5m:42s ----[Port153(Ten-GigabitEthernet1/0/1)][FORWARDING]---- Port protocol : Enabled Port role : Designated Port (Boundary) Port ID : 128.153 Port cost(Legacy) : Config=auto, Active=200 Desg.bridge/port : 32768.000f-e200-2200, 128.2 Port edged : Config=disabled, Active=disabled Point-to-Point : Config=auto, Active=true Transmit limit : 10 packets/hello-time TC-Restriction : Disabled Role-Restriction : Disabled Protection type : Config=none, Active=none MST BPDU format : Config=auto, Active=legacy Port Config- Digest-Snooping : Disabled Rapid transition : False Num of VLANs mapped : 1 Port times : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 2s RemHops 20 BPDU sent : 186 TCN: 0, Config: 0, RST: 0, MST: 186 BPDU received : 0 TCN: 0, Config: 0, RST: 0, MST: 0 -------[MSTI 1 Global Info]------- Bridge ID : 0.000f-e23e-9ca4 RegRoot ID/IRPC : 0.000f-e23e-9ca4, 0 RootPort ID : 0.0 Root type : Primary root Master bridge : 32768.000f-e23e-9ca4 Cost to master : 0 TC received : 0
# In PVST mode, display the spanning tree status and statistics for all ports in all VLANs.
<Sysname> system-view [Sysname] stp mode pvst [Sysname] display stp -------[VLAN 1 Global Info]------- Protocol status : Enabled Bridge ID : 32768.000f-e200-2200 Bridge times : Hello 2s MaxAge 20s FwdDelay 15s VlanRoot ID/RPC : 0.00e0-fc0e-6554, 200200 RootPort ID : 128.48 BPDU-Protection : Disabled TC or TCN received : 2 Time since last TC : 0 days 0h:5m:42s ----[Port1(Ethernet1/1)][FORWARDING]---- Port protocol : Enabled Port role : Designated Port Port ID : 128.153 Port cost(Legacy) : Config=auto, Active=200 Desg. bridge/port : 32768.000f-e200-2200, 128.2 Port edged : Config=disabled, Active=disabled Point-to-Point : Config=auto, Active=true Transmit limit : 10 packets/hello-time Protection type : Config=none, Active=none Rapid transition : False Port times : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 2s -------[VLAN 2 Global Info]------- Protocol status : Enabled Bridge ID : 32768.000f-e200-2200 Bridge times : Hello 2s MaxAge 20s FwDly 15s VlanRoot ID/RPC : 0.00e0-fc0e-6554, 200200 RootPort ID : 128.48 BPDU-Protection : Disabled TC or TCN received : 2 Time since last TC : 0 days 0h:5m:42s
# In MSTP mode, display the spanning tree status and statistics when the spanning tree feature is disabled.
<Sysname> display stp Protocol status : Disabled Protocol Std. : IEEE 802.1s Version : 3 Bridge-Prio. : 32768 MAC address : 000f-e200-8048 Max age(s) : 20 Forward delay(s) : 15 Hello time(s) : 2 Max hops : 20 TC Snooping : Disabled
# In PVST mode, display the spanning tree status and statistics when the spanning tree feature is disabled.
<Sysname> display stp Protocol status : Disabled Protocol Std. : IEEE 802.1w (pvst) Version : 2 Bridge-Prio. : 32768 MAC address : 3822-d69f-0800 Max age(s) : 20 Forward delay(s) : 15 Hello time(s) : 2 TC Snooping : Disabled
Table 29: Command output
Field | Description |
---|---|
Bridge ID | Bridge ID, which contains the device's priority and MAC address. For example, in output 32768.000f-e200-2200, the value preceding the dot is the device's priority. The value following the dot is the device's MAC address. |
Bridge times | Major parameters for the bridge:
|
Root ID/ERPC | CIST root ID and external path cost (the path cost from the device to the CIST root). |
RegRoot ID/IRPC | CIST regional root ID and internal path cost (the path cost from the device to the CIST regional root). |
VlanRoot ID/RPC | VLAN root ID and root path cost (the path cost from the device to the VLAN root bridge). |
RootPort ID | Root port ID. The value 0.0 indicates that the device is the root and there is no root port. |
BPDU-Protection | Global status of the BPDU guard function. |
Bridge Config- Digest-Snooping | Global status of Digest Snooping. |
TC or TCN received | Number of TC/TCN BPDUs received in the MSTI or VLAN. |
Time since last TC | Time since the latest topology change in the MSTI or VLAN. |
[FORWARDING] | The port is in forwarding state. |
[DISCARDING] | The port is in discarding state. |
[LEARNING] | The port is in learning state. |
Port protocol | Status of the spanning tree feature on the port. |
Port role | Port role:
|
(Boundary) | The port is a regional boundary port. |
Port cost(Legacy) | Path cost of the port. The field in parentheses indicates the standard (legacy, dot1d-1998, or dot1t) used for port path cost calculation.
|
Desg.bridge/port | Designated bridge ID and port ID of the port. The port ID displayed is insignificant for a port which does not support port priority. |
Port edged | The port is an edge port or non-edge port.
|
Point-to-Point | The port is connected to a point-to-point link or not.
|
Transmit limit | Number of BPDUs sent within each hello time. |
Protection type | Whether spanning tree protection is configured on the port:
Spanning tree protection features are as follows:
|
TC-Restriction | Status of TC transmission restriction on the port. |
Role-Restriction | Status of port role restriction on the port. |
MST BPDU format | Format of the MST BPDUs that the port can send:
|
Port Config- Digest-Snooping | Status of Digest Snooping on the port. |
Rapid transition | Indicates whether the port rapidly transits to the forwarding state in the MSTI or VLAN. |
Num of VLANs mapped | Number of VLANs that are mapped to the MSTI. |
Port times | Major parameters for the port:
|
BPDU sent | Statistics on sent BPDUs. |
BPDU received | Statistics on received BPDUs. |
RegRoot ID/IRPC | MSTI regional root/internal path cost. |
Root Type | MSTI root type:
|
Master bridge | MSTI root bridge ID. |
Cost to master | Path cost from the MSTI to the master bridge. |
TC received | Number of received TC BPDUs. |
Protocol status | Spanning tree protocol status. |
Protocol Std. | Spanning tree protocol standard. |
Version | Spanning tree protocol version. |
Bridge-Prio. |
|
Max age(s) | Aging timer for BPDUs (in seconds, which is the same as the aging timer for VLAN 1 in PVST mode). |
Forward delay(s) | Port state transition delay (in seconds, which is the same as the forward delay for VLAN 1 in PVST mode). |
Hello time(s) | Interval for the root bridge to send BPDUs (in seconds, which is the same as the interval for VLAN 1 in PVST mode). |
Max hops | Maximum hops in the MSTI. |
TC Snooping | Status of TC Snooping, which can be Enabled or Disabled. |
Related commands
reset stp