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

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

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

NOTE:

CE6880EI does not support VBST.

check vlan instance mapping

Function

The check vlan instance mapping command checks whether the mappings configured between instances and VLANs are correct.

Format

check vlan instance mapping

Parameters

None

Views

VLAN instance view

Default Level

1: Monitoring level

Usage Guidelines

If there are multiple mappings between instances and VLANs, you can run the check vlan instance mapping command to check whether the configured mappings are correct before committing the configuration. By doing so, you can avoid any incorrect configuration.

Example

# Check the configured mappings between instances and VLANs before committing the configuration.

<HUAWEI> system-view
[~HUAWEI] vlan instance
[*HUAWEI-vlan-instance] check vlan instance mapping
Admin configuration:
   Instance   VLANs Mapped
      0       1 to 9 41 to 4094 
      1       10 to 20 
      2       21 to 30 
      3       31 to 40

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

1: Monitoring 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. If the MST region configurations are correct, commit the configuration.

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   VLAN                                                      
      0       1 to 9, 11 to 4094
     16       10
Table 7-68  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 VLAN

Mapping between MSTIs and VLANs. To configure the mapping between MSTIs and VLANs, run the instance or instance (VLAN instance view) command.

display vlan instance mapping

Function

The display vlan instance mapping command displays mappings between instances and VLANs.

Format

display vlan instance mapping

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After you configure mappings between instances and VLANs, you can run the display vlan instance mapping command to display the mappings configured between instances and VLANs.

Example

# Display mappings between instances and VLANs.

<HUAWEI> display vlan instance mapping
Oper configuration:
   Instance   VLANs Mapped
      0       1 to 9 41 to 4094 
      1       10 to 20 
      2       21 to 30 
      3       31 to 40

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

3: Management 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 : 20                                                                                                                    
------------------------------------------------------------------------------                                                      
Trap name                      Default switch status   Current switch status                                                        
hwMstpProLoopbackDetected      off                     on                                                                           
hwMstpProNewBridgeLostRootPrimary                                                                                                   
                               off                     on                                                                           
hwMstpProNewEdgePortChanged    off                     on                                                                           
hwMstpProNewPortBpduGuarded    off                     on                                                                           
hwMstpProNewPortLoopGuarded    off                     on                                                                           
hwMstpProNewPortRootGuarded    off                     on                                                                           
hwMstpProNewPortStateDiscarding                                                                                                     
                               off                     on                                                                           
hwMstpProNewPortStateForwarding                                                                                                     
                               off                     on                                                                           
hwMstpProRootChanged           off                     on                                                                           
hwMstpProTcGuarded             off                     on                                                                           
hwMstpiBridgeLostRootPrimary   off                     on                                                                           
hwMstpiEdgePortChanged         off                     on                                                                           
hwMstpiPortBpduGuarded         off                     on                                                                           
hwMstpiPortLoopGuarded         off                     on                                                                           
hwMstpiPortRootGuarded         off                     on                                                                           
hwMstpiPortStateDiscarding     off                     on                                                                           
hwMstpiPortStateForwarding     off                     on                                                                           
hwMstpiTcGuarded               off                     on                                                                           
newRoot                        off                     on                                                                           
topologyChange                 off                     on   
Table 7-69  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:

  • hwMstpProLoopbackDetected: indicates that the port is blocked when the port detects loopback.

  • hwMstpProNewBridgeLostRootPrimary: indicates that in the MSTP process the device is no longer the root bridge.

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

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

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

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

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

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

  • hwMstpProRootChanged: indicates that the root bridge changes.

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

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

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

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

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

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

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

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

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

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

  • topologyChange: indicates that the topology changes.

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.

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

3: Management 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 mstp all
------------------------------------------------------------------------------                                                      
Feature name: VBST                                                                                                                  
Trap number : 2                                                                                                                     
------------------------------------------------------------------------------                                                      
Trap name                      Default switch status   Current switch status                                                        
hwVbstVlanNumExceeded          on                      on                                                                           
hwVbstVlanNumResumed           on                      on                                                                           
Table 7-70  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:

  • hwVbstVlanNumExceeded:indicates that the number of VLANs running VBST has exceeded the upper limit, and the VBST function may not take effect on some VLANs.
  • hwVbstVlanNumResumed:indicates that the number of VLANs running VBST has restored to the normal 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.

display stp

Function

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

Format

display stp [ process process-id ] [ instance instance-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 MSTP process 0 will be displayed.

The value is a decimal integer ranging from 1 to 256.
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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 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 of the device with a specified stack ID.

The default value is 1 on an unstacked switch; the value depends on the number of stacked switches.

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 on the existing switching device or specified interface.
  • If the Protocol Status field value is Disabled, STP/RSTP/MSTP/VBST is not run.
  • If STP/RSTP/MSTP has been run, information such as the working mode of STP/RSTP/MSTP/VBST will be displayed.

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

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

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

NOTE:

For description about MSTP process 0, see stp process.

Example

# Display the status and statistics of STP/RSTP/MSTP when STP/RSTP/MSTP is disabled.

<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 7-71  Description table of the display stp command output

Item

Description

Protocol Status

Status of the protocol.

Protocol Standard

Standards of the protocol.

Version

Protocol version:
  • 0: STP

  • 2: RSTP

  • 3: MSTP

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

CIST Bridge Priority

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

MAC address

MAC address of the switch.

Max age (s)

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

Forward delay (s)

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

Hello time (s)

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

Max hops

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

Share region-configuration

Status of sharing the region configuration of process 0.

# 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  Cost       Edged                                                
     0  10GE1/0/1                   ROOT  forwarding    none        2000       disable                                              
     0  10GE1/0/2                   DESI  forwarding    none        2000       disable                                              
     0  10GE1/0/3                   DESI  forwarding    none        2000       disable                                              
     0  10GE1/0/4                   DESI  forwarding    none        2000       disable                                              
     0  10GE1/0/5                   DESI  forwarding    none        2000       disable
Table 7-72  Description of the display stp brief command output

Item

Description

MSTID

MSTP instance ID.

Port -
Role
Role of the interface:
  • Root Port

  • Designated Port

  • Alternate Port

  • Backup Port

  • Master Port

Master ports are special regional edge ports and used as root ports on ISTs or CISTs and master ports in instances.
STP State
Interface status. In the CIST region, the statuses of interfaces are as follows:
  • forwarding

  • learning

  • discarding

Protection
The protection type is as follows:
  • None

  • LoopBack

  • BpduRoot

  • Root: Root protection is valid only on the designated port.

  • Bpdu

  • Loop: Loop protection is valid only on the root port or alternate port.

  • BpduLoop

Cost

Path cost of an interface. For the related commands, see stp cost.

Edged
Edge interface specified by the administrator:
  • enable
  • disable

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

<HUAWEI> display stp instance 0 interface 10ge 1/0/1
CIST Global Information:                                                                                                            
  Mode                :MSTP                                                                                                         
  CIST Bridge         :32768.0019-7459-3301                                                                                         
  Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                                      
  Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                                      
  CIST Root/ERPC      :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  CIST RegRoot/IRPC   :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  CIST RootPortId     :0.0                                                                                                          
  BPDU-Protection     :Disabled                                                                                                     
  TC or TCN received  :24                                                                                                           
  TC count per hello  :0                                                                                                            
  STP Converge Mode   :Normal                                                                                                       
  Share region-configuration :Enabled                                                                                               
  Time since last TC  :0 days 1h:8m:8s                                                                                              
  Number of TC        :13                                                                                                           
  Last TC occurred    :10GE1/0/1                                                                                                    
  Topo Change Flag    :0                                                                                                            
                                                                                                                                    
CIST Port Information:                                                                                                              
  Port Id             :2                                                                                                            
  Port Name           :10GE1/0/1                                                                                                    
  Port State          :Down                                                                                                         
  Port Protocol       :Enabled                                                                                                      
  Port Role           :Disabled Port                                                                                                
  Port Priority       :128                                                                                                          
  Port Cost(Dot1T)    :Config=auto / Active=200000000                                                                               
  Designated Bridge/Port   :32768.0019-7459-3301 / 128.2                                                                            
  Port Edged          :Config=default / Active=disabled                                                                             
  Point-to-point      :Config=auto / Active=false                                                                                   
  Transit Limit       :6 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           :0                                                                                                            
           TCN: 0, Config: 0, RST: 0, MST: 0                                                                                        
  BPDU Received       :0                                                                                                            
           TCN: 0, Config: 0, RST: 0, MST: 0                                                                                        
  Last forwarding time: 2013/12/20 19:12:00 UTC
  Message Age         :0 

MSTI 1 Global Information:                                                                                                          
  MSTI Bridge ID      :32768.0019-7459-3301                                                                                         
  MSTI RegRoot/IRPC   :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  MSTI RootPortId     :0.0                                                                                                          
  Master Bridge       :32768.0019-7459-3301                                                                                         
  Cost to Master      :0                                                                                                            
  TC received         :8                                                                                                            
  TC count per hello  :0                                                                                                            
  Time since last TC  :0 days 0h:1m:24s                                                                                             
  Number of TC        :11                                                                                                           
  Last TC occurred    :10GE1/0/1                                                                                                   
  Topo Change Flag    :0                                                                                                            
                                                                                                                                    
MSTI 1 Port Information:                                                                                                            
  Port Id             :1                                                                                                            
  Port Name           :10GE1/0/1                                                                                                    
  Port State          :Forwarding                                                                                                   
  Port Role           :Designated Port                                                                                              
  Port Priority       :128                                                                                                          
  Port Cost(Dot1T)    :Config=auto / Active=2000                                                                                    
  Desg. Bridge/Port   :32768.0019-7459-3301 / 128.1                                                                                 
  Port Times          :RemHops 20                                                                                                   
  TC or TCN send      :12                                                                                                           
  TC or TCN received  :0                                                                                                            
  Last forwarding time: 2013/12/24 08:34:42 UTC 
Table 7-73  Description of the display stp instance command output

Item

Description

CIST Global Information

CIST global information.

Mode

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

CIST Bridge

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

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

Config Times

Values that are configured manually in the bridge protocol information:
  • Hello: indicates the period of sending BPDUs.

  • MaxAge: indicates the maximum lifecycle of BPDU.

  • FwDly: indicates the delay in port status change.

  • MaxHop: indicates the maximum number of hops in the MST region.

Active Times

Values that are used actually in the bridge protocol information:
  • Hello: indicates the period of sending BPDUs.

  • MaxAge: indicates the maximum lifecycle of BPDU.

  • FwDly: indicates the delay in port status change.

  • MaxHop: indicates the maximum number of hops in the MST region.

CIST Root/ERPC

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

CIST RegRoot/IRPC

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

CIST RootPortId

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

BPDU-Protection

BPDU protection function:
  • Disabled

  • Enabled

TC or TCN received

Number of the received TC or TCN BPDUs.

TC count per hello

Number of TC BPDUs received within a hello interval.

STP Converge Mode

STP convergence mode.

Share region-configuration

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 is unavailable when Number of TC is 0.

Topo Change Flag

Whether the topology is changed or not:
  • 0: The topology is not changed.
  • 1: The topology is changed.

CIST Port Information

CIST port information.

Port Id

Port ID.

Port Name

Port name.

Port State
Status of the port:
  • Forwarding
  • Discarding
  • Down
  • Disabled
  • Learning
  • Inactive

Port Protocol

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

Port Role

Role of the interface:
  • Disabled Port

  • Root Port

  • Designated Port

  • Alternate Port

  • Backup Port

  • Master Port

Master ports are special regional edge ports and used as root ports on ISTs or CISTs and master ports in instances.

Port Priority

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

Port Cost(Dot1T)

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

  • active: indicates the actual path cost.

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:
  • None

  • LoopBack

  • BpduRoot

  • Root: Root protection is valid only on the designated port.

  • Bpdu

  • Loop: Loop protection is valid only on the root port or alternate port.

  • BpduLoop

Port STP Mode

STP mode on an interface.

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

Protocol format of the BPDUs received and sent through an interface.

PortTimes

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

  • MaxAge: indicates the maximum lifecycle of BPDU.

  • FwDly: indicates the delay in port status change.

  • RemHop: indicates the maximum number of 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 sent BPDUs:
  • TCN: TCN BPDUs

  • Config: STP BPDUs

  • RST: RSTP BPDUs

  • MST: MSTP BPDUs

BPDU Received

Statistics about received BPDUs:
  • TCN: TCN BPDUs

  • Config: STP BPDUs

  • RST: RSTP BPDUs

  • MST: MSTP BPDUs

Last forwarding time

Time when the interface last entered the forwarding state.

Message Age

Time since the root bridge originally generated information that a BPDU is derived from.

MSTI Bridge ID

ID of the bridge.

MSTI RegRoot/IRPC

MSTI root bridge ID or cost of the internal path (path from the switch to the MSTI root switch).

MSTI RootPortId

ID of the MSTI root interface. The value 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. The value 0 indicates that the master interface is located at the current bridge.

TC received

Number of received TC BPDUs.

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

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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 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   10GE1/0/1                     discarding      root-protected
     0   10GE1/0/2                     down            bpdu-protected           
     0   10GE1/0/3                     discarding      root-protected           
     0   10GE1/0/4                     discarding      loop-detected
# Display information about abnormal ports running VBST in VLAN 5.
<HUAWEI> display stp vlan 5 abnormal-interface
VLANID    Interface          Status          Reason                   
     5    10GE1/0/1          DISCARDING      LOOP-Protected           
     5    10GE1/0/2          DOWN            BPDU-Protected           
     5    10GE1/0/3          DISCARDING      ROOT-Protected           
     5    10GE1/0/4          DISCARDING      LOOP-Detected
Table 7-74  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.

VLANID

VLAN ID.

display stp active

Function

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

Format

display stp [ process process-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 256.

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.

<HUAWEI> display stp active
CIST Global Information:                                                                                                            
  Mode                :MSTP                                                                                                         
  CIST Bridge         :32768.0019-7459-3301                                                                                         
  Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                                      
  Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                                      
  CIST Root/ERPC      :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  CIST RegRoot/IRPC   :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  CIST RootPortId     :0.0                                                                                                          
  BPDU-Protection     :Disabled                                                                                                     
  TC or TCN received  :31                                                                                                           
  TC count per hello  :0                                                                                                            
  STP Converge Mode   :Normal                                                                                                       
  Share region-configuration :Enabled                                                                                               
  Time since last TC  :0 days 0h:28m:47s                                                                                            
  Number of TC        :19                                                                                                           
  Last TC occurred    :10GE1/0/1                                                                                                    
  Topo Change Flag    :0                                                                                                            
                                                                                                                                    
CIST Port Information:                                                                                                              
  Port Id             :1                                                                                                            
  Port Name           :10GE1/0/1                                                                                                    
  Port State          :Forwarding                                                                                                   
  Port Protocol       :Enabled                                                                                                      
  Port Role           :Designated Port                                                                                              
  Port Priority       :128                                                                                                          
  Port Cost(Dot1T)    :Config=auto / Active=2000                                                                                    
  Designated Bridge/Port   :32768.0019-7459-3301 / 128.1                                                                            
  Port Edged          :Config=default / Active=enabled                                                                              
  Point-to-point      :Config=auto / Active=true                                                                                    
  Transit Limit       :6 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           :38563                                                                                                        
           TCN: 0, Config: 0, RST: 0, MST: 38563                                                                                    
  BPDU Received       :0                                                                                                            
           TCN: 0, Config: 0, RST: 0, MST: 0                                                                                        
  Last forwarding time: 2013/12/20 05:02:19 UTC                                                                                     
  Message Age         :0           

MSTI 1 Global Information:                                                                                                          
  MSTI Bridge ID      :32768.0019-7459-3301                                                                                         
  MSTI RegRoot/IRPC   :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  MSTI RootPortId     :0.0                                                                                                          
  Master Bridge       :32768.0019-7459-3301                                                                                         
  Cost to Master      :0                                                                                                            
  TC received         :8                                                                                                            
  TC count per hello  :0                                                                                                            
  Time since last TC  :0 days 0h:1m:24s                                                                                             
  Number of TC        :11                                                                                                           
  Last TC occurred    :10GE1/0/1                                                                                                   
  Topo Change Flag    :0                                                                                                            
                                                                                                                                    
MSTI 1 Port Information:                                                                                                            
  Port Id             :1                                                                                                            
  Port Name           :10GE1/0/1                                                                                                    
  Port State          :Forwarding                                                                                                   
  Port Role           :Designated Port                                                                                              
  Port Priority       :128                                                                                                          
  Port Cost(Dot1T)    :Config=auto / Active=2000                                                                                    
  Desg. Bridge/Port   :32768.0019-7459-3301 / 128.1                                                                                 
  Port Times          :RemHops 20                                                                                                   
  TC or TCN send      :12                                                                                                           
  TC or TCN received  :0                                                                                                            
  Last forwarding time: 2013/12/24 08:34:42 UTC
Table 7-75  Description of the display stp active command output

Item

Description

CIST Global Information

CIST global information.

Mode

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

CIST Bridge

  • The 16 leftmost bits are the switch's priority in the CIST.
  • The 48 rightmost bits are the switch's MAC address.

Config Times

Configured bridge protocol parameters:
  • Hello: interval at which Bridge Protocol Data Units (BPDUs) are sent

  • MaxAge: maximum TTL of a BPDU

  • FwDly: delay in interface status transition

  • MaxHop: maximum number of hops in the MST region

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 bridge ID/external path cost from the switch to the root bridge.

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

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

BPDU-Protection

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

  • Enabled: BPDU protection is enabled.

TC or TCN received

Number of received topology change (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.

Share region-configuration

The status of sharing the region configuration of process 0.

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.

Topo Change Flag
Whether the topology is changed or not:
  • 0: The topology is not changed.
  • 1: The topology is changed.

CIST Port Information

CIST port information.

Port Id

Port ID.

Port Name

Port name.

Port State
The status of the port:
  • Forwarding
  • Discarding

Port Protocol

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

Port Role

Role of the interface:
  • Root Port

  • Designated Port

  • Alternate Port

  • Backup Port

  • Master Port

Master ports are special regional edge ports, functioning as root ports on ISTs or CISTs and master ports in instances.

Port Priority

Interface priority. For details, see stp port priority.

Port Cost(Dot1T)

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

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 (interface view).

Protection Type

The protection type is as follows:
  • Root: valid only on a designed port.

  • Loop: valid only on a root port or an alternate one.

  • None: none.

Port STP Mode

STP mode of the interface

Port Protocol Type

Format of packets 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.

PortTimes

Bridge protocol parameters of the interface:
  • Hello: interval at which BPDUs are sent

  • MaxAge: maximum TTL of a BPDU

  • FwDly: delay in interface status transition

  • RemHop: maximum number of hops in the MST region

TC or TCN send

Number of TC or TCN packets sent on the interface

TC or TCN received

Number of TC or TCN packets 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

  • TCN: topology change notification

  • Config: STP packets

  • RST: RSTP packets

  • MST: MSTP packets

Last forwarding time

Time when the interface last entered the forwarding state

Message Age

Records the time since the root bridge originally generated the information that a BPDU is derived from.

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 packets

display stp blocked-interface

Function

The display stp blocked-interface command displays information about the spanning tree protocol blocked interfaces of a specified VLAN.

Format

display stp vlan vlan-id blocked-interface

Parameters

Parameter Description Value
vlan vlan-id

displays the information about the spanning tree protocol blocked interfaces of a specified VLAN.

The value is an integer ranging from 1 to 4094.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

When interfaces are added to a VLAN, you can run the display stp blocked-interface command to check information about the spanning tree protocol blocked interfaces in this VLAN.

Precautions

This command displays information about the blocked interfaces in the process without being configured with share-link protection.

Example

# Display information about the STP blocked interfaces of VLAN 2.

<HUAWEI> display stp vlan 2 blocked-interface
VLAN          Blocked Ports                                                                                                         
--------------------------------------------------------------------------------                                                    
   2          10GE1/0/1
Table 7-76  Description of the display stp blocked-interface command output

Item

Description

VLAN

ID of a VLAN

Blocked Ports

Name of a blocked interface

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

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.

<HUAWEI> display stp bridge root
MSTID RootID               RootCost HelloTime MaxAge ForwardDelay RootPort                                                          
--------------------------------------------------------------------------                                                          
    0 32768.0019-7459-3301        0         2     20           15         
# Display details about the spanning tree of the root bridge running VBST in VLAN 10.
<HUAWEI> display stp vlan 10 bridge root
------------------------------------------------------------------------------                                                      
                                     Hello  Max Forward                                                                             
VLANID RootID               RootCost  Time  Age   Delay RootPort                                                                    
------------------------------------------------------------------------------                                                      
    10 4106.0025-9e95-7c21         0     2   20      15                                                                             
------------------------------------------------------------------------------                                                      
Table 7-77  Description of the display stp bridge command output

Item

Description

MSTID

MSTP instance ID

RootID

MSTP root bridge ID

RootCost

MSTP root path cost

HelloTime

Interval at which Bridge Protocol Data Units (BPDUs) are sent from the root switch

MaxAge

Maximum TTL of a BPDU

ForwardDelay

Delay in interface status transition

RootPort

Root interface

VLANID

VLAN ID.

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-id256 is not specified, the global STP information of MSTP process 0 will be displayed.

The value is an integer ranging from 1 to 256.

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.

<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                                                                                                       
Bridge-diameter            :7                                                                                                       
CIST Global Information:                                                                                                            
  Mode                :MSTP                                                                                                         
  CIST Bridge         :32768.0019-7459-3301                                                                                         
  Config Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                                      
  Active Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                                      
  CIST Root/ERPC      :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  CIST RegRoot/IRPC   :32768.0019-7459-3301 / 0 (This bridge is the root)                                                           
  CIST RootPortId     :0.0                                                                                                          
  BPDU-Protection     :Disabled                                                                                                     
  TC or TCN received  :9                                                                                                            
  TC count per hello  :0                                                                                                            
  STP Converge Mode   :Normal                                                                                                       
  Share region-configuration :Enabled                                                                                               
  Time since last TC  :0 days 1h:37m:17s                                                                                            
  Number of TC        :10                                                                                                           
  Last TC occurred    :10GE4/0/12                                                                                                   
  Topo Change Flag    :0
Table 7-78  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.

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.

Tc-protection

Topology change (TC) protection status.

Tc-protection threshold

Threshold of TC packets that the device can handle and immediately refresh forwarding entries in a given period

Tc-protection interval

Time the device takes to handle a given number of TC packets and immediately refresh forwarding entries

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.

Pathcost-standard

Method of calculating the MSTP path cost

Timer-factor

Multiplier of Hello time

Transmit-limit

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

Bridge-diameter

Network diameter of the MSTP

CIST Global Information

CIST global information.

Mode

The mode of spanning tree protocol
  • STP
  • RSTP
  • MSTP
  • VBST

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
  • MaxAge: maximum TTL of a BPDU
  • FwDly: delay in interface status transition
  • MaxHop: maximum number of hops in the MST region

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.

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.

Share region-configuration

The status of sharing the region configuration of process 0

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.

Topo Change Flag

Whether the topology is changed or not:
  • 0: The topology is not changed.
  • 1: The topology is changed.

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. The value is an integer ranging from 1 to 256.
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.

<HUAWEI> display stp region-configuration
Operating configuration
   Format selector :0
   Region name     :huawei
   Revision level  :0
   Instance   VLAN
          0   21 to 4094                                                                                
          1   1 to 10                                                                              
          2   11 to 20                                                                                                             
# Display brief information about the effective MST region.
<HUAWEI> display stp region-configuration digest
 Operating configuration
   Format selector    :0
   Region name        :huawei
   Revision level     :0
   Digest             :0xAC36177F50283CD4B83821D8AB26DE62
Table 7-79  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 VLAN

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

Digest

Brief information about the MST region.

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 ] 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 256.

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. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 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 the specified stack ID.

The default value is 1 on an unstacked switch; the value depends on the number of stacked switches.

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     10GE1/0/3                   2/3                   0/0                                                                        
 1     10GE1/0/5                   1/0                   -/-                                                                        
# Display statistics on sent and received TC and TCN BPDUs on ports running VBST.
<HUAWEI> display stp vlan 10 tc-bpdu statistics
VBST TC/TCN information:                                                                                                            
---------------------------------------------------------------------------                                                         
VLANID Interface              TC(Send/Receive)       TCN(Send/Receive)                                                              
---------------------------------------------------------------------------                                                         
    10 10GE1/0/3              (0)/(0)                (0)/(0)                                                                        
    10 10GE1/0/9              (2)/(6)                (0)/(0)                                                                        
---------------------------------------------------------------------------                                                         
Table 7-80  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 sent 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 256.

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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 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 unstable.

The display stp topology-change command can be used to display the statistics about MSTP /VBSTtopology 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.

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)    :10GE1/0/1
   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)    :10GE1/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)    :10GE1/0/3
   Topology change last received from     :00e0-5b3c-c100
   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
VLAN 5 topology change information:                                                                                                 
--------------------------------------------------------------                                                                      
Number of topology changes           : 0                                                                                            
Topology change initiator(notified)  : NA                                                                                           
Time since last topology change      : 0 days 0h:0m:0s                                                                              
Topology change last received from   : 0000-0000-0000                                                                               
--------------------------------------------------------------                                                                      
Table 7-81  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, except reserved VLAN IDs, which can be configured using the vlan reserved command.

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.

<HUAWEI> display stp vlan 1
 ProcessId   InstanceId   Port                        Role  State                                                                   
 ----------------------------------------------------------------------                                                             
         0            0   10GE1/0/1                   DESI  forwarding
Table 7-82  Description of the display stp vlan command output

Item

Description

ProcessId

Process ID

InstanceId.

Instance ID

Port

Interface

Role

Interface role

State

Interface status

display stp vlan bpdu statistics

Function

The display stp vlan bpdu statistics command displays statistics of sent and received BPDUs in a specified VLAN.

Format

display stp vlan [ vlan-id ] bpdu statistics

Parameters

Parameter Description Value
vlan vlan-id

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

If vlan vlan-id is not specified, statistics on sent and received BPDUs in all VLANs 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 BPDUs, you can run this command to view statistics of these BPDUs and locate the fault.

Example

# Display statistics on sent and received BPDUs in a specified VLAN running VBST.
<HUAWEI> display stp vlan 10 bpdu statistics
---------------------------------------------------------------------------                                                         
                                  BPDUSent        TCN     Config        RST                                                         
VLANID Interface              BPDUReceived        TCN     Config        RST                                                         
---------------------------------------------------------------------------                                                         
    10 10GE1/0/3                         0          0          0          0                                                         
                                         0          0          0          0                                                         
    10 10GE1/0/9                     45123          0          0      45123                                                         
                                         0          0          0          0                                                         
---------------------------------------------------------------------------                                                         
Table 7-83  Description of the display stp vlan bpdu statistics command output

Item

Description

VLANID

VLAN ID

Interface

Interface number

BPDUSent

Statistics of send BPDUs

BPDUReceived

Statistics of received BPDUs

RST

Statistics of RST

display stp vlan information

Function

The display stp vlan information command displays the spanning tree status of an interface that joins a VLAN.

Format

display stp vlan [ vlan-id ] information [ brief | global ]

Parameters

Parameter Description Value
vlan-id

Displays the spanning tree status of an interface that joins a specified VLAN.

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

brief

Displays the status of and brief information about the spanning tree.

-

global

Displays global brief information about the spanning tree.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After a VLAN is configured on an interface and the VBST function is enabled, you can run this command to check the spanning tree status of an interface that joins the VLAN. At this time, you do not need to pay attention to the mapping between VLANs and instances.

Example

# Display the status of and brief information about the spanning tree of the device running VBST.
<HUAWEI> display stp vlan 10 information                                                     

VLAN 10 information:                                                                                                                
--------------------------------------------------------------------------------                                                    
Global information:                                                                                                                 
    Protocol Status            : Enabled                                                                                            
    Bpdu-filter Default        : Disabled                                                                                           
    Bpdu-protection            : Disabled                                                                                           
    Tc-protection              : Disabled                                                                                           
    Tc-protection Threshold    : 1                                                                                                  
    Tc-protection Interval(s)  : 10                                                                                                 
    Edged Port Default         : Disabled                                                                                           
    Path Cost Standard         : Dot1T                                                                                              
    Timer Factor               : 3                                                                                                  
    Transit Limit              : 6                                                                                                  
                                                                                                                                    
    Bridge ID                  : 4106.0025-9e95-7c21                                                                                
    Config Times               : Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                            
    Active Times               : Hello 2s MaxAge 20s FwDly 15s MaxHop 20                                                            
    Root ID/RPC                : 4106.0025-9e95-7c21 / 0                                                                            
    RootPortId(InterfaceName)  : 0.0 (This bridge is the root)                                                                      
    Root Type                  : Secondary                                                                                          
Port information:                                                                                                                   
    Port ID   : 58                                                                                                                  
    Interface : 10GE1/0/3                                                                                                           
        STP State                      : Forwarding                                                                                 
        Port Role                      : Designated Port                                                                            
        Port Priority                  : 128                                                                                        
        Path Cost Standard             : Dot1T                                                                                      
        Port Cost(Config/Active)       : 0 / 20000                                                                                  
        Desg. Bridge/Port              : 4106.0025-9e95-7c21 / 128.58                                                               
        Port Edged(Config/Active)      : Default / Enabled                                                                          
        Point-to-point(Config/Active)  : Auto / True                                                                                
        Transit Limit                  : 6 packets/hello                                                                            
        Protection Type                : None                                                                                       
    Port ID   : 63                                                                                                                  
    Interface : 10GE1/0/9                                                                                                           
        STP State                      : Forwarding                                                                                 
        Port Role                      : Designated Port                                                                            
        Port Priority                  : 128                                                                                        
        Path Cost Standard             : Dot1T                                                                                      
        Port Cost(Config/Active)       : 0 / 2000                                                                                   
        Desg. Bridge/Port              : 4106.0025-9e95-7c21 / 128.63                                                               
        Port Edged(Config/Active)      : Default / Disabled                                                                         
        Point-to-point(Config/Active)  : Auto / True                                                                                
        Transit Limit                  : 6 packets/hello                                                                            
        Protection Type                : None                                                                                       
--------------------------------------------------------------------------------                                                    
Table 7-84  Description of the display stp vlan information command output

Item

Description

VLAN

VLAN ID.

Protocol Status

Protocol status.
  • Enabled: The protocol is enabled.
  • Disabled: The protocol is disabled.

Bpdu-filter Default

Indicates whether to specify all ports of a device as BPDU filter ports. For details, see stp bpdu-filter default.
  • Enabled: All ports of a device are specified as BPDU filter ports.
  • Disabled: All ports of a device are specified as non-BPDU filter ports.

Bpdu-protection

Indicates whether to enable the BPDU protection function. For details, see stp bpdu-protection.
  • Enabled: The BPDU protection function is enabled.
  • Disabled: The BPDU protection function is disabled.

Tc-protection

Indicates whether to enable the TC protection function. For details, see stp tc-protection.
  • Enabled: The TC protection function is enabled.
  • Disabled: The TC protection function is disabled.

Tc-protection Threshold

Maximum number of TC BPDUs that a device processes within a specified period. For details, see stp tc-protection threshold.

Tc-protection Interval(s)

Time for a device to process the maximum number of TC BPDUs. For details, see stp tc-protection interval.

Edged Port Default

Indicates whether to configure ports on a device as edge ports. For details, see stp edged-port default.
  • Enabled: Ports on a device are configured as edge ports.
  • Disabled: Ports on a device are configured as non-edge ports.

Path Cost Standard

Standard for calculating the path cost.

Timer Factor

Timer factor of the timeout period of a device to the Hello Time. For details, see stp timer-factor.

Transit Limit

Maximum number of BPDUs that each interface sends per second. For details, see stp transmit-limit (system view) and stp transmit-limit (interface view).

Bridge ID

Bridge ID:
  • The leftmost 4 bits represent the priority of the switch.
  • The rightmost 48 bits represent the MAC address of the switch.

Config Times

Time values in manually configured bridge protocol information:
  • Hello: indicates the interval for sending BPDUs.

  • MaxAge: indicates the maximum lifetime of BPDUs.

  • FwDly: indicates the delay for interface status transition.

  • MaxHop: indicates the maximum number of hops in an MST region.

Active Times

Time values in actual bridge protocol information:
  • Hello: indicates the interval for sending BPDUs.

  • MaxAge: indicates the maximum lifetime of BPDUs.

  • FwDly: indicates the delay for interface status transition.

  • MaxHop: indicates the maximum number of hops in an MST region.

Root ID / RPC

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

RootPortId(InterfaceName)

ID of the CIST root port.

"0.0" indicates that the switch is the root switch without the root port.

Root Type

Root bridge type.
  • Normal
  • Secondary
  • Primary

Port ID

Port ID.

Interface

Interface number.

Port Role

Role of the port. In the CIST region, the roles of ports are as follows:
  • Root port

  • Designated port

  • Alternate port

  • Backup port

Port Priority

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

Port Cost(Config/Active)

Interface path cost calculated using IEEE 802.1T standard:
  • Config indicates the manually configured path cost.
  • Active indicates the actual path cost.

Desg. Bridge/Port

IDs of the designated switch and designated port. The value of Desg. Bridge is in the format Switch priority.Switch MAC address, and the value of Port is in the format Port priority.Port number.

Port Edged(Config/Active)

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(Config/Active)

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

Protection Type

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

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

display stp vlan instance

Function

The display stp vlan instance command displays the mapping between VLANs and instances.

Format

display stp vlan instance

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After a network designer deploys VBST configurations, you can run this command to check the mapping between VLANs and instances.

Example

# Display the mapping between VLANs and instances on the device running VBST.
<HUAWEI> display stp vlan instance
--------------------------------------------------------------------------------                                                    
Instance Mode    VLANs Mapped                                                                                                       
--------------------------------------------------------------------------------                                                    
       0 default 2 to 4, 6 to 99, 101 to 110, 112 to 154, 156 to 4094                                                               
       1 dynamic 1                                                                                                                  
       2 dynamic 100                                                                                                                
       3 dynamic 111                                                                                                                
       4 dynamic 155                                                                                                                
       5 dynamic 5                                                                                                                  
--------------------------------------------------------------------------------                                                    
Table 7-85  Description of the display stp vlan instance command output

Item

Description

Mode

Mapping mode between VLANs and instances:
  • Static
  • Dynamic
  • Default
NOTE:

The 1:1 mapping between VLANs and instances can be dynamically specified or statically configured. After VBST is enabled, the system dynamically allocates an instance ID to a new VLAN in ascending order. If an instance ID is statically configured for the VLAN, the static configuration takes effect. That is, the static configuration takes precedence over the dynamic configuration.

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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 instances.

The value of instance-id specified in the undo instance command cannot be 0. This means that instance 0 cannot be deleted.

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

Example

# Map VLAN 2 to spanning tree instance 1.

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

instance(VLAN-Instance view)

Function

The instance command configures mappings between instances and VLANs.

The undo instance command deletes mappings between instances and VLANs.

By default, all VLANs are mapped to 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 ID of an instance in a Layer 2 loop protocol

The value is an integer that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 instances.

The instance ID in the undo instance instance-id command cannot be set to 0. That is, deleting instance 0 is not allowed.

vlan vlan-id1 Start VLAN ID The value is an integer ranging from 1 to 4094.
to vlan-id2

End VLAN ID

vlan-id2 and vlan-id1 jointly specify a value range. If you do not specify to vlan-id2, only VLAN numbered vlan-id1 is mapped to an instance.

The value of vlan-id2 must be greater than or equal to that of vlan-id1.

The value is an integer ranging from 1 to 4094.

Views

VLAN-Instance view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When you configure Layer 2 loop protocols such as MSTP, you must configure mappings between instances and VLANs. You can run the instance vlan command to configure mappings between instances and VLANs in the VLAN instance view. This command applies to all loop protocols, facilitating configurations.

Precautions

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

  • After you run the undo instance vlan command to delete mappings between specified instances and VLANs, these VLANs will be remapped to instance 0.

  • A VLAN cannot be mapped to multiple instances. If you map a VLAN that is already mapped to an MSTI, to another MSTI, the original mapping will be canceled.

Example

# Map VLAN 2 to instance 1.

<HUAWEI> system-view
[~HUAWEI] vlan instance
[*HUAWEI-vlan-instance] 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 on CE5810EI, 64 on CE6880EI, and 16 on other models (excluding CE6870EI). For CE6870EI, the upper threshold for the number of interfaces is the maximum number of member interfaces, which depends on the number of LAGs that are manually configured.
NOTE:
In the SVF, 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. You can enter a question mark (?) and select a value from the displayed value range.

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

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.

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

2: Configuration 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 10GE1/0/1.

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

reset stp vlan bpdu statistics

Function

The reset stp vlan bpdu statistics command clears statistics on sent and received BPDUs on the VBST-enabled interface in a VLAN.

Format

reset stp vlan [ vlan-id | all ] bpdu statistics

Parameters

Parameter Description Value
vlan-id Clears spanning tree information about a specified VLAN. The value is an integer that ranges from 1 to 4094.
all Displays spanning tree information about all VLANs.

-

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Before collecting statistics on sent and received VBST BPDUs about a VLAN or all VLANs, run the reset stp vlan bpdu statistics command to clear existing statistics on VBST BPDUs to ensure the correctness of statistics.

Configuration Impact

After the reset stp vlan bpdu statistics command is executed, statistics on sent and received VBST BPDUs about a VLAN or all VLANs are cleared. The cleared statistics cannot be restored. Exercise caution when you run the reset stp vlan bpdu statistics command.

Example

# Clear VBST BPDUs in VLAN 5.

<HUAWEI> reset stp vlan 5 bpdu statistics
Warning: Bpdu statistics of this vlan will be cleared. Continue? [Y/N]:Y

reset stp vlan tc-bpdu statistics

Function

The reset stp vlan tc-bpdu statistics command clears statistics on sent and received TC/TCN packets on the VBST-enabled interface in a VLAN.

Format

reset stp vlan [ vlan-id | all ] tc-bpdu statistics

Parameters

Parameter Description Value
vlan-id Clears spanning tree information about a specified VLAN. The value is an integer that ranges from 1 to 4094.
all Displays spanning tree information about all VLANs.

-

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Before collecting statistics on sent and received VBST TC/TCN packets about a VLAN or all VLANs on the VBST-enabled interface, run the reset stp vlan tc-bpdu statistics command to clear existing statistics on VBST TC/TCN packets to ensure the correctness of statistics.

Configuration Impact

After the reset stp vlan tc-bpdu statistics command is executed, statistics on sent and received VBST TC/TCN packets about a VLAN or all VLANs are cleared. The cleared statistics cannot be restored. Exercise caution when you run the reset stp vlan tc-bpdu statistics command.

Example

# Clear VBST TC/TCN packets in VLAN 5.

<HUAWEI> reset stp vlan 5 tc-bpdu statistics
Warning: Tc-bpdu statistics of this vlan will be cleared. Continue? [Y/N]:Y

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

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

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.

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 | hwmstpiportstatediscarding | hwmstpiportstateforwarding | hwmstpitcguarded | hwmstpproloopbackdetected | 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 | hwmstpiportstatediscarding | hwmstpiportstateforwarding | hwmstpitcguarded | hwmstpproloopbackdetected | 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. -
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. -
hwmstpproloopbackdetected Enables the device to send trap when the port detected loopback and the port was blocked. -
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

3: Management 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 { hwvbstvlannumexceeded | hwvbstvlannumresumed } ]

undo snmp-agent trap enable feature-name vbst [ trap-name { hwvbstvlannumexceeded | hwvbstvlannumresumed } ]

Parameters

Parameter Description Value
trap-name Enables the traps of VBST events of specified types. -
hwvbstvlannumexceeded Enables the device to send trap when the number of VLANs running VBST has exceeded the upper limit. -
hwvbstvlannumresumed Enables the device to send trap when the number of VLANs running VBST has restored to the normal range. -

Views

System view

Default Level

3: Management 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 VLANs running VBST has exceeded the upper limit.

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

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

Views

GE interface view, 10GE interface view, 25GE 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 10ge 1/0/1
[*HUAWEI-10GE1/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

GE interface view, 10GE interface view, 25GE 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.

NOTE:

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 10GE1/0/1 as a non-BPDU-filter port.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp bpdu-filter disable
# On a network edge device, specify 10GE1/0/1 as a BPDU-filter port.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp bpdu-filter enable

stp bpdu-filter default

Function

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

The undo stp bpdu-filter default command specifies all 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 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 ports as BPDU filter ports. Then run the stp bpdu-filter disable command in the interface view to change the interfaces that do not need 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.

NOTE:

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.

Precautions

BPDU protection is only valid for the edge port manually configured by the stp edged-port or stp edged-port default command, and is invalid for the edge port configured by the automatic detection function.

After BPDU protection is configured, the edge port that receives BPDUs will enter the Error-Down state and keeps its attributes. The device records the status of an interface as Error-Down when it detects that a fault occurs. The interface in Error-Down state cannot receive or send packets and the interface indicator is off. You can run the display error-down recovery command to check information about all interfaces in Error-Down state on the device.

When the interface is in Error-Down state, check the cause. You can use the following modes to restore the interface status:
  • Manual (after interfaces enter the Error-Down state)

    When there are few interfaces in Error-Down state, run the shutdown and undo shutdown commands in the interface view or run the restart command to restore the interface.

  • Auto (before interfaces enter the Error-Down state)

    If there are many interfaces in Error-Down state, the manual mode brings in heavy workload and the configuration of some interfaces may be ignored. To prevent this problem, run the error-down auto-recovery cause bpdu-protection interval interval-value command in the system view to enable an interface in Error-Down state to go Up and set a recovery delay. You can run the display error-down recovery command to view automatic recovery information about the interface.

    NOTE:

    This mode is invalid for the interface that has entered the Error-Down state, and is valid only for the interface that enters the Error-Down state after the error-down auto-recovery cause bpdu-protection interval interval-value command is run.

Example

# Enable the BPDU protection on the switching device.

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

stp bridge-address

Function

The stp bridge-address command configures the bridge MAC address used by the device to calculate the spanning tree.

The undo stp bridge-address command restores the default configuration.

By default, a device uses its MAC address as the bridge MAC address to calculate the spanning tree.

Format

stp bridge-address mac-address

undo stp bridge-address

Parameters

Parameter

Description

Value

mac-address

Specifies the bridge MAC address used by the device to calculate the spanning tree.

The value is in the format of H-H-H. H is a hexadecimal number that contains one to four digits, such as 00e0 and fc01. If an H contains less than four hexadecimal digits, 0s are padded ahead. For example, if an H is e0, it is equal to 00e0. The MAC address cannot be a broadcast MAC address (FFFF-FFFF-FFFF) or a multicast MAC address (the eighth bit is 1).

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the spanning tree protocol is associated with TRILL, two devices running TRILL must simulate one root bridge. Specifically, the bridge IDs of BPDUs sent by both devices must be the same. However, in most cases, each device has a unique MAC address, and therefore the bridge IDs of devices are different. To configure the same bridge MAC address for two devices, run the stp bridge-address command.

Follow-up Procedure

After you run the stp bridge-address command to configure the same bridge MAC address for two devices, to allow the devices to simulate the same root bridge, ensure that the devices have the same spanning tree protocol configurations, such as the device priority and timer settings.

Precautions

A bridge ID identifies a device. If two devices send packets with the same bridge ID to another device, it is considered that the packets are sent by one device. Exercise caution when you run the stp bridge-address command.

Example

# Configure the bridge MAC address used by the device to calculate the spanning tree as 1-1-1.

<HUAWEI> system-view
[~HUAWEI] stp bridge-address 1-1-1

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/RSTP/MSTP: stp bridge-diameter diameter

STP/RSTP/MSTP: undo stp bridge-diameter

VBST: stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> bridge-diameter diameter

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> bridge-diameter [ diameter ]

Parameters

Parameter Description Value
vlan-id [ to vlan-id ]
Configures the diameter of a spanning tree in VLANs.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a network diameter range. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the configured network diameter is the VLAN specified by the former vlan-id.

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.

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

GE interface view, 10GE interface view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

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 10ge 1/0/1
[~HUAWEI-10GE1/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 10ge 1/0/1
[~HUAWEI-10GE1/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

GE interface view, 10GE interface view, 25GE 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 10GE1/0/1.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/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.

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

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

VBST: stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> cost cost

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> cost [ 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 256.
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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 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-id [ to vlan-id ]
Configures the cost of a spanning tree in VLANs.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a range of the interface cost. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the configured cost is the VLAN specified by the former vlan-id.

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

GE interface view, 10GE interface view, 25GE 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 7-86  Mappings between link rates and path costs ( Huawei legacy standard )

Link Rate

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.

  • After STP, RSTP, or MSTP is enabled on an Eth-Trunk, to reduce packet loss on the inter-board Eth-Trunk during stack upgrade, set the cost of the Eth-Trunk. This setting prevents short STP/RSTP/MSTP service interruptions caused by Eth-Trunk cost change when member interfaces alternate between Up and Down during the upgrade.
  • When member interfaces of LAG alternate between Up and Down, the cost of the VBST-enabled Eth-Trunk will change. As a result, the network flaps. To reduce packet loss on the inter-card Eth-Trunk due to flap, the cost of a single link is four times the cost of the Eth-Trunk by default.
  • If an Eth-Trunk interface is specified as the member interface of an M-LAG configured in V-STP mode, the path cost of the Eth-Trunk interface is fixed at 2000.

Example

# Set the path cost of 10GE1/0/1 in spanning tree instance 2 to 200 when STP/RSTP/MSTP is running.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp instance 2 cost 200
# Set the path cost of 10GE1/0/1 in VLAN 10 to 300 when VBST is running.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/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

GE interface view, 10GE interface view, 25GE 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.

Example

# Configure 10GE1/0/1 as an edge port.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/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. 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 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.

NOTE:

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.

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 on a switching device.

Format

stp enable

undo stp enable

stp disable

undo stp disable

Parameters

None

Views

System view, MSTP process view, GE interface view, 10GE interface view, 25GE 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 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.

If STP/RSTP/MSTP/VBST is enabled on an interface, the interface participates in the spanning tree calculation and determines 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.

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-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> priority priority command to set the priority of the switch in the spanning tree.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> port priority priority command to set the priority of the port in the spanning tree instance.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> root primary command to set the switch as the root bridge of the spanning tree instance.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> root secondary command to set the switch as the secondary root bridge of the spanning tree.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> cost cost command to set the path cost of the port in the spanning tree instance.

  • Run the instance instance-id vlan vlan-id command to map a VLAN to a spanning tree instance.

Other configurations are needed based on real-world situations.

Precautions

  • If the undo stp enable or stp disable command is run in the system view, the global STP/RSTP/MSTP function is disabled, which may cause a loop.

  • If the undo stp enable or stp disable command is run in the MSTP process view, the STP/RSTP/MSTP function in the MSTP process is disabled, which may cause a loop in the MSTP process.

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

Example

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

<HUAWEI> system-view
[~HUAWEI] stp mode mstp
[*HUAWEI] stp enable

# Enable STP/RSTP/MSTP/VBST on MSTP process1.

<HUAWEI> system-view
[~HUAWEI] stp process 1
[*HUAWEI-mst-process-1] stp enable

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

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp disable
Related Topics

stp flush disable

Function

The stp flush disable command disables a device or MSTP process from deleting MAC address entries when receiving TC BPDUs.

The undo stp flush disable command enables a device or MSTP process to delete MAC address entries when receiving TC BPDUs.

By default, a device or MSTP process deletes MAC address entries when the receiving TC BPDUs.

Format

stp flush disable

undo stp flush disable

Parameters

None

Views

System view or MSTP process view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On loop-free networks, STP is still configured to prevent potential loops caused by misconnections. However, STP will send TC BPDUs to instruct devices to delete MAC address entries when the network topology encounters any changes. For example, the local device's interface goes Up from Down. Such changes do not require MAC address deletion. If a large number of MAC address entries are deleted, unknown unicast or broadcast may occur.

To resolve this problem, run the stp flush disable command to disable a device or MSTP process from deleting MAC address entries when it receives TC BPDUs.

Precautions

If you run the stp flush disable command in the system view, MSTP process 0 does not delete MAC address entries after receiving TC BPDUs. If you run this command in an MSTP process view, this MSTP process does not delete MAC address entries after receiving TC BPDUs.

After you run the stp flush disable command, the device or MSTP process does not delete MAC address entries after receiving TC BPDUs. Services may be interrupted for a long time if the MAC address entries are incorrect. Therefore, exercise caution when running this command.

Example

# Disable MSTP process 0 from deleting MAC address entries after receiving TC BPDUs.

<HUAWEI> system-view
[~HUAWEI] stp flush disable

# Disable MSTP process 2 from deleting MAC address entries after receiving TC BPDUs.

<HUAWEI> system-view
[~HUAWEI] stp process 2
[~HUAWEI-mst-process-2] stp flush disable

# Disable VBST from deleting MAC address entries after receiving TC BPDUs.

<HUAWEI> system-view
[~HUAWEI] stp flush 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

GE interface view, 10GE interface view, 25GE 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.

The stp loop-protection command can be used to configure loop protection in order to prevent this problem. If the root port or the alternate port cannot receive BPDUs from the upstream device for a long period of time after the loop protection function is enabled, the root port or the alternate port will send a notification message to the NMS. The root port will enter the Discarding state, and the alternate port remains in the blocked state and no longer forwards packets. This prevents loops on the network. The root port or alternate port restores the Forwarding state after receiving BPDUs.

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.

Example

# Enable loop protection on the 10GE1/0/1.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp loop-protection

stp max-hops

Function

The stp max-hops command sets the maximum hops of a spanning tree in VBST or 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 VBST or 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/VBST 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 VBST or 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 VBST or MST region to 35.

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

stp mcheck

Function

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

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

Format

stp mcheck

Parameters

None

Views

System view, MSTP process view, GE interface view, 10GE interface view, 25GE 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 a port of an RSTP/MSTP 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 switching device cannot switch back to the RSTP/MSTP mode. As a result, the RSTP/MSTP device cannot communicate with other RSTP/MSTP switching devices.

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

Prerequisites

If a port in a process with a non-zero ID needs to be configured to automatically 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 current switching device to automatically switch back to the RSTP/MSTP mode.

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

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

Example

# Perform MCheck on 10GE1/0/1 and switch it to the MSTP mode.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/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 an STP/RSTP/MSTP network, switching devices running different spanning tree protocols cannot communicate with each other. As a result, spanning trees cannot be properly calculated. A switching device has three operation modes: MSTP, RSTP, and STP.

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

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

Example

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

<HUAWEI> system-view
[~HUAWEI] stp mode stp
Related Topics

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.

By default, the enhanced transition mechanism is configured on an interface.

Format

stp no-agreement-check

undo stp no-agreement-check

Parameters

None

Views

GE interface view, 10GE interface view, 25GE 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.

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 status 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 10GE1/0/1.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/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 7-87 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 7-87  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

25 Gbit/s

Full-Duplex

1

800

1

Aggregated Link 2 Ports

1

400

1

Aggregated Link 3 Ports

1

264

1

Aggregated Link 4 Ports

1

200

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

Table 7-88  Path cost list

Interface Rate

Interface Mode

Recommended VBST 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 Ports

25

500,000

500

100 Mbit/s

Half-Duplex

19

200,000

200

Full-Duplex

18

199,999

199

Aggregated Link Ports

4.75

50,000

50

1000 Mbit/s

Full-Duplex

4

20,000

20

Aggregated Link Ports

1

5,000

5

10 Gbit/s

Full-Duplex

2

2000

2

Aggregated Link Ports

1

500

1

25 Gbit/s

Full-Duplex

1

800

1

Aggregated Link Ports

1

200

1

40 Gbit/s

Full-Duplex

1

500

1

Aggregated Link Ports

1

125

1

100 Gbit/s

Full-Duplex

1

200

1

Aggregated Link 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

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

GE interface view, 10GE interface view, 25GE 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 10GE1/0/1 as P2P.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/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

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

VBST: stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> port priority priority

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> port priority [ 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 256.
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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 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-id [ to vlan-id ]
Configures the priority of a port in VLANs.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a range. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the configured port priority is the VLAN specified by the former vlan-id.

In the stp port 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

GE interface view, 10GE interface view, 25GE 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

  • The member ports of an Eth-Trunk do not support this command.

  • 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 10GE1/0/1 to 16 in the spanning tree instance 2 when MSTP is running.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp instance 2 port priority 16
# Set the priority of 10GE 1/0/1 in VLAN 10 to 32 when VBST is running.
<HUAWEI> system-view
[~HUAWEI] interface 10GE 1/0/1
[~HUAWEI-10GE1/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-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> priority priority

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> priority [ 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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 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-id [ to vlan-id ]
Configures the priority of a port in VLANs.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a range. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the configured priority is the VLAN specified by the former vlan-id.

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

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.

If you run the undo stp process command, all configurations of the MSTP process with a specified ID will be deleted.

Example

# Create MSTP process 1.

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

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
  • Mapping 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 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:

Example

# Enter the MST region view.

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

stp root

Function

The stp root command configures a switching device as a root bridge or secondary root bridge of a spanning tree.

The undo stp root command cancels the configuration.

By default, a switching device 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-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> root { primary | secondary }

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> root [ primary | secondary ]

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 that ranges from 0 to 4094. The value 0 indicates a CIST instance. On the CE6880EI, each process supports a maximum of 128 instances. On other models, each process supports a maximum of 64 instances.

primary Indicates that the switching device functions as the root bridge of a spanning tree. -
secondary Indicates that the switching device functions as the secondary root bridge of a spanning tree. -
vlan-id [ to vlan-id ]
Configures the switching device functions as the root bridge or the secondary root bridge of a spanning tree in VLANs.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a range. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the configured root bridge or secondary root bridge is the VLAN specified by the former vlan-id.

In the stp root 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 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 a root bridge. The priority of such a device, however, may be not that high. Therefore, setting a high priority for the switching device is necessary so that the device can function as a root bridge.

To ensure nonstop traffic transmission, run the stp root command to configure the switching device 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 a switching device to be the primary root bridge, the priority value of the switching device 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

  • On networks that run STP/RSTP/MSTP/VBST, configure an optimal core switch as the root bridge to ensure stability of the STP Layer 2 network. Otherwise, new access devices may trigger STP root bridge switching, causing short service interruptions.

  • A spanning tree has only one 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 priority priority command to set the device priority to ensure that the root bridge is selected correctly.

Example

# Configure the switching device 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 switching device 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

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

GE interface view, 10GE interface view, 25GE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface 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.

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 10GE1/0/1.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/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

stp tc-notify trill

Function

The stp tc-notify trill command enables the association between a spanning tree protocol and TRILL.

The undo stp tc-notify trill command disables the function.

By default, the function is disabled.

Format

stp tc-notify trill vlan vlan-id

undo stp tc-notify trill

Parameters

Parameter Description Value
vlan vlan-id

Specifies a VLAN on the TRILL network.

vlan-id must be ID of an admin VLAN on the TRILL network.

The value is an integer that ranges from 1 to 4094, except reserved VLAN IDs, which can be configured using the vlan reserved command.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a spanning tree protocol and TRILL are used together, when a device or link fails, the spanning tree protocol performs the spanning tree calculation again. All devices, including those on the TRILL network and connected networks, must be notified of the topology change and update their MAC address entries and ARP entries accordingly. However, devices on the TRILL network cannot process TC packets generated by the spanning tree protocol. To allow TRILL devices to process TC packets and ensure uninterrupted traffic forwarding, run the stp tc-notify trill command to enable the association between the spanning tree protocol and TRILL.

Prerequisites

An admin VLAN has been configured for the TRILL network. A VLANIF interface must be configured for admin VLAN.

NOTE:

Before the stp tc-notify trill vlan vlan-id command is configured on the device, the stp disable command must be configured on the interface configured with the trill enable port-mode { hybrid | p2p | trunk } command.

Example

# Enable the association between a spanning tree protocol and TRILL.

<HUAWEI> system-view
[~HUAWEI] vlan 100
[*HUAWEI-vlan100] quit
[*HUAWEI] interface vlanif100
[*HUAWEI-Vlanif100] quit
[*HUAWEI] tril
[*HUAWEI-trill] admin-vlan 100
[*HUAWEI-trill] quit
[*HUAWEI] stp tc-notify trill vlan 100

stp tc-protection

Function

The stp tc-protection command enables TC BPDU protection.

The undo stp tc-protection command disables TC BPDU protection.

By default, TC BPDU protection is disabled.

Format

stp tc-protection

undo stp tc-protection

Parameters

None

Views

System view or 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. In this case, you can run the stp tc-protection command to enable the TC BPDU attack defense function.

After the stp tc-protection command is run to enable the TC BPDU attack defense function, 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 MSTP Hello time and can be set using the stp timer hello command.

Follow-up Procedure

After the stp tc-protection command is run, run the stp tc-protection threshold command to set the number of times that TC BPDUs are processed by the switching device within a unit time.

Example

# Enable the TC BPDU protection function.

<HUAWEI> system-view
[~HUAWEI] stp tc-protection

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 for a device to process the maximum number of TC BPDUs is the Hello time.

NOTE:

The Hello time is the value of the Hello timer and specifies the interval at which the device sends BPDUs. You can configure the Hello time using the stp timer hello command.

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

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.

After the TC attack defense function is enabled using the stp tc-protection command, you can run the stp tc-protection interval command to set the time that a device needs to process the maximum number of TC BPDUs which is configured using the stp tc-protection threshold command. If there are packets exceeding the maximum number, the device processes the packets after the time specified in the stp tc-protection interval command expires. For example, if the time is set to 10 seconds and the maximum number is set to 5, when a device receives TC BPDUs, the device processes only the first 5 TC BPDUs within 10 seconds and processes the other TC BPDUs after the time expires. In this way, the device does not frequently update its MAC address entries and ARP entries, reducing CPU usage.

Prerequisites

TC protection has been enabled by running the stp tc-protection command.

Example

# Set the time that a device needs to process the maximum number of TC BPDUs to 10 seconds.
<HUAWEI> system-view
[~HUAWEI] stp tc-protection
[*HUAWEI] stp tc-protection interval 10
# Set the time that a device needs to process the maximum number of TC BPDUs in MSTP 1 to 10 seconds.
<HUAWEI> system-view
[~HUAWEI] stp process 1
[*HUAWEI-mst-process-1] stp tc-protection
[*HUAWEI-mst-process-1] stp tc-protection interval 10

stp tc-protection threshold

Function

The stp tc-protection threshold command sets the maximum number of TC BPDUs that a device processes within a specified period.

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

By default, a device processes one TC BPDU within a specified period.

Format

stp tc-protection threshold threshold

undo stp tc-protection threshold

Parameters

Parameter Description Value
threshold

Specifies the maximum number of TC BPDUs that a device processes within a specified period.

The value is an integer ranging from 1 to 255.

Views

System view or MST process region 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.

After the TC attack defense function is enabled using the stp tc-protection command, you can run the stp tc-protection interval command to set the time that a device needs to process the maximum number of TC BPDUs which is configured using the stp tc-protection threshold command. If there are packets exceeding the maximum number, the device processes the packets after the time specified in the stp tc-protection interval command expires. For example, if the time is set to 10 seconds and the maximum number is set to 5, when a device receives TC BPDUs, the device processes only the first 5 TC BPDUs within 10 seconds and processes the other TC BPDUs after the time expires. In this way, the device does not frequently update its MAC address entries and ARP entries, reducing CPU usage.

Prerequisites

Before running the stp tc-protection threshold command, ensure that the stp tc-protection command is run to enable the TC BPDU attack defense function.

Example

# Configure a device to process a maximum of 5 TC BPDUs within a specified period.
<HUAWEI> system-view
[~HUAWEI] stp tc-protection
[*HUAWEI] stp tc-protection threshold 5
# Configure a device to process a maximum of 5 TC BPDUs in MSTP process 1 within a specified period.
<HUAWEI> system-view
[~HUAWEI] stp process 1
[*HUAWEI-mst-process-1] stp tc-protection
[*HUAWEI-mst-process-1] stp tc-protection threshold 5

stp tc-snooping notify trill

Function

The stp tc-snooping notify trill command enables an interface to transparently transmit STP packets over a TRILL network.

The undo stp tc-snooping notify trill command disable an interface from transparently transmitting STP packets over a TRILL network.

By default, an interface does not transparently transmit STP packets over the TRILL network.

NOTE:

CE6880EI does not support this command.

Format

stp tc-snooping notify trill

undo stp tc-snooping notify trill

Parameters

None

Views

GE interface view, 10GE interface view, 40GE interface view, 25GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If a spanning tree protocol and TRILL are used together, when a device or link fails, the spanning tree protocol performs the spanning tree calculation again. All devices, including those on the TRILL network and networks connected to the TRILL network, must be notified of the topology change. On the TRILL network, TCN BPDUs are discarded on the TRILL network. When the root bridge is not changed, run the stp tc-snooping notify trill command to enable transparent transmission of STP BPDUs on the TRILL network so that services are not interrupted. After this command is used, STP BPDUs are transparently transmitted, and TCN BPDUs are processed on the TRILL network in a timely manner and MAC address entries are updated immediately.

Prerequisites

STP is disabled on the interface on which the stp tc-snooping notify trill command is to be run.

Precautions

To ensure that an interface transparently transmits STP packets over the TRILL network, note the following points:

  • Configure the same PVID as the admin VLAN ID of the TRILL network for interfaces that have the stp tc-snooping notify trill command configured.

  • Configure an admin VLAN for the TRILL network and an IP address for the VLANIF interface of the admin VLAN.

Example

# Enable an interface to transparently transmit STP packets over a TRILL network.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp tc-snooping notify trill

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/RSTP/MSTP: stp timer forward-delay forward-delay

STP/RSTP/MSTP: undo stp timer forward-delay

VBST: stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer forward-delay forward-delay

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer forward-delay [ forward-delay ]

Parameters

Parameter Description Value
vlan-id [ to vlan-id ]
Specifies one or more VLANs in which the Forward Delay value is set.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a range. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the Forward Delay value is configured for only the VLAN specified by the former vlan-id.

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/RSTP/MSTP: stp timer hello hello-time

STP/RSTP/MSTP: undo stp timer hello

VBST: stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer hello hello-time

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer hello [ hello-time ]

Parameters

Parameter Description Value
vlan-id [ to vlan-id ]
Specifies one or more VLANs in which the Hello timer value is set.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a range. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the Hello timer value is configured for only the VLAN specified by the former vlan-id.

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/RSTP/MSTP: stp timer max-age max-age

STP/RSTP/MSTP: undo stp timer max-age

VBST: stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer max-age max-age

VBST: undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> timer max-age [ max-age ]

Parameters

Parameter Description Value
vlan-id [ to vlan-id ]
Specifies one or more VLANs in which the Max Age value is set.
  • vlan-id specifies the start VLAN ID.
  • vlan-id to vlan-id indicates that the two VLAN IDs determine a range. The value of the latter vlan-id must be greater than or equal to the value of the former one.
  • If the to vlan-id parameter is not specified, the Max Age value is configured only for the VLAN specified by the former vlan-id.

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 timer MaxAge value takes effect for only the CIST and does not take effect for MSTIs.

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 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 Time-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 BPDUs that the current port can send in a Hello Time.

The undo stp transmit-limit command restores the default maximum BPDUs.

By default, the maximum number of BPDUs that an interface sends per second is the value configured using the stp transmit-limit (system view) command. If the stp transmit-limit (system view) command is not configured, an interface sends a maximum of 6 BPDUs per second.

NOTE:

The Hello time is the value of the Hello timer and specifies the interval at which the device sends BPDUs. You can configure the Hello time using the stp timer hello command.

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 Hello Time. The value ranges from 1 to 255.

Views

GE interface view, 10GE interface view, 25GE 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 are great within the Hello Time, 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 within the Hello Time. 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

If the same maximum number of BPDUs need to be sent by each interface on a device, run the stp transmit-limit (system view) command. The stp transmit-limit (interface view) command takes precedence over the stp transmit-limit (system view) command. If the stp transmit-limit (interface view) command is run on an interface, the stp transmit-limit (system view) command does not take effect on the interface.

The stp transmit-limit (interface view) command sets the maximum number of BPDUs that an interface sends per second in each process. If an interface is added to multiple processes, the maximum number of BPDUs multiplies. For example, If you run the stp transmit-limit (interface view) command to configure an interface to send a maximum number of 5 BPDUs per second and the interface joins 3 processes, the interface can send a maximum of 15 (5 x 3) BPDUs per second.

Example

# Set the maximum BPDUs that 10GE1/0/1 can send during each Hello Time to 5.
<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] stp transmit-limit 5

stp transmit-limit (system view)

Function

The stp transmit-limit command sets the maximum number of BPDUs that each interface sends per second.

The undo stp transmit-limit command restores the default value.

By default, an interface sends a maximum of six BPDUs 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 each interface sends 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 a spanning tree protocol, a device sends BPDUs to other devices on the same spanning tree at an interval of the Hello time to maintain network stability. If the device sends too many BPDUs per second, the transmission occupies excessive system and bandwidth resources. To avoid this problem, run the stp transmit-limit command in the system view to configure the maximum number of BPDUs that each interface sends per second. This configuration limits the rate at which each interface sends BPDUs and prevents the spanning tree protocol from occupying excessive system and bandwidth resources.

To set the maximum number of BPDUs that each interface on the device sends per second, run the stp transmit-limit command in the system view. To set the maximum number of BPDUs that a specified interface sends per second, run the stp transmit-limit (interface view) command.

NOTE:

You can configure the Hello time using the stp timer hello command. The Hello time is the value of the Hello timer and specifies the interval at which the device sends BPDUs.

Precautions

The stp transmit-limit (interface view) command takes precedence over the stp transmit-limit (system view) command. If the stp transmit-limit (interface view) command is run on an interface, the stp transmit-limit (system view) command does not take effect on the interface.

The stp transmit-limit (system view) command sets the maximum number of BPDUs that an interface sends per second in each process. If an interface is added to multiple processes, the maximum number of BPDUs multiplies. For example, If you run the stp transmit-limit (system view) command to configure an interface to send a maximum number of 5 BPDUs per second and the interface joins 3 processes, the interface can send a maximum of 15 (5 x 3) BPDUs per second.

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 disable

Function

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-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> disable

undo stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> disable

Parameters

Parameter Description Value
vlan-id [ to vlan-id ]
Specifies the VLAN which is enabled or disabled.
  • vlan-id specifies the VLAN which is enabled or disabled.
  • vlan-id to vlan-id indicates the range determined by two values of vlan-id. The value of vlan-id following to must be greater than or equal to the value of vlan-id before to.
  • If to vlan-id is not specified, the VLAN is only enabled or disabled specified by vlan-id.

In one stp vlan disable command, a maximum of 10 VLAN ranges can be specified by using to.

NOTE:

The VLAN can be specified only when VBST is deployed.

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, interface priority, and interface path cost in each VLAN affect spanning tree calculation, and the change of these parameters may cause network flapping. To ensure fast and stable spanning tree calculation, perform basic configurations on the switch and interfaces before enabling VBST:
  • Run the stp mode vbst command to configure the working mode of the switch.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> priority priority command to configure the priority of the switch in a VLAN.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> port priority priority command to configure the priority of the interface in a VLAN.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> root primary command to configure the switch as the root bridge of the specified spanning tree.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> root secondary command to configure the switch as the secondary root bridge of the specified spanning tree.

  • Run the stp vlan vlan-id [ to vlan-id ] [ vlan-id [ to vlan-id ] ] &<1-9> cost cost command to configure the path cost of the interface.

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

Perform the configurations as required.

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.

Example

# Disable VBST in VLAN 5.

<HUAWEI> system-view
[~HUAWEI] stp vlan 5 disable

# Restore the default VBST status in VLAN 5.

<HUAWEI> system-view
[~HUAWEI] undo stp vlan 5 disable

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.

he value is an integer ranging from 1 to 63.

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.

Example

# Map all VLANs to spanning tree instances modulo 16.

<HUAWEI> system-view
[~HUAWEI] stp region-configuration
[~HUAWEI-mst-region] vlan-mapping modulo 16

vlan instance

Function

The vlan instance command displays the VLAN instance view in which mappings between instances and VLANs are configured.

The undo vlan instance command restores the configured mappings between instances and VLANs.

By default, all VLANs in an MST region are mapped to MSTI 0.

Format

vlan instance

undo vlan instance

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When you configure Layer 2 loop protocols such as MSTP, you must configure mappings between instances and VLANs. You can run the vlan instance command to display the VLAN instance view. You can then configure mappings between instances and VLANs in this view. This command applies to all loop protocols, facilitating configurations.

Prerequisites

Before you run the vlan instance command, you must run the undo stp region-configuration command to delete all mappings between instances and VLANs configured in the MST region view.

Precautions

Do not run both the vlan instance command and the stp region-configuration command on the same device. If mappings between MSTIs and VLANs have been configured in the MST region view displayed by the stp region-configuration command, you must delete the configured mappings before using the vlan instance command.

Example

# Display the system view and the VLAN instance view in which mappings between instances and VLANs are configured.

<HUAWEI> system-view
[~HUAWEI] undo stp region-configuration
[*HUAWEI] vlan instance
[*HUAWEI-vlan-instance]
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 75166

Downloads: 380

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next