H3C S5120-SI Series Ethernet Switches Command Reference-Release 1101-6W105

HomeSupportSwitchesH3C S5120 Switch SeriesReference GuidesCommand ReferencesH3C S5120-SI Series Ethernet Switches Command Reference-Release 1101-6W105
H3C S5120-SI Series Ethernet Switches Command Reference-Release 1101-6W105
10-MSTP Commands
Title Size Download
10-MSTP Commands 200.23 KB

MSTP Configuration Commands

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.

Note that:

l          The configuration of MST region–related parameters, especially the VLAN-to-instance mapping table, will cause MSTP to launch a new spanning tree calculation process, which may result in network topology instability. To reduce the possibility of topology instability caused by configuration, MSTP will not immediately launch a new spanning tree calculation process when processing MST region–related configurations; instead, such configurations will take effect only after you activate the MST region–related parameters using this command, or enable MSTP using the stp enable command in the case that MSTP is not enabled.

l          Before running this command, you are recommended to use the check region-configuration command to check whether the MST region pre-configurations are correct. You should run this command only if the result returns positive.

Related commands: instance, region-name, revision-level, vlan-mapping modulo, check region-configuration.

Examples

# Map VLAN 2 to MSTI 1 and activate MST region configuration manually.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] instance 1 vlan 2

[Sysname-mst-region] active region-configuration

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 MST region pre-configuration information, including the region name, revision level, and VLAN-to-instance mapping settings.

Note that:

l          Two or more MSTP-enabled devices belong to the same MST region only if they are configured to have the same format selector, MST region name, the same VLAN-to-instance mapping entries in the MST region and the same MST region revision level, and they are interconnected via a physical link.

l          Before activating the configurations of an MST region, you are recommended to use this command to check whether the MST region pre-configurations are correct. You should activate the MST region pre-configurations only if the result returns positive.

Related commands: instance, region-name, revision-level, vlan-mapping modulo, active region-configuration.

Examples

# View MST region pre-configurations.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] check region-configuration

Admin Configuration

   Format selector      :0

   Region name          :000fe26a58ed

   Revision level       :0

   Configuration digest :0x41b5018aca57daa8dcfdba2984d99d06

 

   Instance   Vlans Mapped

      0       1 to 9, 11 to 4094

      1       10

Table 1-1 check region-configuration command output description

Field

Description

Format selector

Format selector of the MST region, which defaults to 0 and is 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

 

display stp

Syntax

display stp [ instance instance-id ] [ interface interface-list ] [ brief ]

View

Any view

Default Level

1: Monitor level

Parameters

instance instance-id: Displays the status and statistics of a particular MSTI. The minimum value of instance-id is 0, representing the common internal spanning tree (CIST), and the maximum value is 3.

interface interface-list: Displays the MSTP status and statistics on the ports specified by a port list, in the format of interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> indicates that you can specify up to 10 ports or port ranges.

brief: Displays brief MSTP status and statistics.

Description

Use the display stp command to view the MSTP status and statistics.

Based on the MSTP status and statistics, you can analyze and maintain the network topology or check whether MSTP is working normally.

Note that:

l          If you do not specify any MSTI or port, this command will display the MSTP information of all MSTIs on all ports. The displayed information is sorted by MSTI ID and by port name in each MSTI.

l          If you specify an MSTI but not a port, this command will display the MSTP information on all ports in that MSTI. The displayed information is sorted by port name.

l          If you specify some ports but not an MSTI, this command will display the MSTP information of all MSTIs on the specified ports. The displayed information is sorted by MSTI ID, and by port name in each MSTI.

l          If you specify both an MSTI ID and a port list, this command will display the MSTP information on the specified ports in the specified MSTI. The displayed information is sorted by port name.

The MSTP status information includes:

l          CIST global parameters: Protocol work mode, device priority in the CIST (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 status of the BPDU guard function (enabled or disabled).

l          CIST port parameters: 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), status of the root guard function (enabled or disabled), BPDU format, boundary port/non-boundary port, hello time, max age, forward delay, message age, remaining hops, and whether rapid state transition enabled for designated ports.

l          MSTI global parameters: MSTI ID, bridge priority of the MSTI, regional root, internal path cost, MSTI root port, and master bridge.

l          MSTI port parameters: Port status, role, priority, path cost, designated bridge, designated port, remaining hops, and whether rapid state transition enabled (for designated ports).

The statistics include:

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, MST BPDUs and wrong BPDUs received on each port

l          The number of BPDUs discarded on each port

Related commands: reset stp.

Examples

# View the brief MSTP status and statistics.

<Sysname> display stp instance 0 interface gigabitethernet 1/0/1 to gigabitethernet 1/0/4 brief

 MSTID      Port                         Role  STP State     Protection

   0        GigabitEthernet1/0/1         DESI  FORWARDING    NONE

   0        GigabitEthernet1/0/2         DESI  FORWARDING    NONE

   0        GigabitEthernet1/0/3         DESI  FORWARDING    NONE

   0        GigabitEthernet1/0/4         DESI  FORWARDING    NONE

Table 1-2 display stp brief command output description

Field

Description

MSTID

MSTI ID in the MST region

Port

Port name, corresponding to each MSTI

Role

Port role, which can be one of the following:

l      ALTE: The port is an alternate port

l      BACK: The port is a backup port

l      ROOT: The port is a root port

l      DESI: The port is a designated port

l      MAST: The port is a master port

l      DISA: The port is disabled

STP State

MSTP status on the port, which can be:

l      FORWARDING: The port learns MAC addresses and forwards user traffic

l      DISCARDING: The port does not learn MAC addresses or forward user traffic

l      LEARNING: The port learns MAC addresses but does not forward user traffic

Protection

Protection type on the port, which can be:

l      ROOT: Root guard

l      LOOP: Loop guard

l      BPDU: BPDU guard

l      NONE: No protection

 

# View the MSTP status and statistics.

<Sysname> display stp

-------[CIST Global Info][Mode MSTP]-------

CIST Bridge         :32768.000f-e200-2200

Bridge Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20

CIST Root/ERPC      :0.00e0-fc0e-6554 / 200200

CIST RegRoot/IRPC   :32768.000f-e200-2200 / 0

CIST RootPortId     :128.48

BPDU-Protection     :disabled

Bridge Config-

Digest-Snooping     :disabled

TC or TCN received  :2

Time since last TC  :0 days 0h:5m:42s

 

----[Port1(GigabitEthernet1/0/1)][FORWARDING]----

 Port Protocol       :enabled

 Port Role           :CIST Designated Port

 Port Priority       :128

 Port Cost(Legacy)   :Config=auto / Active=200

 Desg. Bridge/Port   :32768.000f-e200-2200 / 128.2

 Port Edged          :Config=disabled / Active=disabled

 Point-to-point      :Config=auto / Active=true

 Transmit Limit      :10 packets/hello-time

 Protection Type     :None

 MST BPDU Format     :Config=auto / Active=legacy

 Port Config-

 Digest-Snooping     :disabled

 Rapid transition    :false

 Num of Vlans Mapped :1

 PortTimes           :Hello 2s MaxAge 20s FwDly 15s MsgAge 2s RemHop 20

 BPDU Sent           :186

          TCN: 0, Config: 0, RST: 0, MST: 186

 BPDU Received       :0

          TCN: 0, Config: 0, RST: 0, MST: 0

 

-------[MSTI 1 Global Info]-------

MSTI Bridge ID      :0.000f-e23e-9ca4

MSTI RegRoot/IRPC   :0.000f-e23e-9ca4 / 0

MSTI RootPortId     :0.0

MSTI Root Type      :PRIMARY root

Master Bridge       :32768.000f-e23e-9ca4

Cost to Master      :0

TC received         :0

# View the MSTP status and statistics when STP is not enabled.

<Sysname> display stp

 Protocol Status    :disabled

 Protocol Std.      :IEEE 802.1s

 Version            :3

 CIST Bridge-Prio.  :32768

 MAC address        :000f-e200-8048

 Max age(s)         :20

 Forward delay(s)   :15

 Hello time(s)      :2

 Max hops           :20

Table 1-3 display stp command output description

Field

Description

CIST Bridge

CIST bridge ID, which comprises the device’s priority in the CIST and its MAC address. For example, in output information “32768.000f-e200-2200”, the value preceding the period (“.”) is the device’s priority in the CIST, and the value following the period is the device’s MAC address.

Bridge Times

Major parameters for the bridge:

l      Hello: Hello timer

l      MaxAge: Max Age timer

l      FWDly: Forward delay timer

l      Max Hop: Max hops within the MST region

CIST Root/ERPC

CIST root ID and external path cost (the path cost from the device to the CIST root)

CIST RegRoot/IRPC

CIST regional root ID and internal path cost (the path cost from the device to the CIST regional root)

CIST RootPortId

CIST root port ID. “0.0” indicates that the device is the root and there is no root port.

BPDU-Protection

Indicates whether BPDU protection is enabled globally.

Bridge Config-

Digest-Snooping

Indicates whether Digest Snooping is enabled globally on the bridge.

TC or TCN received

Number of received TC/TCN packets

Time since last TC

Time since the latest topology change

[FORWARDING]

The port learns MAC addresses and forwards user traffic

[DISCARDING]

The port does not learn MAC addresses or forward user traffic

[LEARNING]

The port learns MAC addresses but does not forward user traffic

Port Protocol

Indicates whether STP is enabled on the port

Port Role

Port role, which can be Alternate, Backup, Root, Designated, Master, or Disabled

Port Priority

Port priority

Port Cost(Legacy)

Path cost of the port. The field in the bracket indicates the standard used for port path cost calculation, which can be legacy, dot1d-1998, or dot1t. Config indicates the configured value, and Active indicates the 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.

Port Edged

Indicates whether the port is an edge port. Config indicates the configured value, and Active indicates the actual value.

Point-to-point

Indicates whether the port is connected to a point-to-point link. Config indicates the configured value, and Active indicates the actual value.

Transmit Limit

The maximum number of packets sent within each Hello time

Protection Type

Protection type on the port, which can be one of the following:

l      Root: Root guard

l      Loop: Loop guard

l      BPDU: BPDU guard

l      None: No protection

MST BPDU Format

Format of the MST BPDUs that the port can send, which can be legacy or 802.1s. Config indicates the configured value, and Active indicates the actual value.

Port Config-

Digest-Snooping

Indicates whether digest snooping is enabled on the port.

Rapid transition

Indicates whether the current port rapidly transitions to the forwarding state.

Num of Vlans Mapped

Number of VLANs mapped to the current MSTI

PortTimes

Major parameters for the port:

l      Hello: Hello timer

l      MaxAge: Max Age timer

l      FWDly: Forward delay timer

l      MsgAge: Message Age timer

l      Remain Hop: Remaining hops

BPDU Sent

Statistics on sent BPDUs

BPDU Received

Statistics on received BPDUs

MSTI RegRoot/IRPC

MSTI regional root/internal path cost

MSTI RootPortId

MSTI root port ID

MSTI Root Type

MSTI root type, which can be primary root or 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

MSTP protocol status

Protocol Std.

MSTP protocol standard

Version

MSTP protocol version

CIST Bridge-Prio.

The device’s priority in the CIST

MAC address

MAC address of the device

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

 

display stp abnormal-port

Syntax

display stp abnormal-port

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display stp abnormal-port command to view the information about abnormally blocked ports.

Any of the following reasons may cause a port to be abnormally blocked:

l          Root guard function

l          Loop guard function

l          MSTP BPDU format incompatibility protection function

Examples

# View information about abnormally blocked ports.

<Sysname> display stp abnormal-port

 MSTID       Blocked Port                 Reason

   1         GigabitEthernet1/0/1       ROOT-Protected

   2         GigabitEthernet1/0/2       LOOP-Protected

   2         GigabitEthernet1/0/3       Formatcompatibility–Protected

Table 1-4 display stp abnormal-port command output description

Field

Description

MSTID

ID of the MSTI to which an abnormally blocked port belongs

Blocked Port

Name of an abnormally blocked port

Reason

Reason that caused abnormal blocking of the port.

l      ROOT-Protected: root guard function

l      LOOP-Protected: loop guard function

l      Formatcompatibility-Protected: MSTP BPDU format incompatibility protection function

 

display stp down-port

Syntax

display stp down-port

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display stp down-port command to display the information about ports blocked by STP protection functions.

These functions include:

l          BPDU attack guard function

l          MSTP BPDU format frequent change protection function

Examples

# View the information about ports blocked by STP protection functions.

<Sysname> display stp down-port

 Down Port                     Reason

 GigabitEthernet1/0/1      BPDU-Protected

 GigabitEthernet1/0/2      Formatfrequency-Protected

Table 1-5 display stp down-port command output description

Field

Description

Down Port

Name of a blocked port

Reason

Reason that caused the port to be blocked.

l      BPDU-Protected: BPDU attack guard function

l      Formatfrequency-Protected: MSTP BPDU format frequent change protection function

 

display stp history

Syntax

display stp [ instance instance-id ] history

View

Any view

Default Level

0: Visit level

Parameters

instance instance-id: Displays the historic port role calculation information of a particular MSTI. The minimum value of instance-id is 0, representing the common internal spanning tree (CIST), and the maximum value of instance-id is 3.

Description

Use the display stp history command to view the historic port role calculation information of the specified MSTI or all MSTIs.

Note that:

l          If you do not specify an MSTI ID, this command will display the historic port role calculation information of all MSTIs. The displayed information is sorted by MSTI ID, and by port role calculation time in each MSTI.

l          If you specify an MSTI ID, this command will display the historic port role calculation information of only this specified MSTI by the sequence of port role calculation time.

Examples

# View the historic port role calculation information in MSTI 2.

<Sysname> display stp instance 2 history

-------------------  Instance 2   ---------------------

     Port GigabitEthernet1/0/1

       Role change   : ROOT->DESI Aged

       Time          : 2006/08/08 00:22:56

       Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.1

 

     Port GigabitEthernet1/0/2

       Role change   : ALTER->ROOT

       Time          : 2006/08/08 00:22:56

       Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2

Table 1-6 display stp history command output description

Field

Description

Port

Port name

Role change

A role change of the port (“Age” means that the change was caused by expiry of the received configuration BPDU)

Time

Time of port role calculation

Port priority

Port priority

 

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-7 display stp ignored-vlan command output description

Field

Description

STP-Ignored VLAN

List of VLAN Ignore enabled VLANs

 

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 configuration information of the MST region, including the region name, revision level, and user-configured VLAN-to-instance mappings.

Related commands: instance, region-name, revision-level, vlan-mapping modulo.

Examples

# View the currently effective MST region configuration information.

<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 1-8 display stp region-configuration command output description

Field

Description

Format selector

MSTP-defined format selector, which defaults to 0 and is not configurable

Region name

MST region name

Revision level

Revision level of the MST region, which can be configured using the revision-level command and defaults to 0.

Instance   Vlans Mapped

VLAN-to-instance mappings in the MST region

 

display stp root

Syntax

display stp root

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display stp root command to view the root bridge information of all MSTIs.

Examples

# View the root bridge information of all MSTIs.

<Sysname> display stp root

MSTID  Root Bridge ID        ExtPathCost IntPathCost Root Port

   0    0.00e0-fc0e-6554      200200      0           GigabitEthernet1/0/1

Table 1-9 display stp root command output description

Field

Description

MSTID

MSTI ID

Root Bridge ID

Root bridge ID

ExtPathCost

External path cost. The device can automatically calculate the default path cost of a port, or alternatively, you can use the stp cost command to configure the path cost of a port.

IntPathCost

Internal path cost. The device can automatically calculate the default path cost of a port, or alternatively, you can use the stp cost command to configure the path cost of a port.

Root Port

Root port name (displayed only if a port of the current device is the root port of MSTIs)

 

display stp tc

Syntax

display stp [ instance instance-id ] tc

View

Any view

Default Level

0: Visit level

Parameters

instance instance-id: Displays the statistics of TC/TCN BPDUs received and sent by all ports in the specified MSTI. The minimum value of instance-id is 0, representing the common internal spanning tree (CIST), and the maximum value of instance-id is 3.

Description

Use the display stp tc command to view the statistics of TC/TCN BPDUs received and sent by all ports in an MSTI or all MSTIs.

Note that:

l          If you do not specify an MSTI ID, this command will display the statistics of TC/TCN BPDUs received and sent by all ports in all MSTIs. The displayed information is sorted by instance ID and by port name in each MSTI.

l          If you specify an MSTI ID, this command will display the statistics of TC/TCN BPDUs received and sent by all ports in the specified MSTI, in port name order.

Examples

# View the statistics of TC/TCN BPDUs received and sent by all ports in MSTI 0.

<Sysname> display stp instance 0 tc

 MSTID      Port                       Receive      Send

   0        GigabitEthernet1/0/1         6          4

   0        GigabitEthernet1/0/2         0          2

Table 1-10 display stp tc command output description

Field

Description

MSTID

MSTI ID

Port

Port name

Receive

Number of TC/TCN BPDUs received on each port

Send

Number of TC/TCN BPDUs sent by each port

 

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: MSTI ID. The minimum value is 0, representing the CIST, and the maximum value is 3.

vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id2 }&<1-10>, in which vlan-id represents the VLAN ID and ranges from 1 to 4094. &<1-10> indicates you can specify up to 10 VLAN IDs or VLAN ID ranges.

Description

Use the instance command to map the specified VLANs to the specified MSTI.

Use the undo instance command to remap the specified VLAN or all VLANs to the CIST (MSTI 0).

By default, all VLANs are mapped to the CIST.

Notice that:

l          If you specify no VLAN in the undo instance command, all VLANs mapped to the specified MSTI will be remapped to the CIST.

l          You cannot map the same VLAN to different MSTIs. If you map a VLAN that has been mapped to an MSTI to a new MSTI, the old mapping will be automatically removed.

l          After configuring this command, you need to run the active region-configuration command to activate the VLAN-to-instance mapping.

Related commands: display stp region-configuration, check region-configuration, active region-configuration.

Examples

# Map VLAN 2 to MSTI 1.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] instance 1 vlan 2

region-name

Syntax

region-name name

undo region-name

View

MST region view

Default Level

2: System level

Parameters

name: MST region name, a string of 1 to 32 characters.

Description

Use the region-name command to configure the MST region name.

Use the undo region-name command to restore the default MST region name.

By default, the MST region name of a device is its MAC address.

Note that:

l          The MST region name, the VLAN-to-instance mapping table and the MSTP revision level of a device jointly determine the MST region to which the device belongs.

l          After configuring this command, you need to run the active region-configuration command to activate the configured MST region name.

Related commands: instance, revision-level, vlan-mapping modulo, display stp region-configuration, check region-configuration, 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

reset stp

Syntax

reset stp [ interface interface-list ]

View

User view

Default Level

1: Monitor level

Parameters

interface interface-list: Clears the MSTP statistics of the ports specified in the format of interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> indicates that you can specify up to 10 ports or port ranges.

Description

Use the reset stp command to clear the MSTP statistics.

The MSTP statistics includes the numbers of TCN BPDUs, configuration BPDUs, RST BPDUs and MST BPDUs sent/received through the specified ports (STP BPDUs and TCN BPDUs are counted only for the CIST).

Note that this command clears the spanning tree-related statistics on the specified ports 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 on ports GigabitEthernet 1/0/1 through GigabitEthernet 1/0/3.

<Sysname> reset stp interface gigabitethernet 1/0/1 to gigabitethernet 1/0/3

revision-level

Syntax

revision-level level

undo revision-level

View

MST region view

Default Level

2: System level

Parameters

level: MSTP revision level, in the range of 0 to 65535.

Description

Use the region-level command to configure the MSTP revision level.

Use the undo region-level command to restore the default MSTP revision level.

By default, the MSTP revision level is 0.

Note that:

l          The MSTP revision level, the MST region name and the VLAN-to-instance mapping table of a device jointly determine the MST region to which the device belongs. When the MST region name and VLAN-to-instance mapping table are both the same for two MST regions, you can still tell them apart by their MSTP revision levels.

l          After configuring this command, you need to run the active region-configuration command to activate the configured MST region level.

Related commands: instance, region-name, vlan-mapping modulo, display stp region-configuration, check region-configuration, 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

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.

Use the undo stp bpdu-protection command to disable the BPDU guard function.

By default, the BPDU guard function is disabled.

Examples

# Enable the BPDU guard function.

<Sysname> system-view

[Sysname] stp bpdu-protection

stp bridge-diameter

Syntax

stp bridge-diameter diameter

undo stp bridge-diameter

View

System view

Default Level

2: System level

Parameters

diameter: Specifies the switched network diameter, in the range of 2 to 7.

Description

Use the stp bridge-diameter command to specify the network diameter, namely the maximum possible number of stations between any two terminal devices on the switched network.

Use the undo stp bridge-diameter command to restore the default.

By default, the network diameter of the switched network is 7.

Note that:

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

l          This configuration must be configured on the root bridge and is effective for the CIST only, not for MSTIs.

Related commands: stp timer forward-delay, stp timer hello, stp timer max-age.

Examples

# Set the network diameter of the switched network to 5.

<Sysname> system-view

[Sysname] stp bridge-diameter 5

stp compliance

Syntax

stp compliance { auto | dot1s | legacy }

undo stp compliance

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

auto: Configures the port(s) to recognize the MSTP BPDU format automatically and accordingly determine the format of MSTP BPDUs to send.

dot1s: Configures the port(s) to receive and send only standard-format (802.1s-compliant) MSTP BPDUs.

legacy: Configures the port(s) to receive and send only compatible-format MSTP BPDUs.

Description

Use the stp compliance command to configure the mode the specified port(s) will use to recognize and send MSTP BPDUs.

Use the undo stp compliance command to restore the system default.

By default, a port automatically recognizes the formats of received MSTP packets and determines the formats of MSTP packets to be sent based on the recognized formats.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

Examples

# Configure GigabitEthernet 1/0/1 to receive and send only standard-format (802.1s) MSTP packets.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp compliance dot1s

stp config-digest-snooping

Syntax

stp config-digest-snooping

undo stp config-digest-snooping

View

System view, Layer 2 Ethernet port view, port group view, Layer 2 aggregate port 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.

Note that:

l          Configured in system view, the setting takes effect globally; configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          You need to enable this feature both globally and on ports connected to third-party devices to make it take effect. It is recommended to enable the feature on all associated ports first and then globally, thus making all configured ports take effect at the same time to minimize the impact on the network.

Related commands: display stp.

Examples

# Enable Digest Snooping on GigabitEthernet 1/0/1 and then globally.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp config-digest-snooping

[Sysname-GigabitEthernet1/0/1] quit

[Sysname] stp config-digest-snooping

stp cost

Syntax

stp [ instance instance-id ] cost cost

undo stp [ instance instance-id ] cost

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

instance instance-id: Sets the path cost of the port(s) in a particular MSTI. The minimum value of instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.

cost: Path cost of the port, the effective range of which depends on the path cost calculation standard adopted.

l          With the IEEE 802.1d-1998 standard selected for path cost calculation, the cost argument ranges from 1 to 65535.

l          With the IEEE 802.1t standard selected for path cost calculation, the cost argument ranges from 1 to 200000000.

l          With the private standard selected for path cost calculation, the cost argument ranges from 1 to 200000.

Description

Use the stp cost command to set the path cost of the port(s) in the specified MSTI or all MSTIs.

Use the undo stp cost command to restore the system default.

By default, the device automatically calculates the path costs of ports in each MSTI based on the corresponding standard.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          Path cost is an important factor in spanning tree calculation. Setting different path costs for a port in MSTIs allows VLAN traffic flows to be forwarded along different physical links, thus achieving VLAN-based load balancing.

l          The path cost setting of a port can affect the role selection of the port. When the path cost of a port is changed, MSTP will re-compute the role of the port and initiate a state transition.

Related commands: display stp.

Examples

# Set the path cost of port GigabitEthernet 1/0/3 in MSTI 2 to 200.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/3

[Sysname-GigabitEthernet1/0/3] stp instance 2 cost 200

stp edged-port

Syntax

stp edged-port { enable | disable }

undo stp edged-port

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

enable: Configures the current port(s) as an edge port or edge ports.

disable: Configures the current port(s) as a non-edge port or non-edge ports.

Description

Use the stp edged-port enable command to configure the port(s) as an edge port or ports.

Use the stp edged-port disable command to configure the port(s) as a non-edge port or non-edge ports.

Use the undo stp edged-port command to restore the default.

All ports are non-edge ports by default.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation 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 a port directly connecting to a user terminal as an edge port to enable it to transition to the forwarding state rapidly.

l          Normally, configuration BPDUs from other devices will not be received by 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 it as an edge port.

l          Among loop guard, root guard and edge port settings, only one function (whichever is configured the earliest) can take effect on a port at the same time.

Related commands: stp loop-protection, stp root-protection.

Examples

# Configure GigabitEthernet 1/0/1 as an edge port.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp edged-port enable

stp enable

Syntax

stp enable

undo stp enable

View

System view, Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

None

Description

Use the stp enable command to enable MSTP globally in system view, on a port in port view, or on multiple ports in port group view.

Use the undo stp enable command to disable MSTP globally or on the port(s).

The device is globally MSTP-disabled by default. After you enable MSTP globally, MSTP is enabled on all ports.

Note that:

l          Configured in system view, the setting takes effect globally; configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group; configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          After you enable MSTP, the device works in STP-compatible mode, RSTP mode or MSTP mode depending on the MSTP mode setting.

l          After being enabled, MSTP dynamically maintains the spanning tree status of VLANs based on 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 GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] undo stp enable

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 vlan-list: Specifeis a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id2 }&<1-10>, in which vlan-id represents the VLAN ID and ranges from 1 to 4094. &<1-10> indicates you can specify up to 10 VLAN IDs or VLAN ID ranges.

Description

Use the stp ignored vlan command to enable VLAN Ignore for the specified VLAN(s).

Use the undo stp ignored vlan command to disable VLAN Ignore for the specified VLAN(s).

Examples

# Enable VLAN Ignore for VLAN 2.

<Sysname> system-view

[Sysname] stp ignored vlan 2

# Enable VLAN Ignore for VLAN 1 through VLAN 10.

[Sysname] stp ignored vlan 1 to 10

stp loop-protection

Syntax

stp loop-protection

undo stp loop-protection

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

None

Description

Use the stp loop-protection command to enable the loop guard function on the port(s).

Use the undo stp loop-protection command to restore the system default.

By default, the loop guard function is disabled.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group; configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          Among loop guard, root guard and edge port settings, only one function (whichever is configured the earliest) can take effect on a port at the same time.

Related commands: stp edged-port, stp root-protection.

Examples

# Enable the loop guard function on GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp loop-protection

stp max-hops

Syntax

stp max-hops hops

undo stp max-hops

View

System view

Default Level

2: System level

Parameters

hops: Maximum hops, in the range of 1 to 40

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.

Setting the maximum hops of MST regions is to limit the sizes of MST regions. By default, the maximum number of hops of an MST region is 20.

Related commands: display stp.

Examples

# Set the maximum hops of the MST region on the device to 35.

<Sysname> system-view

[Sysname] stp max-hops 35

stp mcheck

Syntax

stp mcheck

View

System view, Layer 2 Ethernet port view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

None

Description

Use the stp mcheck command to carry out the mCheck operation globally or on the current port.

If a port on a device running MSTP (or RSTP) connects to a device running STP, this port will automatically migrate to the STP-compatible mode. However, it will not be able to migrate automatically back to the MSTP (or RSTP) mode, but will remain working in the STP-compatible mode under the following circumstances:

l          The device running STP is shut down or removed.

l          The device running STP migrates to the MSTP (or RSTP) mode.

By then, you can perform an mCheck operation to force the port to migrate to the MSTP (or RSTP) mode.

Note that:

l          The device works in STP-compatible mode, RSTP mode or MSTP mode depending on the MSTP mode setting.

l          The stp mcheck command is meaningful only when the device works in RSTP or MSTP mode.

l          Configured in system view, the setting takes effect globally; configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all member ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

Related commands: stp mode.

Examples

# Carry out mCheck on GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp mcheck

stp mode

Syntax

stp mode { stp | rstp | mstp }

undo stp mode

View

System view

Default Level

2: System level

Parameters

stp: Configures the MSTP-enabled device to work in STP-compatible mode.

rstp: Configures an MSTP-enabled device to work in RSTP mode.

mstp: Configures an MSTP-enabled 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 MSTP work mode to the default setting.

By default, an MSTP-enabled device works in MSTP mode.

Related commands: stp mcheck, stp enable.

Examples

# Configure the MSTP-enabled device to work in STP-compatible mode.

<Sysname> system-view

[Sysname] stp mode stp

stp no-agreement-check

Syntax

stp no-agreement-check

undo stp no-agreement-check

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

None

Description

Use the stp no-agreement-check command to enable No Agreement Check on the port(s).

Use the undo stp no-agreement-check command to disable No Agreement Check on the port(s).

By default, No Agreement Check is disabled.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all member ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          This feature takes effect only after you enable it on the root port.

Examples

# Enable No Agreement Check on GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp no-agreement-check

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: The device calculates the default path cost for ports based on IEEE 802.1d-1998.

dot1t: The device calculates the default path cost for ports based on IEEE 802.1t.

legacy: The device calculates the default path cost for ports based on a private standard.

Description

Use the stp pathcost-standard command to specify a standard for the device to use when calculating the default path costs for ports of the device.

Use the undo stp pathcost-standard command to restore the system default.

By default, the device calculates the default path cost for ports based on a private standard.

Note that:

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

l          Table 1-11 shows the path costs calculated using different standards at different link speed. When calculating path cost for an aggregate port, 802.1d-1998 does not take into account the number of member ports in its aggregation group as 802.1t does. The calculation formula of 802.1t is: Path Cost = 200,000,000/link speed (in 100 kbps), where link speed is the sum of the link speed values of the non-blocked ports in the aggregation group.

Table 1-11 Link speed vs. path cost

Link speed

Duplex state

Path cost in 802.1d-1998 standard

Path cost in IEEE 802.1t standard

Path cost in private standard

0

65535

200,000,000

200,000

10 Mbps

Single Port

Aggregate Link 2 Ports

Aggregate Link 3 Ports

Aggregate 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

100 Mbps

Single Port

Aggregate Link 2 Ports

Aggregate Link 3 Ports

Aggregate Link 4 Ports

19

19

19

19

200,000

100,000

66,666

50,000

200

180

160

140

1000 Mbps

Single Port

Aggregate Link 2 Ports

Aggregate Link 3 Ports

Aggregate Link 4 Ports

4

4

4

4

20,000

10,000

6,666

5,000

20

18

16

14

10 Gbps

Single Port

Aggregate Link 2 Ports

Aggregate Link 3 Ports

Aggregate Link 4 Ports

2

2

2

2

2,000

1,000

666

500

2

1

1

1

 

Related commands: stp cost, display stp.

Examples

# Configure the device to calculate the default path cost for ports based on IEEE 802.1d-1998.

<Sysname> system-view

[Sysname] stp pathcost-standard dot1d-1998

stp point-to-point

Syntax

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

undo stp point-to-point

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

auto: Specifies automatic detection of the link type.

force-false: Specifies the non-point-to-point link type.

force-true: Specifies the point-to-point link type.

Description

Use the stp point-to-point command to configure the link type of the current port(s).

Use the undo stp point-to-point command to restore the system default.

The default setting is auto; namely the MSTP-enabled device automatically detects whether a port connects to a point-to-point link.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all member ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port. Configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          When connecting to a non-point-to-point link, a port is incapable of rapid state transition.

l          If the current port is a Layer 2 aggregate port or if it works 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 takes effect on the CIST and all MSTIs. 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 MSTIs. 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.

Related commands: display stp.

Examples

# Configure the link connecting GigabitEthernet 1/0/3 as a point-to-point link.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/3

[Sysname-GigabitEthernet1/0/3] stp point-to-point force-true

stp port priority

Syntax

stp [ instance instance-id ] port priority priority

undo stp [ instance instance-id ] port priority

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

instance instance-id: Sets the priority of the current port(s) in a particular MSTI. The minimum value of instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.

priority: Port priority, in the range of 0 to 240 at the step of 16 (0, 16, 32…, for example).

Description

Use the stp port priority command to set the priority of the port(s).

Use the undo stp port priority command to restore the system default.

Port priority affects the role of a port in an MSTI.

By default, the port priority is 128.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port. Configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          Setting different priorities for the same port in different MSTIs allows VLAN traffic flows to be forwarded along different physical links, thus to achieve VLAN-based load balancing.

l          When the priority of a port is changed in an MSTI, MSTP will re-compute the role of the port and initiate a state transition in the MSTI.

Related commands: display stp.

Examples

# Set the priority of port GigabitEthernet 1/0/3 in MSTI 2 to 16.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/3

[Sysname-GigabitEthernet1/0/3] stp instance 2 port priority 16

stp port-log

Syntax

stp port-log { all | instance instance-id }

undo stp port-log { all | instance instance-id }

View

System view

Default Level

2: System level

Parameters

all: Enables output of port state transition information for all MSTIs.

instance instance-id: Enables output of port state transition information for the specified MSTI. The minimum value of instance-id is 0, representing the CIST, and the maximum value of this argument is 3.

Description

Use the stp port-log command to enable output of port state transition information for the specified MSTI or all MSTIs.

Use the undo stp port-log command to disable output of port state transition information for the specified MSTI or all MSTIs.

This function is enabled by default.

Examples

# Enable output of port state transition information for MSTI 2.

<Sysname> system-view

[Sysname] stp port-log instance 2

%Aug 16 00:49:41:856 2006 Sysname MSTP/3/PDISC: Instance 2's GigabitEthernet1/0/1 has been set to discarding state!

%Aug 16 00:49:41:856 2006 Sysname MSTP/3/PFWD: Instance 2's GigabitEthernet1/0/2 has been set to forwarding state!

// The information above shows that in MSTI 2 the state of GigabitEthernet 1/0/1 has changed to discarding and that of GigabitEthernet 1/0/2 has changed to forwarding.

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 a MSTI. The minimum value of instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.

priority: Device 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. The smaller the priority value, the higher the device priority.

Description

Use the stp priority command to set the priority of the device.

Use the undo stp priority command to restore the default device priority.

By default, the device priority is 32768.

Examples

# Set the device priority in MSTI 1 to 4096.

<Sysname> system-view

[Sysname] stp instance 1 priority 4096

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 MST region-related 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]

stp root primary

Syntax

stp [ instance instance-id ] root primary

undo stp [ instance instance-id ] root

View

System view

Default Level

2: System level

Parameters

instance instance-id: Configures the device as the root bridge in a particular MSTI. The minimum value of instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.

Description

Use the stp root primary command to configure the current device as the root bridge.

Use the undo stp root command to restore the system default.

By default, a device is not a root bridge in any MSTI.

Note that:

l          There is only one root bridge in effect in an MSTI. If two or more devices have been designated to be root bridges of the same MSTI, MSTP will select the device with the lowest MAC address as the root bridge.

l          You can specify a root bridge for each MSTI without caring about the device priority. After specifying the current device as the root bridge or a secondary root bridge, you cannot change the priority of the device.

Related commands: stp priority, stp root secondary.

Examples

# Specify the current device as the root bridge of MSTI 0.

<Sysname> system-view

[Sysname] stp instance 0 root primary

stp root secondary

Syntax

stp [ instance instance-id ] root secondary

undo stp [ instance instance-id ] root

View

System view

Default Level

2: System level

Parameters

instance instance-id: Configures the device as a secondary root bridge in a particular MSTI. The minimum value of instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.

Description

Use the stp root secondary command to configure the device as a secondary root bridge.

Use the undo stp root command to restore the system default.

By default, a device is not a secondary root bridge.

Note that:

l          You can configure one or more secondary root bridges for each MSTI. When the root bridge of an MSTI fails or is shut down, the secondary root bridge can take over the role of the root bridge of the specified MSTI. However, if you specify a new primary root bridge for the instance then, the secondary root bridge will not become the root bridge. If you specify more than one secondary root bridge, the secondary root bridge with the lowest MAC address will become the root bridge.

l          After specifying the current device as a secondary root bridge, you cannot change the priority of the device.

Related commands: stp priority, stp root primary.

Examples

# Specify the current device as a secondary root bridge of MSTI 0.

<Sysname> system-view

[Sysname] stp instance 0 root secondary

stp root-protection

Syntax

stp root-protection

undo stp root-protection

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

None

Description

Use the stp root-protection command to enable the root guard function on the port(s).

Use the undo stp root-protection command to restore the default.

By default, the root guard function is disabled.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all ports in the port group; configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on the member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          Among loop guard, root guard and edge port settings, only one function (whichever is configured the earliest) can take effect on a port at the same time.

Related commands: stp edged-port, stp loop-protection.

Examples

# Enable the root guard function for GigabitEthernet 1/0/1.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp root-protection

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

# Disable the TC-BPDU attack guard function for the device.

<Sysname> system-view

[Sysname] stp tc-protection disable

stp tc-protection threshold

Syntax

stp tc-protection threshold number

undo stp tc-protection threshold

View

System view

Default Level

2: System level

Parameters

number: Maximum number of immediate forwarding address entry flushes that the switch can perform within a certain period of time after it receives the first TC-BPDU. The value range for the argument is 1 to 255.

Description

Use the stp tc-protection threshold command to configure the maximum number of forwarding address entry flushes that the device can perform within a certain period of time after it receives the first TC-BPDU.

Use the undo stp tc-protection threshold command to restore the default.

By default, the device can perform a maximum of six forwarding address entry flushes within 10 seconds after it receives the first TC-BPDU.

Examples

# Set the maximum number of forwarding address entry flushes that the device can perform within 10 seconds after it receives the first TC-BPDU to 10.

<Sysname> system-view

[Sysname] stp tc-protection threshold 10

stp timer forward-delay

Syntax

stp timer forward-delay time

undo stp timer forward-delay

View

System view

Default Level

2: System level

Parameters

time: Forward delay in centiseconds, ranging form 400 to 3000 at the step of 100.

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

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 forward delay value configured through this command; for a non- root bridge, its state transition interval is determined by the forward delay timer set on the root bridge.

The settings of the hello time, forward delay and max age timers must meet the following formulae, thus avoiding frequent network changes:

l          2 × (forward delay – 1 second) ¦ max age

l          Max age ¦ 2 × (hello Time + 1 second)

We recommend that you specify the network diameter of the switched network using the stp root primary command and let MSTP automatically calculate optimal settings of these three timers.

Related commands: stp timer hello, stp timer max-age, 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

stp timer hello

Syntax

stp timer hello time

undo stp timer hello

View

System view

Default Level

2: System level

Parameters

time: Hello time in centiseconds, ranging from 100 to 1000 at the step of 100.

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

By default, the hello time is set to 200 centiseconds.

Hello time is the time interval at which MSTP-enabled devices send configuration BPDUs to maintain spanning tree. If a device fails to receive configuration BPDUs within the set period of time, a new spanning tree calculation process will be triggered due to timeout. The root bridge sends configuration BPDUs at the interval of the hello time set through this command, while non-root bridges use the hello time set on the root bridge.

The settings of the hello time, forward delay and max age timers must meet the following formulae, thus avoiding frequent network changes:

l          2 × (forward delay – 1 second) ¦ max age

l          Max age ¦ 2 × (hello time + 1 second)

We recommend that you specify the network diameter of the switched network using the stp root primary command and let MSTP automatically calculate optimal settings of these three timers.

Related commands: stp timer forward-delay, stp timer max-age, stp bridge-diameter.

Examples

# Set the hello time of the device to 400 centiseconds.

<Sysname> system-view

[Sysname] stp timer hello 400

stp timer max-age

Syntax

stp timer max-age time

undo stp timer max-age

View

System view

Default Level

2: System level

Parameters

time: Max age in centiseconds, ranging from 600 to 4000 at the step of 100.

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

By default, the max age is set to 2,000 centiseconds.

MSTP can detect link failures 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 MSTI 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 BPDU 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 settings of the hello time, forward delay and max age timers must meet the following formulae, thus avoiding frequent network changes:

l          2 × (forward delay – 1 second) ¦ max age

l          Max age ¦ 2 × (hello time + 1 second)

We recommend that you specify the network diameter using the stp root primary command and let MSTP automatically calculate an optimal setting of these three timers.

Related commands: stp timer forward-delay, stp timer hello, 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

stp timer-factor

Syntax

stp timer-factor factor

undo stp timer-factor

View

System view

Default Level

2: System level

Parameters

factor: Timeout factor, in the range of 1 to 20.

Description

Use the stp timer-factor command to set the timeout factor, which decides the timeout time. Timeout time = timeout factor × 3 × hello time.

Use the undo stp timer-factor command to restore the default.

By default, the timeout factor is 3.

Note that:

l          After the network topology is stabilized, each non-root-bridge device forwards configuration BPDUs to the surrounding devices at the interval of hello time to check whether any link is faulty. Typically, if a device does not receive a BPDU from the upstream device within nine times the hello time, it will assume that the upstream device has failed and start a new spanning tree calculation process.

l          In a very stable network, this kind of spanning tree calculation may occur because the upstream device is busy. In this case, you can avoid such unwanted spanning tree calculations by lengthening the timeout time, thus saving the network resources. 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

stp transmit-limit

Syntax

stp transmit-limit limit

undo stp transmit-limit

View

Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view

Default Level

2: System level

Parameters

limit: Maximum number of BPDUs the port(s) can send within each hello time, in the range of 1 to 255.

Description

Use the stp transmit-limit command to set the maximum transmission rate of the port(s), that is, the maximum number of BPDUs the port(s) can send within each hello time.

Use the undo stp transmit-limit command to restore the system default.

By default, the maximum transmission rate of all ports of the device is 10, that is, each port can send up to 10 BPDUs within each hello time.

Note that:

l          Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only; configured in port group view, the setting takes effect on all member ports in the port group.

l          Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a member port in an aggregation group, the setting can take effect only after the port leaves the aggregation group.

l          A larger maximum transmission rate value represents more BPDUs that the port will send within each hello time, but this means that more system resources will be used. An appropriate maximum transmission rate setting can limit the speed at which a port sends BPDUs and prevent MSTP from using excessive bandwidth resources during network topology changes. You are recommended to use the default value.

Examples

# Set the maximum transmission rate of port GigabitEthernet 1/0/1 to 5.

<Sysname> system-view

[Sysname] interface gigabitethernet 1/0/1

[Sysname-GigabitEthernet1/0/1] stp transmit-limit 5

vlan-mapping modulo

Syntax

vlan-mapping modulo modulo

View

MST region view

Default Level

2: System level

Parameters

modulo: Modulo value. The minimum value is 1, and the maximum value is 3.

Description

Use the vlan-mapping modulo command to map VLANs in the current MST region to MSTIs according to the specified modulo value, thus quickly creating a VLAN-to-instance mapping table.

By default, all VLANs are mapped to the CIST (MSTI 0).

Note that:

l          You cannot map the same VLAN to different MSTIs. If you map a VLAN that has been mapped to an MSTI to a new MSTI, the old mapping will be automatically removed.

l          This command maps each VLAN to the MSTI 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 3, for example, then VLAN 1 will be mapped to MSTI 1, VLAN 2 to MSTI 2, VLAN 3 to MSTI 3, VLAN 4 to MSTI 1, and so on.

Related commands: region-name, revision-level, display stp region-configuration, check region-configuration, active region-configuration.

Examples

# Map VLANs to MSTIs as per modulo 3.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] vlan-mapping modulo 3

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网