10-MSTP Command

Download

Table of Contents

Chapter 1 MSTP Configuration Commands. 1-1

1.1 MSTP Configuration Commands. 1-1

1.1.1 active region-configuration. 1-1

1.1.2 check region-configuration. 1-2

1.1.3 display stp. 1-3

1.1.4 display stp region-configuration. 1-5

1.1.5 instance. 1-6

1.1.6 region-name. 1-7

1.1.7 reset stp. 1-8

1.1.8 revision-level 1-8

1.1.9 stp. 1-9

1.1.10 stp bpdu-protection. 1-10

1.1.11 stp bridge-diameter 1-11

1.1.12 stp compliance. 1-12

1.1.13 stp config-digest-snooping. 1-13

1.1.14 stp cost 1-14

1.1.15 stp edged-port 1-15

1.1.16 stp interface. 1-17

1.1.17 stp interface compliance. 1-18

1.1.18 stp interface config-digest-snooping. 1-19

1.1.19 stp interface cost 1-20

1.1.20 stp interface edged-port 1-21

1.1.21 stp interface loop-protection. 1-23

1.1.22 stp interface mcheck. 1-24

1.1.23 stp interface no-agreement-check. 1-24

1.1.24 stp interface point-to-point 1-25

1.1.25 stp interface port priority. 1-27

1.1.26 stp interface root-protection. 1-28

1.1.27 stp interface transmit-limit 1-29

1.1.28 stp loop-protection. 1-30

1.1.29 stp max-hops. 1-30

1.1.30 stp mcheck. 1-31

1.1.31 stp mode. 1-32

1.1.32 stp no-agreement-check. 1-33

1.1.33 stp pathcost-standard. 1-34

1.1.34 stp point-to-point 1-36

1.1.35 stp port priority. 1-37

1.1.36 stp priority. 1-38

1.1.37 stp region-configuration. 1-39

1.1.38 stp root primary. 1-39

1.1.39 stp root secondary. 1-41

1.1.40 stp root-protection. 1-42

1.1.41 stp tc-protection. 1-43

1.1.42 stp tc-protection threshold. 1-44

1.1.43 stp timer forward-delay. 1-45

1.1.44 stp timer hello. 1-46

1.1.45 stp timer max-age. 1-47

1.1.46 stp timer-factor 1-48

1.1.47 stp transmit-limit 1-49

1.1.48 vlan-mapping modulo. 1-49

1.1.49 vlan-vpn tunnel 1-50

 


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 the settings of an MST (multiple spanning tree) region.

Configuring MST region-related parameters (especially the VLAN mapping table) result in spanning trees being regenerated. To reduce network topology jitter caused by the configuration, MSTP (multiple spanning tree protocol) does not regenerate spanning trees immediately after the configuration; it does this only after you activate the new MST region-related settings or enable MSTP, and then the new settings can really take effect.

This command causes the switch to operate with the new MST region-related settings you configured and spanning trees to be regenerated.

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

Example

# Activate the MST region-related settings.

<H3C> system-view

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

[H3C] stp region-configuration

[H3C-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 display the current MST region configuration (maybe inactivated), including region name, revision level, and VLAN mapping table.

MSTP-enabled switches are in the same region only when they have the same MST region-related configuration. A switch cannot be in a respected region if any one of the above three MST region-related settings does not be consistent with that of another switch in the region.

You can use this command to find the MST region the switch currently belongs to or check to see whether or not the MST region-related configuration is correct.

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

Example

# Display the MST region configuration of the current switch.

<H3C> system-view

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

[H3C] stp region-configuration

[H3C-mst-region] check region-configuration

Admin Configuration

   Format selector :0

   Region name     :000fe20f1234

   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

The selector specified by MSTP

Region name

The name of the MST region

Revision level

The revision level of the MST region

Instance   Vlans Mapped

Spanning tree instance-to-VLAN 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: ID of the spanning tree instance ranging from 0 to 16. A value of 0 specifies the common and internal spanning tree (CIST).

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

slot slot-number: Specifies a slot, whose STP (spanning tree protocol) information is to be displayed.

brief: Displays only port state and protection measures taken on the port.

Description

Use the display stp command to display the state and statistical information about one or all spanning trees.

The state and statistical information about MSTP can be used to analyze and maintain the topology of a network. It also can be used to make MSTP operating properly.

If neither spanning tree instance nor port list is specified, the command displays spanning tree information about all spanning tree instances on all ports in order of port number. If only a spanning tree instance is specified, the command displays information about the specified spanning tree instance on all ports in order of port number. If only a port list is specified, the command displays information about all spanning tree instances on these ports in order of port number. And if both a spanning tree instance and a port list are specified, the command displays spanning tree information about the specified spanning tree instance and the specified ports in order of spanning tree instance ID.

MSTP state information includes:

l           Global CIST parameters: Protocol operation mode, switch priority in the CIST instance, MAC address, Hello time, Max age, Forward delay, Max hops, the common root of the CIST, the external path cost for the switch to reach the CIST common root, region root, the internal path cost for the switch to reach the region root, CIST root port of the switch, the state of the BPDU (bridge protocol data unit) protection function (enabled or disabled), and the state of the digest snooping feature (enabled or disabled).

l           CIST port parameters: Port protocol, port role, port priority, path cost, designated bridge, designated port, edge port/non-edge port, whether or not the link on the port is a point-to-point link, the maximum transmitting speed, type of the enabled protection function, state of the digest snooping feature (enabled or disabled), VLAN mappings, Hello time, Max age, Forward delay, Message-age time, and Remaining-hops.

l           Global MSTI parameters: MSTI instance ID, bridge priority of the instance, region root, internal path cost, MSTI root port, and master bridge.

l           MSTI port parameters: Port state, role, priority, path cost, designated bridge, designated port, and Remaining Hops.

The statistical information includes: the numbers of the TCN BPDUs, the configuration BPDUs, the RST BPDUs, and the MST BPDUs transmitted/received by each port.

Related command: reset stp.

Example

# Display the state and statistical information about a spanning tree.

<H3C> 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         ALTE  DISCARDING      LOOP

   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

The ID of a spanning tree instance in the MST region

Port

Port index

Role

Port role

STP State

STP state on the port, which can be forwarding and discarding.

Protection

Protection type on the port

 

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 display the activated MST region configuration, including the region name, region revision level, and spanning tree instance-to-VLAN mappings configured for the switch.

Related command: stp region-configuration.

Example

# Display the activated MST region configuration.

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

The selector specified by MSTP

Region name

The name of the MST region

Revision level

The revision level of the MST region

Instance   Vlans Mapped

Spanning tree instance-to-VLAN 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: ID of a spanning tree instance ranging from 0 to 16. A value of 0 specifies the CIST.

vlan-list: List of VLANs. You need to provide this argument in the form of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where &<1-10> means that you can provide up to 10 VLAN IDs/VLAN ID ranges for this argument. Normally, a VLAN ID can be a number ranging from 1 to 4094. VLANs with their IDs beyond this range (if the switch supports this kind VLAN IDs), such as VLAN 4095, VLAN 4096, can only be mapped to the CIST (spanning tree instance 0).

Description

Use the instance command to map specified VLANs to a specified spanning tree instance.

Use the undo instance command to remove the mappings from the specified VLANs to the specified spanning tree instance and remap the specified VLANs to the CIST (spanning tree instance 0). If you specify no VLAN in the undo instance command, all VLANs that are mapped to the specified spanning tree instance are remapped to the CIST.

By default, all VLANs are mapped to the CIST.

VLAN-to-spanning tree instance mappings are recorded in the VLAN mapping table of an MSTP switch. So these two commands are actually used to manipulate the VLAN mapping table. You can add/remove a VLAN to/from the VLAN mapping table of a specific spanning tree instance by using these two commands.

Note that a VLAN cannot be mapped to multiple spanning tree instances at the same time. A VLAN-to-spanning tree instance mapping is automatically removed if you map the VLAN to another spanning tree instance.

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

Example

# Map VLAN 2 to spanning tree instance 1.

<H3C> system-view

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

[H3C] stp region-configuration

[H3C-mst-region] instance 1 vlan 2

1.1.6  region-name

Syntax

region-name name

undo region-name

View

MST region view

Parameter

name: MST region name to be set for the switch, a string of 1 to 32 characters.

Description

Use the region-name command to set an MST region name for a switch.

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

The default MST region name of a switch is its MAC address.

MST region name, along with VLAN mapping table and MSTP revision level, determines the MST region which a switch 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 switch to “hello”.

<H3C> system-view

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

[H3C] stp region-configuration

[H3C-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 by providing this argument in the form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>, where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.

Description

Use the reset stp command to clear spanning tree-related statistics on Ethernet ports.

The spanning tree statistics include the numbers of the TCN BPDUs, configuration BPDUs, RST BPDUs, and MST BPDUs sent/received through one or more specified ports or all ports (note that STP BPDUs and TCN BPDUs are counted only for CISTs.)

This command clears the spanning tree-related statistics on specified ports if you specify the interface-list argument. If you do not specify the interface-list argument, this command clears the spanning tree-related statistics on all ports.

Related command: display stp.

Example

# Clear the spanning tree-related statistics on ports Ethernet1/0/1 to Ethernet1/0/3.

<H3C> 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 to be set for the switch. This argument ranges from 0 to 65,535 and defaults to 0.

Description

Use the revision-level command to set the MSTP revision level for a switch.

Use the undo revision-level command to revert to the default revision level.

MSTP revision level, along with MST region name and VLAN mapping table, determines the MST region which a switch 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.

<H3C> system-view

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

[H3C] stp region-configuration

[H3C-mst-region] revision-level 5

1.1.9  stp

Syntax

stp { enable | disable }

undo stp

View

System view, Ethernet port view

Parameter

enable: Enables MSTP globally or on a port.

disable: Disables MSTP globally or on a port.

Description

Use the stp command to enable/disable MSTP globally or on a port.

Use the undo stp command to revert to the default MSTP state globally or on a port.

By default, MSTP is disabled.

After you enable MSTP, the switch determines whether to operate in STP/RSTP (rapid spanning tree protocol) mode or in MSTP mode according to the customized protocol mode. A switch becomes a transparent bridge if MSTP is disabled.

After being enabled, MSTP maintains spanning trees by processing configuration BPDUs of different VLANs. After being disabled, it stops maintaining spanning trees.

Related command: stp mode, and stp interface.

Example

# Enable MSTP globally.

<H3C> system-view

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

[H3C] stp enable

# Disable MSTP on Ethernet1/0/1 port.

<H3C> system-view

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

[H3C] interface ethernet 1/0/1

[H3C-Ethernet1/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 protection function.

Use the undo stp bpdu-protection command to revert to the default state of the BPDU protection function.

By default, the BPDU protection function is disabled.

Normally, the access ports of the devices operating on the access layer directly connect to terminals (such as PCs) or file servers. These ports are usually configured as edge ports to achieve rapid transition. But they resume non-edge ports automatically upon receiving configuration BPDUs, which causes spanning trees regeneration and network topology jitter.

Normally, no configuration BPDU will reach edge ports. But malicious users can attack a network by sending configuration BPDUs deliberately to edge ports to cause network jitter. You can prevent this type of attacks by utilizing the BPDU protection function. With this function enabled on a switch, the switch shuts down the edge ports that receive configuration BPDUs and then reports these cases to the administrator. If a port is shut down, only the administrator can restore it.

 

  Caution:

The BPDU protection function does not take effect on the Gigabit ports that cannot be shut down.

 

Example

# Enable the BPDU protection function.

<H3C> system-view

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

[H3C] stp bpdu-protection

1.1.11  stp bridge-diameter

Syntax

stp bridge-diameter bridgenum

undo stp bridge-diameter

View

System view

Parameter

bridgenum: Network diameter to be set for a switched network. This argument ranges from 2 to 7 and defaults to 7.

Description

Use the stp bridge-diameter command to set the network diameter of a switched network. The network diameter of a switched network is represented by the maximum possible number of switches between any two terminals in a switched network.

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

After you configure the network diameter of a switched network, MSTP adjusts its Hello time, Forward delay, and Max age settings accordingly. With the network diameter set to 7 (the default), the three time-relate settings, Hello time, Forward delay, and Max age, are set to their defaults as well.

The stp bridge-diameter command only applies to CIST; it is invalid for MSTIs.

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

Example

# Set the network diameter to 5.

<H3C> system-view

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

[H3C] stp bridge-diameter 5

1.1.12  stp compliance

Syntax

stp compliance { auto | legacy | dot1s }

undo stp compliance

View

Ethernet port view

Parameter

auto: Sets the MSTP packet format as auto.

legacy: Sets the MSTP packet format as legacy.

dot1s: Sets the MSTP packet format as dot1s.

Description

Use the stp compliance command to set the MSTP packet format of a port.

Use the undo stp compliance command to restore the default MSTP packet format.

By default, the MSTP packet format is legacy.

l           With the MSTP packet format set to auto, the port automatically determines the format of the packets to be transmitted according to that of the received MSTP packets. If the format of the received packets changes repeatedly, MSTP will shut down the corresponding port to prevent network storm. A port shut down in this way can only be enabled again by the network administrator.

l           With the MSTP packet format set to legacy, the port only processes and transmits MSTP packets in legacy format. If packets in dot1s format are received, the corresponding ports are set as discarding ports to prevent network storm.

l           With the MSTP packet format set to dot1s, the port only processes and transmits MSTP packets in dot1s format. If packets in legacy format are received, the corresponding ports are set as discarding ports to prevent network storm.

l           All the ports in an aggregation group use the same MSTP packet format.

Example

# Configure MSTP packet format as dot1s (802.1s).

<H3C> system-view

Enter system view, return to user view with Ctrl+Z.

[H3C] interface Ethernet1/0/1

[H3C-Ethernet1/0/1] stp compliance dot1s

# Restore the default MSTP packet format.

[H3C-Ethernet1/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

Parameter

None

Description

Use the stp config-digest-snooping command to enable the digest snooping feature.

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

The digest snooping feature is disabled by default.

According to IEEE 802.1s, two connected switches can interwork with each other through MSTIs in an MST region only when the two switches have the same MST region-related configuration. With MSTP employed, interconnected switches determine whether or not they are in the same MST region by checking the configuration IDs of the BPDUs between them. (A configuration ID contains information such as region ID and configuration digest.)

As some partners' switches adopt proprietary spanning tree protocols, they cannot interwork with other switches in an MST region even if they are configured with the same MST region-related settings as other switches in the MST region.

This kind of problems can be overcome by implementing the digest snooping feature. If a switch port is connected to a partner's switch that has the same MST region-related settings but adopts a proprietary spanning tree protocol, you can enable digest snooping on the port. Then the switch regards the peer switch connected to the port as in the same region and records the configuration digests carried in the BPDUs received from the switch, which will be put in the BPDUs to be send to the peer switch.. In this way, the switch can interwork with the partners' switches in an MST region.

 

&  Note:

l      When the digest snooping feature is enabled on a port, the port state turns to the discarding state. That is, the port will not send BPDU packets. The port is not involved in the STP calculation until it receives BPDU packets from the peer port.

l      The digest snooping feature is needed only when your S3100-SI series switch is connected to partner's proprietary protocol-adopted switches.

l      To enable the digest snooping feature successfully, you must first enable it on all the switch ports that connect to partner's proprietary protocol-adopted switches and then enable it globally.

l      To enable the digest snooping feature, the interconnected switches must be configured with exactly the same MST settings.

l      The digest snooping feature must be enabled on all the switch ports that connect to partners' proprietary protocol-adopted switches in the same MST region..

l      Do not enable the digest snooping feature on the edge ports in an MST region.

l      To change MST region-related configuration, be sure to disable the digest snooping feature first to prevent possible broadcast storms.

l      The digest snooping function is not applicable to edge ports.

 

Example

# Enable the digest snooping feature for Ethernet1/0/1 port.

<H3C> system-view

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

[H3C] interface Ethernet1/0/1

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

[H3C-Ethernet1/0/1] quit

[H3C]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

Parameter

instance-id: ID of a spanning tree instance ranging from 0 to 16. A value of 0 specifies the CIST.

cost: Path cost to be set for the port. This argument ranges from 1 to 200,000,000.

Description

Use the stp cost command to set the path cost of the current port in a specified spanning tree instance.

Use the undo stp cost command to revert to the default path cost of the current port in the specified spanning tree instance.

By default, a switch automatically calculates the path costs of a port in different spanning tree instances based on a specified standard.

If you specify the instance-id argument to be 0 or do not specify this argument, the stp cost command sets the path cost of the port on CIST.

The path costs of a port in spanning tree instances affect the roles of the ports in the spanning tree instances. By configuring different path costs for the same port in different MSTIs, you can make flows of different VLANs traveling along different physical links, so as to achieve VLAN-based load balancing. Changing the path cost of a port in a spanning tree instance may change the role of the port in the instance and put it in state transition.

Related command: stp interface cost.

Example

# Set the path cost of Ethernet1/0/3 port in spanning tree instance 2 to 200.

<H3C> system-view

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

[H3C] interface ethernet1/0/3

[H3C-Ethernet1/0/3] 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

Parameter

enable: Configures the current Ethernet port as an edge port.

disable: Configures the current Ethernet port as a non-edge port.

Description

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

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

Use the undo stp edged-port command to restore the current Ethernet port to its default state.

By default, all Ethernet ports of a switch are non-edge ports.

An edge port is a port that is directly connected to a user terminal instead of another switch or a network segment. Rapid transition is applied to edge ports because, on these ports, no loops can be incurred by network topology changes. You can enable a port to transit to the forwarding state rapidly by setting it to an edge port. And you are recommended to configure the Ethernet ports directly connected to user terminals as edge ports to enable them to transit to the forwarding state rapidly.

Normally, configuration BPDUs cannot reach an edge port because the port is not connected to another switch. But when the BPDU protection function is disabled on an edge port, configuration BPDUs sent deliberately by a malicious user may reach the port. If an edge port receives a BPDU, it turns to a non-edge port.

Related command: stp interface edged-port.

 

  Caution:

Among loop prevention function, root protection function and edge port setting, only one can be valid on the same port.

 

Example

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

<H3C> system-view

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

[H3C] interface ethernet1/0/1

[H3C-Ethernet1/0/1] stp edged-port disable

1.1.16  stp interface

Syntax

stp interface interface-list { enable | disable }

View

System view

Parameter

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

enable: Enables MSTP on the specified ports.

disable: Disables MSTP on the specified ports.

Description

Use the stp interface command to enable or disable MSTP on specified ports in system view.

By default, MSTP is enabled on the ports of a switch if MSTP is globally enabled on the switch, and is disabled on the ports if MSTP is globally disabled.

An MSTP-disabled port does not participate in any calculation of spanning tree and is always in forwarding state.

 

  Caution:

Disabling MSTP on ports may result in loops.

 

Related command: stp mode, stp.

Example

# Enable MSTP on Ethernet1/0/1 port in system view.

<H3C> system-view

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

[H3C] stp interface Ethernet 1/0/1 enable

1.1.17  stp interface compliance

Syntax

stp interface interface-list compliance { auto | legacy | dot1s }

undo stp interface interface-list compliance

View

System view

Parameter

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

auto: Sets the MSTP packet format as auto.

legacy: Sets the MSTP packet format as legacy.

dot1s: Sets the MSTP packet format as dot1s.

Description

Use the stp interface compliance command to set the MSTP packet format of a port.

Use the undo stp interface compliance command to restore the default MSTP packet format.

By default, the MSTP packet format is legacy.

l           With the MSTP packet format set to auto, the port automatically determines the format of the packets to be transmitted according to that of the received MSTP packets. If the format of the received packets changes repeatedly, MSTP will shut down the corresponding port to prevent network storm. A port shut down in this way can only be enabled again by the network administrator.

l           With the MSTP packet format set to legacy, the port only processes and transmits MSTP packets in legacy format. If packets in dot1s format are received, the corresponding ports are set as discarding ports to prevent network storm.

l           With the MSTP packet format set to dot1s, the port only processes and transmits MSTP packets in dot1s format. If packets in legacy format are received, the corresponding ports are set as discarding ports to prevent network storm.

l           All the ports in an aggregation group use the same MSTP packet format.

Example

# Configure MSTP packet format on Ethernet1/0/1 as dot1s (802.1s).

<H3C> system-view

Enter system view, return to user view with Ctrl+Z.

[H3C] stp interface Ethernet1/0/1 compliance dot1s

# Restore the default MSTP packet format.

[H3C-Ethernet1/0/1] undo stp compliance

1.1.18  stp interface config-digest-snooping

Syntax

stp interface interface-list config-digest-snooping

undo stp interface interface-list config-digest-snooping

View

System view

Parameter

None

Description

Use the stp interface config-digest-snooping command to enable the digest snooping feature.

Use the undo stp interface config-digest-snooping command to disable the digest snooping feature.

By default, the digest snooping feature is disabled.

According to IEEE 802.1s, two interconnected MSTP switches can interwork with each other through MSTIs in an MST region only when the two switches have the same MST region-related configuration. Interconnected MSTP switches determine whether or not they are in the same MST region by checking the configuration IDs of the BPDUs between them. (A configuration ID contains information such as region ID and configuration digest.)

As some partners' switches adopt proprietary spanning tree protocols, they cannot interwork with other switches in an MST region even if they are configured with the same MST region-related settings as other switches in the MST region.

This problem can be overcome by implementing the digest snooping feature. If a port on a S3100-SI series switch is connected to a partner's switch that has the same MST region-related settings as its own but adopts a proprietary spanning tree protocol, you can enable digest snooping on the port. Then the S3100-SI switch regards the partner's switch as in the same region; it records the configuration digests carried in the BPDUs received from the partner's switch, and put them in the BPDUs to be send to the partner's switch.. In this way, the S3100-SI switches can interwork with the partners' switches in the same MST region.

 

&  Note:

l      When the digest snooping feature is enabled on a port, the port state turns to the discarding state. That is, the port will not send BPDU packets. The port is not involved in the STP calculation until it receives BPDU packets from the peer port.

l      The digest snooping feature is needed only when your S3100-SI series switch is connected to partner's proprietary protocol-adopted switches.

l      To enable the digest snooping feature successfully, you must first enable it on all the ports of your S3100-SI series switch that are connected to partner's proprietary protocol-adopted switches and then enable it globally.

l      To enable the digest snooping feature, the interconnected switches must be configured with exactly the same MST region-related configuration.

l      The digest snooping feature must be enabled on all the ports of your S3100-SI switch that are connected to partners' proprietary protocol-adopted switches in the same MST region.

l      Do not enable the digest snooping feature on the edge ports of an MST region.

l      To change MST region-related configuration, be sure to disable the digest snooping feature first to prevent possible broadcast storms.

l      The digest snooping function is not applicable to edge ports.

 

Example

# Enable the digest snooping feature on GigabitEthernet1/0/1 port in system view.

<H3C> system-view

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

[H3C] stp interface GigabitEthernet 1/0/1 config-digest-snooping

1.1.19  stp interface cost

Syntax

stp interface interface-list [ instance instance-id ] cost cost

undo stp interface interface-list [ instance instance-id ] cost

View

System view

Parameter

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

instance-id: Spanning tree instance ID ranging from 0 to 16. A value of 0 specifies the CIST.

cost: Port path cost to be set. This argument ranges from 1 to 200,000,000.

Description

Use the stp interface cost command to set the path cost(s) of the specified port(s) in a specified spanning tree instance in system view.

Use the undo stp interface cost command to revert to the default path cost(s) of the specified port(s) in the specified spanning tree instance in system view.

By default, a switch automatically calculates the path costs of a port in different spanning tree instances based on a specified standard.

If you specify the instance-id argument to be 0 or do not specify this argument, the stp interface cost command sets the path cost(s) of the specified port(s) in the CIST.

The path costs of a port in spanning tree instances affect the roles of the ports in the spanning tree instances. By configuring different path costs for the same port in different MSTIs, you can make flows of different VLANs traveling along different physical links, so as to achieve VLAN-based load balancing. Changing the path cost of a port in a spanning tree instance may change the role of the port in the instance and put it in state transition.

The default port path cost differs with port speed. Refer to Table 1-4 for details.

Related command: stp cost.

Example

# Set the path cost of Ethernet1/0/3 port in spanning tree instance 2 to 400 in system view.

<H3C> system-view

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

[H3C] stp instance 2 interface Ethernet 1/0/3 cost 400

1.1.20  stp interface edged-port

Syntax

stp interface interface-list edged-port { enable | disable }

undo stp interface interface-list edged-port

View

System view

Parameter

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

enable: Configures the specified Ethernet ports to be edge ports.

disable: Configures the specified Ethernet ports to be non-edge ports.

Description

Use the stp interface edged-port enable command to configure the specified Ethernet port(s) as edge ports in system view.

Use the stp interface edged-port disable command to configure the specified Ethernet port(s) as non-edge ports in system view.

Use the undo stp interface edged-port command to restore the specified Ethernet port(s) to their default states.

By default, all Ethernet ports of a switch are non-edge ports.

An edge port is a port that is directly connected to a user terminal instead of another switch or a network segment. Rapid transition is applied to edge ports because, on these ports, no loops can be incurred by network topology changes. You can enable a port to transit to the forwarding state rapidly by setting it to an edge port. And you are recommended to configure the Ethernet ports directly connected to user terminals as edge ports to enable them to transit to the forwarding state rapidly.

Normally, configuration BPDUs cannot reach an edge port because the port is not connected to another switch. But when the BPDU protection function is disabled on an edge port, configuration BPDUs sent deliberately by a malicious user may reach the port. If an edge port receives a BPDU, it turns to a non-edge port.

Related command: stp edged-port.

 

  Caution:

Among loop prevention function, root protection function and edge port setting, only one can be valid on the same port.

 

Example

# Configure Ethernet1/0/3 port as an edge port in system view.

<H3C> system-view

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

[H3C] stp interface Ethernet 1/0/3 edged-port enable

1.1.21  stp interface loop-protection

Syntax

stp interface interface-list loop-protection

undo stp interface interface-list loop-protection

View

System view

Parameter

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

Description

Use the stp interface loop-protection command to enable the loop prevention function in system view.

Use the undo stp interface loop-protection command to revert to the default state of the loop prevention function in system view.

The loop prevention function is disabled by default.

Related command: stp loop-protection.

 

  Caution:

Among loop prevention function, root protection function and edge port setting, only one can be valid on the same port.

 

Example

# Enable the loop prevention function on Ethernet1/0/1 port.

<H3C> system-view

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

[H3C] stp interface Ethernet 1/0/1 loop-protection

1.1.22  stp interface mcheck

Syntax

stp [ interface interface-list ] mcheck

View

System view

Parameter

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

Description

Use the stp interface mcheck command to perform the mCheck operation on specified port(s) in system view.

A port on an MSTP-enabled switch toggles to the STP/RSTP mode automatically if an STP-/RSTP-enabled switch is connected to it. But when the STP-/RSTP-enabled switch is disconnected from the port, the port cannot toggle back to the MSTP mode automatically. In this case, you can force the port to toggle to the MSTP mode by performing the mCheck operation on the port.

Related command: stp mcheck, and stp mode.

Example

# Perform the mCheck operation on Ethernet1/0/3 port in system view.

<H3C> system-view

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

[H3C] stp interface Ethernet 1/0/3 mcheck

1.1.23  stp interface no-agreement-check

Syntax

stp interface interface-type interface-number no-agreement-check

undo stp interface interface-type interface-number no-agreement-check

View

System view

Parameter

interface-type: Port type.

interface-number: Port number.

Description

Use the stp interface no-agreement-check command to enable the rapid transition feature on a specified port.

Use the undo stp interface no-agreement-check command to disable the rapid transition feature on a specified port.

The rapid transition feature is disabled on any port by default.

Some partners' switches adopt proprietary spanning tree protocols that are similar to RSTP in the way to implement rapid transition on designated ports. When a switch of this kind operates as the upstream switch of an S3100-SI series switch running MSTP, the upstream designated port fails to change their states rapidly.

The rapid transition feature is developed to avoid this case. When an S3100-SI series switch running MSTP is connected in the upstream direction to a partner's switch running proprietary spanning tree protocol, you can enable the rapid transition feature on the ports of the S3100-SI series switch operating as the downstream switch. Among these ports, those operating as the root ports will then send agreement packets to their upstream ports after they receive proposal packets from the upstream designated ports, instead of waiting for agreement packets from the upstream switch. This enables designated ports of the upstream switch to change their states rapidly.

Related command: stp no-agreement-check.

 

&  Note:

Enable the rapid transition feature on root ports or alternate ports only.

 

Example

# Enable the rapid transition feature for Ethernet1/0/1 port.

<H3C> system-view

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

[H3C]stp interface Ethernet1/0/1 no-agreement-check

1.1.24  stp interface point-to-point

Syntax

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

undo stp interface interface-list point-to-point

View

System view

Parameter

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

force-true: Specifies that the links connected to the specified Ethernet ports are point-to-point links.

force-false: Specifies that the links connected to the specified Ethernet ports are not point-to-point links.

auto: Specifies to automatically determine whether or not the links connected to the specified Ethernet ports are point-to-point links.

Description

Use the stp interface point-to-point command to specify whether the links connected to the specified Ethernet ports are point-to-point links in system view.

Use the undo stp interface point-to-point command to restore the links connected to the specified ports to their default link types, which are automatically determined by MSTP.

If no keyword is specified in the stp interface point-to-point command, the auto keyword is used by default, and so MSTP automatically determines the types of the links connected to the specified ports.

The rapid transition feature is not applicable to ports on non-point-to-point links.

If an Ethernet port is the master port of an aggregated port or operates in full-duplex mode, the link connected to the port is a point-to-point link.

You are recommended to let MSTP automatically determine the link types.

These two commands only apply to CIST and MSTIs. If you configure the link to which a port is connected to be a point-to-point link (or a non-point-to-point link), the configuration applies to all spanning tree instances (that is, the port is configured to connect to a point-to-point link (or a non-point-to-point link) in all spanning tree instances). If the actual physical link is not a point-to-point link and you configure the link to which the port is connected to be a point-to-point link, loops may temporarily occur.

Related command: stp point-to-point.

Example

# Configure the link connected to Ethernet1/0/3 port as a point-to-point link in system view.

<H3C> system-view

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

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

1.1.25  stp interface port priority

Syntax

stp interface interface-list instance instance-id port priority priority

undo stp interface interface-list instance instance-id port priority

View

System view

Parameter

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

instance-id: Spanning tree instance ID ranging from 0 to 16. A value of 0 specifies the CIST.

priority: Port priority to be set. This argument ranges from 0 to 240 and must be a multiple of 16 (such as 0, 16, and 32). The default port priority of a port in any spanning tree instance is 128.

Description

Use the stp interface port priority command to set a port priority for the specified ports in the specified spanning tree instance.

Use the undo stp interface port priority command to restore the specified ports to the default port priority in the specified spanning tree instance.

If you specify the instance-id argument to be 0, these two commands apply to the port priorities on the CIST. The role a port plays in a spanning tree instance is determined by the port priority in the instance. A port on an MSTP-enabled switch can have different port priorities and play different roles in different MSTIs. This enables packets of different VLANs to be forwarded along different physical paths, so as to achieve load balancing by VLANs. Changing port priorities results in port roles being re-determined and may cause state transitions.

Related command: stp port priority.

Example

# Set the port priority