The display stp command displays the status of and statistics about a spanning tree instance.
| Parameter | Description | Value | 
|---|---|---|
| instance instance-id | Displays the status of and statistics about a spanning tree instance. If instance <instanceId> is not specified, the status of and statistics about all spanning tree instances will be displayed in the sequence of the interface numbers. | The value is an integer ranging from 0 to 4094, Value 0 indicates CIST. | 
| interface interface-type interface-number | Displays information of a spanning tree on a specified interface. If interface <ifType> <ifNum> is not specified, the status of and statistics about all interfaces will be displayed in the sequence of the interface numbers. | - | 
| slot slot-id | Specifies the number of the slot where the interface resides. | The value is a string of 1 to 23 case-sensitive characters, spaces not supported. | 
| vsi vsi-name | Specifies the names of a virtual switching instance (VSI). | The vsi-name is a string of 1 to 31 case-sensitive characters, spaces not supported. When quotation marks are used around the string, spaces are allowed in the string. | 
| pw pw-name | Specifies the names of a pseudo wire (PW). | The pw-name is a string of 1 to 15 case-sensitive characters, spaces not supported. When quotation marks are used around the string, spaces are allowed in the string. | 
| brief | Displays the brief status. | - | 
Usage Scenario
The display stp command is used to check whether the spanning tree protocol is run on the existing
device or specified interface.Precautions
In a multi-instance scenario, a PW interface's STP state does not take effect for any MSTP instance with a non-0 ID. For such an instance, its actual STP state is the same as instance 0's STP state.
The actual STP state of an interface bound to a process in link-share mode is the same as that of the interface bound to a process in no-link-share mode. 
 The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display stp
Protocol Status       :Disabled
 Protocol Standard     :IEEE 802.1s
 Version               :3
 CIST Bridge Priority  :32768
 MAC address           :00e0-fc12-3456
 Max age(s)            :20
 Forward delay(s)      :15
 Hello time(s)         :2
 Max hops              :20
<HUAWEI> display stp instance 0 interface gigabitethernet 0/1/1 -------[CIST Global Info][Mode MSTP]------- CIST Bridge :32768.00e0-fc0e-a421 Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20 CIST Root/ERPC :32768.00e0-fc0e-a421 / 0 CIST RegRoot/IRPC :32768.00e0-fc0e-a421 / 0 CIST RootPortId :0.0 BPDU-Protection :Disabled TC or TCN received :0 TC count per hello :0 STP Converge Mode :Normal Time since last TC :0 days 23h:9m:30s ----[Port3(GigabitEthernet0/1/1)][FORWARDING]---- Port Protocol :Enabled Port Role :Designated Port Port Priority :128 Port Cost(Legacy) :Config=auto / Active=19 Designated Bridge/Port :32768.00e0-fc0e-a421 / 128.1229 Port Edged :Config=disabled / Active=disabled Point-to-point :Config=auto / Active=true Transit Limit :3 packets/hello-time Protection Type :None Port STP Mode :MSTP Config-digest-snoop :snooped=false Port Protocol Type :Config=auto / Active=dot1s BPDU Encapsulation :Config=stp / Active=stp PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0 TC or TCN send :0 TC or TCN received :0 BPDU Sent :147 TCN: 0, Config: 0, RST: 0, MST: 147 BPDU Received :0 TCN: 0, Config: 0, RST: 0, MST: 0
<HUAWEI> display stp
-------[CIST Global Info][Mode MSTP]-------                                     
CIST Bridge         :32768.bc9c-31de-7489                                       
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                    
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                    
CIST Root/ERPC      :32768.bc9c-31de-7489 / 0 (This bridge is the root)         
CIST RegRoot/IRPC   :32768.bc9c-31de-7489 / 0 (This bridge is the root)         
CIST RootPortId     :0.0                                                        
BPDU-Protection     :Disabled                                                   
TC or TCN received  :0                                                          
TC count per hello  :0                                                          
STP Converge Mode   :Normal                                                     
Time since last TC  :0 days 0h:0m:0s                                            
Number of TC        :0                                                          
Topo Change Flag    :0
| Item | Description | 
|---|---|
| Protocol Status | Status of the protocol. | 
| Protocol Standard | Standards of the protocol. | 
| Version | Protocol version: 
 | 
| CIST Bridge Priority | Priority of the switch in CIST. | 
| CIST Global Info | CIST global information. | 
| CIST Bridge | ID of the CIST bridge. 
 | 
| CIST Root/ERPC | CIST root bridge ID/External path cost (path cost from the switch to the CIST root bridge). | 
| CIST RegRoot/IRPC | Region root bridge ID/Internal path cost (path cost from the switch to region root bridge). | 
| CIST RootPortId | CIST root port ID. "0.0" indicates that the switch is a root bridge and has no root port. | 
| Bridge Times | Bridge Times. | 
| MAC address | MAC address of the switch. | 
| Max hops | Maximum hops in Multiple Spanning Tree (MST) region. | 
| Max age(s) | Maximum lifecycle of the BPDU. | 
| Forward delay(s) | Time interface status transition takes. | 
| Hello time(s) | Interval at which BPDUs are sent from the root bridge. | 
| Protection Type | Protection type , which can be: 
 | 
| Mode | The operation mode. The default mode is MSTP. For the detailed configuration, see stp mode. | 
| Config Times | Values configured manually in the BPDU: 
 | 
| Active Times | Values used actually in the BPDU: 
 | 
| BPDU-Protection | BPDU protection function: 
 | 
| TC or TCN received | Number of received topology change (TC) or topology change notification (TCN) BPDUs. | 
| TC count per hello | Number of TC BPDUs received within a hello interval. | 
| TC or TCN send | Number of TC or TCN BPDUs sent by the port. | 
| STP Converge Mode | Convergence mode of the spanning tree protocol. | 
| STP State | The status of the port: 
 | 
| Time since last TC | Period from the last topology change to now. | 
| Number of TC | Number of topology changes. | 
| Topo Change Flag | Whether the topology is changed: 
 | 
| Port Protocol | The status of the port protocol: 
 | 
| Port Role | In a CIST area, the four port roles are as follows: 
 | 
| Port Priority | Priority of the port. For the detailed configuration, see stp port priority. | 
| Port Edged | Status of an edge port that is specified by the administrator. 
 Config indicates that the value is configured by using the stp edged-port command. Active indicates the actual value. | 
| Port STP Mode | STP mode on an interface. | 
| Port Protocol Type | Format of the packets that the interface receives and sends: 
 The default value is auto. Config indicates that the packet format is configured using the stp compliance command. Active indicates the actual packet format. | 
| Port Cost(Legacy) | Path cost of the port. It is calculated by dot1t algorithm. 
 | 
| Designated Bridge/Port | ID of the designated switch and port. The 16 left-most bits of the switch ID represent the priority of the switch in the CIST region; the 48 right-most bits represent the MAC address of the switch. The left-most 4 bits of the port ID represent the priority and the right-most 12 bits represent the port number. | 
| Point-to-point | Link type of the port. Config indicates that the link type is configured using the stp point-to-point command. Active indicates the actual link type. | 
| Transit Limit | Maximum number of the BPDUs sent by the current port before each Hello time expires. For the detailed configuration, see stp transmit-limit. | 
| BPDU Encapsulation | Format of the BPDUs received and sent through a port. | 
| BPDU Sent | Statistics about sent BPDUs: 
 | 
| BPDU Received | Statistics about received BPDUs. | 
| Config-digest-snoop | Configuration digest snooping function: Displayed only after the stp config-digest-snoop command is configured to enable the configuration digest snooping function on the port. If the port does not have the function enabled, this field is not displayed. 
 | 
| PortTimes/Port Times | Values in the BPDUs on the interface: 
 |