- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 06-Spanning tree commands | 127.10 KB |
Spanning tree commands
active region-configuration
Use active region-configuration to activate your MST region configuration.
Syntax
active region-configuration
Views
MST region view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
When you configure MST region parameters, MSTP launches a new spanning tree calculation process that might cause network topology instability. This is most likely to occur when you configure the VLAN-to-instance mapping table. The launch occurs after you execute the active region-configuration command or the stp global enable command.
As a best practice, use the check region-configuration command to determine whether the MST region configurations to be activated are correct. Run this command only when they are correct.
Examples
# Map VLAN 2 to MSTI 1 and activate the MST region configuration.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] instance 1 vlan 2
[Sysname-mst-region] active region-configuration
Related commands
check region-configuration
instance
region-name
revision-level
stp global enable
vlan-mapping modulo
check region-configuration
Use check region-configuration to display MST region pre-configuration information.
Syntax
check region-configuration
Views
MST region view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
Spanning tree devices belong to the same MST region only when they are connected through a physical link and configured with the same details as follows:
· Format selector (0 by default and not configurable).
· MST region name.
· MST region revision level.
· VLAN-to-instance mapping entries in the MST region.
As a best practice, use this command to determine whether the MST region configurations to be activated are correct. Activate them only when they are correct.
Examples
# Display MST region pre-configurations.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] check region-configuration
Admin Configuration
Format selector : 0
Region name : 001122334400
Revision level : 0
Configuration digest : 0x3ab68794d602fdf43b21c0b37ac3bca8
Instance VLANs Mapped
0 1, 3 to 4094
15 2
Table 1 Command output
|
Field |
Description |
|
Format selector |
Format selector of the MST region, which is 0 (not configurable). |
|
Region name |
MST region name. |
|
Revision level |
Revision level of the MST region. |
|
Instance VLANs Mapped |
VLAN-to-instance mappings in the MST region. |
Related commands
active region-configuration
instance
region-name
revision-level
vlan-mapping modulo
display stp
Use display stp to display spanning tree status and statistics.
Syntax
display stp [ instance instance-list ] [ interface interface-list | chassis chassis-number slot slot-number ] [ brief ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
instance instance-list: Specifies a space-separated list of up to 10 MSTI items. Each item specifies an MSTI or a range of MSTIs in the form of instance-id1 [ to instance-id2 ]. The value for instance-id2 must be equal to or greater than the value for instance-id1. The value range for the instance-id argument is 0 to 4094, and the value 0 represents the CIST.
interface interface-list: Specifies a space-separated list of up to 10 interface items. Each item specifies an interface or a range of interfaces in the form of interface-type interface-number 1 [ to interface-type interface-number 2 ]. The interface number for interface-number 2 must be equal to or greater than the interface number for interface-number 1.
brief: Displays brief spanning tree status and statistics. If this keyword is not specified, the command displays detailed spanning tree status and statistics.
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays spanning tree status and statistics on all cards.
chassis chassis-number slot slot-number: Specifies a card on a cluster member device. The chassis-number argument represents the member ID of the cluster member device. The slot-number argument represents the slot number of the card. If you do not specify a card, this command displays spanning tree status and statistics on all cards.
Usage guidelines
In STP or RSTP mode, the command output is sorted by port name.
· If you do not specify a port, this command applies to all ports.
· If you specify a port list, this command applies to the specified ports.
In MSTP mode, the command output is sorted by MSTI ID and by port name in each MSTI.
· If you do not specify an MSTI or port, this command applies to all MSTIs on all ports.
· If you specify an MSTI list but not a port, this command applies to all ports in the specified MSTIs.
· If you specify a port list but not an MSTI, this command applies to all MSTIs on the specified ports.
· If you specify both an MSTI list and a port list, this command applies to the specified ports in the specified MSTIs.
Examples
# In MSTP mode, display the brief spanning tree status and statistics for MSTI 0 on port GigabitEthernet 1/2/0/1.
<Sysname> display stp instance 0 interface GigabitEthernet 1/2/0/1 brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/2/0/1 ALTE DISCARDING NONE
Table 2 Command output
|
Field |
Description |
|
MST ID |
MSTI ID in the MST region. |
|
Port |
Port name, corresponding to each MSTI. |
|
Role |
Port role: · ALTE—The port is an alternate port. · BACK—The port is a backup port. · ROOT—The port is a root port. · DESI—The port is a designated port. · MAST—The port is a master port. · DISA—The port is disabled. |
|
STP State |
Spanning tree status on the port: · FORWARDING—The port can receive and send BPDUs and also forward user traffic. · DISCARDING—The port can receive and send BPDUs but cannot forward user traffic. · LEARNING—The port is in a transitional state. It can receive and send BPDUs but cannot forward user traffic. |
|
Protection |
If no spanning tree protection feature is configured or spanning tree protection is not triggered on the port, this field displays NONE. |
# In MSTP mode, display the detailed spanning tree status and statistics for all MSTIs on all ports.
<Sysname> display stp
-------[CIST Global Info][Mode MSTP]-------
Bridge ID : 32768.0001-0000-0000
Bridge times : Hello 2s MaxAge 20s FwdDelay 15s MaxHops 20
Root ID/ERPC : 32768.0001-0000-0000, 0
RegRoot ID/IRPC : 32768.0001-0000-0000, 0
RootPort ID : 0.0
BPDU-Protection : Disabled
Bridge Config-
Digest-Snooping : Disabled
TC or TCN received : 2
Time since last TC : 0 days 0h:0m:58s
----[Port1(GigabitEthernet1/2/0/1)][FORWARDING]----
Port protocol : Enabled
Port role : Designated Port (Boundary)
Port ID : 128.3
Port cost(Legacy) : Config=auto, Active=200
Desg.bridge/port : 32768.0001-0000-0000, 128.3
Port edged : Config=disabled, Active=disabled
Point-to-Point : Config=auto, Active=true
Transmit limit : 10 packets/hello-time
TC-Restriction : Disabled
Role-Restriction : Disabled
Protection type : Config=none, Active=none
MST BPDU format : Config=auto, Active=802.1s
Port Config-
Digest-Snooping : Disabled
Rapid transition : True
Num of VLANs mapped : 0
Port times : Hello 2s MaxAge 20s FwdDelay 15s MsgAge 0s RemHops 20
BPDU sent : 32
TCN: 0, Config: 0, RST: 0, MST: 32
BPDU received : 2
TCN: 0, Config: 0, RST: 0, MST: 2
-------[MSTI 1 Global Info]-------
Bridge ID : 32768.0001-0000-0000
RegRoot ID/IRPC : 32768.0001-0000-0000, 0
RootPort ID : 0.0
Master bridge : 32768.0001-0000-0000
Cost to master : 0
TC received : 0
----[Port1(GigabitEthernet1/2/0/1)][FORWARDING]----
Port protocol : Enabled
Port role : Designated Port (Boundary)
Port ID : 128.3
Port cost(Legacy) : Config=auto, Active=200
Desg.bridge/port : 32768.0001-0000-0000, 128.3
Protection type : Config=none, Active=none
Rapid transition : True
Num of VLANs mapped : 64
Port times : RemHops 20
# In MSTP mode, display the spanning tree status and statistics when the spanning tree feature is disabled.
<Sysname> display stp
Protocol status : Disabled
Protocol Std. : IEEE 802.1s
Version : 3
Bridge-Prio. : 32768
MAC address : 000f-e200-8048
Max age(s) : 20
Forward delay(s) : 15
Hello time(s) : 2
Max hops : 20
TC Snooping : Disabled
Table 3 Command output
|
Field |
Description |
|
Bridge ID |
Bridge ID, which contains the device's priority and its MAC address. For example, in output 32768.000f-e200-2200, the value preceding the dot is the device's priority. The value following the dot is the device's MAC address. |
|
Bridge times |
Major parameters for the bridge: · Hello—Hello timer. · MaxAge—Maximum age timer. · FwdDelay—Forward delay timer. · MaxHops—Maximum hops within the MST region. |
|
Root ID/ERPC |
CIST root ID and external path cost (the path cost from the device to the CIST root). |
|
RegRoot ID/IRPC |
CIST regional root ID and internal path cost (the path cost from the device to the CIST regional root). |
|
VlanRoot ID/RPC |
VLAN root ID and root path cost (the path cost from the device to the VLAN root bridge). |
|
RootPort ID |
Root port ID. The value 0.0 indicates that the device is the root and there is no root port. |
|
BPDU-Protection |
Global status of the BPDU guard feature. The field is not supported in this current software version. |
|
Bridge Config- Digest-Snooping |
Global status of Digest Snooping. The field is not supported in this current software version. |
|
TC or TCN received |
Number of TC/TCN BPDUs received in the MSTI. |
|
Time since last TC |
Time since the latest topology change in the MSTI. |
|
Port protocol |
Status of the spanning tree feature on the port. |
|
Port role |
Port role: · Alternate. · Backup. · Root. · Designated. · Master. · Disabled. |
|
(Boundary) |
The port is a regional boundary port. |
|
Port cost(Legacy) |
Path cost of the port. Legacy is the standard used for port path cost calculation. · Config—Configured value. · Active—Actual value. |
|
Desg.bridge/port |
Designated bridge ID and port ID of the port. The port ID displayed is insignificant for a port which does not support port priority. |
|
Point-to-Point |
The port is connected to a point-to-point link or not. · Config—Configured value. · Active—Actual value. |
|
Transmit limit |
Maximum number of BPDUs sent by a port within each hello time. |
|
Protection type |
Whether spanning tree protection is configured on the port: · Config—Configured spanning tree protection feature. · Active—Effective spanning tree protection feature. If no spanning tree protection feature is configured or spanning tree protection is not triggered on the port, this field displays NONE. |
|
TC-Restriction |
Status of TC transmission restriction on the port. The field is not supported in this current software version. |
|
Role-Restriction |
Status of port role restriction on the port. The field is not supported in this current software version. |
|
MST BPDU format |
Format of the MST BPDUs that the port can send: · Config—Configured value (legacy or 802.1s). · Active—Actual value (legacy or 802.1s). |
|
Port Config- Digest-Snooping |
Status of Digest Snooping on the port. The field is not supported in this current software version. |
|
Rapid transition |
Indicates whether the port rapidly transits to the forwarding state in the MSTI. |
|
Num of VLANs mapped |
Number of VLANs that are mapped to the MSTI. |
|
Port times |
Major parameters for the port: · Hello—Hello timer. · MaxAge—Maximum age timer. · FwdDelay—Forward delay timer. · MsgAge—Message age timer. · RemHops—Remaining hops. |
|
BPDU sent |
Statistics on sent BPDUs. |
|
BPDU received |
Statistics on received BPDUs. |
|
RegRoot ID/IRPC |
MSTI regional root/internal path cost. |
|
Root Type |
MSTI root type: · Primary root. · Secondary root. |
|
Master bridge |
MSTI root bridge ID. |
|
Cost to master |
Path cost from the MSTI to the master bridge. |
|
TC received |
Number of received TC BPDUs. |
|
Protocol status |
Spanning tree protocol status. |
|
Protocol Std. |
Spanning tree protocol standard. |
|
Version |
Spanning tree protocol version. |
|
Bridge-Prio. |
In MSTP mode: Device's priority in the CIST. |
|
Max age(s) |
Aging timer for BPDUs, in seconds. |
|
Forward delay(s) |
Port state transition delay, in seconds. |
|
Hello time(s) |
Interval for the root bridge to send BPDUs, in seconds. |
|
Max hops |
Maximum hops in the MSTI. |
|
TC Snooping |
Status of TC Snooping: · Enabled. (The status is not supported in this current software version.) · Disabled. |
Related commands
reset stp
display stp bpdu-statistics
Use display stp bpdu-statistics to display the BPDU statistics for ports.
Syntax
display stp bpdu-statistics [ interface interface-type interface-number [ instance instance-list ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
instance instance-list: Specifies a space-separated list of up to 10 MSTI items. Each item specifies an MSTI or a range of MSTIs in the form of instance-id1 [ to instance-id2 ]. The value for instance-id2 must be equal to or greater than the value for instance-id1. The value range for the instance-id argument is 0 to 4094, and the value 0 represents the CIST.
Usage guidelines
In MSTP mode, the command output is sorted by port name and by MSTI ID on each port.
· If you do not specify an MSTI or port, this command applies to all MSTIs on all ports.
· If you specify a port but not an MSTI, this command applies to all MSTIs on the port.
· If you specify both an MSTI ID and a port, this command applies to the specified MSTI on the port.
In STP or RSTP mode, the command output is sorted by port name.
· If you do not specify a port, this command applies to all ports.
· If you specify a port, this command applies to the port.
Examples
# In MSTP mode, display the BPDU statistics for all MSTIs on GigabitEthernet 1/2/0/1.
<Sysname> display stp bpdu-statistics interface gigabitethernet 1/2/0/1
Port: GigabitEthernet1/2/0/1
Instance-Independent:
Type Count Last Updated
--------------------------- ---------- -----------------
Invalid BPDUs 0
Looped-back BPDUs 0
Max-aged BPDUs 0
TCN sent 0
TCN received 0
TCA sent 0
TCA received 2 10:33:12 01/13/2011
Config sent 0
Config received 0
RST sent 0
RST received 0
MST sent 4 10:33:11 01/13/2011
MST received 151 10:37:43 01/13/2011
Instance 0:
Type Count Last Updated
--------------------------- ---------- -----------------
Timeout BPDUs 0
Max-hoped BPDUs 0
TC detected 1 10:32:40 01/13/2011
TC sent 3 10:33:11 01/13/2011
TC received 0
Table 4 Command output
|
Field |
Description |
|
Port |
Port name. |
|
Instance-Independent |
Statistics not related to a specific MSTI. |
|
Type |
Statistical item. |
|
Looped-back BPDUs |
Number of BPDUs sent and then received by the same port. |
|
Max-aged BPDUs |
Number of BPDUs whose max age was exceeded. |
|
TCN sent |
Number of sent TCN BPDUs. |
|
TCN received |
Number of received TCN BPDUs. |
|
TCA sent |
Number of sent TCA BPDUs. |
|
TCA received |
Number of received TCA BPDUs. |
|
Config sent |
Number of sent configuration BPDUs. |
|
Config received |
Number of received configuration BPDUs. |
|
RST sent |
Number of sent RSTP BPDUs. |
|
RST received |
Number of received RSTP BPDUs. |
|
MST sent |
Number of sent MSTP BPDUs. |
|
MST received |
Number of received MSTP BPDUs. |
|
Instance |
Statistics for a specific MSTI. |
|
Timeout BPDUs |
Number of expired BPDUs. |
|
Max-hoped BPDUs |
Number of BPDUs whose maximum hops were exceeded. |
|
TC detected |
Number of detected topology changes. |
|
TC sent |
Number of sent TC BPDUs. |
|
TC received |
Number of received TC BPDUs. |
display stp history
Use display stp history to display port role calculation history.
Syntax
display stp [ instance instance-list ] history [ chassis chassis-number slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
instance instance-list: Specifies a space-separated list of up to 10 MSTI items. Each item specifies an MSTI or a range of MSTIs in the form of instance-id1 [ to instance-id2 ]. The value for instance-id2 must be equal to or greater than the value for instance-id1. The value range for the instance-id argument is 0 to 4094, and the value 0 represents the CIST.
chassis chassis-number slot slot-number: Specifies a card on a cluster member device. The chassis-number argument represents the member ID of the cluster member device. The slot-number argument represents the slot number of the card. If you do not specify a card, this command displays port role calculation history on all cards.
Usage guidelines
In STP or RSTP mode, the command output is sorted by port role calculation time.
In MSTP mode, the command output is sorted by MSTI ID and by port role calculation time in each MSTI.
· If you do not specify an MSTI, this command applies to all MSTIs.
· If you specify an MSTI list, this command applies to the specified MSTIs.
Examples
# In MSTP mode, display the port role calculation history on the specified slot in MSTI 2.
<Sysname> display stp instance 2 history slot 1
--------------- STP slot 1 history trace ---------------
------------------- Instance 2 ---------------------
Port GigabitEthernet1/2/0/1
Role change : ROOT->DESI (Aged)
Time : 2009/02/08 00:22:56
Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.1
Designated priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.1
Port GigabitEthernet1/2/0/2
Role change : ALTER->ROOT
Time : 2009/02/08 00:22:56
Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2
128.153
Designated priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2
128.153
Table 5 Command output
|
Field |
Description |
|
Port |
Port name. |
|
Role change |
Role change of the port (Aged means that the change was caused by expiration of the received configuration BPDU). |
|
Time |
Time of port role calculation. |
display stp region-configuration
Use display stp region-configuration to display effective MST region configuration.
Syntax
display stp region-configuration
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Examples
# In MSTP mode, display effective MST region configuration.
<Sysname> display stp region-configuration
Oper Configuration
Format selector : 0
Region name : hello
Revision level : 0
Configuration digest : 0x5f762d9a46311effb7a488a3267fca9f
Instance VLANs Mapped
0 21 to 4094
1 1 to 10
2 11 to 20
Table 6 Command output
|
Field |
Description |
|
Format selector |
Format selector that is defined by the spanning tree protocol. The default value is 0, and the selector cannot be configured. |
|
Region name |
MST region name. |
|
Revision level |
Revision level of the MST region. The default value is 0, and the level can be configured by using the revision-level command. |
|
VLANs Mapped |
VLANs mapped to the MSTI. |
Related commands
instance
region-name
revision-level
vlan-mapping modulo
display stp root
Use display stp root to display the root bridge information of spanning trees.
Syntax
display stp root
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Examples
# In MSTP mode, display the root bridge information of all spanning trees.
<Sysname> display stp root
MST ID Root Bridge ID ExtPathCost IntPathCost Root Port
0 0.00e0-fc0e-6554 200200 0 GigabitEthernet1/2/0/1
Table 7 Command output
|
Field |
Description |
|
ExtPathCost |
External path cost. The path cost of a port is automatically calculated by the device. |
|
IntPathCost |
Internal path cost. The path cost of a port is automatically calculated by the device. |
|
Root Port |
Root port name (displayed only if a port of the device is the root port of the MSTI). |
display stp tc
Use display stp tc to display the incoming and outgoing TC/TCN BPDU statistics for ports.
Syntax
display stp [ instance instance-list ] tc [ chassis chassis-number slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
instance instance-list: Specifies a space-separated list of up to 10 MSTI items. Each item specifies an MSTI or a range of MSTIs in the form of instance-id1 [ to instance-id2 ]. The value for instance-id2 must be equal to or greater than the value for instance-id1. The value range for the instance-id argument is 0 to 4094, and the value 0 represents the CIST.
chassis chassis-number slot slot-number: Specifies a card on a cluster member device. The chassis-number argument represents the member ID of the cluster member device. The slot-number argument represents the slot number of the card. If you do not specify a card, this command displays TC/TCN BPDU statistics on all cards.
Usage guidelines
In STP or RSTP mode, the command output is sorted by port name.
In MSTP mode, the command output is sorted by MSTI ID and by port name in each MSTI.
· If you do not specify an MSTI, this command applies to all MSTIs.
· If you specify an MSTI list, this command applies to the specified MSTIs.
Examples
# In MSTP mode, display the incoming and outgoing TC/TCN BPDU statistics for all ports on the card on slot 1 in MSTI 0.
<Sysname> display stp instance 0 tc slot 1
-------------- STP slot 1 TC or TCN count -------------
MST ID Port Receive Send
0 GigabitEthernet1/2/0/1 6 4
0 GigabitEthernet1/2/0/2 0 2
Table 8 Command output
|
Field |
Description |
|
Port |
Port name. |
|
Receive |
Number of TC/TCN BPDUs received on a port. |
|
Send |
Number of TC/TCN BPDUs sent by a port. |
instance
Use instance to map a list of VLANs to an MSTI.
Use undo instance to remap the specified VLAN or all VLANs to the CIST (MSTI 0).
Syntax
instance instance-id vlan vlan-id-list
undo instance instance-id [ vlan vlan-id-list ]
Default
All VLANs are mapped to the CIST.
Views
MST region view
Predefined user roles
network-admin
mdc-admin
Parameters
instance-id: Specifies an MSTI ID in the range of 0 to 4094. A value of 0 represents the CIST. The value range for the instance-id argument is 1 to 4094 for the undo instance command.
vlan vlan-id-list: Specifies a space-separated list of up to 10 VLAN items. Each item specifies a VLAN or a range of VLANs in the form of vlan-id1 [ to vlan-id2 ]. The value for vlan-id2 must be equal to or greater than the value for vlan-id1. The value range for the vlan-id argument is 1 to 4094.
Usage guidelines
|
CAUTION: Use caution with global Digest Snooping in the following situations: · When you modify the VLAN-to-instance mappings. · When you restore the default MST region configuration. If the local device has different VLAN-to-instance mappings than its neighboring devices, loops or traffic interruption will occur. |
If you do not specify any VLANs in the undo instance command, all VLANs mapped to the specified MSTI are remapped to the CIST.
You cannot map a VLAN to different MSTIs. If you map a VLAN that has been mapped to an MSTI to a new MSTI, the old mapping is automatically deleted.
You can configure VLAN-to-instance mapping for up to 65 MSTIs.
After configuring this command, run the active region-configuration command to activate the VLAN-to-instance mapping.
Examples
# Map VLAN 2 to MSTI 1.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] instance 1 vlan 2
Related commands
active region-configuration
check region-configuration
display stp region-configuration
region-name
Use region-name to configure the MST region name.
Use undo region-name to restore the default MST region name.
Default
The MST region name of the device is its MAC address.
Predefined user roles
network-admin
mdc-admin
name: Specifies the MST region name, a string of 1 to 32 characters.
The MST region name, the VLAN-to-instance mapping table, and the MSTP revision level of a device determine the device's MST region.
After configuring this command, execute the active region-configuration command to activate the configured MST region name.
# Set the MST region name of the device to hello.
[Sysname] stp region-configuration
[Sysname-mst-region] region-name hello
Related commands
active region-configuration
check region-configuration
display stp region-configuration
instance
revision-level
vlan-mapping modulo
reset stp
Use reset stp to clear the spanning tree statistics.
Syntax
reset stp [ interface interface-list ]
Views
User view
Predefined user roles
network-admin
mdc-admin
Parameters
interface interface-list: Specifies a space-separated list of up to 10 interface items. Each item specifies an interface or a range of interfaces in the form of interface-type interface-number 1 [ to interface-type interface-number 2 ]. The interface number for interface-number 2 must be equal to or greater than the interface number for interface-number 1. If you do not specify this option, this command clears the spanning tree statistics on all ports.
Examples
# Clear the spanning tree statistics on ports GigabitEthernet 1/2/0/1 through GigabitEthernet 1/2/0/3.
<Sysname> reset stp interface gigabitethernet 1/2/0/1 to gigabitethernet 1/2/0/3
Related commands
display stp
revision-level
Use revision-level to configure the MSTP revision level.
Use undo revision-level to restore the default MSTP revision level.
Syntax
revision-level level
undo revision-level
Default
The MSTP revision level is 0.
Views
MST region view
Predefined user roles
network-admin
mdc-admin
Parameters
level: Specifies an MSTP revision level in the range of 0 to 65535.
Usage guidelines
The MSTP revision level, the MST region name, and the VLAN-to-instance mapping table of a device determine the device's MST region.
After configuring this command, execute the active region-configuration command to activate the configured MST region level.
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
Related commands
active region-configuration
check region-configuration
display stp region-configuration
instance
region-name
vlan-mapping modulo
stp enable
Use stp enable to enable the spanning tree feature.
Use undo stp enable to disable the spanning tree feature.
Syntax
stp enable
undo stp enable
Default
The spanning tree feature is enabled on all ports.
Views
Layer 2 Ethernet interface view
Layer 2 aggregate interface view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
When you enable the spanning tree feature, the device operates in STP, RSTP, or MSTP mode, depending on the spanning tree mode setting.
When you enable the spanning tree feature, the device dynamically maintains the spanning tree status of VLANs, based on received configuration BPDUs. When you disable the spanning tree feature, the device stops maintaining the spanning tree status.
If this command is configured in Layer 2 Ethernet interface view, it takes effect only on that interface.
If this command is configured in Layer 2 aggregate interface view, it takes effect only on the aggregate interface.
If this command is configured on a member port in an aggregation group, it takes effect only after the port leaves the aggregation group.
Examples
# In MSTP mode, disable the spanning tree feature on GigabitEthernet 1/2/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/2/0/1
[Sysname-GigabitEthernet1/2/0/1] undo stp enable
Related commands
stp global enable
stp mode
stp global enable
Use stp global enable to enable the spanning tree feature globally.
Use undo stp global enable to disable the spanning tree feature globally.
Syntax
stp global enable
undo stp global enable
Default
Whether the spanning tree feature is enabled globally by default varies by device model.
Views
System view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
When you enable the spanning tree feature, the device operates in STP, RSTP, or MSTP mode, depending on the spanning tree mode setting.
When the spanning tree feature is enabled, the device dynamically maintains the spanning tree status of VLANs based on received configuration BPDUs. When the spanning tree feature is disabled, the device stops maintaining the spanning tree status.
Examples
# Enable the spanning tree feature globally.
<Sysname> system-view
[Sysname] stp global enable
Related commands
stp enable
stp mode
stp mode
Use stp mode to configure the spanning tree operating mode.
Use undo stp mode to restore the default.
Syntax
stp mode { mstp | rstp | stp }
undo stp mode
Default
A spanning tree device operates in MSTP mode.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
mstp: Configures the spanning tree device to operate in MSTP mode.
rstp: Configures the spanning tree device to operate in RSTP mode.
stp: Configures the spanning tree device to operate in STP mode.
Usage guidelines
The MSTP mode is compatible with the RSTP mode, and the RSTP mode is compatible with the STP mode.
Examples
# Configure the spanning tree device to operate in STP mode.
<Sysname> system-view
[Sysname] stp mode stp
Related commands
stp enable
stp global enable
stp region-configuration
Use stp region-configuration to enter MST region view.
Use undo stp region-configuration to restore the default MST region configurations.
Syntax
stp region-configuration
undo stp region-configuration
Default
The default settings for an MST region are as follows:
· The MST region name of the device is its MAC address.
· All VLANs are mapped to the CIST.
· The MSTP revision level is 0.
Views
System view
Predefined user roles
network-admin
mdc-admin
Usage guidelines
After you enter MST region view, you can configure MST region parameters, including the region name, VLAN-to-instance mappings, and revision level.
Examples
# Enter MST region view.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region]
vlan-mapping modulo
Use vlan-mapping modulo to map VLANs in an MST region to MSTIs according to the specified modulo value and quickly create a VLAN-to-instance mapping table.
Syntax
vlan-mapping modulo modulo
Default
All VLANs are mapped to the CIST (MSTI 0).
Views
MST region view
Predefined user roles
network-admin
mdc-admin
Parameters
modulo: Specifies the modulo value. The minimum value is 1, and the maximum value varies by device model.
Usage guidelines
You cannot map a VLAN to different MSTIs. If you map a VLAN that has been mapped to an MSTI to a new MSTI, the old mapping is automatically deleted.
This command maps each VLAN to the MSTI with ID (VLAN ID – 1) % modulo + 1. (VLAN ID – 1) % modulo is the modulo operation for (VLAN ID – 1). If the modulo value is 15, then VLAN 1 is mapped to MSTI 1, VLAN 2 to MSTI 2, …, VLAN 15 to MSTI 15, VLAN 16 to MSTI 16, and so on.
Examples
# Map VLANs to MSTIs as per modulo 8.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] vlan-mapping modulo 8
Related commands
active region-configuration
check region-configuration
display stp region-configuration
region-name
revision-level

