No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S7700 and S9700 V200R011C10

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
STP/RSTP/MSTP/VBST Configuration Commands

STP/RSTP/MSTP/VBST Configuration Commands

Command Support

Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.

active region-configuration

Function

The active region-configuration command activates the configuration of a multiple spanning tree (MST) region.

Format

active region-configuration

Parameters

None

Views

MST region view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Configuring MST region parameters, especially VLAN mapping tables for MST regions, is likely to cause network topology flapping. To reduce network flapping, make sure that newly configured MST region parameters take effect only after the active region-configuration command is run.

Precautions

Before running the active region-configuration command, you are recommended to run the check region-configuration command to check whether the region configurations that have not taken effect are correct. If the region configurations that have not taken effect are correct, run the active region-configuration command.

After the active region-configuration command is run, the configured MST region parameters will take effect and all spanning trees in the MST region will be recalculated.

If the VLAN to be mapped to an MSTP instance is the control VLAN for the SEP segment, the newly configured parameters of the MST region cannot be activated.

Example

# Map VLAN 5 to the spanning tree instance 2 and activate the configuration.

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region] instance 2 vlan 5
[HUAWEI-mst-region] active region-configuration

check region-configuration

Function

The check region-configuration command displays the configuration of an MST region such as the region name, revision level, and VLAN mapping table.

Format

check region-configuration

Parameters

None

Views

MST region view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP divides a switching network into multiple regions, each of which has multiple spanning trees that are independent of each other. Each region is called an MST region and each spanning tree is called a multiple spanning tree instance (MSTI).

Two switching devices belong to the same MST region only when they have the following same configurations:
  • MST region name
  • MST region revision level
  • Mappings between MSTIs and VLANs

To ensure that MST region configurations on each switching device are correct, you are recommended to run the check region-configuration command to check the MST region configurations before running the active region-configuration command. If the MST region configurations are correct, run the active region-configuration command to activate them.

Precautions

By default, VLANs that are not mapped to any instances with non-zero IDs using the instance command are mapped to instance 0.

Example

# Display the configuration of an MST region.

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region] check region-configuration
 Admin configuration                                                            
   Format selector    :0                                                        
   Region name        :00b010000001                                             
   Revision level     :0                                                        
                                                                                
   Instance   VLANs Mapped                                                      
      0       1 to 9, 11 to 4094
     16       10
Table 5-81  Description of the check region-configuration command output

Item

Description

Format selector

Selection factor defined by MSTP

Region name

Name of the MST region. To configure the name for an MST region, run the region-name command.

Revision level

Revision level of the MST region. To set the revision level of the MST region, run the revision-level command.

Instance VLANs Mapped

Mapping between MSTIs and VLANs. To configure the mapping between MSTIs and VLANs, run the instance or vlan-mapping modulo.

display ethernet-loop-protection ignored-vlan

Function

The display ethernet-loop-protection ignored-vlan command displays information about configured ignored VLANs.

Format

display ethernet-loop-protection ignored-vlan

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After you configure an ignored VLAN using the ethernet-loop-protection ignored-vlan command, the display ethernet-loop-protection ignored-vlan command can be used to display information about the configured ignored VLAN.

Prerequisites

An ignored VLAN has been configured using the ethernet-loop-protection ignored-vlan command.

Example

# Display information about the configured ignored VLAN.

<HUAWEI> display ethernet-loop-protection ignored-vlan
Ethernet-loop-protection ignored-vlan : 3 to 4
Table 5-82  Description of the display ethernet-loop-protection ignored-vlan command output

Item

Description

Ethernet-loop-protection ignored-vlan

ID of a configured ignored VLAN

To specify the parameter, run the ethernet-loop-protection ignored-vlan command.

display snmp-agent trap feature-name mstp all

Function

The display snmp-agent trap feature-name mstp all command displays all trap messages of the MSTP module.

Format

display snmp-agent trap feature-name mstp all

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The Simple Network Management Protocol (SNMP) is a standard network management protocol widely used on TCP/IP networks. It uses a central computer (a network management station) that runs network management software to manage network elements. The management agent on the network element automatically reports traps to the network management station. Then, the network administrator immediately takes measures to resolve the problem.

The display snmp-agent trap feature-name mstp all command displays whether all trap functions of the MSTP module are enabled.

Example

# Display all trap messages of the MSTP module.

<HUAWEI> display snmp-agent trap feature-name mstp all
------------------------------------------------------------------------------
Feature name: MSTP
Trap number : 22
------------------------------------------------------------------------------
Trap name                       Default switch status   Current switch status
hwMstpiPortStateForwarding      off                     off
hwMstpiPortStateDiscarding      off                     off
hwMstpiBridgeLostRootPrimary    off                     off
hwMstpiPortBpduGuarded          off                     off
hwMstpiPortRootGuarded          off                     off
hwMstpiPortLoopGuarded          off                     off
newRoot                        off                     off
topologyChange                 off                     off
hwMstpiEdgePortChanged          off                     off
hwMstpiTcGuarded                off                     off
hwMstpProNewPortStateForwarding
                                off                     off
hwMstpProNewPortStateDiscarding
                                off                     off
hwMstpProNewBridgeLostRootPrimary
                                off                     off
hwMstpProNewPortBpduGuarded     off                     off
hwMstpProNewPortRootGuarded     off                     off
hwMstpProNewPortLoopGuarded     off                     off
hwMstpProNewEdgePortChanged     off                     off
hwMstpProTcGuarded              off                     off
hwMstpProRootChanged            off                     off
hwMstpProLoopbackDetected       off                     off
hwMstpPortCountThreshold        off                     off
hwMstpPortCountThresholdResume  off                     off
Table 5-83  Description of the display snmp-agent trap feature-name mstp all command output

Item

Description

Feature name

Name of the module to which a trap message belongs.

Trap number

Number of trap messages.

Trap name

Name of a trap message of the MSTP module:

  • hwMstpiPortStateForwarding: indicates that the port status changes to Forwarding.

  • hwMstpiPortStateDiscarding: indicates that the port status changes to Discarding.

  • hwMstpiBridgeLostRootPrimary: indicates that the current device is no longer the root bridge.

  • hwMstpiPortBpduGuarded: indicates that the edge port enabled with the BPDU guard function can receive BPDUs.

  • hwMstpiPortRootGuarded: indicates that the port enabled with the root guard function receives BPDUs with higher priorities.

  • hwMstpiPortLoopGuarded: indicates that the port enabled with the loop guard function does not receive any BPDU in a specified period.

  • newRoot: indicates that the current device is elected as the root bridge.

  • topologyChange: indicates that the topology changes.

  • hwMstpiEdgePortChanged: indicates that the edge port that is not enabled with the BPDU guard function is no longer the edge port after receiving bridge protocol data units (BPDUs).

  • hwMstpiTcGuarded: indicates that the number of topology change (TC) packets received by the instance enabled with the TC guard function exceeds the upper limit.

  • hwMstpProNewPortStateForwarding: indicates that in the MSTP process the port status changes to Forwarding.

  • hwMstpProNewPortStateDiscarding: indicates that in the MSTP process the port status changes to Discarding.

  • hwMstpProNewBridgeLostRootPrimary: indicates that in the Multiple Spanning Tree Protocol (MSTP) process the device is no longer the root bridge.

  • hwMstpProNewPortBpduGuarded: indicates that in the MSTP process the port enabled with the BPDU guard function can receive BPDUs.

  • hwMstpProNewPortRootGuarded: indicates that in the MSTP process the port enabled with the root guard function receives BPDUs with higher priorities.

  • hwMstpProNewPortLoopGuarded: indicates that in the MSTP process the port enabled with the loop guard function does not receive any BPDU in a specified period.

  • hwMstpProNewEdgePortChanged: indicates that in the MSTP process the edge port that is not enabled with the BPDU guard function is no longer the edge port after receiving BPDUs.

  • hwMstpProTcGuarded: indicates that in the MSTP process the number of TC packets received by the instance enabled with the TC guard function exceeds the upper limit.

  • hwMstpProRootChanged: indicates that the root bridge changes.

  • hwMstpProLoopbackDetected: indicates that port detected loopback, block the port.
  • hwMstpPortCountThreshold: indicates that the number of STP interfaces that were Up on a device exceeded the upper threshold.
  • hwMstpPortCountThresholdResume: indicates that the number of STP interfaces that were Up on a device fell below the lower threshold.

Default switch status

Status of the default trap function:

  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

Current switch status

Status of the current trap function:

  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

To specify the parameter, run the snmp-agent trap enable feature-name mstp command.

display snmp-agent trap feature-name vbst all

Function

The display snmp-agent trap feature-name vbst all command displays all trap messages of the VBST module.

Format

display snmp-agent trap feature-name vbst all

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The Simple Network Management Protocol (SNMP) is a standard network management protocol widely used on TCP/IP networks. It uses a central computer (a network management station) that runs network management software to manage network elements. The management agent on the network element automatically reports traps to the network management station. Then, the network administrator immediately takes measures to resolve the problem.

The display snmp-agent trap feature-name vbst all command displays whether all trap functions of the VBST module are enabled.

Example

# Display all trap messages of the VBST module.

<HUAWEI>display snmp-agent trap feature-name vbst all
------------------------------------------------------------------------------
Feature name: VBST                          
Trap number : 5         
------------------------------------------------------------------------------
Trap name                       Default switch status   Current switch status 
hwVbstPVNumExceeded             off                     off                 
hwVbstPVNumResumed              off                     off                 
hwVbstInvalidPV                 off                     off                 
hwVbstTrunkPVNumExceeded        off                     off                 
hwVbstTrunkPVNumResumed         off                     off      
Table 5-84  Description of the display snmp-agent trap feature-name vbst all command output

Item

Description

Feature name

Name of the module to which a trap message belongs.

Trap number

Number of trap messages.

Trap name

Name of a trap message of the VBST module:

  • hwVbstPVNumExceeded: indicates that the number of interfaces and VLANs participating in VBST calculation exceeded the maximum number of interfaces and VLANs allowed by VBST.

  • hwVbstPVNumResumed: indicates that the number of interfaces and VLANs participating in VBST calculation falls below 95% of the maximum number of interfaces and VLANs allowed by VBST.

  • hwVbstInvalidPV: indicates that the number of VLANs that do not participate in calculation in the VBST BPDUs received by the interface exceeds the threshold.

  • hwVbstTrunkPVNumExceeded: indicates that the number of PVs of the Eth-Trunk exceeds the maximum value.

  • hwVbstTrunkPVNumResumed: indicates that the number of PVs of the Eth-Trunk is restored to be within the allowed range.

Default switch status

Status of the default trap function:

  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

Current switch status

Status of the current trap function:

  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

To specify the parameter, run the snmp-agent trap enable feature-name vbst command.

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 63.
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 an integer
  • 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.

  • 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.
NOTE:

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 5-85  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 (system view) 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 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

The status of sharing the region configuration of process 0, the status is fixed as 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    GigabitEthernet1/0/1        DESI  FORWARDING      NONE     
    0    GigabitEthernet1/0/2        DESI  FORWARDING      NONE     
    0    GigabitEthernet1/0/4        ROOT  FORWARDING      NONE  
Table 5-86  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    :GigabitEthernet1/0/1
 ----[Port1(GigabitEthernet1/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 5-87  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 GE1/0/1.

<HUAWEI> display stp instance 0 interface gigabitethernet 1/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
Last TC occurred    :GigabitEthernet1/0/1

----[Port3(GigabitEthernet1/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 5-88  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 (system view) 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 convergence 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.

Last TC occurred

Interface which causes the last topology change

NOTE:

This parameter does not appear when Number of TC is 0.

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.

display stp abnormal-interface

Function

The display stp abnormal-interface command displays information about abnormal interfaces running the Spanning Tree Protocol (STP).

Format

STP/RSTP/MSTP: display stp [ process process-id ] [ instance instance-id ] abnormal-interface

VBST: display stp [ vlan vlan-id ] abnormal-interface

Parameters

Parameter Description Value
process process-id

Displays the ID of a specified multi service transport platform (MSTP) process.

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

The value is an integer in the range 1 to 63.

instance instance-id

Displays the status and statistics of a specified 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 in the range 0 to 4094. The value 0 indicates a common and internal spanning tree (CIST) instance.
NOTE:

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

vlan vlan-id

Displays information about abnormal ports running STP in a specified VLAN.

If vlan vlan-id is not specified, information about abnormal ports running STP in all VLANs is displayed.

NOTE:

If vlan vlan-id is specified, only information about abnormal ports running VBST is displayed.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

If a device has many interfaces and the display stp command output displays vast information, viewing information about abnormal interfaces running STP is difficult.

You can use the display stp abnormal-interface command to view information about abnormal interfaces running STP.

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.

Example

# Display information about abnormal interfaces in process 0 running STP

<HUAWEI> display stp instance 0 abnormal-interface
MSTID    Interface                     Status          Reason                   
    0    GigabitEthernet1/0/0          DISCARDING      LOOP-Protected           
    0    GigabitEthernet1/0/1          DOWN            BPDU-Protected           
    0    GigabitEthernet1/0/2          DISCARDING      ROOT-Protected           
    0    GigabitEthernet1/0/3          DISCARDING      LOOP-Detected
# Display information about abnormal ports running VBST in VLAN 5.
<HUAWEI> display stp vlan 5 abnormal-interface
VLAN    Interface                     Status          Reason                   
   5    GigabitEthernet1/0/0          DISCARDING      LOOP-Protected           
   5    GigabitEthernet1/0/1          DOWN            BPDU-Protected           
   5    GigabitEthernet1/0/2          DISCARDING      ROOT-Protected           
   5    GigabitEthernet1/0/3          DISCARDING      LOOP-Detected
Table 5-89  Description of the display stp abnormal-interface command output

Item

Description

MSTID

MSTP instance ID

Interface

Interface type

Status

Status of an interface after the STP protection takes effect
  • DOWN: indicates that the physical status of the interface is Down (including error-down).
  • DISCARDING: indicates the blocked interface after the topology of the spanning tree becomes stable.

Reason

An interface running STP becomes abnormal due to one of the following:
  • Root-Protected: indicates that the root protection takes effect.
  • Loop-Protected: indicates that the loop protection takes effect.
  • BPDU-Protected: indicates that the BPDU protection takes effect.
  • Loop-Detected: indicates that the loop detection takes effect.
  • PVID-Inconsistency: The PVID of the directly connected interface is inconsistent.

VLAN

VLAN ID.

Related Topics

display stp active

Function

The display stp active command displays the status of and statistics on spanning trees of all Up interfaces.

Format

STP/RSTP/MSTP: display stp [ process process-id ] active

VBST: display stp [ vlan vlan-id ] active

Parameters

Parameter Description Value
process process-id

Multiple Spanning Tree Protocol (MSTP) process ID

If process process-id is not specified, the status of and statistics on process 0 will be displayed.

The value is an integer ranging from 1 to 63.

vlan vlan-id

Displays details and statistics about spanning trees of all ports in Up state in a specified VLAN.

If vlan vlan-id is not specified, details and statistics about spanning trees of all ports in Up state in all VLANs are displayed.

NOTE:

If vlan vlan-id is specified, only details and statistics about spanning trees of all ports in Up state in a specified VLAN are displayed.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The display stp active command displays information about spanning trees of Up interfaces only.

Precautions

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

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

Example

# Display information about spanning trees of all Up interfaces of MSTP process 0 when STP/RSTP/MSTP is running.

<HUAWEI> display stp active
-------[CIST Global Info][Mode MSTP]-------                                     
CIST Bridge         :61440.781d-ba56-f06c                                       
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                    
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                    
CIST Root/ERPC      :61440.781d-ba56-f06c / 0 (This bridge is the root)                                  
CIST RegRoot/IRPC   :61440.781d-ba56-f06c / 0 (This bridge is the root)                                  
CIST RootPortId     :0.0                                                        
BPDU-Protection     :Disabled                                                   
TC or TCN received  :85                                                         
TC count per hello  :0                                                          
STP Converge Mode   :Normal                                                     
Share region-configuration :Enabled
Time since last TC  :0 days 9h:10m:8s
Number of TC        :13                                                         
Last TC occurred    :GigabitEthernet1/0/4
----[Port18(GigabitEthernet1/0/10)][FORWARDING]----                             
 Port Protocol       :Enabled                                                   
 Port Role           :Designated Port                                           
 Port Priority       :128                                                       
 Port Cost(Dot1T )   :Config=auto / Active=20000                                
 Designated Bridge/Port   :61440.781d-ba56-f06c / 128.18                        
 Port Edged          :Config=default / Active=enabled                           
 Point-to-point      :Config=auto / Active=true                                 
 Transit Limit       :10 packets/s                                              
 Protection Type     :None                                                      
 Port STP Mode       :MSTP                                                      
 Port Protocol Type  :Config=auto / Active=dot1s                                
 BPDU Encapsulation  :Config=stp / Active=stp                                   
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s RemHop 20                   
 TC or TCN send      :5                                                         
 TC or TCN received  :0                                                         
 BPDU Sent           :178445                                                    
          TCN: 0, Config: 0, RST: 0, MST: 178445                                
 BPDU Received       :0                                                         
          TCN: 0, Config: 0, RST: 0, MST: 0                                     
 Last forwarding time: 2012/04/19 16:58:37 UTC+08:00                            
----[Port19(GigabitEthernet2/1/17)][FORWARDING]----                             
 Port Protocol       :Enabled                                                   
 Port Role           :Designated Port                                           
 Port Priority       :128                                                       
 Port Cost(Dot1T )   :Config=auto / Active=20000                                
 Designated Bridge/Port   :61440.781d-ba56-f06c / 128.19                        
 Port Edged          :Config=default / Active=enabled                           
 Point-to-point      :Config=auto / Active=true                                 
 Transit Limit       :10 packets/s                                              
 Protection Type     :None                                                      
 Port STP Mode       :MSTP                                                      
 Port Protocol Type  :Config=auto / Active=dot1s                                
 BPDU Encapsulation  :Config=stp / Active=stp                                   
 PortTimes           :Hello 2s MaxAge 20s FwDly 15s RemHop 20                   
 TC or TCN send      :0                                                         
 TC or TCN received  :0                                                         
 BPDU Sent           :5                                                         
          TCN: 0, Config: 0, RST: 0, MST: 5                                     
 BPDU Received       :0                                                         
          TCN: 0, Config: 0, RST: 0, MST: 0                                     
 Last forwarding time: 2012/04/23 20:06:08 UTC+08:00                            
                                                                                
-------[MSTI 1 Global Info]-------                                              
MSTI Bridge ID      :61440.781d-ba56-f06c                                       
MSTI RegRoot/IRPC   :61440.781d-ba56-f06c / 0(This bridge is the root)
MSTI RootPortId     :0.0                                                        
Master Bridge       :61440.781d-ba56-f06c                                       
Cost to Master      :0                                                          
TC received         :2                                                          
TC count per hello  :0                                                          
Time since last TC  :0 days 9h:10m:8s                                           
Number of TC        :9                                                          
Last TC occurred    :GigabitEthernet1/0/4
# Display details and statistics about spanning trees of all ports in Up state in VLAN 10 when VBST is running.
<HUAWEI> display stp vlan 10 active
-------[VLAN 10 Global Info][Mode VBST]-------
Bridge ID           :10   .00e0-5553-9900
Bridge Diameter     :7   
Config Times        :Hello 2s MaxAge 20s FwDly 15s
Active Times        :Hello 2s MaxAge 20s FwDly 15s
Root ID / RPC       :10   .00e0-5553-9900 / 0 (This bridge is the root)
RootPortId          :0.0
Root Type           :Primary
BPDU-Protection     :Disabled
STP Converge Mode   :Normal
Time since last TC  :0 days 0h:10m:46s
Number of TC        :1
 ----[Port1(GigabitEthernet1/0/1)][FORWARDING]----
 Port Role          :Designated Port
 Port Priority      :128
 Port Cost(Legacy)  :Config=Auto / Active=20
 Desg. Bridge/Port  :10   .00e0-5553-9900 / 128.1
 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 5-90  Description of the display stp active command output

Item

Description

CIST Bridge

Bridge ID

CIST bridge:

Bridge ID:

NOTE:

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

Bridge Diameter

VBST network diameter.

Config Times

Configured bridge protocol parameters:
  • Hello: interval at which Bridge Protocol Data Units (BPDUs) are sent. To specify the parameter, run the stp timer hello command.

  • MaxAge: maximum TTL of a BPDU. To specify the parameter, run the stp timer max-age command.

  • FwDly: delay in interface status transition. To specify the parameter, run the stp timer forward-delay command.

  • MaxHop: maximum number of hops in the MST region. To specify the parameter, run the stp max-hops command.

Active Times

Bridge protocol parameters that are being used:
  • Hello: interval at which BPDUs are sent

  • MaxAge: maximum TTL of a BPDU

  • FwDly: delay in interface status transition

  • MaxHop: maximum number of hops in the MST region

CIST Root/ERPC

Root ID/RPC

CIST Root/ERPC indicates the CIST root bridge ID/external path cost from the switch to the root bridge.

Root ID/RPC indicates the root bridge ID in a VLAN/external path cost from the switch to the 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

ID of the CIST region root bridge or cost of the path from the switch to the CIST region root switch.

CIST RootPortId

RootPortId

CIST RootPortId indicates the CIST root port ID. "0.0" indicates that the switch is the root switch without the root port.

RootPortId indicates the root port ID in a VLAN. "0.0" indicates that the switch is the root switch without the root port.

NOTE:

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

BPDU-Protection

Whether BPDU protection is enabled:
  • Disabled: BPDU protection is disabled.

  • Enabled: BPDU protection is enabled.

To specify the parameter, run the stp bpdu-protection command.

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 per Hello time.

STP Converge Mode

Convergence mode of the Spanning Tree Protocol (SPT), which can be fast or normal. For details, see stp converge.

Share region-configuration

The status of sharing the region configuration of process 0. The status is fixed as Enabled.

Time since last TC

Time since the last topology change.

Number of TC

Number of topology changes.

Last TC occurred

Interface which causes the last topology change.

NOTE:

This parameter does not appear when Number of TC is 0.

Port Protocol

STP status on the interface:
  • Enabled: STP is enabled on the interface.
  • Disabled: STP is disabled on the interface.

To specify the parameter, run the stp enable command.

Port Role

Role of an interface:
  • Root Port
  • Designated Port
  • Alternate Port
  • Backup Port
  • Master port

  • Disabled Port

Port Priority

Interface priority. To configure the interface priority, run the stp port priority command.

Port Cost(Dot1T)

Path cost (calculated by dot1t) of an interface:
  • Config: configured path cost
  • Active: path cost that is being used

To specify the parameter, run the stp pathcost-standard and stp cost commands.

Designated Bridge/Port

Switch ID/Port ID The first 16 bits represent the switch's priority in the CIST region, and the last 48 bits represent the switch's MAC address. The first 4 bits of the port ID represent the port's priority, and the last 12 bits represent the port number.

Port Edged

Whether the edge interface (specified by the administrator) is enabled:
  • enabled: The edge interface is enabled.

  • disabled: The edge interface is disabled.

Config indicates the value that is specified in the stp edged-port command, and Active indicates the value in use.

Point-to-point

Link type of the interface. Config indicates the link type that is specified in the stp point-to-point command, and Active indicates the link type that is being used.

Transit Limit

Maximum number of BPDUs that the current interface can send per second. For details, see stp transmit-limit.

Protection Type

Protection type, which can be:
  • root-protection: Protection takes effect only on the specified interface.

  • loop-protection: Protection takes effect only on the root interface or alternate interface.

  • None

To specify the parameter, run the stp root-protection or stp loop-protection command.

Port STP Mode

STP mode of the interface.

To specify the parameter, run the stp mode (system view) command.

Port Protocol Type

Format of BPDUs sent and received on the interface, which can be:
  • auto

  • legacy

  • dot1s

The default value is auto. Config indicates the packet format that is specified in the stp compliance command, and Active indicates the packet format in use.

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

Bridge protocol parameters of the interface:
  • Hello: interval at which BPDUs are sent. To specify the parameter, run the stp timer hello command.

  • MaxAge: maximum TTL of a BPDU. To specify the parameter, run the stp timer max-age command.

  • FwDly: delay in interface status transition. To specify the parameter, run the stp timer forward-delay command.

  • RemHop: maximum number of hops in the MST region. To specify the parameter, run the stp max-hops command.

TC or TCN send

Number of TC or TCN BPDUs sent on the interface.

TC or TCN received

Number of TC or TCN BPDUs received on the interface.

BPDU Sent

Statistics on sent BPDUs, including:
  • TCN: TCN BPDUs

  • Config: STP BPDUs

  • RST: Rapid Spanning Tree Protocol (RSTP) BPDUs

  • MST: MSTP BPDUs

BPDU Received

Statistics on received BPDUs.

MSTI Bridge ID

Multiple Spanning Tree instance (MSTI) bridge ID.

MSTI RegRoot/IRPC

MSTI root bridge ID/Cost of the internal path (path from the switch to the MSTI root switch).

MSTI RootPortId

ID of the MSTI root interface. 0.0 indicates that the switch is the root switch and does not provide any root interface.

Master Bridge

ID of the bridge where the master interface is located.
  • The first 16 bits represent the switch's priority in the CIST.
  • The last 48 bits represent the switch's MAC address.

Cost to Master

Cost of the path from the switch to the bridge where the master interface is located. 0 indicates that the master interface is located at the current bridge.

TC received

Number of received TC BPDU.

display stp bridge

Function

The display stp bridge command displays details about the spanning tree of a bridge.

Format

STP/RSTP/MSTP: display stp [ process process-id ] bridge { root | local }

VBST: display stp [ vlan vlan-id ] bridge { root | local }

Parameters

Parameter Description Value
process process-id

Multiple Spanning Tree Protocol (MSTP) process ID

If process process-id is not specified, details about the spanning tree of MSTP process 0 will be displayed.

The value is an integer ranging from 1 to 63.

root Displays details about the spanning tree of the root bridge. -
local Displays details about the spanning tree of the local bridge. -
vlan vlan-id

Displays details about the spanning tree of a bridge in a specified VLAN.

If vlan vlan-id is not specified, details about the spanning trees of bridges in all VLANs are displayed.

NOTE:

If vlan vlan-id is specified, only information about bridges running VBST is displayed.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

When a device provides many interfaces, running the display stp command displays a large amount of information, and it is difficult to find information about the spanning trees of the root and local bridges.

Using the display stp bridge command, you can easily view details about the spanning trees of the root and local bridges.

Precautions

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

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

Example

# Display details about the spanning tree of the root bridge of MSTP process 0 when STP/RSTP/MSTP is running.

<HUAWEI> display stp bridge root
MSTID              Root ID  Root Cost Hello Max Forward Root Port               
                                       Time Age   Delay                         
----- -------------------- ---------- ----- --- ------- -----------------       
    0 61440.781d-ba56-f06c          0     2  20      15                         
    1 61440.781d-ba56-f06c          0     2  20      15
# Display details about the spanning tree of the root bridge running VBST in VLAN 5.
<HUAWEI> display stp vlan 5 bridge root
 VLAN-ID           Root ID  Root Cost Hello Max Forward Root Port                                                                   
                                       Time Age   Delay                                                                             
----- -------------------- ---------- ----- --- ------- -----------------                                                           
    5 32773.5489-9876-a2b0      20000     2  20      15 GigabitEthernet1/0/5
Table 5-91  Description of the display stp bridge command output

Item

Description

MSTID

MSTP instance ID

Root ID

Root bridge ID

Root Cost

Root path cost

Hello Time

Interval at which Bridge Protocol Data Units (BPDUs) are sent from the root switch. To specify the parameter, run the stp timer hello command

Max Age

Maximum TTL of a BPDU. To specify the parameter, run the stp timer max-age command

Forward Delay

Delay in interface status transition. To specify the parameter, run the stp timer forward-delay command

Root Port

Root interface

VLAN-ID

VLAN ID.

display stp error packet

Function

The display stp error packet command displays the statistics about error packets received by MSTP and the contents of recently received packets.

Format

display stp error packet

Parameters

None.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If a device on a Layer 2 network runs MSTP is attacked by MSTP error packets, the display stp error packet command can be used to view recently received MSTP error packets.

Example

# Display the statistics about error packets received by MSTP and the contents of recently received packets.

<HUAWEI> display stp error packet
 4 error-packet(s) have been received and the last one is received at 2011/05/02 12:45:31.
01 80 C2 00 00 00 38 AA D2 11 11 10 00 69 42 42 
03 00 00 03 02 7C 00 00 38 AA D2 11 11 10 00 00 
00 00 00 00 38 AA D2 11 11 10 80 01 00 00 14 00 
02 00 0F 00 00 00 40 00 33 38 61 61 64 32 31 31 
31 31 31 30 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 AC 36 17 7F 50 28 
3C D4 B8 38 21 D8 AB 26 DE 62 00 00 00 00 00 00 
38 AA D2 11 11 10 14

display stp global

Function

The display stp global command displays global Spanning Tree Protocol (STP) information.

Format

display stp [ process process-id ] global

Parameters

Parameter Description Value
process process-id

Multiple Spanning Tree Protocol (MSTP) process ID

If process process-id is not specified, the global STP information of MSTP process 0 will be displayed. VBST does not support processes. Therefore, this parameter cannot be specified when the spanning tree protocol is VBST.

The value is an integer ranging from 1 to 63.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

When a device provides many interfaces, the display stp command output contains a large amount of information, and it is difficult to find the desired information quickly and view global information at a glance. The display stp brief command output, by comparison, displays information about spanning trees on interfaces, but not global information.

Using the display stp global command, you can view global STP information conveniently.

Precautions

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

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

Example

# Display brief STP information about MSTP process 0 when STP/RSTP/MSTP is running.

<HUAWEI> display stp global
Protocol Status            : Enabled                                            
Bpdu-filter default        : Disabled                                           
Tc-protection              : Enabled                                           
Tc-protection threshold    : 1                                                  
Tc-protection interval     : 2s                                                 
Edged port default         : Enabled                                            
Pathcost-standard          : Dot1t                                              
Timer-factor               : 3                                                  
Transmit-limit             : 10                                                 
Bridge-diameter            : 7                                                  
-------[CIST Global Info][Mode MSTP]-------                                     
CIST Bridge         :61440.781d-ba56-f06c                                       
Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                    
Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                    
CIST Root/ERPC      :61440.781d-ba56-f06c / 0                                   
CIST RegRoot/IRPC   :61440.781d-ba56-f06c / 0                                   
CIST RootPortId     :0.0                                                        
BPDU-Protection     :Disabled                                                   
TC or TCN received  :85                                                         
TC count per hello  :0                                                          
STP Converge Mode   :Normal                                                     
Share region-configuration :Enabled
Time since last TC  :0 days 9h:12m:34s
Number of TC        :13                                                         
Last TC occurred    :GigabitEthernet1/0/4
# Display brief STP information when VBST is running.
<HUAWEI> display stp global
Protocol Status            : Enabled             
Bpdu-filter default        : Disabled            
Tc-protection              : Enabled            
Tc-protection threshold    : 1                   
Tc-protection interval     : 2s                  
Edged port default         : Disabled            
Pathcost-standard          : Dot1t               
Timer-factor               : 3                   
Transmit-limit             : 6                   
STP Converge Mode          : Normal
Table 5-92  Description of the display stp global command output

Item

Description

Protocol Status

Spanning Tree Protocol (STP) status:
  • Enabled: STP is enabled.
  • Disabled: STP is disabled.

To specify the parameter, run the stp enable command.

Bpdu-filter default

Whether the function of configuring device interfaces as Bridge Protocol Data Unit (BPDU) filter interfaces is enabled:
  • Enabled: The function is enabled.
  • Disabled: The function is disabled.

To specify the parameter, run the stp bpdu-filter default command.

Tc-protection

Topology change (TC) protection status. This function is permanently enabled.

Tc-protection threshold

Threshold of TC packets that the device can handle and immediately refresh forwarding entries in a given period. To specify the parameter, run the stp tc-protection threshold command.

Tc-protection interval

Time the MSTP takes to handle a given number of TC packets and immediately refresh forwarding entries. To specify the parameter, run the stp tc-protection interval command.

Edged port default

Whether the function of configuring all ports of the switch as edge ports is enabled:
  • Enabled: The function is enabled.
  • Disabled: The function is disabled.

To specify the parameter, run the stp edged-port default command.

Pathcost-standard

Method of calculating the MSTP path cost

To specify the parameter, run the stp pathcost-standard command.

Timer-factor

Multiplier of Hello time

To specify the parameter, run the stp timer-factor command.

Transmit-limit

Maximum number of BPDUs that the current interface can send per Hello time. For details, see stp transmit-limit.

Bridge-diameter

Network diameter of the MSTP

To specify the parameter, run the stp bridge-diameter command.

CIST Bridge

Common and internal spanning tree (CIST) bridge ID
  • The first 16 bits represent the switch's priority in the CIST.
  • The last 48 bits represent the switch's MAC address.

Config Times

Configured bridge protocol parameters:
  • Hello: interval at which BPDUs are sent. To specify the parameter, run the stp timer hello command.
  • MaxAge: maximum TTL of a BPDU. To specify the parameter, run the stp timer max-age command.
  • FwDly: delay in interface status transition. To specify the parameter, run the stp timer forward-delay command.
  • MaxHop: maximum number of hops in the MST region. To specify the parameter, run the stp max-hops command.

Active Times

Bridge protocol parameters that are being used:
  • Hello: interval at which BPDUs are sent
  • MaxAge: maximum TTL of a BPDU
  • FwDly: delay in interface status transition
  • MaxHop: maximum number of hops in the MST region

CIST Root/ERPC

CIST root switch ID/Cost of the external path (path from the switch to the CIST root switch)

CIST RegRoot/IRPC

ID of the CIST region root bridge/Cost of the internal path (path from the switch to the CIST region root switch)

CIST RootPortId

ID of the CIST root interface. 0.0 indicates that the switch is the root switch and does not provide any root interface.

BPDU-Protection

Whether BPDU protection is enabled:
  • Disabled: BPDU protection is disabled.
  • Enabled: BPDU protection is enabled.

To specify the parameter, run the stp bpdu-protection command.

TC or TCN received

Number of received TC or topology change notification (TCN) packets

TC count per hello

Number of TC packets received per Hello time

STP Converge Mode

Convergence mode of the Spanning Tree Protocol (SPT), which can be fast or normal. For details, see stp converge.

Share region-configuration

The status of sharing the region configuration of process 0. The status is fixed as Enabled.

Time since last TC

Time since the last topology change

Number of TC

Number of topology changes

Last TC occurred

Interface which causes the last topology change

NOTE:

This parameter does not appear when Number of TC is 0.

display stp region-configuration

Function

The display stp region-configuration command displays the effective configuration of the MST region on the switching device. The configuration includes the region name, revision level and mapping relationship between VLANs and spanning tree instances.

Format

display stp [ process process-id ] region-configuration [ digest ]

Parameters

Parameter Description Value
process process-id Indicates the ID of an MSTP process. VBST does not support processes. Therefore, this parameter cannot be specified when the spanning tree protocol is VBST. The value is an integer ranging from 1 to 63.
digest Displays brief information about the effective MST region. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After an MST region is configured and takes effect on the network running MSTP, you can run the display stp region-configuration command to view the name, revision level, STP instance, and inter-VLAN mapping of the MST region.

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.

NOTE:

For description about MSTP process 0, see stp process.

Example

# Display the configuration of MST regions when STP/RSTP/MSTP is running.

<HUAWEI> display stp region-configuration
Oper configuration
   Format selector :0
   Region name     :huawei
   Revision level  :0
   Instance   VLANs Mapped
      0       21 to 4094
      1       1 to 10
      2       11 to 20
# Display brief information about the effective MST region when STP/RSTP/MSTP is running.
<HUAWEI> display stp region-configuration digest
 Oper configuration
   Format selector    :0
   Region name        :huawei
   Revision level     :0
   Digest             :0xAC36177F50283CD4B83821D8AB26DE62
# Display the mapping between VLANs and MSTIs when VBST is running.
<HUAWEI> display stp region-configuration
 Oper configuration
   Format selector    :0
   Region name        :00e055539900
   Revision level     :0

   Instance Mode    VLANs Mapped
      0     default 1 to 9, 11 to 19, 21 to 29, 31 to 39, 41 to 4094
     10     static  10
     20     static  20
     30     static  30
     40     static  40
Table 5-93  Description of the display stp region-configuration command output

Item

Description

Format selector

Selection factors defined by the MSTP protocol.

Region name

Name of the MST region. For the related commands, see region-name.

Revision level

Revision level of the MST region. For the related commands, see revision-level.

Instance VLANs Mapped

Mapping between the spanning tree instance and VLANs of the MST region. For the related commands, see instance or vlan-mapping modulo.

If the mapping is incorrect, run the instance command to re-map the specified VLAN to the specified MSTI and run the active region-configuration command to activate the mapping.

Digest

Brief information about the MST region.

Mode

Mode for the mapping between MSTIs and VLANs:
  • Static
  • Dynamic
  • Default
NOTE:

The mapping between MSTIs and VLANs can be statically configured or dynamically specified. The configuration of instance is static. The system dynamically allocates an instance ID to a new VLAN in ascending order. If an instance ID is statically configured for this VLAN, the statically configured one takes effect. That is, static configuration takes precedence over dynamic configuration.

display stp tc-bpdu statistics

Function

The display stp tc-bpdu statistics command displays statistics of sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.

Format

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

VBST: display stp [ vlan vlan-id ] [ interface interface-type interface-number | slot slot-id ] tc-bpdu statistics

Parameters

Parameter Description Value
process process-id

Specifies the ID of an MSTP process of which statistics of TC and TCN BPDUs are displayed.

If the parameter process process-id is not specified, statistics of TC and TCN BPDUs in MSTP process 0 are displayed.

The value is an integer ranging from 1 to 63.

instance instance-id

Specifies the ID of an MSTP instance of which statistics of TC and TCN BPDUs are displayed.

If the parameter instance instance-id is not specified, statistics of TC and TCN BPDUs on all interfaces are displayed in the sequence of the interface numbers.

The value is an integer that ranges from 0 to 4094. The value 0 indicates a CIST instance.
NOTE:

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

interface interface-type interface-number

Specifies the interface on which statistics of TC and TCN BPDUs are displayed.

If the parameter interface interface-type interface-number is not specified, statistics of TC and TCN BPDUs on all interfaces are displayed in the sequence of the interface numbers.

-

slot slot-id

Displays the statistics of TC and TCN BPDUs 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

Display statistics on sent and received TC and TCN BPDUs on ports in a specified VLAN.

If vlan vlan-id is not specified, statistics on sent and received TC and TCN BPDUs on ports in all VLANs are displayed.

NOTE:

If vlan vlan-id is specified, only statistics on sent and received TC and TCN BPDUs on ports running VBST are displayed.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

If you need to know whether a fault has occurred on interfaces that send and receive TC/TCN BPDUs, you can run this command to view statistics of these BPDUs and locate the fault.

Example

# Display the statistics of TC/TCN BPDUs on interfaces of an MSTP instance when STP/RSTP/MSTP is running.

<HUAWEI> display stp tc-bpdu statistics
 -------------------------- STP TC/TCN information --------------------------
 MSTID Port                        TC(Send/Receive)      TCN(Send/Receive)
 0     GigabitEthernet1/0/9               3/2                   0/0 
 0     GigabitEthernet1/0/10              1/0                   0/0 
 1     GigabitEthernet1/0/9               14/9                  -/-  
 1     GigabitEthernet1/0/10              8/10                  -/-  
 2     GigabitEthernet1/0/9               3/2                   -/-  
 2     GigabitEthernet1/0/10              1/0                   -/-
# Display statistics on sent and received TC and TCN BPDUs on ports running VBST.
<HUAWEI> display stp vlan 5 tc-bpdu statistics
 -------------------------- STP TC/TCN information --------------------------                                                       
 VLAN-ID  Port                        TC(Send/Receive)      TCN(Send/Receive)                                                          
       5  GigabitEthernet1/0/5        1/615                 0/0         
Table 5-94  Description of the display stp tc-bpdu statistics command output

Item

Description

MSTID

ID of an MSTP instance.

Port

Interface name.

TC(Send/Receive)

Statistics of sent and received TC BPDUs.

TCN(Send/Receive)

Statistics of send and received TCN BPDUs. ("-" indicates that MSTP instances except MSTP instance 0 do not have TCN BPDUs sent and received.)

VLAN-ID

VLAN ID.

display stp topology-change

Function

The display stp topology-change command displays the statistics about topology changes.

Format

STP/RSTP/MSTP: display stp [ process process-id ] [ instance instance-id ] topology-change

VBST: display stp [ vlan vlan-id ] topology-change

Parameters

Parameter Description Value
process process-id

Displays statistics about the topology changes of a specified MSTP process.

If this parameter is not specified, the statistics about the topology changes of MSTP process 0 are displayed.

The value is an integer ranging from 1 to 63.

instance instance-id

Displays statistics about the topology changes of a specified STP instance.

If this parameter is not specified, the statistics about the topology changes of a CIST instance are displayed.

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.

vlan vlan-id

Displays statistics on topology changes in a specified VLAN.

If vlan vlan-id is not specified, statistics on topology changes in all VLANs are displayed.

NOTE:

If vlan vlan-id is specified, only statistics on topology changes of VBST are displayed.

The value is an integer that ranges from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

On a Layer 2 network running MSTP, a device clears ARP entries and MAC entries after receiving topology change packets. If a device receives too many topology change packets, the device will frequently clear ARP entries and MAC entries, causing high CPU usage. As a result, network traffic is instable.

The display stp topology-change command can be used to display the statistics about MSTP/VBST topology changes. If the statistics increase, network flapping occurs.

Prerequisites

In the case of a non-zero process, the stp process process-id command must be used to create a process.

Prerequisites

In the case of a non-zero process, the stp process process-id command must be used to create a process.

Example

# Display statistics about MSTP topology changes when MSTP is running.

<HUAWEI> display stp topology-change
CIST topology change information
   Number of topology changes             :5
   Time since last topology change        :0 days 0h:23m:19s
   Topology change initiator(detected)    :GigabitEthernet1/0/1
   Topology change last received from     :00e0-5b3c-c100
   Number of generated topologychange traps :   5
   Number of suppressed topologychange traps:   3

 MSTI 1 topology change information
   Number of topology changes             :5
   Time since last topology change        :0 days 0h:23m:19s
   Topology change initiator(detected)    :GigabitEthernet1/0/2
   Number of generated topologychange traps :   5
   Number of suppressed topologychange traps:   3

 MSTI 2 topology change information
   Number of topology changes             :5
   Time since last topology change        :0 days 0h:23m:19s
   Topology change initiator(notified)    :GigabitEthernet1/0/3
   Number of generated topologychange traps :   5
   Number of suppressed topologychange traps:   3

 MSTI 3 topology change information
   Number of topology changes             :5
   Time since last topology change        :0 days 0h:23m:19s
# Display statistics on topology changes in VLAN 5 when VBST is running.
<HUAWEI> display stp vlan 5 topology-change
 VLAN 5 topology change information
   Number of topology changes             :316
   Topology change initiator(notified)    :GigabitEthernet1/0/5
   Time since last topology change        :0 days 0h:3m:18s
   Topology change last received from     :5489-9876-a2b0
Table 5-95  Description of the display stp topology-change command output

Item

Description

Number of topology changes

Total number of topology changes since initialization.

NOTE:

The number of received and sent TC BPDUs in each VLAN may be different during topology convergence, so the number of topology changes in each VLAN may be different.

Time since last topology change

Time since the last topology change.

Topology change initiator(detected)

Interface that initiates a topology change because the interface status changes to detected.

Topology change initiator(notified)

Interface that initiates a topology change after receiving a topology change packet.

Topology change last received from

Source bridge MAC address contained in a topology change packet.

Number of generated topologychange traps

Total number of generated topology-change traps.

Number of suppressed topologychange traps

Total number of suppressed topology-change traps.

display stp vlan

Function

The display stp vlan command displays the STP status on an interface added to a specified VLAN.

Format

display stp vlan vlan-id

Parameters

Parameter Description Value
vlan-id

Displays the STP status on an interface added to a specified VLAN.

The value is an integer ranging from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After an interface is added to a VLAN, the display stp vlan command can be used to the display the STP status on the interface. In this case, the mapping between VLANs and instances does not need to be concerned with.

Example

# Display the STP status on an interface added to a specified VLAN when STP/RSTP/MSTP is running.

<HUAWEI> display stp vlan 1
       ProcessId   InstanceId   Port                        Role  State
 ----------------------------------------------------------------------
          0            0        GE1/0/1                     DESI  FORWARDING
Table 5-96  Description of the display stp vlan 1 command output

Item

Description

ProcessId

Process ID

InstanceId.

Instance ID

Port

Interface

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.

State

Interface status:
  • FORWARDING

  • DISCARDING

# Display the spanning tree status on a port in a specified VLAN when VBST is running.
<HUAWEI> display stp vlan 20
-------[VLAN 20 Global Info][Mode VBST]-------                                          
Bridge ID           :32788.4c1f-cc6b-c208                                       
Bridge Diameter     :7   
Config Times        :Hello 2s MaxAge 20s FwDly 15s                              
Active Times        :Hello 2s MaxAge 20s FwDly 15s                              
Root ID / RPC       :20   .781d-bacc-8bc0 / 199                                 
RootPortId          :128.191 (GigabitEthernet3/0/7)                                    
Root Type           :Normal                                                     
BPDU-Protection     :Disabled
STP Converge Mode   :Normal
Time since last TC  :0 days 0h:10m:46s
Number of TC        :1 
 ----[Port190(GigabitEthernet3/0/6)][DISCARDING]----                                   
 Port Role          :Designated Port                                            
 Port Priority      :128                                                        
 Port Cost(Legacy)  :Config=20000 / Active=20000                                
 Desg. Bridge/Port  :32788.4c1f-cc6b-c208 / 128.190                             
 Port Edged         :Config=Default / Active=Disabled                           
 Point-to-point     :Config=Auto / Active=true                                  
 Port Revert Slow   :Disabled
 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 5-97  Description of the display stp vlan command output

Item

Description

VLAN

VLAN ID.

Bridge ID

Bridge ID:
  • The first 16 bits represent the switch's priority.
  • The last 48 bits represent the switch's MAC address.

Bridge Diameter

VBST network diameter. To specify the parameter, run the stp bridge-diameter command.

Config Times

Configured bridge protocol parameters:
  • Hello: interval at which Bridge Protocol Data Units (BPDUs) are sent. To specify the parameter, run the stp timer hello command.

  • MaxAge: maximum TTL of a BPDU. To specify the parameter, run the stp timer max-age command.

  • FwDly: delay in interface status transition. To specify the parameter, run the stp timer forward-delay command.

  • MaxHop: maximum number of hops in the MST region. To specify the parameter, run the stp max-hops command.

Active Times 

Bridge protocol parameters that are being used:
  • Hello: interval at which BPDUs are sent

  • MaxAge: maximum TTL of a BPDU

  • FwDly: delay in interface status transition

  • MaxHop: maximum number of hops in the MST region

Root ID / RPC

Root switch ID or external cost of the path from the switch to the root switch.

RootPortId

Root port ID.

The value 0.0 indicates that the root switch has no root port.

Root Type

Root bridge type.

BPDU-Protection

BPDU protection function:
  • Disabled

  • Enabled

To specify the parameter, run the stp bpdu-protection command.

STP Converge Mode

STP converge mode. To specify the parameter, run the stp converge command.

Time since last TC

Period from the last topology change to now.

Number of TC

Topology change count.

Port Role

Role of a port:
  • 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, which is calculated using Huawei proprietary algorithm:
  • config: indicates the path cost that is manually configured.
  • active: indicates the path cost that is actually used.

To specify the parameter, run the stp pathcost-standard and stp cost commands.

Desg. Bridge/Port

IDs of the designated switch and designated port. In the switch ID, the first 16 bits represent the switch's priority, and the last 48 bits represent the switch's MAC address. In the port ID, the first 4 bits represents the port priority, and the last 12 bits represent the port number.

Port Edged

Status of the edge port that is specified by the administrator:
  • enabled: The edge port is enabled.

  • disabled: The edge port is disabled.

Config indicates the value configured using the stp edged-port command, and Active indicates the actual value.

Point-to-point

Link type of the port. Config indicates link type configured using the stp point-to-point command, and Active indicates the actual link type.

Port Revert Slow

The delay in revertive switching during VBST calculation on a port
  • enabled: The delay in revertive switching is enabled.

  • disabled: The delay in revertive switching is disabled.

To specify the parameter, run the stp revertive slow command.

Transmit Limit

Maximum number of BPDUs sent by the port per second. To set the maximum number of BPDUs sent by the port per second, run the stp transmit-limit (interface view) command.

Protection Type

Protection type of the port:
  • root-protection: takes effect only on the designated port.

  • loop-protection: takes effect only on the root port or alternate port.

To specify the parameter, run the stp root-protection or stp loop-protection command.

Port STP Mode

STP mode on an interface. To specify the parameter, run the stp mode (system view) command.

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 vbst bpdu-statistics

Function

The display vbst bpdu-statistics command displays VBST BPDU statistics.

Format

display vbst bpdu-statistics [ vlan vlan-id ] [ interface interface-type interface-number | slot slot-id ]

Parameters

Parameter Description Value
vlan vlan-id

Displays VBST BPDU statistics in a specified VLAN.

If vlan vlan-id is not specified, VBST BPDU statistics in all VLANs are displayed.

The value is an integer that ranges from 1 to 4094.

interface interface-type interface-number Displays VBST BPDU statistics on a specified interface. -
slot slot-id Displays VBST BPDU statistics on a specified board.

The value is an integer and must be the slot ID of a running board.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To check statistics on BPDUs on the switch running VBST, run the display vbst bpdu-statistics command.

Example

# Display VBST BPDU statistics in VLAN 2.
<HUAWEI> display vbst bpdu-statistics vlan 2
-------[VLAN 2 ]-------
 ----[Port1010(GigabitEthernet1/0/17)]---
 BPDU Sent           :0             
          TCN: 0, Config: 0, RST: 0
 BPDU Received       :0             
          TCN: 0, Config: 0, RST: 0
 ----[Port1011(GigabitEthernet1/0/18)]---
 BPDU Sent           :0             
          TCN: 0, Config: 0, RST: 0
 BPDU Received       :0             
          TCN: 0, Config: 0, RST: 0
 ----[Port1012(GigabitEthernet1/0/19)]---
 BPDU Sent           :0             
          TCN: 0, Config: 0, RST: 0
 BPDU Received       :0             
          TCN: 0, Config: 0, RST: 0
 ----[Port1031(GigabitEthernet1/0/20)]---
 BPDU Sent           :0             
          TCN: 0, Config: 0, RST: 0
 BPDU Received       :0             
          TCN: 0, Config: 0, RST: 0
 ----[Port1033(GigabitEthernet1/0/21)]---
 BPDU Sent           :14664             
          TCN: 0, Config: 0, RST: 14664
 BPDU Received       :3             
          TCN: 0, Config: 0, RST: 3
 ----[Port1047(GigabitEthernet1/0/22)]---
 BPDU Sent           :14643             
          TCN: 0, Config: 0, RST: 14643
 BPDU Received       :0             
          TCN: 0, Config: 0, RST: 0
Table 5-98  Description of the display vbst bpdu-statistics command output

Item

Description

VLAN

VLAN ID.

Port

Port name.

BPDU Sent

Number of sent BPDUs.

The number of sent BPDUs contains the number of sent TCP BPDUs, configuration BPDUs, and RST BPDUs.

TCN

Number of sent/received TCN BPDUs.

Config

Number of sent/received configuration BPDUs.

RST

Number of sent/received RST BPDUs.

BPDU Received

Number of received BPDUs.

The number of received BPDUs contains the number of received TCP BPDUs, configuration BPDUs, and RST BPDUs.

ethernet-loop-protection ignored-vlan

Function

The ethernet-loop-protection ignored-vlan command configures ignored VLANs for a device. Through the loop protocol calculation, the interface on which the ignored VLAN is configured does not enter the blocked state but stays in the forwarding state.

The undo ethernet-loop-protection ignored-vlan command restores the ignored VLAN to the default setting.

By default, no ignored VLAN is configured for a device.

Format

ethernet-loop-protection ignored-vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

undo ethernet-loop-protection ignored-vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all }

Parameters

Parameter Description Value
vlan-id1

Specifies the ID of a start VLAN.

The value is an integer ranging from 1 to 4094.

to vlan-id2

Specifies the ID of an end VLAN.

vlan-id2 and vlan-id1 together specify a VLAN range. If you do not specify to vlan-id2, only the VLAN with ID of vlan-id1 is configured to the ignored VLAN.

The value is an integer ranging from 1 to 4094. The value of vlan-id2 must be greater than that of vlan-id1.

all

Restore all the ignored VLAN to the default setting.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a device uses a specific VLAN to create a VLANIF interface and configure it as the management network port, Layer 2 loop protocols (MSTP/RRPP/SEP/ERPS/Smart Link) are enabled on the device to prevent network loops. After the device starts or the Layer 2 loop protocols are enabled, the VLANIF interface enters the blocked state and needs to wait a long time to enter the forwarding state through the protocol calculation. During this period, services are interrupted, and users who use the VLANIF interface cannot operate the device.

To resolve the problem, the ethernet-loop-protection ignored-vlan command can be used to configure the specific VLAN to an ignored VLAN. Through loop protocol calculation, the interface on which the ignored VLAN is configured does not enter the blocked state but stays in the forwarding state.

Precautions

If the ethernet-loop-protection ignored-vlan command is run more than once, all configurations take effect.

If an ignored VLAN is configured on a ring network, a loop occurs. Therefore, you cannot configure an ignored VLAN in a ring topology.

After the ethernet-loop-protection ignored-vlan command is executed, the configuration file shows that STP has been disabled in the VLAN, for example, stp vlan 100 disable.

After the undo ethernet-loop-protection ignored-vlan command is executed, the system checks whether the number of instances exceeds the limit. If so, the system restores the VBST status in the VLAN. If not, the system displays a message about a failure to restore the VBST status in the VLAN.

Example

# Configure VLAN 2 as an ignored VLAN.

<HUAWEI> system-view
[HUAWEI] ethernet-loop-protection ignored-vlan 2
Warning: This operation may result in bridging loops. Please make sure there are
 no bridging loops in the VLAN(s). Continue?[Y/N]:Y

instance

Function

The instance command maps a VLAN to a spanning tree instance.

The undo instance command deletes the mapping between a VLAN and a spanning tree instance.

By default, all VLANs are mapped to CIST, that is, instance 0.

Format

instance instance-id vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>

undo instance instance-id [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]

Parameters

Parameter Description Value
instance-id Specifies the number of a spanning tree instance. 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.

vlan vlan-id1 Specifies a start VLAN ID. The value is an integer ranging from 1 to 4094. The start VLAN ID must be smaller than the end VLAN ID.
to vlan-id2 Specifies an end VLAN ID.
NOTE:
  • VBST maps one VLAN to one instance. Therefore, this parameter cannot be specified when the spanning tree protocol is VBST.

  • The 1:1 mapping between MSTIs and VLANs are used only by the switch to determine the VBST forwarding status. This does not mean that VBST supports multi-instance. instance in other commands cannot be specified when VBST is running.

The value is an integer that ranges from 1 to 4094.

Views

MST region view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP divides a switching network into multiple regions, each of which has multiple spanning trees that are independent of each other. Each spanning tree is called an MSTI and each region is called an MST region.

Two switching devices belong to the same MST region only when they have the following same configurations:
  • MST region name
  • Mappings between MSTIs and VLANs
  • MST region revision level

The instance command is used to set mappings between spanning tree instances and VLANs.

Precautions

When using the undo instance command, note the following points:

  • After the mapping between specified VLANs and a specified spanning tree instance is deleted, these VLANs will be mapped to a CIST, namely, instance 0.

  • If no VLAN is specified, all VLANs that have established mappings with the spanning tree instance will be mapped to a CIST.

If the instance command is run more than once, all configurations take effect.

A VLAN cannot be mapped to different spanning tree instances. If the instance command is run several times, the latest configuration overrides the previous one.

To map the MUX VLAN to a spanning tree instance, you are advised to configure the principal VLAN, subordinate group VLAN, and subordinate separate VLAN in the MUX VLAN in the same spanning tree instance.

Example

# Map VLAN 2 to spanning tree instance 1.

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region] instance 1 vlan 2

max bandwidth-affected-linknumber

Function

The max bandwidth-affected-linknumber command sets the upper threshold for the number of interfaces that determine the bandwidth of an Eth-Trunk.

The undo max bandwidth-affected-linknumber command restores the default upper threshold for the number of interfaces that determine the bandwidth of an Eth-Trunk.

By default, the upper threshold for the number of interfaces that determine the bandwidth of an Eth-Trunk is 8.

Format

max bandwidth-affected-linknumber link-number

undo max bandwidth-affected-linknumber

Parameters

Parameter

Description

Value

link-number

Specifies the upper threshold for the number of interfaces that determine the bandwidth of an Eth-Trunk.

The value is an integer that ranges from 1 to 8.

If the device is equipped with cards specified in the assign trunk command, you can run the assign trunk command to set the value, and run the display trunk configuration command to view the configuration.

Views

Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

The upper threshold for the number of interfaces that determine the bandwidth of an Eth-Trunk is used for STP calculation.

For example, device A and device B are connected by two Eth-Trunks. Eth-Trunk1 has three member links that are Up; the Eth-Trunk2 has two member links that are Up. The bandwidth of each member link is 1 Gbit/s, so the bandwidth of Eth-Trunk1 is 3 Gbit/s and the bandwidth of Eth-Trunk2 is 2 Gbit/s. If device A is the root bridge during STP calculation, Eth-Trunk1 on device B is the root port and Eth-Trunk2 is the alternate port. You can run this command to set the upper threshold to 1. Then the bandwidth of Eth-Trunk1 becomes 1 Gbit/s during STP calculation. Bandwidth decrease affects the interface cost, causing STP recalculation. The max bandwidth-affected-linknumber command does not affect traffic forwarding on the Eth-Trunk. The bandwidth used to forward traffic is still 3 Gbit/s.

Example

# Set the upper threshold to 3.

<HUAWEI> system-view
[HUAWEI] interface eth-trunk 1
[HUAWEI-Eth-Trunk1] max bandwidth-affected-linknumber 3

region-name

Function

The region-name command configures the MST region name of the switching device.

The undo region-name command restores the default name.

By default, the MST region name is the MAC address of the management network interface on the MPU of the switching device.

Format

region-name name

undo region-name

Parameters

Parameter Description Value
name Specifies the region name of the switching device.

The value is a case-sensitive string of 1 to 32 characters without spaces.

NOTE:

When double quotation marks are used around the string, spaces are allowed in the string.

Views

MST region view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP divides a switching network into multiple regions, each of which has multiple spanning trees that are independent of each other. Each spanning tree is called an MSTI and each region is called an MST region.

Two switching devices belong to the same MST region only when they have the following same configurations:
  • MST region name
  • Mappings between MSTIs and VLANs
  • MST region revision level

The region-name command is used to configure MST region names in order to identify different regions.

VBST does not support regions. Therefore, this command does not take effect when the spanning tree protocol is VBST.

Follow-up Procedure

After configuring MST region parameters, run the active region-configuration command to activate the MST region configurations.

Precautions

If an MST region name is changed several times, only the last configuration activated using the active region-configuration command takes effect.

Example

# Set the MST region name of the switch to "huawei".

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region] region-name huawei

reset stp error packet statistics

Function

The reset stp error packet statistics command clears the statistics of error STP packets.

Format

reset stp error packet statistics

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

Applicable Scenario

You can use the reset stp error packet statistics command to clear the history statistics when you need to observe the statistics of error STP packets in a period from the current time.

Precautions

The reset stp error packet statistics command clears the statistics about error STP packets are cleared and cannot be restored. Therefore, confirm the action before you use the command.

Example

# Clear the statistics about error STP packets.

<HUAWEI> reset stp error packet statistics

reset stp statistics

Function

The reset stp statistics command clears the statistics of a spanning tree.

Format

reset stp [ interface interface-type interface-number ] statistics

Parameters

Parameter Description Value
interface interface-type interface-number Specifies an interface type and the number of the interface.

-

Views

User view

Default Level

3: Management level

Usage Guidelines

Sometimes, traffic statistics within a certain period are needed. In this situation, clear the existing statistics before restarting the count.

When you run the reset stp statistics command:

  • If you specify an interface, you can clear the statistics of a spanning tree on the interface.

  • If you do not specify an interface, you can clear the statistics of spanning trees on all interfaces.

Example

# Clear the statistics of spanning trees on GE1/0/1.

<HUAWEI> reset stp interface gigabitethernet 1/0/1 statistics
Related Topics

reset vbst bpdu-statistics

Function

The reset vbst bpdu-statistics command clears VBST BPDU statistics.

Format

reset vbst bpdu-statistics [ interface interface-type interface-number | slot slot-id ]

Parameters

Parameter Description Value
interface interface-type interface-number Clears BPDU statistics on a specified interface running VBST. -
slot slot-id Clears BPDU statistics on interfaces running VBST on the card in a specified slot. The value is an integer and must be an existing slot on the device.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Before recollecting VBST BPDU statistics on a specified interface or on the card in a specified slot in a specified period of time, run the reset vbst bpdu-statistics command to clear existing VBST BPDU statistics.

Configuration Impact

The cleared VBST BPDU statistics on a specified interface or on the card in a specified slot cannot be restored. Exercise caution when running the reset vbst bpdu-statistics command.

Example

# Clear VBST BPDU statistics on GE 1/0/1.

<HUAWEI> reset vbst bpdu-statistics interface gigabitethernet 1/0/1

revision-level

Function

The revision-level command configures the revision level of MST region of a switching device.

The undo revision-level command restores the default level.

By default, the revision level of MST region is 0.

Format

revision-level level

undo revision-level

Parameters

Parameter Description Value
level Specifies the revision level of the MST region. The value is an integer ranging from 0 to 65535.

Views

MST region view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP divides a switching network into multiple regions, each of which has multiple spanning trees that are independent of each other. Each region is called an MST region and each spanning tree is called a multiple spanning tree instance (MSTI).

Two switching devices belong to the same MST region only when they have the following same configurations:
  • MST region name
  • Mappings between MSTIs and VLANs
  • MST region revision level

To perform tree calculation in an MST region, multiple devices in this region must have the same value for the three parameters. If the parameters are changed after MSTP is deployed, the change will cause spanning tree recalculation and route flapping on the network. As a result, you are advised not to change the MST region parameters after MSTP is deployed.

If two switching devices have the same region name and VLAN mapping table, the revision-level command can be used to set different revision levels for the two devices so that the two devices belong to different MST regions.

MSTP is a standard protocol; therefore, the MSTP revision level of a device is 0 by default. If the revision level of some devices from a specified manufacturer is not 0, you must change the MSTP revision level of devices to be the same to facilitate tree calculation in an MST region.

VBST does not support regions. Therefore, this command does not take effect when the spanning tree protocol is VBST.

Follow-up Procedure

After configuring MST region parameters, run the active region-configuration command to activate the MST region configurations.

Precautions

If an MST region revision level is changed several times, only the latest configuration activated using the active region-configuration command takes effect.

Example

# Set the MSTP revision level of the switching device to 5.

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region] revision-level 5

snmp-agent trap enable feature-name mstp

Function

The snmp-agent trap enable feature-name mstp command enables the trap function for the MSTP module.

The undo snmp-agent trap enable feature-name mstp command disables the trap function for the MSTP module.

By default, the trap function is disabled for the MSTP module.

Format

snmp-agent trap enable feature-name mstp [ trap-name { hwmstpibridgelostrootprimary | hwmstpiedgeportchanged | hwmstpiportbpduguarded | hwmstpiportloopguarded | hwmstpiportrootguarded | hwmstpproloopbackdetected | hwmstpiportstatediscarding | hwmstpiportstateforwarding | hwmstpitcguarded | hwmstpportcountthreshold | hwmstpportcountthresholdresume | hwmstppronewbridgelostrootprimary | hwmstppronewedgeportchanged | hwmstppronewportbpduguarded | hwmstppronewportloopguarded | hwmstppronewportrootguarded | hwmstppronewportstatediscarding | hwmstppronewportstateforwarding | hwmstpprorootchanged | hwmstpprotcguarded | newroot | topologychange } ]

undo snmp-agent trap enable feature-name mstp [ trap-name { hwmstpibridgelostrootprimary | hwmstpiedgeportchanged | hwmstpiportbpduguarded | hwmstpiportloopguarded | hwmstpiportrootguarded | hwmstpproloopbackdetected | hwmstpiportstatediscarding | hwmstpiportstateforwarding | hwmstpitcguarded | hwmstpportcountthreshold | hwmstpportcountthresholdresume | hwmstppronewbridgelostrootprimary | hwmstppronewedgeportchanged | hwmstppronewportbpduguarded | hwmstppronewportloopguarded | hwmstppronewportrootguarded | hwmstppronewportstatediscarding | hwmstppronewportstateforwarding | hwmstpprorootchanged | hwmstpprotcguarded | newroot | topologychange } ]

Parameters

Parameter

Description

Value

trap-name Enables the traps of MSTP events of specified types. -
hwmstpibridgelostrootprimary Enables the device to send trap when the current device is no longer the root bridge. -
hwmstpiedgeportchanged Enables the device to send trap when the edge port that is not enabled with the BPDU guard function is no longer the edge port after receiving BPDUs. -
hwmstpiportbpduguarded Enables the device to send trap when the edge port enabled with the BPDU guard function can receive BPDUs. -
hwmstpiportloopguarded Enables the device to send trap when the port enabled with the loop guard function does not receive any BPDU in a specified period. -
hwmstpiportrootguarded Enables the device to send trap when the port enabled with the root guard function receives BPDUs with higher priorities. -
hwmstpiportstatediscarding Enables the device to send trap when the port status changes to Discarding. -
hwmstpproloopbackdetected Enables the device to send trap when port detected loopback, block the port. -
hwmstpiportstateforwarding Enables the device to send trap when the port status changes to Forwarding. -
hwmstpitcguarded Enables the device to send trap when the number of TC packets received by the instance enabled with the TC guard function exceeds the upper limit. -
hwmstpportcountthreshold Enables the device to send trap when the number of STP interfaces that were Up on a device exceeded the upper threshold. -
hwmstpportcountthresholdresume Enables the device to send trap when the number of STP interfaces that were Up on a device fell below the lower threshold. -
hwmstppronewbridgelostrootprimary Enables the device to send trap when in the MSTP process the device is no longer the root bridge. -
hwmstppronewedgeportchanged Enables the device to send trap when in the MSTP process the edge port that is not enabled with the BPDU guard function is no longer the edge port after receiving BPDUs. -
hwmstppronewportbpduguarded Enables the device to send trap when in the MSTP process the port enabled with the BPDU guard function can receive BPDUs. -
hwmstppronewportloopguarded Enables the device to send trap when in the MSTP process the port enabled with the loop guard function does not receive any BPDU in a specified period. -
hwmstppronewportrootguarded Enables the device to send trap when in the MSTP process the port enabled with the root guard function receives BPDUs with higher priorities. -
hwmstppronewportstatediscarding Enables the device to send trap when in the MSTP process the port status changes to Discarding. -
hwmstppronewportstateforwarding Enables the device to send trap when in the MSTP process the port status changes to Forwarding. -
hwmstpprorootchanged Enables the device to send trap when the root bridge changes. -
hwmstpprotcguarded Enables the device to send trap when in the MSTP process the number of TC packets received by the instance enabled with the TC guard function exceeds the upper limit. -
newroot Enables the device to send trap when the current device is elected as the root bridge. -
topologychange Enables the device to send trap when the topology changes. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The MSTP module is not configured with the function of excessive traps. To enable the traps of one or more events, you can specify trap-name.

Example

# Enables the device to send trap when the current device is no longer the root bridge.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable feature-name mstp trap-name hwmstpibridgelostrootprimary

snmp-agent trap enable feature-name vbst

Function

The snmp-agent trap enable feature-name vbst command enables the trap function for the VBST module.

The undo snmp-agent trap enable feature-name vbst command disables the trap function for the VBST module.

By default, the trap function is disabled for the VBST module.

Format

snmp-agent trap enable feature-name vbst [ trap-name { hwvbstpvnumexceeded | hwvbstpvnumresumed | hwVbstInvalidPV | hwVbstTrunkPVNumExceeded | hwVbstTrunkPVNumResumed } ]

undo snmp-agent trap enable feature-name vbst [ trap-name { hwvbstpvnumexceeded | hwvbstpvnumresumed | hwVbstInvalidPV | hwVbstTrunkPVNumExceeded | hwVbstTrunkPVNumResumed } ]

Parameters

Parameter Description Value
trap-name Enables the traps of VBST events of specified types. -
hwvbstpvnumexceeded Enables the device to send trap when the number of interfaces and VLANs participating in VBST calculation exceeded the maximum number of interfaces and VLANs allowed by VBST. -
hwvbstpvnumresumed Enables the device to send trap when the number of interfaces and VLANs participating in VBST calculation falls below 95% of the maximum number of interfaces and VLANs allowed by VBST. -
hwVbstInvalidPV Enables the device to send trap when the number of VLANs that do not participate in calculation in the VBST BPDUs received by the interface exceeds the threshold. -
hwVbstTrunkPVNumExceeded Enables the device to send trap when the number of PVs of the Eth-Trunk exceeds the maximum value. -
hwVbstTrunkPVNumResumed Enables the device to send trap when the number of PVs of the Eth-Trunk is restored to be within the allowed range. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The VBST module is not configured with the function of excessive traps. To enable the traps of one or more events, you can specify trap-name.

Example

# Enables the device to send trap when the number of interfaces and VLANs participating in VBST calculation exceeded the maximum number of interfaces and VLANs allowed by VBST.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable feature-name vbst trap-name hwvbstpvnumexceeded

stp agreement-legacy

Function

The stp agreement-legacy command configures an interface to discard non-standard STP/RSTP packets sent by the Handreamnet switch.

The undo stp agreement-legacy command cancels the configuration.

By default, an interface does not discard non-standard STP/RSTP packets sent by the Handreamnet switch.

Format

stp agreement-legacy

undo stp agreement-legacy

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If Huawei datacom device and Handreamnet switch are deployed on the VBST network, non-standard STP/RSTP packets sent by the Handreamnet switch may cause temporary loops. You can run the stp agreement-legacy command to configure the interface to discard non-standard STP/RSTP packets to prevent temporary loops.

Example

# Configure the GE1/0/1 to discard non-standard STP/RSTP packets sent by the Handreamnet switch.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp agreement-legacy

stp binding process

Function

The stp binding process command adds the current interface to a specified MSTP process.

The undo stp binding process command removes the current interface from the specified MSTP process.

By default, the interface belongs to MSTP process with ID 0.

Format

stp binding process process-id

undo stp binding process process-id

Parameters

Parameter Description Value
process process-id Specifies the ID of an MSTP process. The value is an integer ranging from 1 to 63.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After an MSTP device properly starts, each port of this device belongs to MSTP process 0 by default. Links connecting MSTP devices and access rings are called access links. If multiple processes are required to isolate services on access rings, the stp binding process command can be used to add ports on access links to specified MSTP processes.

Prerequisites

The stp process command has been run to configure the corresponding MSTP process. This means that the MSTP process to which a port will be added already exists.

Precautions

A port on an access link can be added to only one MSTP process. If the stp binding process command is run several times to add a port to different MSTP processes, only the latest configuration takes effect.

Example

# Add a port to MSTP process 1.

<HUAWEI> system-view
[HUAWEI] stp process 1
[HUAWEI-mst-process-1] quit
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp binding process 1

stp bpdu-filter

Function

The stp bpdu-filter enable command specifies a port as a BPDU-filter port.

The stp bpdu-filter disable command specifies a port as a non-BPDU-filter port.

The undo stp bpdu-filter command restores the default attribute of a BPDU-filter port.

By default, a port is a non-BPDU-filter port.

Format

stp bpdu-filter { enable | disable }

undo stp bpdu-filter

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network running a spanning tree protocol, if the stp edged-port enable command is used to configure a port as an edge port, the port will not participate in the spanning tree calculation. This speeds up network convergence and improves network stability. This port, however, will still send BPDUs. This may cause BPDUs to be sent to other networks. As a result, these networks flap.

The stp bpdu-filter enable command can be used on the port to address this problem. After the stp bpdu-filter enable command is used on the port, the port will become a BPDU-filter port, and will not process BPDUs.

If the stp bpdu-filter enable command is run on a port, the port will not transmit or process BPDUs. The port cannot negotiate the STP status with the directly connected port on the remote device. Therefore, exercise cautions when using the stp bpdu-filter enable command. Running the stp bpdu-filter enable command only on edge ports is recommended.

Running the stp bpdu-filter enable command in the interface view configures only the current port as a BPDU-filter port. If multiple BPDU-filter ports are required on a device, the stp bpdu-filter default command can be used in the system view to configure all the ports as BPDU-filter ports. If some ports need to participate in spanning tree calculation but do not need to be configured as BPDU-filter ports, the stp bpdu-filter disable command can be used in the view of these ports to configure them as non-BPDU-filter ports. Similarly, if the stp bpdu-filter disable command has been run on a port, the non-BPDU filter port attributes of the port will not change after the stp bpdu-filter default command is run.

Precautions

After the stp bpdu-filter disable command is run on a port, the port becomes a non-BPDU-filter port. The port is still a non-BPDU-filter port even if the stp bpdu-filter default command is run in the system view. After the undo stp bpdu-filter command is run on the port, the BPDU-filter attributes of the port restore to the default ones.

Example

# On a network edge device, specify GE1/0/1 as a non-BPDU-filter port.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp bpdu-filter disable
# On a network edge device, specify GE1/0/1 as a BPDU-filter port.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp bpdu-filter enable

stp bpdu-filter default

Function

The stp bpdu-filter default command specifies all edge ports of a device as BPDU filter ports.

The undo stp bpdu-filter default command specifies all edge ports of a device as non-BPDU filter ports.

By default, a port is a non-BPDU filter port.

Format

stp bpdu-filter default

undo stp bpdu-filter default

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network running a spanning tree protocol, if the stp edged-port enable command is used to configure a port as an edge port, the port will not participate in the spanning tree calculation. This speeds up network convergence and improves network stability. This port, however, will still send BPDUs. This may cause BPDUs to be sent to other networks. As a result, these networks flap.

The stp bpdu-filter enable command can be used on the port to address this problem. After the stp bpdu-filter enable command is used on the port, the port will become a BPDU filter port, and will not process BPDUs.

Running the stp bpdu-filter enable command in the interface view configures only the current edge port as a BPDU filter port. If multiple BPDU filter ports are required on a device, the stp bpdu-filter default command can be used in the system view to configure all edge ports as BPDU filter ports. Then run the stp bpdu-filter disable command in the interface view to change the interfaces that need not to be configured as BPDU filter interfaces into non-BPDU filter interfaces.

Precautions

After the stp bpdu-filter default command is run, a port that has been configured with the undo stp bpdu-filter command will become a BPDU filter port. After the stp bpdu-filter disable command is run, the port that has been configured with the undo stp bpdu-filter command, however, will still serve as a non-BPDU filter port.

After the stp bpdu-filter default and stp edged-port default commands are run in the system view, none of the ports on the device will initiate any BPDUs or initiate a negotiation with the remote device, and all the ports are in the forwarding state. This may lead to a loop and cause a broadcast storm. Exercise caution when using the stp bpdu-filter default and stp edged-port default commands in the system view.

Example

# On a network edge device, specify all ports as BPDU filter ports.

<HUAWEI> system-view
[HUAWEI] stp bpdu-filter default

stp bpdu-protection

Function

The stp bpdu-protection command enables BPDU protection on a switching device.

The undo stp bpdu-protection command disables BPDU protection on a switching device.

By default, the BPDU protection is disabled.

Format

stp bpdu-protection

undo stp bpdu-protection

Parameters

None.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp bpdu-protection command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network running a spanning tree protocol, a port connected to terminals does not need to participate in spanning tree calculation. If the port participates in spanning tree calculation, the network convergence speed will be affected. In addition, status changes of the port may cause network flapping, interrupting user traffic. To address this problem, you can run the stp edged-port enable command to configure the port as an edge port. Then, the port will not participate in the spanning tree calculation. This speeds up network convergence and improves network stability.

An edge port will lose edge port attributes after receiving BPDUs. To prevent attackers from forging BPDUs to change edge ports to non-edge ports, you can run the stp bpdu-protection command to configure BPDU protection on a switching device.

Configuration Impact

After BPDU protection is enabled on a switching device, the switching device shuts down the edge port if the edge port receives a BPDU. The attributes of the edge port are not changed.

Precautions

After BPDU protection is enabled, a switching device sets an edge port to error down state if the edge port receives a BPDU and retains the port as an edge port. To configure the edge port in error-down state to automatically restore to the Up state, run the error-down auto-recovery cause bpdu-protection interval interval-value command in the system view.

By default, an interface cannot automatically restore to Up state after it is shut down. To restore the interface, run the shutdown and undo shutdown commands on the interface in sequence. Alternatively, run the restart command on the interface to restart the interface.

To configure the interface to go Up automatically, run the error-down auto-recovery cause bpdu-protection interval interval-value command in the system view to set a recovery delay. After the delay, the interface goes Up automatically.

Example

# Enable the BPDU protection on the switching device.

<HUAWEI> system-view
[HUAWEI] stp bpdu-protection

stp bridge-diameter

Function

The stp bridge-diameter command configures the diameter of the spanning tree.

The undo stp bridge-diameter command restores the default diameter.

By default, the diameter of the spanning tree is 7.

Format

stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] bridge-diameter diameter

undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] bridge-diameter

Parameters

Parameter Description Value
vlan vlan-id1 [ to vlan-id2 ]
Configures the diameter of a spanning tree in VLANs.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the diameter is configured only for the VLAN specified by vlan-id1.

In the stp bridge-diameter command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.
diameter Specifies the diameter. The value is an integer ranging from 2 to 7.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp bridge-diameter command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network running a spanning tree protocol, the network diameter is the maximum number of devices between two switching devices. If the network diameter is improperly set, network converge may slow down, affecting users' normal communication.

The stp bridge-diameter command can be used to set a proper network diameter based on the network scale. This helps to accelerate network convergence.

The following time parameters are related to the network scale:
  • Hello Time

  • Forward Delay

  • Max Age

Precautions

After the stp bridge-diameter command is used on a switching device, the switching device will automatically set proper values for Hello Time, Forward Delay, and Max Age based on the configured network diameter.

On an MSTP network, the network diameter configured using the stp bridge-diameter command is valid only for CISTs.

Example

# Set the network diameter to 5 when STP/RSTP/MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp bridge-diameter 5
# Set the diameter to 5 for VLAN 10 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 bridge-diameter 5

stp compliance

Function

The stp compliance command configures the format for the MSTP packets that are received and sent on the switching device.

The undo stp compliance command restores the default format for the MSTP packets that are received and sent on the switching device.

By default, the MSTP packet format is auto.

Format

stp compliance { auto | dot1s | legacy }

undo stp compliance

Parameters

Parameter Description Value
auto Indicates that the protocol format is self-adaptive. -
dot1s Indicates that the format is standard IEEE 802.1s. -
legacy Indicates the private packet format. -

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP protocol packets have two formats: dot1s (IEEE 802.1s standard packets) and legacy (proprietary protocol packets). The stp compliance command can be used on a device to set an MSTP packet format based on the format of the MSTP packet received from a remote device so that this device can better communicate with the remote device.

The auto mode is set to allow a port to automatically switch to the MSTP protocol packet format used by the remote end based on the MSTP protocol packet format received from the remote end. This enables the two interfaces to use the same MSTP protocol packet format.

Example

# Set the format of the MSTP packets to the standard format of the interface.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp compliance dot1s

# Restore the self-adaptive format of the MSTP packets that are received and sent by the switching device.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] undo stp compliance
Related Topics

stp config-digest-snoop

Function

The stp config-digest-snoop command enables digest snooping.

The undo stp config-digest-snoop command disables digest snooping.

By default, the digest snooping is disabled.

Format

stp config-digest-snoop

undo stp config-digest-snoop

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

On an MSTP network where Huawei and non-Huawei devices are interconnected, if the Huawei and non-Huawei devices have the same region name, revision level, and VLAN mapping table but different BPDU keys, the stp config-digest-snoop command can be used to enable the Huawei and non-Huawei devices to exchange BPDUs.

Example

# Enable digest snooping on GE1/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp config-digest-snoop
Related Topics

stp converge

Function

The stp converge command sets the converging mode of a spanning tree protocol.

The undo stp converge command restores the default mode.

By default, the converging mode of the spanning tree protocol is normal.

Format

stp converge { fast | normal }

undo stp converge

Parameters

Parameter Description Value
fast Indicates ARP entries that will be directly deleted. -
normal Indicates ARP entries that will age quickly. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network running a spanning tree protocol, if the topology of a spanning tree instance changes, the forwarding paths of VLANs that are mapped to this instance change. As a result, ARP entries related to these VLANs need to be updated. Based on methods for processing ARP entries, the converging modes of a spanning tree protocol are classified into fast and normal:
  • In fast mode, entries that need to be updated in an ARP table are directly deleted.
  • In normal mode, entries that need to be updated in an ARP table quickly age. A switching device sets the EXPIRE time of these ARP entries to 0 in order to age them. If the number of detection times for aging out ARP entries is greater than 0, the switching device detects these ARP entries before deleting them.

The stp converge command can be used to set a converging mode based on the method for processing ARP entries.

Precautions

If the stp converge fast command is run on a switching device and the topology of a spanning tree instance changes, the switching device will directly delete the ARP entries that need to be updated in the ARP table.

If the stp converge normal command is run on a switching device and the topology of a spanning tree instance changes, the switching device will age the ARP entries that need to be updated in the ARP table.

Setting the converging mode of a spanning tree protocol to normal is recommended. If the fast mode is used, frequent ARP entry deletion will affect services and even may cause the CPU usage of the device to reach 100%. As a result, packet processing will time out, causing network flapping.

In either fast or normal mode, MAC address entries that need to be updated are deleted.

Example

# Set the converging mode of the spanning tree protocol on the Ethernet switch as normal.

<HUAWEI> system-view
[HUAWEI] stp converge normal
Related Topics

stp cost

Function

The stp cost command sets the path cost of a port in a spanning tree.

The undo stp cost command restores the default path cost.

By default, the path cost of a port in a spanning tree is the path cost corresponding to the port rate.

Format

STP/RSTP/MSTP: stp [ process process-id ] [ instance instance-id ] cost cost

VBST: stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] cost cost

STP/RSTP/MSTP: undo stp [ process process-id ] [ instance instance-id ] cost

VBST: undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] cost

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 63.
instance instance-id

Specifies the number of a spanning tree instance.

If instance instance-id is not specified, it indicates the path cost of an interface in CIST.

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.

cost Specifies the path cost of an interface. According to different calculation standards, the value ranges are as follows:
  • Huawei legacy standard: 1 to 200,000

  • IEEE 802.1d-1998 standard: 1 to 65535

  • IEEE 802.1t standard: 1 to 200,000,000

vlan vlan-id1 [ to vlan-id2 ]
Specifies one or more VLANs in which the port path cost is set.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the port path cost is configured only for the VLAN specified by vlan-id1.

In the stp cost command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The path cost of a port is an important basis for calculating a spanning tree. Path costs determine root port selection. In a spanning tree, the port with the lowest path cost to the root bridge is selected as a root port.

If different path costs are set for a port on an MSTP device in different spanning tree instances, traffic of different VLANs will be forwarded along different physical links and VLAN-based load balancing can be carried out.

Path costs depend on path cost calculation standards. After the path cost calculation standard is determined, set a relatively small path cost within a specified range for a port that has a high link rate. In the Huawei legacy standard, default path costs for ports with different link rates are different, as shown in the following table.
Table 5-99  Mappings between link rates and path costs ( Huawei legacy standard )

Link Rate

Recommended Value

Default, Value

Recommended Value Range

Value Range

10 Mbit/s

2000

200-20000

1-200,000

100 Mbit/s

200

20-2000

1-200,000

1 Gbit/s

20

2-200

1-200,000

10 Gbit/s

2

2-20

1-200,000

Over 10 Gbit/s

1

1-2

1-200,000

Prerequisites

A path cost calculation standard has been set using the stp pathcost-standard command.

Precautions

If the path cost of a port, the spanning tree where the port resides needs to be recalculated.

If the stp pathcost-standard command is used to change the path cost calculation standard, the path cost set using the stp cost command for a port will be restored to the default value.

Example

# Set the path cost of GE1/0/1 in spanning tree instance 2 to 200 when STP/RSTP/MSTP is running.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp instance 2 cost 200
# Set the path cost of GE1/0/1 in VLAN 10 to 300 when VBST is running.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp vlan 10 cost 300

stp edged-port

Function

The stp edged-port enable command sets the current port as an edge port.

The stp edged-port disable command sets the current port as a non-edge port.

The undo stp edged-port command restores the default attribute of an edge port.

By default, all the ports on the switching device are non-edge ports.

NOTE:

After STP is enabled on a port, edge-port detecting is started automatically. If the port fails to receive BPDU packets within (2 x Hello Timer + 1) seconds, the port is set to an edge port. Otherwise, the port is set to a non-edge port. If the stp edged-port enable or stp edged-port disable command is executed in the interface view or the stp edged-port default command is configured in the system view, automatic detection of the edge port becomes invalid.

Format

stp edged-port { enable | disable }

undo stp edged-port

Parameters

Parameter Description Value
enable Sets the current port as an edge port. -
disable Sets the current port as a non-edge port. -

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network running a spanning tree protocol, a port connected to terminals does not need to participate in spanning tree calculation. If the port participates in spanning tree calculation, the network convergence speed will be affected. In addition, status changes of the port may cause network flapping, interrupting user traffic. To address this problem, you can run the stp edged-port enable command to configure the port as an edge port. Then, the port will not participate in the spanning tree calculation. This speeds up network convergence and improves network stability.

Precautions

An edge port does not participate in spanning tree calculation. The edge port can transition from Disable to Forwarding state immediately without a delay. The switch automatically configures an edge port as a non-edge port once the edge port receives a configuration BPDU. Then the spanning tree is recalculated.

After the stp edged-port default command is run, a port that has been configured with the undo stp edged-port command will become an edge port. After the stp edged-port disable command is run, the port that has been configured with the undo stp edged-port command, however, will still serve as a non-edge port.

NOTE:
The device supports automatic detection of the edge port. When the port connected to the terminal changes from Down to Up, the port enters the forwarding state after (2 x Hello Timer + 1) seconds. If automatic detection is not configured, the port enters the forwarding state after 30s.

Example

# Configure GE1/0/1 as an edge port.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp edged-port enable

stp edged-port default

Function

The stp edged-port default command configures the ports on a switching device as edge ports.

The undo stp edged-port default command restores the default setting.

By default, the ports on a switching device are non-edge ports.

NOTE:

After STP is enabled on a port, edge-port detecting is started automatically. If the port fails to receive BPDU packets within (2 x Hello Timer + 1) seconds, the port is set to an edge port. Otherwise, the port is set to a non-edge port.

Format

stp edged-port default

undo stp edged-port default

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network running a spanning tree protocol, a port connected to terminals does not need to participate in spanning tree calculation. If the port participates in spanning tree calculation, the network convergence speed will be affected. In addition, status changes of the port may cause network flapping, interrupting user traffic. To address this problem, you can run the stp edged-port enable command to configure the port as an edge port. Then, the port will not participate in the spanning tree calculation. This speeds up network convergence and improves network stability.

After the stp edged-port default command is run on a device, all ports of the device will be become edge ports. During network topology calculation, running the stp edged-port default command may cause a loop. Exercise caution when using this command.

Precautions

If a port of a switching device receives a BPDU after being configured as an edge port, the switching device will automatically set the port as a non-edge port and recalculate the spanning tree.

To prevent attackers from forging BPDUs to change edge ports on a switching device to non-edge ports, you can run the stp bpdu-protection command in the system view to configure BPDU protection on the switching device. After BPDU protection is enabled on a switching device, the switching device shuts down the edge port if the edge port receives a BPDU. The attributes of the edge port are not changed.

After the stp edged-port default command is run, a port that has been configured with the undo stp edged-port command will become an edge port. After the stp edged-port disable command is run, the port that has been configured with the undo stp edged-port command, however, will still serve as a non-edge port.

Example

# Configure all ports on an edge device as edge ports.

<HUAWEI> system-view
[HUAWEI] stp edged-port default

stp enable

Function

The stp enable command enables STP/RSTP/MSTP/VBST on a switching device or an interface.

The undo stp enable command disables STP/RSTP/MSTP/VBST on a switching device or an interface.

The stp disable command disables STP/RSTP/MSTP/VBST on a switching device or an interface.

The undo stp disable command enables STP/RSTP/MSTP/VBST on a switching device or an interface.

By default, STP/RSTP/MSTP/VBST is enabled globally and on an interface.

Format

stp enable

undo stp enable

stp disable

undo stp disable

Parameters

None

Views

System view, MSTP process view, Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a complex Layer 2 network, to prevent loops or break loops, STP/RSTP/MSTP/VBST can be configured on switching devices.

Running the stp enable command enables STP/RSTP/MSTP/VBST. The devices running STP/RSTP/MSTP/VBST discover loops on the network by exchanging information with each other and trim the ring topology into a loop-free tree topology by blocking a certain interface. In this manner, replication and circular propagation of packets are prevented on the network. In addition, the processing performance of devices is prevented from deteriorating.

Enabling STP/RSTP/MSTP/VBST consumes system resources so that you can run the stp disable command to disable STP/RSTP/MSTP/VBST on devices or interfaces that do not participate in the spanning tree calculation.

Pre-configuration Tasks

After STP/RSTP/MSTP is enabled on a ring network, STP/RSTP/MSTP immediately calculates spanning trees on the network. Configurations on a switching device, such as, the switching device priority and port priority, will affect spanning tree calculation. Any change of the configurations may cause network flapping. Therefore, to ensure rapid and stable spanning tree calculation, before enabling STP/RSTP/MSTP, perform basic configurations on the switching device and its interfaces. For example:
  • Run the stp mode { mstp | rstp | stp } command to set the working mode of the switching device.

  • Run the stp [ instance instance-id ] priority priority command to set the priority of the switching device in the spanning tree.

  • Run the stp [ process process-id ] [ instance instance-id ] port priority priority command to set the priority of the interface in the spanning tree instance.

  • Run the stp [ instance instance-id ] root primary command to set the switching device as the primary root bridge of the spanning tree.

  • Run the stp [ instance instance-id ] root secondary command to set the switching device as the secondary root bridge of the spanning tree.

  • Run the stp [ process process-id ] [ instance instance-id ] cost cost command to set the path cost of the interface in the spanning tree instance.

  • If the spanning tree protocol is MSTP, run the region-name name, instance instance-id vlan { vlan-id [ to vlan-id ] } &<1-10>, vlan-mapping modulo, and revision-level level commands to configure the MST region.

When VBST is enabled on a ring network, VBST immediately starts spanning tree calculation. Parameters such as the switch priority and port priority affect spanning tree calculation, and change of these parameters may cause network flapping. To ensure fast and stable spanning tree calculation, perform basic configurations on the switch and ports before enabling VBST.
  • Run the stp mode vbst command to set the working mode of the switch.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> priority priority command to set the priority of the switch in the spanning tree.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> port priority priority command to set the priority of the port in the spanning tree instance.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> root primary command to set the switch as the root bridge of the spanning tree instance.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> root secondary command to set the switch as the secondary root bridge of the spanning tree.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> costcost command to set the path cost of the port in the spanning tree instance.

  • Run the instance instance-id vlan vlan-id command to configure 1:1 mapping between MSTIs and VLANs.

Other configurations are needed based on real-world situations.

Precautions

  • If STP/RSTP/MSTP/VBST is enabled on an interface, the interface participates in the spanning tree calculation and determine whether it is in the forwarding state according to the calculation result.

  • If STP/RSTP/MSTP/VBST is disabled on an interface, the interface does not participate in the spanning tree calculation and it is always in the forwarding state.

  • STP/RSTP/MSTP/VBST must be enabled on all interfaces that participate in the spanning tree calculation. Otherwise, a loop may occur.

  • Spanning tree calculation may result in network flapping. Before network convergence, packets cannot be correctly forwarded. In this case, if the DHCP server is configured on a VLANIF interface, DHCP clients obtain IP addresses slowly. To solve the problem, disable STP or configure the device interface connected to a terminal as the edge interface.

Follow-up Procedure

After STP is enabled globally and on an interface, run the stp vlan enable command to enable STP in a VLAN so that VBST can take effect.

Example

# Enable STP/RSTP/MSTP/VBST on a switching device.

<HUAWEI> system-view
[HUAWEI] stp enable

# Disable STP/RSTP/MSTP/VBST on GE1/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp disable

stp loop-protection

Function

The stp loop-protection command enables loop protection on the current port.

The undo stp loop-protection command disables loop protection on the current port.

By default, loop protection on ports is disabled.

Format

stp loop-protection

undo stp loop-protection

Parameters

None.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network running a spanning tree protocol, a switching device maintains the status of the root port and blocked port by continually receiving BPDUs from the upstream switching device. If ports cannot receive BPDUs from the upstream switching device due to link congestion or unidirectional link failures, the switching device will re-select a root port. Then, the previous root port becomes a designated port and the previous blocked port enters the Forwarding state. As a result, loops may occur on the network.

To prevent the preceding problems, deploy loop protection. If the root port or alternate port does not receive BPDUs from the upstream device for a long time, the switch enabled with loop protection sends a notification to the NMS. If the root port is used, the root port enters the Discarding state and becomes the designated port. If the alternate port is used, the alternate port keeps blocked and becomes the designated port. In this case, loops will not occur. After the link is not congested or unidirectional link failures are rectified, the port receives BPDUs for negotiation and restores its original role and status.

NOTE:
  • An alternate port is the backup of the root port. When the root port can normally send and receive BPDUs, the alternate port is in the blocked state.

  • Between two interconnected switching devices in a spanning tree, the switching device nearer to the root bridge is the upstream device of the other devices.

Precautions

Loop protection and root protection cannot be configured on the same interface simultaneously.

If loop protection needs to be configured on an interface in a process with a non-zero ID, the stp binding process command must have been run to bind this interface to the process.

Example

# Enable loop protection on the GE1/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp loop-protection
Related Topics

stp max-hops

Function

The stp max-hops command sets the maximum hops of a spanning tree in an MST region.

The undo stp max-hops command restores the default value of the maximum hops of a spanning tree.

By default, the maximum hops in an MST region is 20.

Format

stp max-hops hop

undo stp max-hops

Parameters

Parameter Description Value
hop Specifies the maximum hops. The value ranges from 1 to 40.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp max-hops command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Switching devices on a Layer 2 network running MSTP communicate with each other by exchanging MST BPDUs. An MST BPDU has a field that indicates the number of remaining hops.
  • The number of remaining hops in a BPDU sent by the root switching device equals the maximum number of hops.

  • The number of remaining hops in a BPDU sent by a non-root switching device equals the maximum number of hops minus the number of hops from the non-root switching device to the root switching device.

  • If a switching device receives a BPDU in which the number of remaining hops is 0, the switching device will discard the BPDU.

Therefore, the maximum number of hops of a spanning tree in an MST region determines the network scale. The stp max-hops command can be used to set the maximum number of hops in an MST domain so that the network scale of a spanning tree can be controlled.

Precautions

In an MST region, the maximum number of hops set on the root switching device in a CIST or an MSTI is the maximum number of hops in the CIST or MSTI.

Example

# Set the maximum hops in the MST region to 35.

<HUAWEI> system-view
[HUAWEI] stp max-hops 35
Related Topics

stp mcheck

Function

The stp mcheck command configures a port to switch from the STP mode back to the RSTP/MSTP/VBST mode.

By default, a port transitions from the STP mode to the RSTP/MSTP/VBST mode by receiving BPDUs. A port that does not receive BPDUs cannot transition from the STP mode to the RSTP/MSTP/VBST mode.

Format

stp mcheck

Parameters

None

Views

System view, MSTP process view, Ethernet interface view, Eth-Trunk interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, port group view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp mcheck command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a port of an RSTP/MSTP/VBST switching device is directly connected to an STP switching device, the port automatically switches to the STP mode and then sends BPDUs. This ensures that the two switching devices properly communicate with each other. If the STP switching device is powered off or removed, the port on the RSTP/MSTP/VBST switching device cannot switch back to the RSTP/MSTP/VBST mode. As a result, the RSTP/MSTP/VBST device cannot communicate with other RSTP/MSTP/VBST switching devices.

The stp mcheck command can be used to address this problem. After this command is run on a port, the port will switch from the STP mode back to the RSTP/MSTP mode.

When a VBST-enabled switch connects to an MSTP-enabled switch, the connected port of the MSTP-enabled switch automatically switches to the RSTP mode through negotiation. When the VBST-enabled switch switches to the MSTP mode, the connected ports of the two switches may still work in RSTP mode due to the time sequence problem. You can perform the following operations to manually switch the ports to the MSTP mode.

Prerequisites

If a port in a process with a non-zero ID needs to be configured to switch from the STP mode back to the RSTP/MSTP mode, the port must have been bound to the corresponding process using the stp binding process process-id command.

Precautions

This command does not take effect on a port in Down state.

Running the stp mcheck command in the system view configures all ports on the device to switch back to the RSTP/MSTP/VBST mode.

Running the stp mcheck command in the MSTP process view configures all ports bound to the current MSTP process to switch back to the RSTP/MSTP mode.

Running the stp mcheck command in the interface view configures only the current port to switch back to the RSTP/MSTP/VBST mode.

Example

# Perform MCheck on GE1/0/1 and switch it to the MSTP mode.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp mcheck

stp mode (MSTP process view)

Function

The stp mode command sets the operation mode of spanning tree protocol for the current MSTP process.

The undo stp mode command restores the default operation mode of the current MSTP process.

By default, the operation mode of spanning tree protocol for the current MSTP process is MSTP.

Format

stp mode { mstp | rstp | stp }

undo stp mode

Parameters

Parameter Description Value
mstp Indicates the MSTP operation mode for the ports bound to the current MSTP process. -
rstp Indicates the RSTP operation mode for the ports bound to the current MSTP process. -
stp Indicates the STP operation mode for the ports bound to the current MSTP process. -

Views

MSTP process view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After an MSTP process is created on an MSTP network, all ports bound to the MSTP process operate in MSTP mode by default. These ports may be connected to STP/RSTP devices. As a result, spanning trees cannot be properly calculated, because devices running different spanning tree protocols cannot exchange packets.

To address this problem, the stp mode command can be set an operation mode for a switching device. The operation mode can be MSTP, RSTP, or STP.

By default, if a port on a switching device is bound to a process and is connected to an STP switching device, the switching device automatically sets the operation mode of this port to STP and the operation mode of the other ports to MSTP.

Precautions

  • After the stp mode mstp command is run in an MSTP process, all ports that are running MSTP and are bound to the MSTP process, excluding the ports directly connected to STP switching devices, operate in MSTP mode and can send MST BPDUs. The ports directly connected to STP switching devices operate in STP mode.

  • After the stp mode rstp command is run in an MSTP process, all ports that are running MSTP and are bound to the MSTP process, excluding the ports directly connected to STP switching devices, operate in RSTP mode and can send RST BPDUs. The ports directly connected to STP switching devices operate in STP mode.

  • After the stp mode stp command is run in an MSTP process, all ports bound to the MSTP process operate in STP mode and send configured BPDUs.

A port operating in MSTP mode can communicate with a port operating in RSTP mode.

Running the stp mode rstp command on a device that supports MSTP is not recommended. The function of the stp mode rstp command can be implemented by the stp mode mstp command by default.

Example

# Set the operation mode of MSTP process 1 to the STP mode.

<HUAWEI> system-view
[HUAWEI] stp process 1
[HUAWEI-mst-process-1] stp mode stp

stp mode (system view)

Function

The stp mode command sets the operation mode of the spanning tree protocol on a switching device.

The undo stp mode command restores the default operation mode of the spanning tree protocol.

By default, the switching device operates in MSTP mode.

Format

stp mode { mstp | rstp | stp | vbst }

undo stp mode

Parameters

Parameter Description Value
mstp Indicates the MSTP mode. -
rstp Indicates the RSTP mode. -
stp Indicates the STP mode. -
vbst Indicates the VBST mode. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On the network running a spanning tree protocol, switches running different spanning tree protocols cannot communicate with each other. As a result, spanning trees cannot be properly calculated. A switch has four operation modes: VBST, MSTP, RSTP, and STP.

The stp mode command can be used to set a proper operation mode for a spanning tree protocol on a switching device and enables the switching device to identify BPDUs sent by a switching device that runs a different spanning tree protocol during communication.

By default, all ports on a switching device operate in MSTP mode. When a switching device finds that it is directly connected to an STP switching device, it automatically switches the operation mode and the port directly connected to the STP switching device to STP.

Configuration Impact

  • After the stp mode vbst command is run on a switch, all ports running VBST on the switch, excluding the ports directly connected to STP switches, operate in VBST mode and can send VBST BPDUs. The ports directly connected to STP switches operate in STP mode.

  • After the stp mode mstp command is run on a switching device, all ports running MSTP on the switching device, excluding the ports directly connected to STP switching devices, operate in MSTP mode and can send MSTP BPDUs. The ports directly connected to STP switching devices operate in STP mode.

  • After the stp mode rstp command is run on a switching device, all ports running RSTP on the switching device, excluding the ports directly connected to STP switching devices, operate in RSTP mode and can send RSTP BPDUs. The ports directly connected to STP switching devices operate in STP mode.

  • After the stp mode stp command is run on a switching device, all ports of the switching device operate in STP mode and send configured BPDUs.

Precautions

  • When HVRP is enabled, do not change the working mode of the STP to VBST.
  • A port operating in MSTP mode can communicate with a port operating in RSTP mode.

  • VBST BPDUs and RST BPDUs can be used at the same time.
  • The stp mode rstp command can be used to enable a switch that does not support MSTP to communicate with an STP switch.

  • In VBST mode, the MAC address 0100-0CCC-CCCD is displayed in the display bpdu mac-address command output. In STP/RSTP/MSTP mode, the MAC address 0100-0CCC-CCCD is not displayed unless the bpdu mac-address command specifies the MAC address as 0100-0CCC-CCCD.

Example

# Set the operation mode of the switching device to the STP mode.

<HUAWEI> system-view
[HUAWEI] stp mode stp

stp no-agreement-check

Function

The stp no-agreement-check command configures the common fast transition mechanism on an interface.

The undo stp no-agreement-check command restores the default fast transition mechanism on an interface.

STP does not support fast transition. By default, for RSTP, MSTP, and VBST, fast transition in enhanced mode is used on a port.

Format

stp no-agreement-check

undo stp no-agreement-check

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If Huawei and non-Huawei data communication devices are deployed on a network running a spanning tree protocol, the Huawei devices and non-Huawei devices may fail to communicate with each other, because they have different Proposal/Agreement mechanisms. To address this problem, the stp no-agreement-check command can be used to set a common fast transition mechanism or an enhanced transition mechanism on a port.
  • Running the stp no-agreement-check command configures a common fast transition mechanism on a port.

  • Running the undo stp no-agreement-check command configures an enhanced fast transition mechanism on a port.

Precautions

The fast transition mechanism is also called the Proposal/Agreement mechanism. The device currently supports the following modes:
  • Enhanced mode: The current interface counts a root port when it calculates the synchronization flag bit.
    1. An upstream device sends a Proposal message to a downstream device requesting fast transition. After receiving the message, the downstream device sets the port connected to the upstream device as the root port and blocks all non-edge ports.

    2. The upstream device then sends an Agreement message to the downstream device. After the downstream device receives the message, the root port transitions to the Forwarding state.

    3. The downstream device then responds with an Agreement message. After receiving the message, the upstream device sets the port connected to the downstream device as the designated port, and then the status of the designated port changes to Forwarding.

  • Common mode: The current interface ignores the root port when it calculates the synchronization flag bit.
    1. An upstream device sends a Proposal message to a downstream device requesting fast transition. After receiving the message, the downstream device sets the port connected to the upstream device as the root port and blocks all non-edge ports. Then, the status of the root port changes to Forwarding.

    2. The downstream device then responds with an Agreement message. After receiving the message, the upstream device sets the port connected to the downstream device as the designated port, and then the status of the designated port changes to Forwarding.

NOTE:

Between two interconnected switching devices in a spanning tree, the switching device nearer to the root bridge is the upstream device of the other devices.

Example

# Configure the common fast transition mechanism for the GE1/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp no-agreement-check

stp pathcost-standard

Function

The stp pathcost-standard command sets the standard used to calculate the path cost.

The undo stp pathcost-standard command restores the default standard used to calculate the path cost.

By default, the IEEE 802.1t is used to calculate the path cost.

Format

stp pathcost-standard { dot1d-1998 | dot1t | legacy }

undo stp pathcost-standard

Parameters

Parameter Description Value
dot1d-1998 Indicates IEEE 802.1D standard that is used to calculate the path cost. -
dot1t Indicates IEEE 802.1t standard that is used to calculate the path cost. -
legacy Indicates Huawei legacy standard that is used to calculate the path cost. -

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp pathcost-standard command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A path cost is a port parameter, and is used by a spanning tree protocol to select a link. By calculating path costs, a spanning tree protocol selects stable links, blocks redundant paths, and trims a network into a loop-free network. The path cost range is determined by the path cost calculation standard.

Table 5-100 lists path costs defined by the IEEE 802.1D-1998 standard, IEEE 802.1t standard, and Huawei legacy standard. Different vendors use different standards.
Table 5-100  Path cost list

Interface Rate

Interface Mode

Recommended STP Path Cost

IEEE 802.1D-1998 Standard

IEEE 802.1t Standard

Huawei Legacy Standard

0

-

65535

200,000,000

200,000

10 Mbit/s

Half-Duplex

100

2,000,000

2000

Full-Duplex

99

1,999,999

1999

Aggregated Link 2 Ports

95

1,000,000

1800

Aggregated Link 3 Ports

95

666,666

1600

Aggregated Link 4 Ports

95

500,000

1400

100 Mbit/s

Half-Duplex

19

200,000

200

Full-Duplex

18

199,999

199

Aggregated Link 2 Ports

15

100,000

180

Aggregated Link 3 Ports

15

66,666

160

Aggregated Link 4 Ports

15

50,000

140

1000 Mbit/s

Full-Duplex

4

20,000

20

Aggregated Link 2 Ports

3

10,000

18

Aggregated Link 3 Ports

3

6666

16

Aggregated Link 4 Ports

3

5000

14

10 Gbit/s

Full-Duplex

2

2000

2

Aggregated Link 2 Ports

1

1000

1

Aggregated Link 3 Ports

1

666

1

Aggregated Link 4 Ports

1

500

1

40 Gbit/s

Full-Duplex

1

500

1

Aggregated Link 2 Ports

1

250

1

Aggregated Link 3 Ports

1

166

1

Aggregated Link 4 Ports

1

125

1

100 Gbit/s

Full-Duplex

1

200

1

Aggregated Link 2 Ports

1

100

1

Aggregated Link 3 Ports

1

66

1

Aggregated Link 4 Ports

1

50

1

Precautions

If the path cost calculation standard is changed on a port, the path cost of the port is restored to the default value. The stp cost command can be used to set a path cost for a port.

Usually, all switching devices on the same network use the same path cost calculation standard.

Example

# Use the IEEE 802.1d-1998 to calculate the path cost.

<HUAWEI> system-view
[HUAWEI] stp pathcost-standard dot1d-1998
Related Topics

stp point-to-point

Function

The stp point-to-point command sets the link type of a port.

The undo stp point-to-point command restores the default link type.

By default, the link type of the ports on the switching device is auto. That is, the spanning tree protocol detects whether a port is connected to a P2P link.

Format

stp point-to-point { auto | force-false | force-true }

undo stp point-to-point

Parameters

Parameter Description Value
force-true Indicates the link type is P2P. -
force-false Indicates the link type is non-P2P. -
auto Indicates that the spanning tree protocol detects automatically whether the port is connected to a P2P link. -

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network running a spanning tree protocol, if a port of a switching device is connected to a non-P2P link, the port cannot perform fast status transition.

If a port works in full-duplex mode, the port is connected to a P2P link, and force-true can be set in the stp point-to-point command.

If a port works in half-duplex mode, the stp point-to-point force-true command can be used to forcibly set the type of the link to which the port is connected to P2P, implementing rapid network convergence.

Precautions

The stp point-to-point command configuration on a port takes effect in all spanning tree instances where the port resides.

Example

# Set the link type of GE1/0/1 as P2P.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp point-to-point force-true

stp port priority

Function

The stp port priority command sets the priority of a port in a spanning tree.

The undo stp port priority command restores the default priority.

By default, the priority of a port in a spanning tree is 128.

Format

STP/RSTP/MSTP: stp [ process process-id ] [ instance instance-id ] port priority priority

VBST: stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] port priority priority

STP/RSTP/MSTP: undo stp [ process process-id ] [ instance instance-id ] port priority

VBST: undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] port priority

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 an integer ranging from 1 to 63.
instance instance-id

Specifies the spanning tree instance.

If this parameter is not specified, the statistics about the topology changes of a CIST are displayed.

The value is an integer ranging from 0 to 4094. Value 0 refers to CIST. instance-id ranges from 0 to 4094. Each process supports a maximum of 65 instances.
priority Specifies the priority of a port. The priority ranks from 0 to 240 in descending order. The value is an integer multiple of 16, such as, 0, 16, and 32.
vlan vlan-id1 [ to vlan-id2 ]
Specifies one or more VLANs in which the port priority is configured.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the port priority is configured only for the VLAN specified by vlan-id1.

In the stp priority command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When ports participate in spanning tree calculation, the PIDs of these ports on switching devices may affect the designated port election result. During spanning tree calculation, the port with the smallest PID is elected as the designated port.

NOTE:

A PID is the ID of a port, and consists of a 4-bit priority and a 12-bit port number.

The stp port priority command can be used to change the priority of a port. This affects the PID of the port and determines whether the port can be elected as the designated port.

Precautions

When the priority of a port changes, a spanning tree protocol recalculates the role of the port and performs status transition for the port.

The priority of a port determines the role of the port in a specified spanning tree instance and process. You can set different priorities for a port in different spanning tree instances or processes so that user traffic can be forwarded along different links and traffic load balancing can be implemented.

Example

# Set the priority of GE1/0/1 to 16 in the spanning tree instance 2 when MSTP is running.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp instance 2 port priority 16
# Set the priority of GE 1/0/1 in VLAN 10 to 32 when VBST is running.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp vlan 10 port priority 32

stp priority

Function

The stp priority command sets the priority of the switching device in a spanning tree.

The undo stp priority command restores the default priority.

By default, the priority of the switching device in a spanning tree is 32768.

Format

STP/RSTP/MSTP: stp [ instance instance-id ] priority priority

STP/RSTP/MSTP: undo stp [ instance instance-id ] priority

VBST: stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] priority priority

VBST: undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] priority

Parameters

Parameter Description Value
instance instance-id Specifies the ID of a spanning tree instance.

If the parameter instance instance-id is not specified, the configuration takes effect on a CIST instance.

The value is an integer ranging from 0 to 4094. Value 0 refers to CIST. instance-id ranges from 0 to 4094. Each process supports a maximum of 65 instances.
priority Specifies the priority of the switching device in a spanning tree.

The smaller the value is, the higher the switch priority is.

The priority ranks from 0 to 61440. The value is an integer multiple of 4096, such as 0, 4096 and 8192. The default is 32768.
vlan vlan-id1 [ to vlan-id2 ]
Specifies one or more VLANs in which the switch priority is configured.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the switch priority is configured only for the VLAN specified by vlan-id1.

In the stp priority command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp priority command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Priorities of switching devices are an important factor to calculate a spanning tree and determine the selection of the root bridge.

On an STP/RSTP/MSTP/VBST network, each spanning tree has only one root bridge, which is responsible for sending BPDUs. Owning to the importance of the root bridge, the switching device with high performance and network hierarchy is generally chosen as the root bridge. The priority of such a switching device, however, may not be that high. Therefore, setting a high priority for the switching device is necessary so that the device can function as a root bridge.

Other devices with low performance and network hierarchy are not fit to be a root bridge. Therefore, set low priorities for these devices.

On an MSTP network, each switching device can be set with a distinct priority in each spanning tree instance. On a VBST network, each switch can be set with a priority for the spanning tree in each VLAN.

Precautions

The smaller the priority value of a switching device is, the higher the possibility that the switching device is selected as the root bridge.

If a switching device has been configured as the primary or secondary root bridge, before changing the priority of the switching device, run the undo stp [ instance instance-id ] root command to disable the root bridge or secondary root bridge function.

If the stp root primary command is run to set a switching device as the primary root bridge, the priority value of the switching device is 0.

If the stp root secondary command is run to set a switching device as the secondary root bridge, the priority value of the switching device is 4096.

Example

# Set the priority of the switching device in spanning tree instance 1 to 4096 when MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp instance 1 priority 4096
# Set the priority of the switch in VLAN 10 to 4096 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 priority 4096
Related Topics

stp process

Function

The stp process command has the following functions:

  • Create an MSTP process with a specified ID and enter the MSTP process view if the specified MSTP process does not exist.

  • Display the MSTP process view if the specified MSTP process exists.

The undo stp process command deletes a specified MSTP process.

By default, all MSTP configurations on a device belong to MSTP process 0.

Format

stp process process-id

undo stp process process-id

Parameters

Parameter Description Value
process-id Indicates the ID of an MSTP process. The value is an integer ranging from 1 to 63.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network where MSTP is run, if devices belong to multiple access rings that are isolated from each other and these access rings do not need intercommunication, MSTP cannot be used to calculate one spanning tree for all these access rings. Instead, MSTP must be enabled on each access ring to calculate the spanning trees independently.

Each switching device on these access rings can be configured with multiple MSTP processes. After ports of each switching device are bound to different MSTP processes, they participate in the MSTP calculations of different MSTP processes. MSTP calculations in different MSTP processes are independent of each other.

Follow-up Procedure

After an MSTP process is created, run the stp binding process command to bind relevant interfaces to the MSTP process.

Precautions

After a switching device that runs MSTP starts correctly, MSTP process 0 exists by default. MSTP configurations in the system view and interface view both belong to this process.

VBST does not support processes. Therefore, this command does not take effect when the spanning tree protocol is VBST. If this command has been run in MSTP mode, switching the MSTP mode to VBST mode fails, and the system displays a message indicating switching failure.

Example

# Create MSTP process 1.

<HUAWEI> system-view
[HUAWEI] stp process 1
Related Topics

stp pvid-consistency protection mode

Function

The stp pvid-consistency protection mode command configures a protection mode for PVID inconsistency between directly connected ports in VLAN-based Spanning Tree (VBST).

The stp pvid-consistency protection mode command deletes the protection mode for PVID inconsistency between directly connected ports in VBST.

By default, no protection mode is configured for PVID inconsistency between directly connected ports. That is, the switch only prints log information when the PVIDs of directly connected ports are different.

Format

stp pvid-consistency protection mode block

undo stp pvid-consistency protection mode

Parameters

Parameter Description Value
block

Specifies the block mode.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

VBST checks whether PVIDs of two directly connected ports are the same. If they are different, the processing method varies as follows:

  • If the protection mode is block, VBST will block the PVIDs.

  • If no protection mode is configured, VBST will print log information but not block the PVIDs.

Precautions

When the PVID of the interface is inconsistent and the PVID needs to be blocked, the stp pvid-consistency protection mode command must be configured on the two directly connected ports and their link types must be both trunk.

Example

# Set the protection mode for PVID inconsistency between directly connected ports to block.

<HUAWEI> system-view
[HUAWEI] stp pvid-consistency protection mode block

stp region-configuration

Function

The stp region-configuration command displays the MST region view.

The undo stp region-configuration command restores the default configuration of the MST region.

The default parameters of the MST regions are as follows:

  • MST region name: MAC address of the main processing unit of the switching device.

  • MSTP revision level 0.

  • VLAN mapping table: all VLANs are mapped to CIST.

Format

stp region-configuration

undo stp region-configuration

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP divides a switching network into multiple regions, each of which has multiple spanning trees and these spanning trees are independent of each other. Each spanning tree is called a multiple spanning tree instance (MSTI) and each region is called a multiple spanning tree (MST) region.

Two switching devices belong to the same MST region if they have the following parameters the same:
  • MST region name
  • Mappings between VLANs and MSTIs
  • Revision level of the MST region

If the preceding parameters need to be set for the current switching device or the current process, run the the stp region-configuration command to enter the MST region view first.

Follow-up Procedure

After the stp region-configuration command is run to enter the MST region view, run the following commands:

After entering the MST region view and set the preceding parameters, run the active region-configuration command to activate the configurations of the MST region.

Example

# Enter the MST region view.

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region]

stp revertive slow

Function

The stp revertive slow command enables the delay in revertive switching during VBST calculation on a port.

The undo stp revertive slow command disables the delay in revertive switching during VBST calculation on a port.

By default, the delay in revertive switching disabled during VBST calculation on a port.

Format

stp revertive slow

undo stp revertive slow

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a VBST-enabled switch interworks with a PVST-enabled third-party device that does not support P/A negotiation, negotiation is asynchronous. As a result, the network convergence time is long. If the remote device is the root bridge and the VBST-enabled switch provides the alternate port in addition to the interconnected port, you can enable the delay in revertive switching on the interconnected interface. The delay is calculated as follows: 2 * Forward Delay + 8s After the delay function is enabled, the remote interface first completes spanning tree calculation when the port status changes. Then the local interface performs spanning tree status switching. During status switching, services are not interrupted.

Precautions

After the delay in revertive switching is enabled on a port, this function takes effect for all VLANs that the interface join. If there is no alternate port in the VLAN where the interconnected port belongs, the port needs to wait for the delay for recovery. Exercise caution when you run this command in this situation.

Example

<HUAWEI> system-view
[HUAWEI] stp mode vbst
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp revertive slow

stp root

Function

The stp root command configures the switch as a root bridge or secondary root bridge of a spanning tree.

The undo stp root command cancels the configuration.

By default, the switch does not function as the root bridge or secondary root bridge of a spanning tree.

Format

STP/RSTP/MSTP: stp [ instance instance-id ] root { primary | secondary }

STP/RSTP/MSTP: undo stp [ instance instance-id ] root

VBST: stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] root { primary | secondary }

VBST: undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] root

Parameters

Parameter Description Value
instance instance-id Specifies the ID of a spanning tree instance.

If the parameter instance instance-id is not specified, the configuration takes effect on a CIST instance.

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.

primary Indicates that the switch functions as the root bridge of a spanning tree. -
secondary Indicates that the switch functions as the secondary root bridge of a spanning tree. -
vlan vlan-id1 [ to vlan-id2 ]
Specifies the VLAN to which the switch used as the root bridge or secondary root bridge belongs.
  • vlan-id1 specifies the first VLAN to which the switch used as the root bridge or secondary root bridge belongs.
  • to vlan-id2 specifies the last VLAN to which the switch used as the root bridge or secondary root bridge belongs. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 determine a VLAN range.
  • If to vlan-id2 is not specified, the VLAN specified by vlan-id1 is used.

In the stp root secondary command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp root command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a spanning tree protocol network, each spanning tree has only one root bridge, which is responsible for sending BPDUs. Owning to the importance of the root bridge, the switch with high performance and network hierarchy is generally chosen as a root bridge. The priority of such a device, however, may be not that high. Therefore, setting a high priority for the switch is necessary so that the switch can function as a root bridge.

To ensure nonstop traffic transmission, run the stp root command to configure the switch as the secondary root bridge. When the root bridge is faulty or is powered off, the secondary root bridge becomes the root bridge during spanning tree calculation.

NOTE:

After the stp root primary command is run to set the switch to be the primary root bridge, the priority value of the switch is 0 in the spanning tree and the priority cannot be modified.

The secondary root bridge specified using the stp root secondary command has the priority value of 4096 and the priority cannot be modified.

Precautions

A spanning tree has only one root bridge.

A switch in a spanning tree cannot function both as the primary root bridge and as the secondary root bridge.

If multiple secondary root bridges are set in a spanning tree, the one with the smallest MAC address functions as the secondary root bridge of the spanning tree.

When the device connects to a non-Huawei device, you are advised to run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> priority priority command to set the device priority to ensure that the root bridge is selected correctly.

Example

# Configure the switch as the root bridge of spanning tree instance 1 when MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp instance 1 root primary
# Configure the switch as the root bridge in VLAN 10 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 root primary

# Configure the switch as the secondary root bridge of spanning tree instance 4 when MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp instance 4 root secondary
# Configure the switch as the secondary root bridge in VLAN 10 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 root secondary
Related Topics

stp root-protection

Function

The stp root-protection command enables root protection at the current port.

The undo stp root-protection command restores the default setting of root protection.

By default, root protection is disabled at all ports.

Format

stp root-protection

undo stp root-protection

Parameters

None

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Owning to incorrect configurations or malicious attacks on the network, a root bridge may receive BPDUs with a higher priority. Consequently, the root bridge is no longer able to serve as the root bridge, and the network topology is changed, triggering a spanning tree recalculation. This spanning tree recalculation may transfer traffic from high-speed links to low-speed links, causing traffic congestion.

If a designated port is enabled with the root protection function, the port role cannot be changed. Once a designated port that is enabled with root protection receives BPDUs with a higher priority, the port enters the Discarding state and does not forward packets. If the port does not receive any BPDUs with a higher priority before a period (generally two Forward Delay periods) expires, the port automatically enters the Forwarding state.

NOTE:

You can run the stp timer forward-delay command to set the Forward Delay period.

Precautions

The root protection function takes effect only on a designated port. In addition, configuring the root protection function on a port that functions as the designated port in all instances is recommended. Generally, root protection is configured on the interfaces of the root bridge.

If the stp root-protection command is run on other types of ports, the root protection function does not take effect.

Loop protection and root protection cannot be configured on the same interface.

Example

# Enable the root protection function on GE1/0/1.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp root-protection

stp tc-notify process 0

Function

The stp tc-notify process 0 command enables the current MSTP process to notify the specified STP instances in MSTP process 0 of receiving a TC message.

The undo stp tc-notify process 0 command forbids the current MSTP process from notifying the specified STP instances in MSTP process 0 of receiving a TC message.

By default, the current MSTP process is disabled from notifying the STP instances in MSTP process 0 of receiving a TC message.

Format

stp tc-notify process 0

undo stp tc-notify process 0

Parameters

None

Views

MSTP process view

Default Level

2: Configuration level

Usage Guidelines

After the stp tc-notify process 0 command is run, the current MSTP process, after receiving a TC message, notifies the MSTIs in MSTP process 0 to update MAC entries and ARP entries. This prevents user services from being interrupted.

Example

# Configure MSTP process 1 to notify MSTP process 0 of receiving a TC message.

<HUAWEI> system-view
[HUAWEI] stp process 1
[HUAWEI-mst-process-1] stp tc-notify process 0
Related Topics

stp tc-protection interval

Function

The stp tc-protection interval command sets the time for a device to process the maximum number of TC BPDUs.

The undo stp tc-protection interval command restores the default value.

By default, the time is the Hello timer length.

NOTE:

When STP works in VBST mode, the default time for the device to process the maximum number of TC BPDUs is 10s.

Format

stp tc-protection interval interval-value

undo stp tc-protection interval

Parameters

Parameter Description Value
interval-value Specifies the time for a device to process the maximum number of TC BPDUs. The value is an integer ranging from 1 to 600, in seconds.

Views

System view or MST process region view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp tc-protection interval command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network running a spanning tree protocol, a device deletes MAC address entries and ARP entries after receiving TC packets. Frequent entry deletion may cause high CPU usage.

The TC attack defense function is enabled by default. You can configure the time, which the device takes to handle a given number of TC packets and immediately refresh forwarding entries, by running the stp tc-protection interval command. Within the time specified by interval-value, the device handles a given number of TC packets. Excess TC packets are processed by the device at once after the timer (whose length is the configured time) expires. This mechanism ensures that the device does not frequently delete its MAC entries and ARP entries, and therefore does not have excessive CPU usage.
NOTE:

You can specify the maximum number of TC packets that the device processes can handle in the specified time by running the stp tc-protection threshold command.

Example

# Configure the time that MSTP takes to handle a given number of TC packets and immediately refreshes forwarding entries, to 10 seconds.
<HUAWEI> system-view
[HUAWEI] stp tc-protection interval 10

stp tc-protection threshold

Function

The stp tc-protection threshold command sets the number of times that a device handles received TC BPDUs and updates forwarding entries within a unit time.

The undo stp tc-protection threshold command restores the default setting.

By default, after a device receives TC BPDUs, the default number of times that the device handles the TC BPDUs and updates forwarding entries is 1 within a unit time.

Format

stp tc-protection threshold threshold

undo stp tc-protection threshold

Parameters

Parameter Description Value
threshold Indicates the number of times that a device handles the TC BPDU and updates forwarding entries per unit of time. The value is an integer ranging from 1 to 255.

Views

System view or MST process region view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp tc-protection threshold command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a Layer 2 network where MSTP is run, a switching device that receives TC BPDUs will delete the corresponding MAC entries and ARP entries. Frequent deletion operations will greatly affect the CPU, leading to a high CPU usage.

The TC attack defense function is enabled by default, the number of times that TC BPDUs are processed by the switching device within a unit time is configurable (the default unit time is 2s, and the default number of times is 1). If the number of TC BPDUs that the switching device receives within a unit time exceeds the specified threshold, the switching device handles TC BPDUs only for the specified number of times. Additional TC BPDUs are processed by the switching device as a whole for once after the timer (that is, the specified time period) expires. In this manner, the switching device is prevented from frequently deleting its MAC entries and ARP entries so that the CPU is protected against overburden.
NOTE:

The value of the unit time is consistent with the Hello time and can be set using the stp timer hello command.

Example

# Set the threshold update forwarding entries to 5.
<HUAWEI> system-view
[HUAWEI] stp tc-protection threshold 5

stp timer forward-delay

Function

The stp timer forward-delay command sets the value of the Forward Delay of a switching device.

The undo stp timer forward-delay command restores the default value of the Forward Delay.

By default, the value of the Forward Delay of a switching device is 1500 centiseconds (15 seconds).

Format

stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer forward-delay forward-delay

undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer forward-delay

Parameters

Parameter Description Value
vlan vlan-id1 [ to vlan-id2 ]
Specifies one or more VLANs in which the Forward Delay value is set.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the Forward Delay value is configured for only the VLAN specified by vlan-id1.

In the stp timer forward-delay command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.
forward-delay Specifies the value of the Forward Delay. The value ranges from 400 to 3000 centiseconds by a step of 100.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp timer forward-delay command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network running a spanning tree algorithm, if the network topology is changed, it takes time to advertise new BPDU configuration messages on the network. During this period, interfaces to be blocked may not be blocked in time and interface ever blocked may not be blocked. As a result, a temporary loop may be formed. To prevent this problem, you can use the Forward Delay timer to set a delay time. During the delay time, all interfaces are blocked temporarily.

The stp timer forward-delay command is used to set the Forward Delay timer.

Precautions

The value of the Forward Delay timer set on the root bridge is advertised to other devices of the same spanning tree using BPDUs. Then it becomes the value of the Forward Delay timer of all devices in the spanning tree.

The relationships between the Hello Time, Forward Delay, and MaxAge are as follows. The spanning tree functions properly only if the correct relationships are established. Otherwise, frequent network flapping occurs.
  • 2 x (Forward Delay - 1.0 second) ≥ Max Age

  • Max Age ≥ 2 x (Hello Time + 1.0 second)

Running the stp bridge-diameter command to set the network diameter is recommended. After the stp bridge-diameter command is run, the switching device sets optimum values for the three parameters, Hello Time, Forward Delay, and Max Age.

Example

# Set the Forward Delay to 2000 centiseconds (20 seconds) when STP/RSTP/MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp timer forward-delay 2000
# Set the Forward Delay value to 2000 centiseconds (20 seconds) for VLAN 10 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 timer forward-delay 2000

stp timer hello

Function

The stp timer hello command sets the interval of the switching device to send BPDUs, that is, the value of the Hello Time.

The undo stp timer hello command restores the default setting.

By default, the interval of the switch to send BPDUs is 200 centiseconds (2 seconds).

Format

stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer hello hello-time

undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer hello

Parameters

Parameter Description Value
vlan vlan-id1 [ to vlan-id2 ]
Specifies one or more VLANs in which the Hello timer value is set.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the Hello timer value is configured for only the VLAN specified by vlan-id1.

In the stp timer hello command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.
hello-time

Specifies the interval of the switch to send BPDUs.

The value ranges from 100 to 1000, in centiseconds by a step of 100.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp timer hello command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network where a spanning tree protocol is enabled, a switching device periodically sends BPDUs to other devices in the same spanning tree at the interval of the Hello Time. Sending BPDUs periodically ensures that the spanning tree is stable. The stp timer hello command can be used to set the BPDU sending interval, that is, the Hello Time.

If no BPDUs are received by the switching device within the timeout period (timeout period = Hello Time x 3 x Timer Factor), the spanning tree is calculated again.
NOTE:

In a spanning tree, the device closer to the root bridge is the upstream device of another connected device.

Precautions

The value of the Hello Time set on the root bridge is advertised to other devices of the same spanning tree using BPDUs. Then it becomes the value of the Hello Time of all devices in the spanning tree.

The relationships between the Hello Time, Forward Delay, and Max Age are as follows. The spanning tree works properly only if the relationships are correctly established. Otherwise, frequent network flapping occurs.
  • 2 x (Forward Delay - 1.0 second) ≥ Max Age

  • Max Age ≥ 2 x (Hello Time + 1.0 second)

Running the stp bridge-diameter command to set the network diameter is recommended. After the stp bridge-diameter command is run, the switching device sets optimum values for the three parameters, Hello Time, Forward Delay, and Max Age.

Example

# Set the Hello Time to 400 centiseconds (4 seconds) when STP/RSTP/MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp timer hello 400
# Set the Hello time to 400 centiseconds (4 seconds) for VLAN 10 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 timer hello 400

stp timer max-age

Function

The stp timer max-age command sets the Max Age of a switching device, that is, the BPDU aging time on a port of the switching device.

The undo stp timer max-age command restores the default setting.

By default, the Max Age of a switching device is 2000 centiseconds (20 seconds).

Format

stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer max-age max-age

undo stp [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] timer max-age

Parameters

Parameter Description Value
vlan vlan-id1 [ to vlan-id2 ]
Specifies one or more VLANs in which the Max Age value is set.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, the Max Age value is configured only for the VLAN specified by vlan-id1.

In the stp timer max-age command, you can specify a maximum of 10 VLAN ranges.

NOTE:

VLANs can be specified only when VBST is running.

The value is an integer that ranges from 1 to 4094.
max-age

Specifies the BPDU aging time on a port of the switch.

The value ranges from 600 to 4000 in centiseconds with a step of 100.

Views

System view or MST process region view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp timer max-age command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network where a spanning tree protocol is enabled, a switching device checks whether the BPDUs received from an upstream switching device time out based on the set Max Age value. If the received BPDUs time out, the switching device ages the BPDUs and blocks the port that receives the BPDUs. Then, the switching device sends the BPDUs with the switching device as the root bridge. This aging mechanism effectively controls the diameter of the spanning tree. After the stp timer max-age command is run, the Max Age value is set to control the timeout period of received BPDUs.
NOTE:

In a spanning tree, the device closer to the root bridge is the upstream device of another connected device.

Precautions

The value of the Max Age set on the root bridge is advertised to other devices of the same spanning tree using BPDUs. Then it becomes the MaxAge value of all devices in the spanning tree.

The relationships between the Hello Time, Forward Delay, and Max Age are as follows. The spanning tree functions properly only if the relationships are correctly established. Otherwise, frequent network flapping occurs.
  • 2 x (Forward Delay - 1.0 second) ≥ Max Age

  • Max Age ≥ 2 x (Hello Time + 1.0 second)

Running the stp bridge-diameter command to set the network diameter is recommended. After the stp bridge-diameter command is run, the switching device sets optimum values for the three parameters, Hello Time, Forward Delay, and Max Age.

Example

# Set the Max Age to 1000 centiseconds (10 seconds) when STP/RSTP/MSTP is running.

<HUAWEI> system-view
[HUAWEI] stp timer max-age 1000
# # Set the Max Age value to 1000 centiseconds (10 seconds) for VLAN 10 when VBST is running.
<HUAWEI> system-view
[HUAWEI] stp vlan 10 timer max-age 1000

stp timer-factor

Function

The stp timer-factor command sets the timer factor of the timeout period of a switching device to the Hello Time.

The undo stp timer-factor command restores the default setting.

By default, the timer factor is 3.
NOTE:

If a switching device does not receive BPDUs from an upstream device within the timeout period (timeout period = Hello Time × 3 × Timer Factor), the spanning tree is calculated again.

Format

stp timer-factor factor

undo stp timer-factor

Parameters

Parameter Description Value
factor Specifies the timer factor. The value ranges from 1 to 10.

Views

System view or MSTP process view

NOTE:
VBST does not support processes. When VBST is running, you cannot run the stp timer-factor command in the MSTP process view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network where a spanning tree protocol is enabled, if a switching device does not receive BPDUs from an upstream device within the timeout period, it considers that the upstream device becomes faulty, and will recalculate the spanning tree.

Sometimes, however, the failure of the upstream device to send BPDUs within the timeout period is only because it is busy processing services. In this case, the spanning tree cannot be calculated. Therefore, you can set a long timeout period on a stable network to avoid the waste of network resources.
NOTE:

In a spanning tree, the device closer to the root bridge is the upstream device of another connected device.

Precautions

If the parameter factor is set smaller, the timeout period of the switching device to re-calculate the spanning tree is shorter. In this case, there is a higher probability that the switching device incorrectly considers the upstream device as being faulty.

If the parameter factor is set larger, the timeout period of the switching device to re-calculate the spanning tree is longer. In this case, there is a higher probability that the traffic becomes interrupted because the upstream device has become faulty.

Example

# Set the timer factor of the switching device to 6.

<HUAWEI> system-view
[HUAWEI] stp timer-factor 6
Related Topics

stp transmit-limit (interface view)

Function

The stp transmit-limit command sets the maximum number of BPDUs that the current port can send in a specified period.

The undo stp transmit-limit command restores the default maximum BPDUs.

By default, the maximum number of BPDUs that a port sends is 6 per second.

Format

stp transmit-limit packet-number

undo stp transmit-limit

Parameters

Parameter Description Value
packet-number

Specifies the maximum number of BPDUs that a port can send in a specified period.

The value is an integer that ranges from 1 to 255.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network where a spanning tree protocol is enabled, a switching device periodically sends BPDUs to other devices in the same spanning tree with the interval of the Hello Time. Sending BPDUs periodically ensures that the spanning tree is stable. If the number of sent BPDUs is great in a specified period, excessive system and bandwidth resources will be consumed.

To prevent this problem from occurring, run the stp transmit-limit command to set the maximum number of BPDUs that can be sent by an interface in a specified period. In this manner, the BPDU sending speed is controlled, preventing excessive use of system and bandwidth resources by MSTP when the network topology flaps.

Precautions

After the stp transmit-limit command is configured, the maximum number of BPDUs sent in a specified period by the interface is determined by the set value.

Example

# Set the maximum BPDUs that GE1/0/1 can send in a specified period to 5.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] stp transmit-limit 5

stp transmit-limit (system view)

Function

The stp transmit-limit command configures the maximum number of Bridge Protocol Data Units (BPDUs) that each interface of the local device can send per second.

The undo stp transmit-limit command restores the maximum number of BPDUs, which can be sent by each interface of the local device per second, to the default value.

By default, each interface can send a maximum of 6 BPDUs per second.

Format

stp transmit-limit packet-number

undo stp transmit-limit

Parameters

Parameter Description Value
packet-number Maximum number of BPDUs that each interface of the local device can send per second The value is an integer ranging from 1 to 255.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a network running the Spanning Tree Protocol (STP), a switch sends BPDUs to other devices in the same spanning tree at the interval of the Hello time, to maintain the spanning tree stability. If a large number of BPDUs are sent every second, system and bandwidth resources will be greatly consumed.

NOTE:

You can configure the Hello time by using the stp timer hello command. The Hello time is the length of the Hello timer and specifies the interval at which the switch sends BPDUs.

To prevent excessive usage of system and bandwidth resources, you can run the stp transmit-limit command to configure the maximum number of BPDUs that each interface of the local device can send per second. This configuration controls the BPDU sending rate and prevents the Multiple Spanning Tree Protocol (MSTP) from consuming too many system and bandwidth resources when topology flapping occurs.

Precautions

After the stp transmit-limit command is executed, packet-number controls the maximum number of BPDUs that each interface can send per second.

You can also configure the maximum number of BPDUs that a specific interface can send per second by running the stp transmit-limit (interface view) command in the view of this interface. The stp transmit-limit (interface view) command configuration in the interface view takes precedence over the stp transmit-limit command configuration in the system view. That is, if the stp transmit-limit (interface view) command is configured in the view of an interface, the stp transmit-limit command configuration in the system view does not take effect for this interface.

Example

# Configure the maximum number of BPDUs that each interface of the local device can send per second to 5.
<HUAWEI> system-view
[HUAWEI] stp transmit-limit 5

stp vlan enable

Function

The stp vlan enable command enables VBST in a VLAN on the switch.

The stp vlan disable command disables VBST in a VLAN on the switch.

The undo stp vlan disable command restores the default VBST status in a VLAN on the switch.

By default, VBST is enabled in a VLAN on the switch.

Format

stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> enable

stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> disable

undo stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> disable

Parameters

Parameter Description Value
vlan vlan-id1 [ to vlan-id2 ]
Specifies one or more VLANs in which VBST is enabled.
  • vlan-id1 specifies the start VLAN ID.
  • to vlan-id2 specifies the end VLAN ID. vlan-id2 must be greater than or equal to vlan-id1. vlan-id2 and vlan-id1 specify a VLAN range.
  • If to vlan-id2 is not specified, VBST is enabled only for the VLAN specified by vlan-id1.

In the stp enable command, you can specify a maximum of 10 VLAN ranges.

The value is an integer that ranges from 1 to 4094.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a complex Layer 2 network, to prevent or eliminate loops and allow traffic in different VLANs to be forwarded along spanning trees to implement load balancing, deploy VBST on the switch.

Spanning tree calculation occupies system resources. Therefore, run the stp vlan disable command to disable VBST in a VLAN where spanning tree calculation does not need to be performed.

Pre-configuration Tasks

When VBST is enabled on a ring network, VBST immediately starts spanning tree calculation. Parameters such as the switch priority and port priority affect spanning tree calculation, and change of these parameters may cause network flapping. To ensure fast and stable spanning tree calculation, perform basic configurations on the switch and ports before enabling VBST.
  • Run the stp mode vbst command to set the working mode of the switch.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> priority priority command to set the priority of the switch in the spanning tree.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> port priority priority command to set the priority of the port in the spanning tree instance.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> root primary command to set the switch as the root bridge of the spanning tree instance.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> root secondary command to set the switch as the secondary root bridge of the spanning tree.

  • Run the stp vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> costcost command to set the path cost of the port in the spanning tree instance.

  • Run the instance instance-id vlan vlan-id command to configure 1:1 mapping between MSTIs and VLANs.

Configurations are needed based on real-world situations.

Precautions

When VBST is enabled globally and in a VLAN, the interface that belongs to the VLAN participates in spanning tree calculation. Whether the interface is in forwarding state depends on the calculation result.

When VBST is disabled in a VLAN, the interface that belongs to the VLAN does not participate in spanning tree calculation and is in forwarding state in the VLAN.

VBST cannot be enabled in the ignored VLAN or control VLAN used by ERPS, RRPP, SEP, or Smart Link.

If VLAN mapping or VLAN stacking is configured on an interface corresponding to the VLAN, VBST negotiation for this VLAN will fail.

Example

# Enable VBST in VLAN 5.

<HUAWEI> system-view
[HUAWEI] stp vlan 5 enable

# Disable VBST in VLAN 5.

<HUAWEI> system-view
[HUAWEI] stp vlan 5 disable

stp vpls-subinterface enable

Function

The stp vpls-subinterface enable command enables a main interface to notify its sub-interface bound to a VSI of the received TC BPDUs.

The undo stp vpls-subinterface enable command disables a main interface from notifying its sub-interface bound to a VSI of the received TC BPDUs.

By default, a main interface is disabled from notifying its sub-interface bound to a VSI of the received TC BPDUs.

NOTE:

Switch XGE interfaces connected to the ACU2 card do not support this command.

Switch XGE interfaces connected to the ET1D2IPS0S00, ET1D2FW00S00, ET1D2FW00S01 or ET1D2FW00S02 card do not support this command.

Format

stp vpls-subinterface enable

undo stp vpls-subinterface enable

Parameters

None.

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If an MSTP-enabled interface has a sub-interface configured with L2VPN, you can run the stp vpls-subinterface enable command to enable the main interface to notify its sub-interface bound to a VSI of the received TC BPDUs. After the main interface receives TC BPDUs, the main interface can notify the sub-interface bound to the VSI of updating MAC address entries and ARP entries. This function ensures nonstop services. When the stp vpls-subinterface enable command is used and the main interface is in Discarding state, the sub-interface bound to the VSI enters the flowdown state. This prevents loops on a VPLS network when CEs are dual-homed to PEs.

This command does not take effect when VBST is running. If this command has been run in STP/RSTP/MSTP mode, switching the STP/RSTP/MSTP mode to VBST mode fails, and the system displays a message indicating switching failure

Precautions

When the forwarding status of an interface moves to Discarding, its VSI-bound sub-interfaces will move to the Discarding state to prevent loops on the VPLS network on which a CE is dual-homed to two PEs.

The stp vpls-subinterface enable and erps vpls-subinterface enable commands are mutually exclusive on the same interface.

Example

# Enable the GE1/0/1 to notify its sub-interface bound to a VSI of the received TC BPDUs.
<HUAWEI> system-view 
[HUAWEI] interface gigabitethernet 1/0/1 
[HUAWEI-GigabitEthernet1/0/1] stp vpls-subinterface enable

vlan-mapping modulo

Function

The vlan-mapping modulo command enables VLAN-to-instance mapping assignment based on a default algorithm.

The undo vlan-mapping modulo command restores the default mapping.

By default, all VLANs are mapped to CIST, namely, spanning tree instance 0.

Format

vlan-mapping modulo modulo

undo vlan-mapping modulo

Parameters

Parameter Description Value
modulo Specifies the value of a module.

The value is an integer ranging from 1 to 64.

Views

MST region view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MSTP divides a switching network into multiple regions, each of which has multiple spanning trees that are independent of each other. Each spanning tree is called an MSTI and each region is called an MST region.

Two switching devices belong to the same MST region only when they have the following same configurations:
  • MST region name
  • Mappings between MSTIs and VLANs
  • MST region revision level
The vlan-mapping modulo command is used to enable VLAN-to-instance mapping assignment based on a default algorithm.
NOTE:

In the command, vlan-mapping modulo indicates that the formula (VLAN ID-1)%modulo+1 is used. In the formula, (VLAN ID-1)%modulo means the remainder of (VLAN ID-1) divided by the value of modulo. This formula is used to map a VLAN to the corresponding MSTI. The calculation result of the formula is ID of the mapping MSTI. For example, if the modulus is 16, the switch maps VLAN 1 to MSTI 1, VLAN 2 to MSTI 2 VLAN 16 to MSTI 16, VLAN 17 to MSTI 1, and so on.

Precautions

The instance instance-id vlan { vlan-id [ to vlan-id ] }&<1-10> command is recommended because VLAN-to-instance mapping assignments cannot meet actual mapping requirements.

VBST does not support regions. Therefore, this command does not take effect when the spanning tree protocol is VBST.

Example

# Map all VLANs to spanning tree instances modulo 16.

<HUAWEI> system-view
[HUAWEI] stp region-configuration
[HUAWEI-mst-region] vlan-mapping modulo 16
Translation
Download
Updated: 2019-10-18

Document ID: EDOC1000178288

Views: 26238

Downloads: 109

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next