< Home

display stp

Function

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

Format

STP/RSTP/MSTP: display stp [ process process-id ] [ instance instance-id ] [ interface interface-type interface-number | slot slot-id ] [ brief ]

VBST: display stp [ vlan vlan-id ] [ interface interface-type interface-number | slot slot-id ] [ brief ]

Parameters

Parameter Description Value
process process-id

Indicates the ID of an MSTP process.

If process process-id is not specified, the status and statistics of an MSTP process with the ID 0 will be displayed.

The value is a decimal integer ranging from 1 to 31.
instance instance-id

Displays the status and statistics of a spanning tree instance.

If instance instance-id is not specified, the status and statistics of 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 refers to CIST.
NOTE:

instance-id ranges from 0 to 4094. Each process supports a maximum of 65 instances.

interface interface-type interface-number

Displays the information of a spanning tree on a specified interface.

If interface interface-type interface-number is not specified, the status and statistics of all interfaces will be displayed in the sequence of the interface numbers.

-
brief Displays the brief status. -
slot slot-id

Displays the status of and statistics on a spanning tree instance in a specified slot.

The value is an integer and must be an existing slot on the device.

vlan vlan-id

Displays spanning tree configurations in a specified VLAN.

If vlan vlan-id is not specified, configurations of spanning trees in all VLANs are displayed.

NOTE:

If vlan vlan-id is specified, only VBST spanning tree configurations in a specified VLAN are displayed.

The value is an integer ranging from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display stp command is used to check whether STP/RSTP/MSTP/VBST is run in the existing switching device or specified interface.
  • If the Protocol Status field value is Disabled, STP/RSTP/MSTP/VBST is not run.
  • If STP/RSTP/MSTP has been run, information such as the working mode of STP/RSTP/MSTP/VBST will be displayed.

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

Precautions
  • If you run this command in the system view without specifying an MSTP process, information about MSTP process 0 is displayed by default.

  • If you run this command in the MSTP process view without specifying an MSTP process, information about the MSTP process in this view is displayed by default.

  • In VBST, if NAC authentication is configured but user authentication fails on a port that is configured as an edge port and is in Active state, information about the port is not displayed.

  • If a non-0 instance is mapped to a VLAN to which no interface is added, the following information is displayed when you query the status and statistics of the spanning tree instance:
    Info: No instance information is available.

For description about MSTP process 0, see stp process.

Example

# When the stp enable command does not run, the status and statistics of STP are displayed.

<HUAWEI> display stp
 Protocol Status       :Disabled
 Protocol Standard     :IEEE 802.1s
 Version               :3
 CIST Bridge Priority  :32768
 MAC address           :00e0-6343-6800
 Max age(s)            :20
 Forward delay(s)      :15
 Hello time(s)         :2
 Max hops              :20   
 Share region-configuration :Enabled
Table 1 Description table of the display stp command output

Item

Description

Protocol Status

Status of the protocol.
  • Disabled
  • Enabled

Protocol Standard

Standards of the protocol.

Version

Protocol version:
  • 0: STP

  • 2: RSTP

  • 3: MSTP

To set the protocol version, run the stp mode command.

CIST Bridge Priority

Priority of the switch in the CIST. To set the STP priority, run the stp priority command.

MAC address

MAC address of the switch.

Max age (s)

Maximum TTL of a BPDU. To set the value of Max Age, run the stp timer max-age command.

Forward delay (s)

Time taken by interface status transition. To set the value of Forward Delay, run the stp timer forward-delay command.

Hello time (s)

Interval for sending BPDUs from the root switch. To set the hello time, run the stp timer hello command.

Max hops

Maximum number of hops in an MST region. To set the maximum number of hops, run the stp max-hops command.

Share region-configuration

Status of sharing the region configuration of process 0. The status is fixed at Enable.

# Display the status of and statistics on a spanning tree instance when the stp enable command is configured.

<HUAWEI> display stp brief
 MSTID   Port                        Role  STP State     Protection 
    0    GigabitEthernet0/0/1        DESI  FORWARDING      NONE     
    0    GigabitEthernet0/0/2        DESI  FORWARDING      NONE     
    0    GigabitEthernet0/0/4        ROOT  FORWARDING      NONE  
Table 2 Description of the display stp brief command output

Item

Description

MSTID

MSTP instance ID.

Port -
Role
Interface role:
  • DESI: Designated port

  • ROOT: Root port

  • ALTE: Alternate port

  • BACK: Backup port

  • MAST: Master port

  • DISA: The interface is in initialization state.

STP State
Interface status. In the CIST region, the statuses of interfaces are as follows:
  • FORWARDING

  • LEARNING

  • DISCARDING

Protection
Protection function:
  • ROOTPROTECTION
  • LOOPPROTECTION
  • NONE
  • LOOPBACK: loopback detection
  • PVIDCONSISTENCY: The PVID of the directly connected interface is inconsistent.

# Displays spanning tree configurations when VBST is running.
<HUAWEI> display stp
-------[VLAN 20 Global Info][Mode VBST]-------
Bridge ID           :32788.00e0-f068-0600
Bridge Diameter     :7
Config Times        :Hello 2s MaxAge 20s FwDly 15s
Active Times        :Hello 2s MaxAge 20s FwDly 15s
Root ID / RPC       :20   .00e0-c959-e700 / 20
RootPortId          :128.2 (GigabitEthernet0/0/2)
Root Type           :Normal
BPDU-Protection     :Disabled
STP Converge Mode   :Normal
Time since last TC  :0 days 0h:10m:46s
Number of TC        :1 
Last TC occurred    :GigabitEthernet0/0/1
 ----[Port1(GigabitEthernet0/0/1)][DISCARDING]----
 Port Role          :Alternate Port
 Port Priority      :128
 Port Cost(Legacy)  :Config=20000 / Active=20000
 Desg. Bridge/Port  :32788.00e0-2539-c700 / 128.3
 Port Edged         :Config=Default / Active=Disabled
 Point-to-point     :Config=Auto / Active=true
 Transit Limit      :6 packets/hello
 Protection Type    :None
 Port STP Mode      :VBST
 BPDU Encapsulation :Config=VBST / Active=VBST
 BPDU Sent          :0             
          TCN: 0, Config: 0, RST: 0
 BPDU Received      :0             
          TCN: 0, Config: 0, RST: 0
Table 3 Description of the display stp command output

Item

Description

Bridge ID Bridge ID.
Bridge Diameter

VBST network diameter.

Config Times Time values in manually configured bridge protocol information:
  • Hello: indicates the interval for sending BPDUs.
  • MaxAge: indicates the maximum lifetime of BPDUs.
  • MaxAge: indicates the maximum lifetime of BPDUs.
  • FwDly: indicates the delay for port status transition.
Active Times Time values in actual bridge protocol information:
  • Hello: indicates the interval for sending BPDUs.
  • MaxAge: indicates the maximum lifetime of BPDUs.
  • MaxAge: indicates the maximum lifetime of BPDUs.
  • FwDly: indicates the delay for port status transition.
Root ID / RPC Root switch ID in a VLAN or external path cost from the local switch to the CIST root switch.
RootPortId ID of the root port in a VLAN. The value 0.0 indicates that the switch is the root switch without the root port.
Root Type Root bridge type.

BPDU-Protection

BPDU protection function:
  • Disabled

  • Enabled

STP Converge Mode

STP converge mode

Time since last TC

Period from the last topology change to now.

Number of TC

Topology change count.

Port Role Role of the port.
Port Priority

Priority of the port. To set the priority for a port, run the stp port priority command.

Port Cost(Legacy) Port path cost calculated using Huawei proprietary algorithm:
  • Config: indicates the manually configured path cost.
  • Active: indicates the actual path cost.
Desg. Bridge/Port Designated bridge or port.
Port Edged
Edge port specified by the administrator:
  • enabled: indicates that the edge port is enabled.

  • disabled: indicates that the edge port is not enabled.

Config indicates the value configured by the stp edged-port command; Active indicates the actual value.
Point-to-point

Link type of the port. Config indicates the link type configured by the stp point-to-point command; Active indicates the actual link type.

Transit Limit

Maximum number of BPDUs sent by the current interface in each Hello time. To set the maximum number of BPDUs sent per second on a port, run the stp transmit-limit (interface view) command.

Protection Type Protection type:
  • root-protection
  • loop-protection
  • None
  • LoopBack: loopback detection

Port STP Mode

STP mode on an interface.

BPDU Encapsulation

Format of BPDUs that are sent and received on the interface. In STP/RSTP/MSTP mode, the value is stp. In VBST mode, the value is VBST.

BPDU Sent

Statistics about the packets sent by BPDU is as follows:
  • TCN: topology change notification

  • Config: STP packets

  • RST: RSTP packets

  • MST: MSTP packets

BPDU Received

Statistics about the packets received by BPDU.

# Display the status of and statistics on the spanning tree instance 0 on GE0/0/1.

<HUAWEI> display stp instance 0 interface gigabitethernet 0/0/1
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge         :32768.00e0-fc0e-a421
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC      :32768.00e0-fc0e-a421 / 0 (This bridge is the root)
CIST RegRoot/IRPC   :32768.00e0-fc0e-a421 / 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
Share region-configuration :Enabled
Time since last TC  :0 days 23h:9m:30s
Number of TC        :1
----[Port3(GigabitEthernet0/0/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    
Table 4 Description of the display stp instance command output

Item

Description

CIST Global Info

CIST global information.

Mode MSTP

The operation mode is MSTP. By default, the mode is MSTP. To set the operation mode, run the stp mode command.

CIST Bridge

ID of the CIST bridge.
  • The previous 16 bits are the priority of the switch in CIST.

  • The latter 48 bits is the MAC address of the switch.

NOTE:

CIST Bridge is displayed when STP/RSTP/MSTP is running. Bridge ID is displayed when VBST is running.

Config Times

Value that is configured manually in the bridge protocol information:
  • Hello: the period of sending BPDUs.

  • MaxAge: the maximum life cycle of BPDU.

  • FwDly: deferred time of the change of the port status.

  • MaxHop: the maximum hops in the MST region.

Active Times

Value that is used actually in the bridge protocol information:
  • Hello: the period of sending BPDUs.

  • MaxAge: the maximum life cycle of BPDU.

  • FwDly: deferred time of the change of the port status.

  • MaxHop: the maximum hops in the MST region.

CIST Root/ERPC

CIST root bridge ID/External path cost (the path cost from the switch to the CIST root bridge.)

NOTE:

CIST Root/ERPC is displayed when STP/RSTP/MSTP is running. Root ID / RPC is displayed when VBST is running.

CIST RegRoot/IRPC

Region root bridge ID/Internal path cost (the path cost from the switch to region root bridge.)

CIST RootPortId

CIST root port ID. "0.0" indicates the switch is a root bridge and has no root port.

NOTE:

CIST RootPortId is displayed when STP/RSTP/MSTP is running. RootPortId is displayed when VBST is running.

BPDU-Protection

BPDU protection function:
  • Disabled

  • Enabled

TC or TCN received

Number of the received TC or TCN packets.

TC count per hello

Number of TC packets received within a hello interval.

STP Converge Mode

STP converge mode

Share region-configuration

The status of sharing the region configuration of process 0.

Time since last TC

Period from the last topology change to now.

Number of TC

Topology change count.

Port Protocol

The status of the port protocol is as follows:
  • Enable: STP is enabled on the port.

  • disable: STP is disabled on the port.

Port Role

The port roles are as follows:
  • Root Port

  • Designated Port

  • Alternate Port

  • Backup Port

  • Master port

  • Disabled Port

Port Priority

Priority of the port. To set the priority for a port, run the stp port priority command.

Port Cost(Legacy)

Path cost of the port. It is calculated by dot1t algorithm.
  • config: refers to the path cost that is configured manually.

  • active: refers to the path cost actually.

Designated Bridge/Port

ID of the designated switch and port. The first 16 bits of the switch ID represent the priority of the switch in the CIST region; the last 48 bits represent the MAC address of the switch. The first 4 bits of the port ID represent the priority and the last 12 bits represent the port number.

Port Edged

Edged 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.

Point-to-point

Link type of the port. Config indicates that the link type is configured by running the stp point-to-point command. Active indicates the actual link type.

Transit Limit

Limit of the BPDUs sent by the current port during each Hello time. To set the limit of the BPDUs sent by the current port during each Hello time, run the stp transmit-limit (interface view) command.

Protection Type

The protection type is as follows:
  • root protection
  • loop protection
  • None
  • LoopBack: loopback detection

Port STP Mode

STP mode on an interface.

Config-digest-snoop

The configuration digest snooping function. The command output is displayed only after the stp config-digest-snoop command is configured and the configuration digest snooping function is enabled on the port. If the port is not enabled with the function, the command output 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.

Port Protocol Type

Format of the packets that the interface receives and sends. The formats are as follows:
  • auto

  • legacy

  • dot1s

The default value is auto. Config indicates that the packet format is configured by running the stp compliance command. Active indicates the actual packet format.

BPDU Encapsulation

Format of BPDUs that are sent and received on the interface. In STP/RSTP/MSTP mode, the value is stp. In VBST mode, the value is VBST.

PortTimes

Values in the bridge protocol information of the interface:
  • Hello: the period of sending BPDUs.

  • MaxAge: the maximum life cycle of BPDU.

  • FwDly: deferred time of the change of the port status.

  • RemHop: the maximum hops in the MST region.

TC or TCN send

Number of BPDUs with TC flags or TCN BPDUs sent by the port.

TC or TCN received

Number of BPDUs with TC flags or TCN BPDUs received by the port.

BPDU Sent

Statistics about the packets sent by BPDU is as follows:
  • TCN: topology change notification

  • Config: STP packets

  • RST: RSTP packets

  • MST: MSTP packets

BPDU Received

Statistics about the packets received by BPDU.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >