- Table of Contents
-
- H3C S9500 Command Manual-Release2132[V2.03]-01 IP Access Volume
- 00-1Cover
- 01-Ethernet Interface Commands
- 02-POS Interface Commands
- 03-GVRP Commands
- 04-Link Aggregation Commands
- 05-Port Mirroring Commands
- 06-RPR Commands
- 07-Ethernet OAM Commands
- 08-MSTP Commands
- 09-VLAN Commands
- 10-QinQ Commands
- 11-BPDU Tunneling Commands
- 12-Port Isolation Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
08-MSTP Commands | 184.82 KB |
Chapter 1 MSTP Configuration Commands
1.1 MSTP Configuration Commands
1.1.1 active region-configuration.
1.1.2 check region-configuration.
1.1.8 display stp ignored-vlan
1.1.9 display stp region-configuration.
1.1.18 stp config-digest-snooping
1.1.31 stp region-configuration.
1.1.36 stp timer forward-delay
Chapter 1 MSTP Configuration Commands
1.1 MSTP Configuration Commands
1.1.1 active region-configuration
Syntax
active region-configuration
View
MST region view
Default Level
2: System level
Parameters
None
Description
Use the active region-configuration command to activate your MST region configuration.
When you carry out this command, MSTP will replace the currently running MST region–related parameters with the parameters you have just configured, and will perform spanning tree computing again.
Related commands: instance, region-name, revision-level, vlan-mapping modulo, and check region-configuration.
Examples
# Activate MST region configuration manually.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] active region-configuration
1.1.2 check region-configuration
Syntax
check region-configuration
View
MST region view
Default Level
2: System level
Parameters
None
Description
Use the check region-configuration command to view all the MST region configuration information, including the region name, VLAN-to-instance mapping and revision level settings.
Be sure that your MST region configurations are correct, especially the VLAN-to-instance mapping table. MSTP-compliant devices are in the same MST region only when they have the same format selector (which is stipulated by 802.1s and cannot be configured by the user), region name, the same VLAN-to-instance mapping table, and the same MSTP revision level setting. A device will be in a different region if it is different in any of these four settings. You can view all the MST region–related configuration information by using this command and determine the MST region the device is currently in, or check whether the MST region configuration is correct.
Related commands: instance, region-name, revision-level, vlan-mapping modulo, and active region-configuration.
Examples
# View the inactivated configuration information of the MST region.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] check region-configuration
Admin Configuration
Format selector :0
Region name :00b010000001
Revision level :0
Instance Vlans Mapped
0 1 to 4094
Table 1-1 Description on the fields of the check region-configuration command
Field |
Description |
Format selector |
Format selector stipulated in MSTP |
Region name |
MST region name |
Revision level |
Revision level of the MST region |
Instance Vlans Mapped |
VLAN-to-instance mappings in the MST region |
1.1.3 debugging stp
Syntax
debugging stp { all | global-error | global-event }
undo debugging stp { all | global-error | global-event }
View
User view
Default Level
2: System level
Parameters
all: Enables all types of global MSTP debugging.
global-error: Enables debugging for global MSTP errors.
global-event: Enables debugging for global MSTP events.
Description
Use the debugging stp command to enable a specific type of global MSTP debugging.
Use the undo debugging stp command to disable a specific type of global MSTP debugging.
By default, all types of global MSTP debugging are disabled.
Table 1-2 Description on the fields of the debugging stp global-error command
Field |
Description |
Port Port Number received BPDU packet is error for String |
An error BPDU was received on a port. Port Number: Port number. String: Error description, which may be: "STP Config BPDU's designated info is wrong": The port received an STP BPDU sent by the port itself. "RSTP BPDU's designated info is wrong: The port received an RSTP BPDU sent by the port itself. "MSTP BPDU's designated info is wrong": The port received an MSTP BPDU sent by the port itself. “dead Root priority“: Root priority is invalid. “dead MSTI Root priority, do not drop”: MSTI Root priority is invalid. |
The protocol type ID is wrong |
The protocol type ID is invalid. |
The protocol version ID is wrong |
The protocol version ID is invalid (the correct protocol version ID for STP, RSTP, and MSTP is 0, 2, and 3). |
Instance InstanceID is wrong |
The instance is invalid. InstanceID: Instance ID. |
Creating mbuffer failed |
Fail to create buffer. |
P/V semaphore error |
A P/V semaphore error occurs. |
Set STP String error |
Fail to issue STP-enabled state to the driver. String: STP state, which can be enable or disable. |
Creating responsive message for configuration failed |
Fail to generate response configuration messages. |
Port Port Number is inexistent |
The port does not exist. Port Number: Port number. |
Active region configuration error |
Fail to activate region configuration. |
Set instance InstanceID's port Port Number STP state String error |
Error occurs to setting STP forwarding state for a port in an instance. InstanceID: Instance ID. Port Number: Port number. String: STP forwarding state, which can be discarding, learning, or forwarding. |
Write queue String error |
Fail to write a queue. String: Queue name, which can be MstpMsgQue or MstpPktQue. |
Write event String error |
Fail to write an event. String: Event, which can be MSTP_BPDU_EVENT or MSTP_L2INF_EVENT. |
Bind vlan to instance InstanceID error |
Error occurs to binding a VLAN to an instance. InstanceID: Instance ID. |
Instance InstanceID 's port Port Number enter unknown state of String state machine! |
A port in an instance is in an unknown state of a state machine. InstanceID: Instance ID. Port Number: Port number. String: State machine name, which can be PIM, PPM, TCM, PRT_DAB, or PRT_RDM. |
Port Port Number send packet error |
Fail to send packets through a port. Port Number: Port number. |
Table 1-3 Description on the fields of the debugging stp global-event command
Field |
Description |
Instance InstanceID Enters PRS Machine |
An instance enters the PRS state machine. InstanceID: Instance ID. |
Instance InstanceID's all ports' dyna-Address are cleared |
The dynamic MAC address entries of all the ports in an instance are removed. |
All instances' all ports' dyna-Address are cleared |
The dynamic MAC address entries of all the ports in all the instances are removed. |
Examples
# Enable debugging for global MSTP events after configuring multiple instances on an MSTP-enabled device, and then bring up a port.
<Sysname> terminal debugging
<Sysname> debugging stp global-event
*Mar 26 14:18:10:635 2007 Sysname IFNET/7/LINK UPDOWN:
Ethernet1/1/1: link status is UP
*Mar 26 14:18:10:635 2007 Sysname MSTP/7/PRS:Instance 0 Enters PRS Machine.
// Instance 0 entered the PRS state machine.
*Mar 26 14:18:11:635 2007 Sysname MSTP/7/PRS:Instance 2 Enters PRS Machine.
// Instance 2 entered the PRS state machine.
*Mar 26 14:18:11:635 2007 Sysname MSTP/7/PRS:Instance 0 Enters PRS Machine.
// Instance 0 entered the PRS state machine.
*Mar 26 14:18:11:635 2007 Sysname MSTP/7/FLSHINS:Instance 0's all ports' dyna-Address are cleared.
// The dynamic MAC address entries of all the ports in instance 0 were removed.
*Mar 26 14:18:12:635 2007 Sysname MSTP/7/PRS:Instance 2 Enters PRS Machine.
// Instance 2 entered the PRS state machine.
*Mar 26 14:18:12:635 2007 Sysname MSTP/7/FLSHINS:Instance 2's all ports' dyna-Address are cleared.
// The dynamic MAC address entries of all the ports in instance 2 were removed.
1.1.4 debugging stp event
Syntax
debugging stp [ interface interface-type interface-number ] event
undo debugging stp [ interface interface-type interface-number ] event
View
User view
Default Level
2: System level
Parameters
interface interface-type interface-number: Specifies a port by its type and number.
Description
Use the debugging stp event command to enable debugging for MSTP port events.
Use the undo debugging stp event disable debugging for MSTP port events.
By default, debugging for MSTP port events is disabled.
If the interface-type interface-number argument is not provided, these two commands apply to all the ports; otherwise, these two commands apply to the port identified by the argument.
Table 1-4 Description on the fields of the debugging stp event command
Field |
Description |
Instance InstanceID's port Port Number enters String state |
The state of a port in a valid instance InstanceID: Instance ID. Port Number: Port number. String: State in a state machine. |
Instance InstanceID's all ports' dyna-Address are cleared |
The dynamic MAC address entries of all the ports in an instance are removed. |
All instances' all ports' dyna-Address are cleared |
The dynamic MAC address entries of all the ports in all the instances are removed. |
Instance InstanceID's Port Port Number is selected as String role |
The role of a port in an instance InstanceID: Instance ID. Port Number: Port number. String: Role of a port in an instance, which can be DESIGNATED, ROOT, ALTERNATE, BACKUP, or MASTER. |
Port ULONG occurs String event |
Event on a port ULONG: Port number. String: Event, which can one of the following: l ADD VLAN, indicating the event that the port is added to a VLAN. l DEL VLAN, indicating the event that the port is removed from a VLAN. l SPEED CHANGE, indicating the event that the speed of the port changes. l DUPLEX CHANGE, indicating the event that the duplex mode of the port changes. l LINK DOWN, indicating the event that the port is shut down) l LINK UP, indicating the event that the port is brought up. l NOT PA PORT, indicating the event that the port exits from a port aggregation group. l PA SUB PORT, indicating the event that the port joins a port aggregation group. l PA OLD BRIDGE PORT, indicating the old master port when the master port of a port aggregation group changes l PA NEW BRIDGE PORT indicating the new master port when the master port of a port aggregation group changes. |
Examples
# Connect two ports of Device A to two ports of Device B, configure Device A as the root bridge, enable MSTP on Device B, and enable debugging for MSTP port events on Ethernet 1/1/1.
<Sysname> display stp brief
MSTID Port Role STP State Protection
0 Ethernet1/1/2 ROOT FORWARDING NONE
0 Ethernet1/1/1 ALTE DISCARDING NONE
<Sysname> terminal debugging
<Sysname> debugging stp interface ethernet 1/1/1 event
*Mar 26 14:20:10:635 2007 Sysname MSTP/7/MEXS:Instance 0's port385 enters PIM%CURRENT state.
// Ethernet 1/1/1 entered the CURRENT state of the PIM state machine in instance 0.
*Mar 26 14:20:10:635 2007 Sysname MSTP/7/MEXS:Instance 0's port385 enters PIM%RECEIVED state.
// Ethernet 1/1/1 entered the RECEIVED state of the PIM state machine in instance 0.
*Mar 26 14:20:10:635 2007 Sysname MSTP/7/MEXS:Instance 0's port385 enters PIM%REPEATED_DESIGNATED state.
// Ethernet 1/1/1 entered the REPEATED DESIGNATED state of the PIM state machine in instance 0.
*Mar 26 14:20:11:635 2007 Sysname MSTP/7/MEXS:Instance 0's port385 enters PRT%ACTIVE_PORTstate.
// Ethernet 1/1/1 entered the ACTIVE PORT state of the PRT state machine in instance 0.
1.1.5 debugging stp instance
Syntax
debugging stp instance instance-id
undo debugging stp instance instance-id
View
User view
Default Level
2: System level
Parameters
instance-id: MST instance ID, in the range 0 to 47. Note that a value of 0 specifies the common internal spanning tree (CIST).
Description
Use the debugging stp instance command to enable debugging for an MST instance.
Use the undo debugging stp instance command to disable debugging for an MST instance.
By default, debugging for an MST instance is disabled.
Table 1-5 Description on the fields of the debugging stp instance command
Field |
Description |
Instance InstanceID's port Port Number enters String state |
The state of a port in an instance InstanceID: Instance ID. Port Number: Port number. String: State of a port in a state machine (the string before "%" represents the state machine name, and the string after “%” represents the state in the state machine), which could be one of the following values: l PIM%ENABLED l PIM%AGED l PIM%CURRENT l PIM%RECEIVED, PIM%SUPERIOR_DESIGNATED l PIM%REPEATED_DESIGNATED l PIM%ROOT l PIM%OTHER l PPM%SEND_RSTP l PPM%SENDING_RSTP l PPM%SEND_STP l PPM%SENDING_STP l PRT%BLOCK_PORT l PRT%BLOCKED_PORT l PRT%BACKUP_PORT l PRT%ACTIVE_PORT l PRT%PROPOSED l PRT%PROPOSING l PRT%AGREES l PRT%SYNCED l PRT%AGREES l PRT%LEARN l PRT%FORWARD l PRT%REROOT l PRT%FORWARD l PRT%LEARN l PRT%LISTEN l PRT%REROOTED l PRT%ROOT l TCM%INIT l TCM%INACTIVE l TCM%DETECTED l TCM%ACTIVE l TCM%NOTIFIED_TCN l TCM%NOTIFIED_TC l TCM%PROPAGATING l TCM%ACKNOLEDGED |
Examples
# Connect the ports of Device A to those of Device B, configure Device A as the root bridge, configure MST instance 2 on Device B and enable debugging for MST instance 2.
<Sysname> terminal debugging
<Sysname> display stp brief
MSTID Port Role STP State Protection
0 Ethernet1/1/1 ROOT FORWARDING NONE
0 Ethernet1/1/2 ALTE DISCARDING NONE
2 Ethernet1/1/1 MAST FORWARDING NONE
2 Ethernet1/1/2 ALTE DISCARDING NONE
<Sysname> debugging stp instacne 2
*Mar 26 14:20:15:635 2007 Sysname MSTP/7/MEXS:Instance 2's port385 enters PRT%ACTIVE_PORT state.
*Mar 26 14:20:15:635 2007 Sysname MSTP/7/MEXS:Instance 2's port385 enters PRT%ACTIVE_PORT state.
*Mar 26 14:20:15:635 2007 Sysname MSTP/7/MEXS:Instance 2's port385 enters PRT%ACTIVE_PORT state.
*Mar 26 14:20:15:635 2007 Sysname MSTP/7/MEXS:Instance 2's port385 enters PRT%ACTIVE_PORT state.
// Ethernet 1/1/1 of instance 2 is in the ACTIVE PORT state of the PRT state machine.
1.1.6 debugging stp packet
Syntax
debugging stp [ interface interface-type interface-number ] packet [ brief | verbose ]
undo debugging stp [ interface interface-type interface-number ] packet [ brief | verbose ]
View
User view
Default Level
2: System level
Parameters
interface interface-type interface-number: Specifies a port by its type and number. brief: Displays the brief information about MSTP packets. The brief keyword is adopted by default.
verbose: Displays the detailed information about MSTP packets.
Description
Use the debugging stp packet command to enable MSTP packet debugging.
Use the undo debugging stp packet command to disable MSTP packet debugging.
By default, MSTP packet debugging is disabled.
Table 1-6 Description on the fields of the debugging stp packet brief command
Field |
Description |
Port interface-number (interface-name) String type Packet(Length:number) |
interface-number: Port number. interface-name: Port name. String: Indicates packet direction (inbound or outbound). Type: Packet type, which can be Stp, Rstp, Mstp-dot1s, or Mstp-legacy. Number: Packet size (in bytes). |
Protocol version |
|
BPDUType |
BPDU packet type |
Instance(Flags) |
Instance ID (flags carried in a BPDU) |
Table 1-7 Description on the fields of the debugging stp packet verbose command
Field |
Description |
PKT |
Packet debugging output information, including port number, port name, packet direction (inbound or outbound), packet type, packet size, and packet content (in hexadecimal characters) |
Examples
# Connect the ports of Device A to those of Device B, configure Device A as the root bridge, enable MSTP on Device B, and enable MSTP packet debugging on Device B to display the brief information about MSTP packets.
<Sysname> terminal debugging
<Sysname> debugging stp packet
*Mar 26 14:20:10:635 2007 Sysname MSTP/7/PKT:
Port386(Ethernet1/1/1) Rcvd Mstp-legacy Packet(Length: 103)
ProtocolVersionID: 03
BPDUType : 02
Instance(Flags) : 0(6c)
// Ethernet 1/1/1 received an MSTP packet in legacy format. The size of the packet is 103 bytes, the protocol version is 3, BPDU type is 2, and the flag of instance 0 is 6c.
# Enable MSTP packet debugging on an MSTP-enabled device to display detailed information about MSTP packets (assuming that at least one port is in up state).
<Sysname> debugging stp packet verbose
*Mar 26 14:20:11:635 2007 Sysname MSTP/7/PKT:
Port385(Ethernet1/1/1) Rcvd Mstp-legacy Packet(Length: 103)
00 00 03 02 6c 80 00 00 e0 fc 00 00 00 00 00 00
00 80 00 00 e0 fc 00 00 00 81 81 00 00 14 00 02
00 0f 00 00 00 00 40 30 30 65 30 66 63 30 30 30
30 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 ac 36 17 7f 50 28 3c
d4 b8 38 21 d8 ab 26 de 62 80 00 00 e0 fc 00 00
00 00 00 00 00 14 00
// Ethernet 1/1/1 received an MSTP packet in legacy format. The size of the packet is 103 bytes. The content of the packet is displayed in hexadecimal characters.
1.1.7 display stp
Syntax
display stp [ instance instance-id ] [ interface interface-list | slot slot-num ] [ brief ]
View
Any view
Default Level
1: Monitor level
Parameters
instance instance-id: Displays STP information of the specified MSTI. instance-id ranges from 0 to 47. A value of 0 specifies the CIST.
interface interface-list: Displays STP information of the specified ports. interface-list is a list of Ethernet ports. You can specify multiple Ethernet ports by providing the this argument in the form of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where, interface-type is port type and interface-number is port number, and &<1-10> means that you can specify up to 10 ports or port ranges for this argument.
slot slot-id: Displays STP information of the board seated in a slot identified by slot-id.
brief: Displays brief MSTP information.
Description
Use the display stp command to view the MSTP status information and statistics information.
Based on the MSTP status information and statistics information, you can analyze and maintain the network topology or check that MSTP is operating properly.
Note that:
l If you do not specify an MST instance ID or a port list, this command displays the MSTP information about all the MST instances on all the ports by MST instance ID. The information about an MST instance is displayed by port number.
l If you specify an MST instance ID, this command displays the MSTP information about the specified MST instance on all the ports by port number.
l If you specify a port list, this command displays the MSTP information about all the MST instances on the specified ports by MST instance ID.
l If you specify both an MST instance ID and a port list, this command displays the MSTP information about the specified MST instance on the specified ports.
The MSTP status information includes:
l CIST global parameters, such as protocol work mode, device priority in the CIST instance (Priority), MAC address, hello time, max age, forward delay, maximum hops, common root of the CIST, external path cost from the device to the CIST common root, regional root, the internal path cost from the device to the regional root, CIST root port of the device, and states of the BPDU guard functions (enabled or disabled).
l CIST port parameters, such as port status, role, priority, path cost, designated bridge, designated port, edge port/non-edge port, whether connecting to a point-to-point link, maximum transmission rate (transmit limit), state of the root guard function (enabled or disabled), BPDU format, boundary port/non-boundary port, hello time, max age, forward delay, message age time, and remaining hops.
l MSTI global parameters, such as MSTI instance ID, bridge priority of the instance, regional root, internal path cost, MSTI root port, and master bridge.
l MSTI port parameters, such as port status, role, priority, path cost, designated bridge, designated port, and remaining hops.
The statistics information includes:
l The number of TCN BPDUs, configuration BPDUs, RST BPDUs, and MST BPDUs sent from each port
l The number of TCN BPDUs, configuration BPDUs, RST BPDUs, and MST BPDUs received on each port
Related commands: reset stp.
Examples
# View the MSTP status information and statistics information.
<Sysname> display stp
Protocol Status :disabled
Protocol Std. :IEEE 802.1s
Version :3
CIST Bridge-Prio. :32768
MAC address :000f-e222-e5cd
Max age(s) :20
Forward delay(s) :15
Hello time(s) :2
Max hops :20
Table 1-8 Description on the fields of the display stp command
Description |
|
Protocol Status |
Protocol status |
Protocol Std. |
Protocol standard |
Version |
Protocol version |
CIST Bridge-Prio |
CIST priority of the bridge |
MAC address |
MAC address of the bridge |
Max age(s) |
Max age |
Forward delays(s) |
State transition delay |
Hello time(s) |
Interval of sending Hello packets |
Max hops |
Max hops |
1.1.8 display stp ignored-vlan
Syntax
display stp ignored-vlan
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display stp ignored-vlan command to display VLAN Ignore-enabled VLANs.
Examples
# Display VLAN Ignore-enabled VLANs.
<Sysname> display stp ignored-vlan
STP-Ignored VLAN: 1 to 2
Table 1-9 Description on the fields of the display stp ignored-vlan command
Field |
Description |
STP-Ignored VLAN |
List of VLAN Ignore-enabled VLANs |
1.1.9 display stp region-configuration
Syntax
display stp region-configuration
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display stp region-configuration command to view the currently effective MST region configuration information, including the region name, revision level, and VLAN-to-instance mappings.
Related commands: stp region-configuration.
Examples
# View the currently effective MST region configuration information.
<Sysname> display stp region-configuration
Oper configuration
Format selector :0
Region name :000fe222e5cd
Revision level :0
Instance Vlans Mapped
0 1 to 4094
Table 1-10 Description on the fields of the display stp region-configuration command
Field |
Description |
Format selector |
MSTP-defined format selector |
Region name |
MST region name |
Revision level |
Revision level of an MST region |
Instance Vlans Mapped |
VLAN-to-instance mappings in an MST region |
1.1.10 instance
Syntax
instance instance-id vlan vlan-list
undo instance instance-id [ vlan vlan-list ]
View
MST region view
Default Level
2: System level
Parameters
instance-id: MST instance ID, in the range 0 to 47. A value of 0 specifies the CIST.
vlan-list: VLAN list. You can specify multiple VLANs or VLAN ranges by providing this argument in the form of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where, vlan-id is a VLAN ID, and &<1-10> means that you can specify up to 10 VLANs or VLAN ranges for this argument.
Description
Use the instance command to map the specified VLAN(s) to an MST instance.
Use the undo instance command to remove the specified VLAN(s) from the specified MST instance and map the removed VLAN(s) to the CIST (MST instance 0).
By default, all VLANs are mapped to the CIST.
l If you specify no VLAN in the undo instance command, all VLANs mapped to the specified MST instance will be remapped to the CIST.
l You cannot map the same VLAN to different MST instances. If you map a VLAN that has been mapped to an instance to a new instance, the old mapping will be automatically removed.
Related commands: region-name, revision-level, check region-configuration, vlan-mapping modulo, and active region-configuration.
Examples
# Map VLAN 2 to MST instance 1.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] instance 1 vlan 2
1.1.11 region-name
Syntax
region-name name
undo region-name
View
MST region view
Default Level
2: System level
Parameters
name: Name of the MST regions, a string of 1 to 32 characters.
Description
Use the region-name command to configure the MST region name of your device.
Use the undo region-name command to restore the MST region name to the default setting.
By default, the MST region name of a device is its bridge MAC address.
The MST region name, the VLAN-to-instance mapping table and the MSTP revision level of a device jointly determine the MST region the device belongs to.
Related commands: instance, revision-level, check region-configuration, vlan-mapping modulo, and active region-configuration.
Examples
# Set the MST region name of the device to “hello”.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] region-name hello
1.1.12 reset stp
Syntax
reset stp [ interface interface-list ]
View
User view
Default Level
1: Monitor level
Parameters
interface interface-list: Clears STP information of the specified ports. interface-list is a list of Ethernet ports. You can specify multiple Ethernet ports or port ranges by providing the this argument in the form of interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where, interface-type is port type and interface-number is port number, and &<1-10> means that you can specify up to 10 VLANs or VLAN ranges for this argument.
Description
Use the reset stp command to clear the MSTP statistics information.
The MSTP statistics information includes the numbers of TCN BPDUs, configuration BPDUs, RST BPDUs and MST BPDUs sent/received through the specified port(s) (STP BPDUs and TCN BPDUs are counted only for the CIST).
Note that this command clears the spanning tree-related statistics information on the specified port(s) if you specify the interface-list argument; otherwise, this command clears the spanning tree-related statistics on all ports.
Related commands: display stp.
Examples
# Clear the spanning tree-related statistics information on ports Ethernet 1/1/1 through Ethernet 1/1/3.
<Sysname> reset stp interface ethernet 1/1/1 to ethernet 1/1/3
1.1.13 revision-level
Syntax
revision-level level
undo revision-level
View
MST region view
Default Level
2: System level
Parameters
level: MSTP revision level.
Description
Use the region-level command to configure the MSTP revision level of your device.
Use the undo region-level command to restore the MSTP revision level to the default setting.
The MSTP revision level, the MST region name and the VLAN-to-instance mapping table of a device jointly determine the MST region the device belongs to.
Related commands: instance, region-name, check region-configuration, vlan-mapping modulo, and active region-configuration.
Examples
# Set the MSTP revision level of the MST region to 5.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] revision-level 5
1.1.14 stp
Syntax
stp { enable | disable }
undo stp
View
System view, Ethernet interface view, port group view
Default Level
2: System level
Parameters
enable: Enables the MSTP feature.
disable: Disables the MSTP feature.
Description
Use the stp command to enable or disable the MSTP feature globally or for a port or a group of ports.
Use the undo stp command to restore the default MSTP status globally or for a port or a group of ports.
By default, MSTP is enabled globally. With MSTP enabled globally, MSTP is enabled on all the ports by default.
Note that:
l To control MSTP flexibly, you can disable the MSTP feature for certain ports so that they will not take part in spanning tree computing and thus to save the device’s CPU resources.
l Configured in system view, the setting is effective for the device globally; configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all the ports in the port group.
l After you enable MSTP, the device determines whether to work in STP-compatible mode, in RSTP mode or in MSTP mode according to your MSTP work mode setting. After MSTP is disabled, the device becomes a transparent bridge.
l After being enabled, MSTP dynamically maintains spanning tree status of the corresponding VLANs based the received configuration BPDUs. After being disabled, it stops maintaining the spanning tree status.
Related commands: stp mode.
Examples
# Enable the MSTP feature globally.
<Sysname> system-view
[Sysname] stp enable
# Disable MSTP on port Ethernet 1/1/1.
<Sysname> system-view
[Sysname] interface ethernet 1/1/1
[Sysname-Ethernet1/1/1] stp disable
1.1.15 stp bpdu-protection
Syntax
stp bpdu-protection
undo stp bpdu-protection
View
System view
Default Level
2: System level
Parameters
None
Description
Use the stp bpdu-protection command to enable the BPDU guard function for the device.
Use the undo stp bpdu-protection command to disable the BPDU guard function for the device.
By default, the BPDU guard function is disabled.
Examples
# Enable the BPDU guard function for the device.
<Sysname> system-view
[Sysname] stp bpdu-protection
1.1.16 stp bridge-diameter
Syntax
stp bridge-diameter bridgenum
undo stp bridge-diameter
View
System view
Default Level
2: System level
Parameters
bridgenum: Network diameter of the switched network.
Description
Use the stp bridge-diameter command to specify the network diameter, namely the maximum number of stations between any two terminal devices on the switched network.
Use the undo stp bridge-diameter command to restore the default network diameter of the switched network.
By default, the network diameter of the switched network is 7.
An appropriate setting of hello time, forward delay and max age can speed up network convergence. The values of these timers are related to the network size. You can set these three timers indirectly by setting the network diameter. Based on the network diameter you configured, MSTP automatically sets an optimal hello time, forward delay, and max age for the device. With the network diameter set to 7 (the default), the three timer are also set to their defaults.
Note that this configuration is effective for the CIST only and not for MSTIs, and this configuration must be configured on the root bridge.
Related commands: stp timer forward-delay, stp timer hello, and stp timer max-age.
Examples
# Set the network diameter of the switched network to 5.
<Sysname> system-view
[Sysname] stp bridge-diameter 5
1.1.17 stp compliance
Syntax
stp compliance { legacy | dot1s | auto }
undo stp compliance
View
Ethernet interface view/port group view
Default Level
2: System level
Parameters
legacy: Configures the port(s) to receive and send only compatible-format MSTP BPDUs.
dot1s: Configures the port(s) to receive and send only standard-format (802.1s-compliant) MSTP BPDUs.
auto: Configures the port(s) to recognize the MSTP BPDU format automatically. The format of sent MSTP BPDUs will be the same as that of received MSTP BPDUs.
Description
Use the stp compliance command to configure the mode the port(s) uses to recognize and send MSTP BPDUs.
Use the undo stp compliance command to restore the system default.
The default mode is auto, namely, all ports recognize the BPDU format automatically.
Note that:
l Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
l If the mode is set to auto on a port, the port automatically recognizes and resolves the received compatible-format BPDUs or 802.1s-compliant BPDUs. The format of MSTP BPDUs sent by the port will be the same as that of received MSTP BPDUs.
l If the mode is set to legacy or dot1s, on a port, the port can receive and send only BPDUs of the specified format. If the port receives an MSTP packet in the format other than the configured format, it will become a designated port and stay in the discarding state to avoid loop.
Examples
# Configure Ethernet 1/1/1 to receive and send only standard-format (802.1s) MSTP packets.
<Sysname> system-view
[Sysname] interface ethernet 1/1/1
[Sysname-Ethernet1/1/1] stp compliance dot1s
# Restore the default mode for port Ethernet 1/1/1 to recognize and send MSTP BPDUs.
[Sysname-Ethernet1/1/1] undo stp compliance
1.1.18 stp config-digest-snooping
Syntax
stp config-digest-snooping
undo stp config-digest-snooping
View
system view, Ethernet interface view, port group view
Default Level
2: System level
Parameters
None
Description
Use the stp config-digest-snooping command to enable Digest Snooping.
Use the undo stp config-digest-snooping command to disable Digest Snooping.
The feature is disabled by default.
Notice that:
l Configured in system view, the setting is effective for the device globally; configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all the ports in the port group.
l You need to enable this feature both globally and on ports connected to other vendors’ devices to make it take effect. It is recommended to enable the feature on all the ports connected to other vendor’s devices first and then enable it globally, to minimize the impact to the network. To disable the feature on all the ports, you can just disable it globally.
l It is not recommended to enable Digest Snooping on the MST region edge port to avoid loops.
Examples
# Enable global Digest Snooping.
<Sysname> system-view
[Sysname] stp config-digest-snooping
# Enable Digest Snooping on Ethernet 1/1/1.
<Sysname> system-view
[Sysname] interface ethernet 1/1/1
[Sysname-Ethernet1/1/1] stp config-digest-snooping
1.1.19 stp cost
Syntax
stp [ instance instance-id ] cost cost
undo stp [ instance instance-id ] cost
View
Ethernet interface view, port group view
Default Level
2: System level
Parameters
instance instance-id: Sets the path cost of the current port in the specified MSTI.
cost cost: Specifies the path cost of a port.
Description
Use the stp cost command to set the path cost of a port or a group or ports in the specified MST instance.
Use the undo stp cost command to restore the default.
By default, the path cost of a port is determined by MSTP.
Note that:
l If you set instance-id to 0, you are setting the path cost of the port in the CIST. The path cost setting of a port can affect the role selection of the port. Setting different path costs for the same port in different MST instances allows different VLAN traffic flows to be forwarded along different physical links, thus to enable per-VLAN load balancing. When the path cost of a port is changed, MSTP will re-compute the role of the port and initiate a state transition.
l Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
l If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.
Examples
# Set the path cost of port Ethernet 2/1/3 in MST instance 2 to 200.
<Sysname> system-view
[Sysname] interface ethernet 2/1/3
[Sysname-Ethernet2/1/3] stp instance 2 cost 200
1.1.20 stp edged-port
Syntax
stp edged-port { enable | disable }
undo stp edged-port
View
Ethernet interface view/port group view
Default Level
2: System level
Parameters
enable: Configures the current port to be an edge port.
disable: Configures the current port to be a non-edge port.
Description
Use the stp edged-port enable command to configure the current port to be an edge port.
Use the stp edged-port disable or undo stp edged-port enable command to configure the current port to be a non-edge port.
All Ethernet ports are non-edge ports by default.
Note that:
l Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
l If a port directly connects to a user terminal rather than another device or a shared LAN segment, this port is regarded as an edge port. When the network topology changes, an edge port will not cause a temporary loop. Therefore, configuring a port as an edge port can enable the port to transition to the forwarding state rapidly. We recommend that you configure an Ethernet port directly connecting to a user terminal as an edge port before to enable it to transition to the forwarding state rapidly.
l Normally, configuration BPDUs from other devices cannot reach an edge port because it does not connect to any other device. Before the BPDU guard function is enabled, if a port receives a configuration BPDU, the port is working actually as a non-edge port even if you have configured in as an edge port.
Examples
# Configure port Ethernet 2/1/1 as a non-edge port.
<Sysname> system-view
[Sysname] interface ethernet 2/1/1
[Sysname-Ethernet2/1/1] stp edged-port disable
1.1.21 stp ignored vlan
Syntax
stp ignored vlan vlan-list
undo stp ignored vlan vlan-list
View
System view
Default Level
2: System level
Parameters
vlan-list: Indicates multiple VLAN IDs. vlan-list={ vlan-id [ to vlan-id ] }&<1-10>, vlan-id is in the range 1 to 4094, &<1-10> indicates you can enter the argument before it up to 10 times.
Description
Use the stp ignored vlan command to enable VLAN Ignore in specified VLANs.
Use the undo stp ignored vlan command to disable VLAN Ignore in specified VLANs.
By default, VLAN ignore is disabled in a VLAN.
Examples
# Enable VLAN Ignore in VLAN 2.
<Sysname> system-view
[Sysname] stp ignored vlan 2
1.1.22 stp loop-protection
Syntax
stp loop-protection
undo stp loop-protection
View
Ethernet interface view/port group view
Default Level
2: System level
Parameters
None
Description
Use the stp loop-protection command to enable the loop guard function for a port or a group of ports.
Use the undo stp loop-protection command to restore default loop guard setting for a port of a group of ports.
By default, the loop guard function is disabled.
Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
Examples
# Enable the loop guard function for port Ethernet 2/1/1.
<Sysname> system-view
[Sysname] interface ethernet 2/1/1
[Sysname-Ethernet2/1/1] stp loop-protection
1.1.23 stp max-hops
Syntax
stp max-hops hops
undo stp max-hops
View
System view
Default Level
2: System level
Parameters
hops: Maximum hops.
Description
Use the stp max-hops command to set the maximum hops of the MST region on the device.
Use the undo stp max-hops command to restore the maximum hops to the default setting.
By default, the maximum hops of an MST region is 20.
In the CIST or an MST instance, the maximum hops setting configured on the regional root bridge determines the maximum network diameter supported by the MST region. After a configuration BPDU leaves the root bridge, its hop count is decremented by 1 whenever it passes a device. When its hop count reaches 0, it will be discarded by the device that has received it. As a result, devices beyond the maximum hop count are unable to take part in spanning tree computing, and thereby the size of the MST region is limited.
When the current device becomes the root bridge of the CIST or an MSTI, the maximum hops setting configured on the device becomes the network diameter of that spanning tree and restricts the size of that spanning tree in the current MST region.
Devices other than the root bridge in an MST region use the maximum hops setting on the root bridge.
Examples
# Set the maximum hops of the MST region to 35.
<Sysname> system-view
[Sysname] stp max-hops 35
1.1.24 stp mcheck
Syntax
stp mcheck
View
System view, Ethernet interface view
Default Level
2: System level
Parameters
None
Description
Use the stp mcheck command to carry out the mCheck operation globally or on a port.
In a switched network, if a port on the device running MSTP (or RSTP) connects to a device running STP, this port will automatically migrate to the STP-compatible mode. However, if the device running STP is removed, this will not be able to migrate automatically to the MSTP (or RSTP) mode, but will remain working in the STP-compatible mode. In this case, you can perform an mCheck operation to force the port to migrate to the MSTP (or RSTP) mode.
Note that the stp mcheck command is meaningful only when the MSTP is configured to operate in the MSTP mode or RSTP-compatible mode, not in the STP-compatible mode.
Related commands: stp mode.
Examples
# Carry out mCheck on port Ethernet 2/1/1.
<Sysname> system-view
[Sysname] interface Ethernet 2/1/1
[Sysname-Ethernet2/1/1] stp mcheck
1.1.25 stp mode
Syntax
stp mode { stp | rstp | mstp }
undo stp mode
View
System view
Default Level
2: System level
Parameters
stp: Configures the MSTP-compliant device to work in STP-compatible mode.
rstp: Configures the MSTP-compliant device to work in RSTP mode.
mstp: Configures the MSTP-compliant device to work in MSTP mode.
Description
Use the stp mode command to configure the MSTP work mode of the device.
Use the undo stp mode command to restore the default MSTP work mode.
By default, an MSTP-compliant device works in MSTP mode.
Related commands: stp mcheck, stp.
Examples
# Configure the MSTP-compliant device to work in STP-compatible mode.
<Sysname> system-view
[Sysname] stp mode stp
# Configure the MSTP-compliant device to work in RSTP-compatible mode.
<Sysname> system-view
[Sysname] stp mode rstp
1.1.26 stp no-agreement-check
Syntax
stp no-agreement-check
undo stp no-agreement-check
View
Ethernet interface view/port group view
Default Level
2: System level
Parameters
None
Description
Use the stp no-agreement-check command to enable No Agreement Check on port(s).
Use the undo stp no-agreement-check command to disable No Agreement Check on port(s).
By default, No Agreement Check is disabled.
Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all the ports in the port group.
& Note:
The No Agreement Check feature can take effect only on root ports or alternate ports.
Examples
# Enable No Agreement Check on Ethernet 1/1/1.
<Sysname> system-view
[Sysname] interface ethernet 1/1/1
[Sysname-Ethernet1/1/1] stp no-agreement-check
1.1.27 stp pathcost-standard
Syntax
stp pathcost-standard { dot1d-1998 | dot1t | legacy }
undo stp pathcost-standard
View
System view
Default Level
2: System level
Parameters
dot1d-1998: Adopts the IEEE 802.1D-1998 standard.
dot1t: Adopts the IEEE 802.1t standard.
legacy: Adopts the private standard.
Description
Use the stp pathcost-standard command to specify the standard used to calculate the default path cost of the link connected with the device
Use the undo stp pathcost-standard command to restore the default setting of the calculation standard.
By default, a device uses the private standard to calculate the default path cost.
Note that if you change the standard that the device uses in calculating the default path cost, the port path cost value set through the stp cost command will be out of effect.
Table 1-11 Link speed vs. path cost
Link speed |
Duplex state |
802.1D-1998 |
IEEE 802.1t |
Private standard |
0 |
— |
65535 |
200,000,000 |
200,000 |
10Mbps |
Single Port Aggregated Link 2 Ports Aggregated Link 3 Ports Aggregated Link 4 Ports |
100 100 100 100 |
2,000,000 1,000,000 666,666 500,000 |
2,000 1,800 1,600 1,400 |
100Mbps |
Single Port Aggregated Link 2 Ports Aggregated Link 3 Ports Aggregated Link 4 Ports |
19 19 19 19 |
200,000 100,000 66,666 50,000 |
200 180 160 140 |
1000Mbps |
Single Port Aggregated Link 2 Ports Aggregated Link 3 Ports Aggregated Link 4 Ports |
4 4 4 4 |
20,000 10,000 6,666 5,000 |
20 18 16 14 |
10Gbps |
Single Port Aggregated Link 2 Ports Aggregated Link 3 Ports Aggregated Link 4 Ports |
2 2 2 2 |
2,000 1,000 666 500 |
2 1 1 1 |
Unlike 802.1D-1998 where the number of ports in an aggregation link is not considered during path cost calculation for the link, 802.1T considers the number of ports in the aggregation.
In 802.1T, the path cost calculation formula is: Path cost = 200,000,000/link speed (in 100 kbps), where link speed is the sum of the link speeds of the non-blocked ports in the aggregation.
Examples
# Configure the device to calculate the default path cost based on IEEE 802.1D-1998.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1d-1998
# Configure the device to calculate the default path cost based on IEEE 802.1t.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1t
1.1.28 stp point-to-point
Syntax
stp point-to-point { force-true | force-false | auto }
undo stp point-to-point
View
Ethernet interface view/port group view
Default Level
2: System level
Parameters
auto: Specifies MSTP detects automatically whether the current port connects to a point-to-point link.
force-false: Specifies the current port to connect to a non-point-to-point link.
force-true: Specifies the current port to connect to a point-to-point link.
Description
Use the stp point-to-point command to specify whether the current port connects to a point-to-point link.
Use the undo stp point-to-point command to restore the default status of the link connected with the current port.
The default setting is auto; namely the MSTP-compliant device automatically detects whether an Ethernet port connects to a point-to-point link.
Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
Note that:
l When connecting to a non-point-to-point link, a port is incapable of rapid state transition.
l If the current port is the master port in an aggregation group or if it is working in full duplex mode, the link to which the current port connects is a point-to-point link. We recommend that you use the default setting, namely let MSTP detect the link status automatically.
l This setting is effective to the CIST and all MST instances. If a port is configured as connecting to a point-to-point link or a non-point-to-point link, the setting takes effect for the port in all MST instances. If the physical link to which the port connects is not a point-to-point link and you force it to be a point-to-point link by configuration, your configuration may incur a temporary loop.
Examples
# Configure port Ethernet 2/1/3 as connecting to a point-to-point link.
<Sysname> system-view
[Sysname] interface Ethernet 2/1/3
[Sysname-Ethernet2/1/3] stp point-to-point force-true
1.1.29 stp port priority
Syntax
stp [ instance instance-id ] port priority priority
undo stp [ instance instance-id ] port priority
View
Ethernet interface view/port group view
Default Level
2: System level
Parameters
instance instance-id: Sets the priority of the current port(s) in the specified MSTI. instance-id ranges from 0 to 47. A value of 0 specifies the CIST.
priority: Port priority, at the step of 16 (0, 16, 32…, for example).
Description
Use the stp port priority command to set the priority of a port or a group or ports in the specified MST instance.
Use the undo stp port priority command to restore the default priority of a port or a group or ports in the specified MST instance.
By default, the port priority is 128.
Note that:
l Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
l If you set instance-id to 0, you are setting the priority of the port in the CIST. The priority of a port can affect the role selection of the port in the specified MST instance.
l Setting different priorities for the same port in different MST instances allows different VLAN traffic flows to be forwarded along different physical links, thus to enable per-VLAN load balancing.
l When the priority of a port is changed, MSTP will re-compute the role of the port and initiate a state transition.
l If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.
Examples
# Set the priority of port Ethernet 2/1/3 in MST instance 2 to 16.
<Sysname> system-view
[Sysname] interface Ethernet 2/1/3
[Sysname-Ethernet2/1/3] stp instance 2 port priority 16
1.1.30 stp priority
Syntax
stp [ instance instance-id ] priority priority
undo stp [ instance instance-id ] priority
View
System view
Default Level
2: System level
Parameters
instance instance-id: Sets the priority of the device in the specified MSTI. instance-id ranges from 0 to 47. A value of 0 specifies the CIST.
priority: Port priority, in the range of 0 to 61440 at the step of 4096, namely you can set up to 16 priority values, such as 0, 4096, 8192…, on the device.
Description
Use the stp priority command to set the priority of the device in the specified MST instance.
Use the undo stp priority command to restore the device priority to the default setting.
By default, the device priority is 32768.
The device priority is involved in spanning tree computing. The device priority is set on a per-instance basis. An MSTP-compliant device can have different priorities in different MST instances.
If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.
Examples
# Set the device priority in MST instance 1 to 4096.
<Sysname> system-view
[Sysname] stp instance 1 priority 4096
1.1.31 stp region-configuration
Syntax
stp region-configuration
undo stp region-configuration
View
System view
Default Level
2: System level
Parameters
None
Description
Use the stp region-configuration command to enter MST region view.
Use the undo stp region-configuration command to restore the default MST region configurations.
By default, the default settings are used for all the three MST region parameters. Namely, the device’s MST region name is the device’s MAC address, all VLANs are mapped to the CIST, and the MSTP revision level is 0.
After you enter MST region view, you can configure the parameters related the MST region, including the region name, VLAN-to-instance mapping and revision level.
Examples
# Enter MST region view.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region]
1.1.32 stp root primary
Syntax
stp [ instance instance-id ] root primary [ bridge-diameter bridgenum [ hello-time centi-seconds ] ]
undo stp [ instance instance-id ] root
View
System view
Default Level
2: System level
Parameters
instance instance-id: Specifies an MSTI. instance-id ranges from 0 to 47. A value of 0 specifies the CIST.
bridge-diameter bridgenum: Specifies the network diameter of the switched network. bridgenum is 7 by default.
hello-time centi-seconds: Specifies the hello time (in centiseconds).
Description
Use the stp root primary command to specify the current device as the root bridge of the specified MST instance.
Use the undo stp root command to remove the current device as the root bridge of the specified MST instance.
By default, a device is not a root bridge.
Note that:
l If you do not provide instance instance-id, the setting is effective in the CIST instance only.
l There is only one root bridge in effect in a spanning tree instance. If two or more devices are configured as the root bridges of the same spanning tree instance, the one with smaller MAC address works as the root bridge.
l You can specify a root bridge for each MST instance without caring about the device priority.
l After specifying the current device as the root bridge or a secondary root bridge, you cannot change the priority of the device.
l When configuring a root bridge, you can use this command to specify the network diameter of the switched network, so that the MSTP-compliant device automatically calculates the three timers (hello time, forward delay and max age). As the calculated hello time value is not the optimal value, you can specify a hello time value by providing hello-time centi-seconds in the command, which will override the hello time value calculated by the device based on the network diameter. Generally, we recommend that you use the values of the other two timers calculated by the device based the specified network diameter.
l The configured network diameter and hello time settings are effective only for MST instance 0, namely the CIST. If you configure these two timers for any other instance, your configuration can succeed, but they will not actually work.
Examples
# Configure the current device as the root bridge of MST instance 0, setting the network diameter to 4 and the hello time of the device to 500 centiseconds.
<Sysname> system-view
[Sysname] stp instance 0 root primary bridge-diameter 4 hello-time 500
1.1.33 stp root secondary
Syntax
stp [ instance instance-id ] root secondary [ bridge-diameter bridgenum [ hello-time centi-seconds ] ]
undo stp [ instance instance-id ] root
View
System view
Default Level
2: System level
Parameters
instance instance-id: Specifies an MSTI.
bridge-diameter bridgenum: Specifies the network diameter of the switched network. bridgenum is 7 by default.
hello-time centi-seconds: Specifies the hello time (in centiseconds).
Description
Use the stp root secondary command to specify the current device as a secondary root bridge of the specified MST instance.
Use the undo stp root command to remove the current device as a secondary root bridge of the specified MST instance.
By default, a device is not a secondary root bridge.
Note that:
l If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.
l You can configure one or more secondary root bridges for each MST instance. When the root bridge of an instance fails or is shut down, the secondary root bridge can take over the role of the instance of the specified MST instance. If you specify more than one secondary root bridge, the secondary root bridge with the lowest Mac address will become the root bridge.
l When configuration a secondary root bridge, you can specify the network diameter of the switched network and the hello time for the secondary root bridge, so that the MSTP-compliant device automatically calculates the other two timers (forward delay and max age) of the root bridge.
l The configured network diameter and hello time settings are effective only for MST instance 0, namely the CIST. If you configure these two timers for any other instance, your configuration can succeed, but they will not actually work.
l If you set instance-id to 0, you are specifying the current device as the secondary root bridge of the CIST.
l Upon specifying the current device as the root bridge or a secondary root bridge, you cannot change the priority of the device.
Examples
# Define the current device as the secondary root bridge of MST instance 0 and set the network diameter to 5 and the hello time of the device to 300 centiseconds.
<Sysname> system-view
[Sysname] stp instance 0 root secondary bridge-diameter 5 hello-time 300
1.1.34 stp root-protection
Syntax
stp root-protection
undo stp root-protection
View
Ethernet interface view, port group view
Default Level
2: System level
Parameters
None
Description
Use the stp root-protection command to enable the root guard function for a port or a group of ports.
Use the undo stp root-protection command to restore default setting of the root guard function for the port(s).
By default, the root guard function is disabled.
Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
Examples
# Enable the root guard function for port Ethernet 2/1/1.
<Sysname> system-view
[Sysname] interface Ethernet 2/1/1
[Sysname-Ethernet2/1/1] stp root-protection
1.1.35 stp tc-protection
Syntax
stp tc-protection enable
stp tc-protection disable
View
System view
Default Level
2: System level
Parameters
None
Description
Use the stp tc-protection enable command to enable the TC-BPDU attack guard function for the device.
Use the stp tc-protection disable command to disable the TC-BPDU attack guard function for the device.
By default, the TC-BPDU attack guard function is enabled.
Examples
# Enable the TC-BPDU attack guard function for the device.
<Sysname> system-view
[Sysname] stp tc-protection enable
1.1.36 stp timer forward-delay
Syntax
stp timer forward-delay centi-seconds
undo stp timer forward-delay
View
System view
Default Level
2: System level
Parameters
centi-seconds: Forward delay in centiseconds.
Description
Use the stp timer forward-delay command to set the forward delay timer of the device.
Use the undo stp timer forward-delay command to restore the forward delay timer of the device to the default setting.
By default, the forward delay timer is set to 1,500 centiseconds.
In order to prevent temporary loops, a port must go through an intermediate state, the learning state, before it transitions from the discarding state to the forwarding state, and must wait a certain period of time before it transitions from one state to another to keep synchronized with the remote device during state transition. The forward delay timer set on the root bridge determines the time interval of state transition.
If the current device is the root bridge, the state transition interval of the device depends on the set forward delay value; for a secondary root bridge, its state transition interval is determined by the forward delay timer set on the root bridge.
The setting of the hello time, forward delay and max age timers must meet the following formulae.
l 2 × (forward delay – 1 second) ¦ max age
l Max age ¦ 2 × (hello Time + 1 second)
MSTP can work effectively on the entire network only when the above-mentioned conditions are met; otherwise, network instability will frequently occur. We recommend that you specify the network diameter of the switched network in the bridge-diameter command and let MSTP automatically calculate an optimal setting of these three timers.
Related commands: stp timer hello, stp timer max-age, and stp bridge-diameter.
Examples
# Set the forward delay timer of the device to 2,000 centiseconds.
<Sysname> system-view
[Sysname] stp timer forward-delay 2000
1.1.37 stp timer hello
Syntax
stp timer hello centi-seconds
undo stp timer hello
View
System view
Default Level
2: System level
Parameters
centi-seconds: Hello time (in centiseconds).
Description
Use the stp timer hello command to set the hello time of the device.
Use the undo stp timer hello command to restore the hello time of the device to the default setting.
By default, the hello time is set to 200 centiseconds.
Hello time is the time interval at which MSTP-compliant devices send configuration BPDUs to maintain spanning tree stability. If a device fails to receive configuration BPDUs within the set period of time, a new spanning tree computing process will be triggered due to timeout. The root bridge sends configuration BPDUs at the interval of the hello time set on the device, while secondary root bridges use the hello time set on the root bridge.
The setting of the hello time, forward delay and max age timers must meet the following formulae.
l 2 × (forward delay – 1 second) ¦ max age
l Max age ¦ 2 × (hello time + 1 second)
MSTP can work effectively on the entire network only when the above-mentioned conditions are met; otherwise, network instability will frequently occur. We recommend that you specify the network diameter of the switched network in the bridge-diameter command and let MSTP automatically calculate an optimal setting of these three timers.
Related commands: stp timer forward-delay, stp timer max-age, and stp bridge-diameter.
Examples
# Set the hello time of the device to 400 centiseconds.
<Sysname> system-view
[Sysname] stp timer hello 400
1.1.38 stp timer max-age
Syntax
stp timer max-age centi-seconds
undo stp timer max-age
View
System view
Default Level
2: System level
Parameters
centi-seconds: Max age (in centiseconds).
Description
Use the stp timer max-age command to set the max age timer of the device.
Use the undo stp timer max-age command to restore the max age timer of the device to the default setting.
By default, the max age is set to 2,000 centiseconds.
MSTP can detect link faults and automatically restore the forwarding state of the redundant link. In the CIST, the device determines whether a configuration BPDU received on a port has expired based on the max age timer. If a port receives a configuration BPDU that has expired, that MST instance needs to be re-computed.
The max age timer is not meaningful for MSTIs. If the current device is the root bridge of the CIST, it determines whether a configuration BPDUs has expired based on the configured max age timer; if the current device is not the root bridge of the CIST, it uses the max age timer set on the CIST root bridge.
The setting of the hello time, forward delay and max age timers must meet the following formulae.
l 2 × (forward delay – 1 second) ¦ max age
l Max age ¦ 2 × (hello time + 1 second)
MSTP can work effectively on the entire network only when the above-mentioned conditions are met; otherwise, network instability will frequently occur. We recommend that you specify the network diameter in the bridge-diameter command and let MSTP automatically calculate an optimal setting of these three timers.
Related commands: stp timer forward-delay, stp timer hello, and stp bridge-diameter.
Examples
# Set the max age timer of the device to 1,000 centiseconds.
<Sysname> system-view
[Sysname] stp timer max-age 1000
1.1.39 stp timer-factor
Syntax
stp timer-factor number
undo stp timer-factor
View
System view
Default Level
2: System level
Parameters
number: Timeout factor.
Description
Use the stp timer-factor command to configure the timeout time of the device by setting the timeout factor. Timeout time = timeout factor × 3 × hello time.
Use the undo stp timer-factor command to restore the timeout factor to the default setting.
By default, the timeout factor of the device is set to 3.
After the network topology becomes stabilized, each non-root-bridge device forwards configuration BPDUs to the adjacent devices at the interval of hello time to check for faulty links. Typically, if a device does not receive a BPDU from the upstream device within nine times the hello time, it assumes that the upstream device has failed and starts spanning tree calculation.
In a very stable network, this kind of spanning tree computing may occur because the upstream device is busy. In this case, you can avoid such unwanted spanning tree computing by lengthening the timeout time (by setting the timeout factor to 4 or more). We recommend that you set the timeout factor to 5, or 6, or 7 for a stable network.
Examples
# Set the timeout factor of the device to 7.
<Sysname> system-view
[Sysname] stp timer-factor 7
1.1.40 stp transmit-limit
Syntax
stp transmit-limit packetnum
undo stp transmit-limit
View
Ethernet interface view, port group view
Default Level
2: System level
Parameters
packetnum: Maximum number of MSTP packets that the port can send within each hello time, namely the maximum transmission rate of the port.
Description
Use the stp transmit-limit command to set the maximum number of configuration BPDUs that the current port can send within each hello time.
Use the undo stp transmit-limit command to restore the maximum number of configuration BPDUs that the current port can send within each hello time to the default setting.
By default, the maximum transmission rate of a port is 10.
l A larger maximum transmission rate value indicates that the current port sends more MSTP packets within each hello time, but this means that more device resources will be used. An appropriate maximum transmission rate setting can limit the number of MSTP packets that the current port sends within each hello time and prevent MSTP from using an excessive bandwidth resource during network topology instability.
l Configured in Ethernet interface view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.
Examples
# Set the maximum transmission rate of Ethernet 2/1/1 to 5.
<Sysname> system-view
[Sysname] interface Ethernet 2/1/1
[Sysname-Ethernet2/1/1] stp transmit-limit 5
1.1.41 vlan-mapping modulo
Syntax
vlan-mapping modulo modulo
View
MST region view
Default Level
2: System level
Parameters
modulo: Modulo value.
Description
Use the vlan-mapping modulo command to map VLANs in the current MST region to MST instances according to the specified modulo value.
By default, all VLANs are mapped to the CIST (instance 0).
You cannot map the same VLAN to different MST instances. If you map a VLAN that has been mapped to an instance to a new instance, the old mapping will be automatically removed.
& Note:
By using the vlan-mapping modulo command, you can quickly specify a VLAN for each MST instance. This command maps each VLAN to the MST instance whose ID is (VLAN ID–1) %modulo + 1, where (VLAN ID-1) %modulo is the modulo operation for (VLAN ID–1). If the modulo value is 15, for example, then VLAN 1 will be mapped to MSTI 1, VLAN 2 to MSTI 2, VLAN 15 to MSTI 15, VLAN 16 to MSTI 1, and so on.
Related commands: region-name, revision-level, check region-configuration, and active region-configuration.
Examples
# Map VLANs to MSTIs as per the modulo value of 16.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] vlan-mapping modulo 16