display stp (All views)

Function

The display stp command displays the status of and statistics about a spanning tree instance.

Format

display stp [ instance instance-id ] [ interface { interface-name | interface-type interface-number } | slot slot-id | vsi vsi-name pw pw-name ] [ brief ]

Parameters

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.

-

Views

All views

Default Level

1: Monitoring level

Task Name and Operations

Task Name Operations
mstp read

Usage Guidelines

Usage Scenario

The display stp command is used to check whether the spanning tree protocol is run on the existing

device or specified interface.

  • If the Protocol Status field value is Disabled, the spanning tree protocol is not run.
  • If STP/RSTP/MSTP has been run, information such as the working mode of the spanning tree protocol will be displayed.

    When a network planner has deployed STP/RSTP/MSTP on the network, you can run the display stp command to check whether the configurations are correct and check the calculation result.

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.

Example

The actual command output varies according to the device. The command output here is only an example.

# When the stp enable command does not run, display the status of and statistics about STP.
<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
# Display the status of and statistics about spanning tree instance 0 on GE 0/1/1.
<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
# After run the stp enable command, display the status of and statistics about STP.
<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
Table 1 Description of the display stp (All views) command output
Item Description
Protocol Status

Status of the protocol.

Protocol Standard

Standards of the protocol.

Version

Protocol version:

  • 0: STP.
  • 2: RSTP.
  • 3: MSTP.
CIST Bridge Priority

Priority of the switch in CIST.

CIST Global Info

CIST global information.

CIST Bridge

ID of the CIST bridge.

  • The 16 left-most bits are the priority of the switch in CIST.
  • The 48 right-most bits is the MAC address of the switch.
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:

  • None: no protection.
  • LoopBack: self-loop detection.
  • BpduRoot: BPDU and root protection.
  • ROOT: root protection.
  • BPDU: BPDU protection.
  • Loop: loop protection.
  • BpduLoop: BPDU and loop protection.
Mode

The operation mode. The default mode is MSTP. For the detailed configuration, see stp mode.

Config Times

Values configured manually in the BPDU:

  • Hello: interval at which BPDUs are sent.
  • MaxAge: maximum lifecycle of the BPDU.
  • FwDly: forwarding delay timer.
  • MaxHop: maximum hops in the MST region.
Active Times

Values used actually in the BPDU:

  • Hello: interval at which BPDUs are sent.
  • MaxAge: maximum lifecycle of the BPDU.
  • FwDly: forwarding delay timer.
  • MaxHop: maximum hops in the MST region.
BPDU-Protection

BPDU protection function:

  • disabled.
  • enabled.
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:

  • Forwarding.
  • Discarding.
  • Down.
  • Disabled.
  • Learning.
  • Inactive.
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:

  • 0: The topology is not changed.
  • 1: The topology is changed.
Port Protocol

The status of the port protocol:

  • enable: STP is enabled on the port.
  • disable: STP is disabled on the port.
Port Role

In a CIST area, the four port roles are as follows:

  • CIST Root Port.
  • CIST Designated Port.
  • CIST Alternate Port.
  • CIST Backup Port.
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.

  • enabled.
  • disabled.

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:

  • auto.
  • legacy.
  • dot1s.

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.

  • config: path cost manually configured.
  • active: actual path cost.
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:

  • TCN: topology change notification.
  • Config: STP BPDUs.
  • RST: RSTP BPDUs.
  • MST: MSTP 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.

  • snooped=false: The configuration digest of the packets on the remote end is the same as that on the local end.
  • snooped=true: The configuration digest of the packets on the remote end is different from that on the local end.
PortTimes/Port Times

Values in the BPDUs on the interface:

  • Hello: interval at which BPDUs are sent.
  • MaxAge: maximum lifecycle of the BPDU.
  • FwDly: forwarding delay timer.
  • MaxHop: maximum hops in the MST region.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >