H3C S3610[S5510] Series Ethernet Switches Command Manual-Release 0001-(V1.02)

HomeSupportSwitchesH3C S3610[S5510] Switch SeriesReference GuidesCommand ReferencesH3C S3610[S5510] Series Ethernet Switches Command Manual-Release 0001-(V1.02)
08-MSTP Command
Title Size Download
08-MSTP Command 208 KB

Chapter 1  MSTP Configuration Commands

1.1  MSTP Configuration Commands

1.1.1  active region-configuration

Syntax

active region-configuration

View

MST region view

Parameter

None

Description

Use the active region-configuration command to activate your MST region configuration.

Your configuration of MST region–related parameters, especially the VLAN-to-instance mapping table, 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 computing process when processing MST region–related configurations; instead, the region configuration will take effect only when you activate the MST region–related parameters you have configured or enable MSTP.

When you carry out this command, MSTP will replace the currently running MST region–related parameters with the parameters you have just configured, and will perform spanning tree computing again.

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

Example

# Activate MST region configuration manually.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] active region-configuration

1.1.2  check region-configuration

Syntax

check region-configuration

View

MST region view

Parameter

None

Description

Use the check region-configuration command to view all the MST region configuration information, including the region name, VLAN-to-instance mapping and revision level settings.

 

  Caution:

Be sure that your MST region configurations are correct, especially the VLAN-to-instance mapping table. MSTP-compliant devices are in the same MST region only when they have the same region name, the same VLAN-to-instance mapping table and the same MSTP revision level setting. A device will not be in a different region if it is different in any of these three settings. You can view all the MST region–related configuration information by using this command and determine the MST region the device is currently in, or check whether the MST region configuration is correct.

 

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

Example

# View all the configuration information of the MST region

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] check region-configuration

Admin Configuration

   Format selector :0

   Region name     :00b010000001

   Revision level  :0

 

   Instance   Vlans Mapped

      0       1 to 9, 11 to 4094

     16       10

Table 1-1 Description on the fields of the check region-configuration command

Field

Description

Format selector

Configuration format selector of the MST region

Region name

MST region name

Revision level

Revision level of the MST region

Instance   Vlans Mapped

VLAN-to-instance mappings in the MST region

 

1.1.3  display stp

Syntax

display stp [ instance instance-id ] [ interface interface-list | slot slot-number ] [ brief ]

View

Any view

Parameter

instance-id: MSTI ID, ranging from 0 to 15. A value of 0 specifies the CIST.

interface-list: Ethernet port list. You can specify multiple Ethernet ports or port ranges by providing the this argument in the form of interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where, interface-type is port type and interface-number is port number, and &<1-10> means that you can specify up to 10 ports or port ranges for this argument.

slot slot-number: Displays the STP information about a slot.

brief: Specifies to display only the information about port state, port role and the guard function enabled for a port.

Description

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

Based on the MSTP status information and statistics information, you can analyze and maintain the network topology or maintain the normal operation of MSTP.

Note that:

l           If you do not specify any MSTI ID or port list, this command will display the MSTP information on all ports. The displayed information is sequenced by MSTI ID, and by port number within an MSTI.

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

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

l           If you specify both an MSTI ID and a port list, this command will display the MSTP information of the specified MSTI on the specified ports.

The MSTP status information includes:

l           CIST global parameters: Protocol work mode, device priority in the CIST instance (Priority), MAC address, hello time, max age, forward delay, maximum hops, common root of the CIST, external path cost from the device to the CIST common root, regional root, the internal path cost from the device to the regional root, CIST root port of the device, and 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, region edge port/non region edge port, hello time, max age, forward delay, message age, and remaining hops.

l           MSTI global parameters: MSTI instance ID, bridge priority of the instance, 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, and remaining hops.

The statistics information includes:

l           The number of TCN BPDUs, configuration BPDUs, RST BPDUs and MST BPDUs sent from each port

l           The number of TCN BPDUs, configuration BPDUs, RST BPDUs and MST BPDUs received on each port

Related command: reset stp.

Example

# View the MSTP status information and statistics information.

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

  MSTID      Port                  Role  STP State     Protection

   0         Ethernet1/0/1         DESI  FORWARDING    NONE

   0         Ethernet1/0/2         DESI  FORWARDING    NONE

   0         Ethernet1/0/3         DESI  FORWARDING    NONE

   0         Ethernet1/0/4         DESI  FORWARDING    NONE

Table 1-2 Description on the fields of the display stp command

Field

Description

MSTID

MSTI ID in the MST region

Port

Port name, corresponding to each MSTI

Role

Port role

STP State

MSTP status on the port, including forwarding, discarding, and learning

Protection

Protection type on the port, including root guard, loop guard, and BPDU guard

 

1.1.4  display stp region-configuration

Syntax

display stp region-configuration

View

Any view

Parameter

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 command: stp region-configuration.

Example

# View the currently effective MST region configuration information.

<Sysname> display stp region-configuration

Oper Configuration

   Format selector :0

   Region name     :hello

   Revision level  :0

 

   Instance   Vlans Mapped

      0       21 to 4094

      1       1 to 10

      2       11 to 20

Table 1-3 Description on the fields of the display stp region-configuration command

Field

Description

Format selector

MSTP-defined format selector

Region name

MST region name

Revision level

Revision level of the MST region

Instance Vlans Mapped

VLAN-to-instance mappings in the MST region

 

1.1.5  instance

Syntax

instance instance-id vlan vlan-list

undo instance instance-id [ vlan vlan-list ]

View

MST region view

Parameter

instance-id: MSTI ID, ranging from 0 to 15. A value of 0 specifies the CIST.

vlan-list: VLAN list. You can specify multiple VLANs or VLAN ranges by providing this argument in the form of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where, vlan-id is in the range of 1 to 4094, and &<1-10> means that you can specify up to 10 VLANs or VLAN ranges for this argument.

Description

Use the instance command to map the specified VLAN(s) to the specified MSTI.

Use the undo instance command to remove the specified VLAN(s) from the specified MSTI and map the removed VLAN(s) 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 instance to a new instance, the old mapping will be automatically removed.

Related command: region-name, revision-level, check region-configuration, vlan-mapping modulo, and active region-configuration.

Example

# Map VLAN 2 to MSTI 1.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] instance 1 vlan 2

1.1.6  region-name

Syntax

region-name name

undo region-name

View

MST region view

Parameter

name: Name of the MST regions, a string of 1 to 32 characters.

Description

Use the region-name command to configure the MST region name of your device.

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

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

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

Related command: instance, revision-level, check region-configuration, vlan-mapping modulo, and active region-configuration.

Example

# Set the MST region name of the device to “hello”.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] region-name hello

1.1.7  reset stp

Syntax

reset stp [ interface interface-list ]

View

User view

Parameter

interface-list: Ethernet port list. You can specify multiple Ethernet ports or port ranges by providing the this argument in the form of interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where, interface-type is port type and interface-number is port number, and &<1-10> means that you can specify up to 10 VLANs or VLAN ranges for this argument.

Description

Use the reset stp command to clear the MSTP statistics information.

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

This command clears the spanning tree-related statistics information on the specified port(s) if you specify the interface-list argument; otherwise, this command clears the spanning tree-related statistics on all ports.

Related command: display stp.

Example

# Clear the statistics on Ethernet1/0/1 through Ethernet1/0/3.

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

1.1.8  revision-level

Syntax

revision-level level

undo revision-level

View

MST region view

Parameter

level: MSTP revision level, in the range of 0 to 65535. The system default is 0.

Description

Use the region-level command to configure the MSTP revision level of your device.

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

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

Related command: instance, region-name, check region-configuration, vlan-mapping modulo, and active region-configuration.

Example

# Set the MSTP revision level of the MST region to 5.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region] revision-level 5

1.1.9  stp

Syntax

stp { enable | disable }

undo stp

View

System view, Ethernet port view, port group view

Parameter

enable: Enables the MSTP feature.

disable: Disables the MSTP feature.

Description

Use the stp command to enable or disable the MSTP feature globally or for a port or a group of ports.

Use the undo stp command to restore the default MSTP status globally or for a port or a group of ports.

Whether a device is globally MSTP-enabled by default depends on the specific device model. By default, MSTP is enabled for all ports.

To control MSTP flexibly, you can disable the MSTP feature for certain ports so that they will not take part in spanning tree computing and thus to save the device’s CPU resources.

After you enable MSTP, the device determines whether to work in STP-compatible mode, in RSTP mode or in MSTP mode according to your MSTP work mode setting. After MSTP is disabled, the device becomes a transparent bridge. 

After being enabled, MSTP dynamically maintains spanning tree status of the corresponding VLANs based the received configuration BPDUs. After being disabled, it stops maintaining the spanning tree status.

Configured in system view, the setting is effective for the device globally; configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

Related command: stp mode.

Example

# Enable the MSTP feature globally.

<Sysname> system-view

[Sysname] stp enable

# Disable MSTP on Ethernet1/0/1.

<Sysname> system-view

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet 1/0/1] stp disable

1.1.10  stp bpdu-protection

Syntax

stp bpdu-protection

undo stp bpdu-protection

View

System view

Parameter

None

Description

Use the stp bpdu-protection command to enable the BPDU guard function for the device.

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

By default, the BPDU guard function is disabled.

Example

# Enable the BPDU guard function for the device.

<Sysname> system-view

[Sysname] stp bpdu-protection

1.1.11  stp bridge-diameter

Syntax

stp bridge-diameter bridge-number

undo stp bridge-diameter

View

System view

Parameter

bridge-number: Network diameter of the spanning tree, in the range of 2 to 7.

Description

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

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

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

An appropriate setting of hello time, forward delay and max age can speed up network convergence. The values of these timers are related to the network size. You can set these three timers indirectly by setting the network diameter. Based on the network diameter you configured, MSTP automatically sets an optimal hello time, forward delay, and max age for the device. With the network diameter set to 7 (the default), the three timer are also set to their defaults.

Note that this configuration is effective for the CIST and root bridge only, and not for MSTIs.

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

Example

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

<Sysname> system-view

[Sysname] stp bridge-diameter 5

1.1.12  stp compliance

Syntax

stp compliance { auto | dot1s | legacy }

undo stp compliance

View

Ethernet port view, port group view

Parameter

auto: Configure the port to recognize the BPDU format automatically.

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

legacy: Configures the port to receive and send compatible-format BPDUs.

Description

Use the stp compliance command to configure the MSTP packet format for a port or a group of ports

Use the undo stp compliance command to restore the MSTP packet format to be default setting for a port or a group of ports.

By default, the MSTP packet format is set to auto, namely a port recognizes the BPDU format automatically.

Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

Note that:

l           If the MSTP packet format is set to auto for a port, the port automatically recognizes and resolves the received compatible-format BPDUs or 802.1s-compliant BPDUs, and sends, when needed, compatible-format or 802.1s-compliant BPDUs.

l           If you specify the BPDU format by using the legacy or dot1s keyword, the port can only receive and send BPDUs of the specified format. If the port is configured not to detect the packet format automatically while it works in the MSTP mode, and if it receives a packet in the format other than as configured, that port will become a designated port, and the port will remain in the discarding state to prevent the occurrence of a loop.

Example

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

<Sysname>system-view

System View: return to User View with Ctrl+Z.

[Sysname-Ethernet1]interface Ethernet 1/0/1

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

# Restore the default MSTP packet format for port Ethernet 1/0/1.

[Sysname-Ethernet1 Ethernet 1/0/1] undo stp compliance

1.1.13  stp config-digest-snooping

Syntax

stp config-digest-snooping

undo stp config-digest-snooping

View

System view, Ethernet port view, port group view

Parameter

None

Description

Use the stp config-digest-snooping command to enable Digest Snooping.

Use the undo stp config-digest-snooping command to disable Digest Snooping.

The feature is disabled by default.

Notice that:

l           You need to enable this feature both globally and on ports connected to other vendors’ devices to make it take effect. It is recommended to enable the feature on all associated ports first and then globally, making all configured ports take effect at the same time to minimize the impact, and disable the feature globally to disable it on all associated ports.

l           It is not recommended to enable Digest Snooping on the MST region edge port to avoid loops.

Example

# Enable global Digest Snooping.

<Sysname> system-view

[Sysname] stp config-digest-snooping

# Enable Digest Snooping on Ethernet 1/0/1.

<Sysname> system-view

[Sysname] interface Ethernet1/0/1

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

1.1.14  stp cost

Syntax

stp [ instance instance-id ] cost cost

undo stp [ instance instance-id ] cost

View

Ethernet port view, port group view

Parameter

instance-id: MSTI ID, ranging from 0 to 15. A value of 0 represents the CIST.

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

Description

Use the stp cost command to set the path cost of a port or a group or ports in the specified MSTI.

Use the undo stp cost command to restore the default path cost of a port or a group or ports in the specified MSTI.

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

Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

If you set instance-id to 0, you are setting the path cost of the port in the CIST. The path cost setting of a port can affect the role selection of the port. Setting different path costs for the same port in different MSTIs allows different VLAN traffic flows to be forwarded along different physical links, thus to enable per-VLAN load balancing. When the path cost of a port is changed, MSTP will re-compute the role of the port and initiate a state transition.

If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.

Example

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

<Sysname> system-view

[Sysname] interface Ethernet 1/0/1

[Sysname-Ethernet 1/0/1] stp instance 2 cost 200

1.1.15  stp edged-port

Syntax

stp edged-port { enable | disable }

undo stp edged-port

View

Ethernet port view, port group view

Parameter

enable: Configures the current port to be an edge port.

disable: Configures the current port to be a non-edge port.

Description

Use the stp edged-port enable command to configure the current port to be an edge port.

Use the stp edged-port disable command to configure the current port to be a non-edge port.

Use the undo stp edged-port enable command to restore the default state of the current port.

All Ethernet ports are non-edge ports by default.

Configured in Ethernet port. view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

If the current port connects with another device, you can use the stp edged-port disable or undo stp edged-port command to specify it to be a non-edge port.

l           If a port directly connects to a user terminal rather than another device or a shared LAN segment, this port is regarded as an edge port. When the network topology changes, an edge port will not cause a temporary loop. Therefore, configuring a port as an edge port can enable the port to transition to the forwarding state rapidly. We recommend that you configure an Ethernet port directly connecting to a user terminal as an edge port before to enable it to transition to the forwarding state rapidly.

l           Normally, configuration BPDUs from other devices cannot reach an edge port because it does not connect to any other device. Before the BPDU guard function is enabled, if a port receives a configuration BPDU, the port is working actually as a non-edge port even if you have configured in as an edge port.

Example

# Configure port Ethernet 1/0/1 as a non-edge port.

<Sysname> system-view

[Sysname] interface Ethernet 1/0/1

[Sysname- Ethernet 1/0/1] stp edged-port disable

1.1.16  stp loop-protection

Syntax

stp loop-protection

undo stp loop-protection

View

Ethernet port view, port group view

Parameter

None

Description

Use the stp loop-protection command to enable the loop guard function for a port or a group of ports.

Use the undo stp loop-protection command to restore default loop guard setting for a port of a group of ports.

By default, the loop guard function is disabled.

Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

Example

# Enable the loop guard function for port Ethernet 1/0/2.

<Sysname> system-view

[Sysname] interface Ethernet 1/0/2

[Sysname-Ethernet 1/0/2] stp loop-protection

1.1.17  stp max-hops

Syntax

stp max-hops hops

undo stp max-hops

View

System view

Parameter

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.

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

In the CIST and MSTIs, the maximum hops setting configured on the regional root bridge determines the maximum network diameter supported this the MST region. After a configuration BPDU leaves the root bridge, its hop count is decremented by 1 whenever it passes a device. When its hop count reaches 0, it will be discarded by the device that has received it. As a result, devices beyond the maximum hop count are unable to take part in spanning tree computing, and thereby the size of the MST region is limited.

When the current device becomes the root bridge of the CIST or an MSTI, the maximum hops setting configured on the device becomes the network diameter of that spanning tree and restricts the size of that spanning tree in the current MST region.

Devices other than the root bridge in an MST region use the maximum hops setting on the root bridge.

Example

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

<Sysname> system-view

[Sysname] stp max-hops 35

1.1.18  stp mcheck

Syntax

stp mcheck

View

System view, Ethernet port view

Parameter

None

Description

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

In a switched network, if a port on the device running MSTP (or RSTP) connects to a device running STP, this port will automatically migrate to the STP-compatible mode. However, if the device running STP is removed, this will not be able to migrate automatically to the MSTP (or RSTP) mode, but will remain working in the STP-compatible mode. In this case, you can perform an mCheck operation to force the port to migrate to the MSTP (or RSTP) mode.

Note that the stp mcheck command is meaningful only when the device works in the MSTP (or RSTP) mode, not in the STP-compatible mode.

Related command: stp mode.

Example

# Carry out mCheck on port Ethernet 1/0/1.

<Sysname> system-view

[Sysname] interface Ethernet 1/0/1

[Sysname- Ethernet 1/0/1] stp mcheck

1.1.19  stp no-agreement-check

Syntax

stp no-agreement-check

undo stp no-agreement-check

View

Ethernet port view, port group view

Parameter

None

Description

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

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

By default, No Agreement Check is disabled.

 

&  Note:

The No Agreement Check feature can only take effect on the root port or Alternate port after enabled.

 

Example

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

<Sysname> system-view

[Sysname] interface ethernet 1/1

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

1.1.20  stp mode

Syntax

stp mode { stp | rstp | mstp }

undo stp mode

View

System view

Parameter

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

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

mstp: Configures MSTP-compliant device to work in MSTP mode.

Description

Use the stp mode command to configure the MSTP work mode of the device.

Use the undo stp mode command to restore the MSTP work mode to the default setting.

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

Related command: stp mcheck and stp.

MSTP and RSTP can recognize each other’s protocol packets, so they are mutually compatible. However, STP is unable to recognize MSTP packets. For hybrid networking with legacy STP devices and full interoperability with RSTP-compliant devices, MSTP supports the three following work modes:

l           STP-compatible mode, devices operating in which sends STP BPDUs.

l           RSTP-compatible mode, devices operating in which sends RSTP BPDUs.

l           MSTP mode, devices operating in which sends out MSTP BPDUs. If a device operating in this detects that it is connected with a legacy STP device, the corresponding port on the former migrates to STP-compatible mode automatically.

Example

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

<Sysname> system-view

[Sysname] stp mode stp

1.1.21  stp pathcost-standard

Syntax

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

undo stp pathcost-standard

View

System view

Parameter

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 cost of the link connected with the device

Use the undo stp pathcost-standard command to restore the default setting of the calculation standard.

The default standard used by the device depends on the specific device model.

Note that if you change the standard that the device uses in calculating the default path cost, the port path cost value set through the stp cost command will be out of effect.

Table 1-4 Link speed vs. path cost

Link speed

Duplex state

802.1D-1998

IEEE 802.1t

Private standard

0

65535

200,000,000

200,000

10Mbps

Single Port

Aggregated Link 2 Ports

Aggregated Link 3 Ports

Aggregated Link 4 Ports

100

100

100

100

2,000,000

1,000,000

666,666

500,000

2,000

1,800

1,600

1,400

100Mbps

Single Port

Aggregated Link 2 Ports

Aggregated Link 3 Ports

Aggregated Link 4 Ports

19

19

19

19

200,000

100,000

66,666

50,000

200

180

160

140

1000Mbps

Single Port

Aggregated Link 2 Ports

Aggregated Link 3 Ports

Aggregated Link 4 Ports

4

4

4

4

20,000

10,000

6,666

5,000

20

18

16

14

10Gbps

Single Port

Aggregated Link 2 Ports

Aggregated Link 3 Ports

Aggregated Link 4 Ports

2

2

2

2

2,000

1,000

666

500

2

1

1

1

 

In the calculation of the path cost value of an aggregated link, 802.1D-1998 does not take into account the number of ports in the aggregated link. Whereas, 802.1T takes the number of ports in the aggregated link into account. The calculation formula 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 aggregated link.

Example

# 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

Cost configuration of every port will be reset and auto-calculation is available

 after changing current pathcost standard. Continue? [Y/N]y

 Cost of every port has been recalculated.

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

<Sysname> system-view

[Sysname] stp pathcost-standard dot1t

Cost configuration of every port will be reset and auto-calculation is available

 after changing current pathcost standard. Continue? [Y/N]

Before pressing ENTER you must choose 'YES' or 'NO'[Y/N]:y

 Cost of every port has been recalculated.

1.1.22  stp point-to-point

Syntax

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

undo stp point-to-point

View

Ethernet port view, port group view

Parameter

auto: Specifies MSTP detects automatically whether the current port connects to a point-to-point link.

force-false: Specifies the current port to connect to a non-point-to-point link.

force-true: Specifies the current port to connect to a point-to-point link.

Description

Use the stp point-to-point command to specify whether the current port connects to a point-to-point link.

Use the undo stp point-to-point command to restore the default status of the link connected with the current port.

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

Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

Note that:

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

l           If the current port is the master port of aggregated ports of 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 is effective to 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.

Example

# Configure port Ethernet 1/0/3 as connecting to a point-to-point link.

<Sysname> system-view

[Sysname] interface Ethernet 1/0/3

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

1.1.23  stp port priority

Syntax

stp [ instance instance-id ] port priority priority

undo stp [ instance instance-id ] port priority

View

Ethernet port view, port group view

Parameter

instance-id: MSTI ID, ranging from 0 to 15. A value of 0 specifies the CIST.

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 a port or a group or ports in the specified MSTI.

Use the undo stp port priority command to restore the default priority of a port or a group or ports in the specified MSTI.

By default, the port priority is 128.

Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

If you set instance-id to 0, you are setting the priority of the port in the CIST. The priority of a port can affect the role selection of the port in the specified MSTI.

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

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

If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.

Example

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

<Sysname> system-view

[Sysname] interface Ethernet 1/0/1

[Sysname- Ethernet 1/0/1] stp instance 2 port priority 16

1.1.24  stp priority

Syntax

stp [ instance instance-id ] priority priority

undo stp [ instance instance-id ] priority

View

System view

Parameter

instance-id: MSTI ID, ranging from 0 to 15. A value of 0 specifies the CIST.

priority: Port priority, in the range of 0 to 61440 at the step of 4096, namely you can set up to 16 priority values, such as 0, 4096, 8192…, on the device.

Description

Use the stp priority command to set the priority of the device in the specified MSTI.

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

By default, the device priority is 32768.

The device priority is involved in spanning tree computing. The device priority is set on a per-instance basis. An MSTP-compliant device can have different priorities in different MSTIs.

If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.

Example

# Set the device priority in MSTI 1 to 4096.

<Sysname> system-view

[Sysname] stp instance 1 priority 4096

1.1.25  stp region-configuration

Syntax

stp region-configuration

undo stp region-configuration

View

System view

Parameter

None

Description

Use the stp region-configuration command to enter MST region view.

Use the undo stp region-configuration command to restore the default MST region configurations.

By default, the default settings are used for all the three MST region parameters. Namely, the device’s MST region name is the device’s MAC address, all VLANs are mapped to the CIST, and the MSTP revision level is 0.

After you enter MST region view, you can configure the parameters related the MST region, including the region name, VLAN-to-instance mapping and revision level.

Example

# Enter MST region view.

<Sysname> system-view

[Sysname] stp region-configuration

[Sysname-mst-region]

1.1.26  stp root primary

Syntax

stp [ instance instance-id ] root primary [ bridge-diameter bridge-number ] [ hello-time centi-seconds ]

undo stp [ instance instance-id ] root

View

System view

Parameter

instance-id: MSTI ID, ranging from 0 to 15. A value of 0 specifies the CIST.

bridge-number: Network diameter of the spanning tree, in the range of 2 to 7 and defaulting to 7.

centi-seconds: Hello time (in centiseconds) of the spanning tree, in the range of 100 to 1,000.

Description

Use the stp root primary command to specify the current device as the root bridge of the specified MSTI.

Use the undo stp root command to remove the current device as the root bridge of the specified MSTI.

If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.

By default, a device is not a root bridge.

You can specify a root bridge for each MSTI without caring about the device priority.

When configuration a root bridge, you can use this command to specify the network diameter of the switched network, so that the MSTP-compliant device automatically calculates the three timers (hello time, forward delay and max age). As the calculated hello time value is not the optimal value, you can specify a hello time value by providing hello-time centi-seconds in the command, which will override the hello time value calculated by the device based on the network diameter. Generally, we recommend that you use the values of the other two timers calculated by the device based the specified network diameter.

The configured network diameter and hello time settings are effective only for MSTI 0, namely the CIST. If you configure these two timers for any other instance, your configuration can succeed, but they will not actually work.

 

  Caution:

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

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

 

Example

# Define the current device as the root bridge of MSTI 0 and set the network diameter to 4 and the hello time of the device to 500 centiseconds.

<Sysname> system-view

[Sysname] stp instance 0 root primary bridge-diameter 4 hello-time 500

1.1.27  stp root secondary

Syntax

stp [ instance instance-id ] root secondary [ bridge-diameter bridge-number ] [ hello-time centi-seconds ]

undo stp [ instance instance-id ] root

View

System view

Parameter

instance-id: MSTI ID, ranging from 0 to 15. A value of 0 specifies the CIST.

bridge-number: Network diameter of the spanning tree, in the range of 2 to 7 and defaulting to 7.

centi-seconds: Hello time (in centiseconds) of the spanning tree, in the range of 100 to 1,000.

Description

Use the stp root secondary command to specify the current device as a secondary root bridge of the specified MSTI.

Use the undo stp root command to remove the current device as a secondary root bridge of the specified MSTI.

If you do not provide instance instance-id, your configuration will take effect in the CIST instance only.

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

You can configure one or more secondary root bridges for each MSTI. When the root bridge of an instance fails or is shut down, the secondary root bridge can take over the role of the instance of the specified MSTI. If you specify more than one secondary root bridge, the secondary root bridge with the lowest Mac address will become the root bridge.

When configuration a secondary root bridge, you can specify the network diameter of the switched network and the hello time for the secondary root bridge, so that the MSTP-compliant device automatically calculates the other two timers (forward delay and max age) of the root bridge.

The configured network diameter and hello time settings are effective only for MSTI 0, namely the CIST. If you configure these two timers for any other instance, your configuration can succeed, but they will not actually work.

If you set instance-id to 0, you are specifying the current device as the secondary root bridge of the CIST. You can configure one or more secondary root bridges for an MSTI.

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

Example

# Define the current device as the secondary root bridge of MSTI 0 and set the network diameter to 5 and the hello time of the device to 300 centiseconds.

<Sysname> system-view

[Sysname] stp instance 0 root secondary bridge-diameter 5 hello-time 300

1.1.28  stp root-protection

Syntax

stp root-protection

undo stp root-protection

View

Ethernet port view, port group view

Parameter

None

Description

Use the stp root-protection command to enable the root guard function for a port or a group of ports.

Use the undo stp root-protection command to restore default setting of the root guard function for the port(s).

By default, the root guard function is disabled.

Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

Example

# Enable the root guard function for port Ethernet 1/0/1.

<Sysname> system-view

[Sysname] interface Ethernet 1/0/1

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

1.1.29  stp tc-protection

Syntax

stp tc-protection enable

stp tc-protection disable

View

System view

Parameter

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.

Example

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

<Sysname> system-view

[Sysname] stp tc-protection enable

1.1.30  stp timer forward-delay

Syntax

stp timer forward-delay centi-seconds

undo stp timer forward-delay

View

System view

Parameter

centi-seconds: Forward delay in centiseconds, in the range of 400 to 3,000.

Description

Use the stp timer forward-delay command to set the forward delay timer of the device.

Use the undo stp timer forward-delay command to restore the forward delay timer of the device to the default setting.

By default, the forward delay timer is set to 1,500 centiseconds.

In order to prevent temporary loops, a port must go through an intermediate state, the learning state, before it transitions from the discarding state to the forwarding state, and must wait a certain period of time before it transitions from one state to another to keep synchronized with the remote device during state transition. The forward delay timer set on the root bridge determines the time interval of state transition.

If the current device is the root bridge, the state transition interval of the device depends on the set forward delay value; for a secondary root bridge, its state transition interval is determined by the forward delay timer set on the root bridge.

The setting of the hello time, forward delay and max age timers must meet the following formulae.

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

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

MSTP can work effectively on the entire network only when the above-mentioned conditions are met; otherwise, network instability will frequently occur. We recommend that you specify the network diameter of the switched network in the stp root primary command and let MSTP automatically calculate an optimal setting of these three timers.

Related command: stp timer hello, stp timer max-age, and stp bridge-diameter.

Example

# Set the forward delay timer of the device to 2,000 centiseconds.

<Sysname> system-view

[Sysname] stp timer forward-delay 2000

1.1.31  stp timer hello

Syntax

stp timer hello centi-seconds

undo stp timer hello

View

System view

Parameter

centi-seconds: Hello time (in centiseconds), in the range of 100 to 1,000.

Description

Use the stp timer hello command to set the hello time of the device.

Use the undo stp timer hello command to restore the hello time of the device to the default setting.

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

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

The setting of the hello time, forward delay and max age timers must meet the following formulae.

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

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

MSTP can work effectively on the entire network only when the above-mentioned conditions are met; otherwise, network instability will frequently occur. We recommend that you specify the network diameter of the switched network in the stp root primary command and let MSTP automatically calculate an optimal setting of these three timers.

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

Example

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

<Sysname> system-view

[Sysname] stp timer hello 400

1.1.32  stp timer max-age

Syntax

stp timer max-age centi-seconds

undo stp timer max-age

View

System view

Parameter

centi-seconds: Max age (in centiseconds), in the range of 600 to 4,000.

Description

Use the stp timer max-age command to set the max age timer of the device.

Use the undo stp timer max-age command to restore the max age timer of the device to the default setting.

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

MSTP can detect link faults and automatically restore the forwarding state of the redundant link. In the CIST, the device determines whether a configuration BPDU received on a port has expired based on the max age timer. If a port receives a configuration BPDU that has expired, that MSTI needs to re-computed.

The max age timer is not meaningful for MSTIs. If the current device is the root bridge of the CIST, it determines whether a configuration BPDUs has expired based on the configured max age timer; if the current device is not the root bridge of the CIST, it uses the max age timer set on the CIST root bridge.

The setting of the hello time, forward delay and max age timers must meet the following formulae.

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

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

MSTP can work effectively on the entire network only when the above-mentioned conditions are met; otherwise, network instability will frequently occur. We recommend that you specify the network diameter in the stp root primary command and let MSTP automatically calculate an optimal setting of these three timers.

Related command: stp timer forward-delay, stp timer hello, and stp bridge-diameter.

Example

# Set the max age timer of the device to 1,000 centiseconds.

<Sysname> system-view

[Sysname] stp timer max-age 1000

1.1.33  stp timer-factor

Syntax

stp timer-factor number

undo stp timer-factor

View

System view

Parameter

number: Timeout factor, in the range of 1 to 10.

Description

Use the stp timer-factor command to configure the timeout time of the device by setting the timeout factor. Timeout time = timeout factor × 3 × hello time.

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

By default, the timeout factor of the device is set to 3.

A device sends a BPDU to the devices around it at a regular 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 computing process.

In a very stable network, this kind of spanning tree computing may occur because the upstream device is busy. In this case, you can avoid such unwanted spanning tree computing by lengthening the timeout time (by setting the timeout factor to 4 or more). We recommend that you set the timeout factor to 5, or 6, or 7 for a stable network.

Example

# Set the timeout factor of the device to 7.

<Sysname> system-view

[Sysname] stp timer-factor 7

1.1.34  stp transmit-limit

Syntax

stp transmit-limit packet-number

undo stp transmit-limit

View

Ethernet port view, port group view

Parameter

packet-number: Maximum number of MSTP packets that the port can send within each hello time, namely the maximum transmission rate of the port, in the range of 1 to 255.

Description

Use the stp transmit-limit command to set the maximum number of configuration BPDUs (namely, the maximum transmission rate) that can be transmitted by a port within the Hello time.

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

By default, the maximum transmission rate of a port is 10.

Configured in Ethernet port view, the setting is effective on the current port only; configured in port group view, the setting is effective on all ports in the port group.

A larger maximum transmission rate value means more MSTP packets are sent within each Hello time, but this also means that more device resources are used. An appropriate maximum transmission rate setting can prevent MSTP from using an excessive bandwidth resource during network topology instability.

Example

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

<Sysname> system-view

[Sysname] interface Ethernet 1/0/1

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

1.1.35  vlan-mapping modulo

Syntax

vlan-mapping modulo modulo

View

MST region view

Parameter

modulo: Modulo value, ranging from 1 to 15.

Description

Use the vlan-mapping modulo command to map the specified VLAN list to the specified MSTI.

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

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

 

&  Note:

By carrying out the vlan-mapping modulo command, you can quickly specify a VLAN for each MSTI. 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 16, for example, then VLAN 1 will be mapped to MSTI 1, VLAN 2 to MSTI 2, VLAN 16 to MSTI 16, VLAN 17 to MSTI 1, and so on.

 

Related command: region-name, revision-level, check region-configuration, and active region-configuration.

Example

# Map VLANs to MSTIs as per the modulo value of 15.

<Sysname> system-view

[Sysname] stp region-configuration

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

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
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
新华三官网