H3C S3100-52P Ethernet Switch Command Manual-Release 1500(V1.01)

HomeSupportSwitchesH3C S3100 Switch SeriesReference GuidesCommand ReferencesH3C S3100-52P Ethernet Switch Command Manual-Release 1500(V1.01)
13-MSTP Command
Title Size Download
13-MSTP Command 266 KB

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 bpdu-drop any. 1-2

1.1.3 check region-configuration. 1-2

1.1.4 display stp. 1-4

1.1.5 display stp region-configuration. 1-6

1.1.6 instance. 1-7

1.1.7 region-name. 1-8

1.1.8 reset stp. 1-9

1.1.9 revision-level 1-9

1.1.10 stp. 1-10

1.1.11 stp bpdu-protection. 1-11

1.1.12 stp bridge-diameter 1-12

1.1.13 stp compliance. 1-13

1.1.14 stp config-digest-snooping. 1-14

1.1.15 stp cost 1-16

1.1.16 stp edged-port 1-17

1.1.17 stp interface. 1-18

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

1.1.19 stp interface cost 1-21

1.1.20 stp interface edged-port 1-22

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

1.1.24 stp interface point-to-point 1-26

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

1.1.30 stp mcheck. 1-32

1.1.31 stp mode. 1-33

1.1.32 stp no-agreement-check. 1-34

1.1.33 stp pathcost-standard. 1-35

1.1.34 stp point-to-point 1-37

1.1.35 stp port priority. 1-38

1.1.36 stp priority. 1-39

1.1.37 stp region-configuration. 1-40

1.1.38 stp root primary. 1-41

1.1.39 stp root secondary. 1-42

1.1.40 stp root-protection. 1-43

1.1.41 stp tc-protection. 1-44

1.1.42 stp timer forward-delay. 1-45

1.1.43 stp timer hello. 1-46

1.1.44 stp timer max-age. 1-47

1.1.45 stp timer-factor 1-48

1.1.46 stp transmit-limit 1-49

1.1.47 vlan-mapping modulo. 1-50

Chapter 2 BPDU Tunnel Configuration Commands. 2-1

2.1 BPDU Tunnel Configuration Commands. 2-1

2.1.1 vlan-vpn tunnel 2-1

 


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 a multiple spanning tree (MST) region.

Configuring MST region-related parameters (especially the VLAN mapping table) is probable to result in network topology jitter. To reduce network topology jitter caused by the configuration, multiple spanning tree protocol (MSTP) does not recalculate 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.

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

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  bpdu-drop any

Syntax

bpdu-drop any

undo bpdu-drop any

View

Ethernet port view

Parameter

None

Description

Use the bpdu-drop any command to enable the function of dropping BPDU packets on the Ethernet port.

Use the undo bpdu-drop any command to disable the function of dropping BPDU packets on the Ethernet port.

The function of dropping BPDU packets is disabled on the Ethernet port by default.

In a STP-enabled network, some users may send BPDU packets to the switch continuously with the purpose of destroying the network. When a switch receives the BPDU packets, it will forward them to other switches. As a result, STP calculation is performed continuously, which may occupy too much CPU of the switches or cause errors in the protocol state of the BPDU packets.

In order to avoid this problem, you can enable the function of dropping BPDU packets on the Ethernet port. Once the function is enabled on a port, the port will not receive or forward any BPDU packets. In this way, the switch is protected against the BPDU packet attack so that the STP calculation is assured to be right.

Example

# Enable the function of dropping BPDU packets on Ethernet1/0/1.

<H3C>system-view

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

[H3C] interface Ethernet 1/0/1

[H3C-Ethernet1/0/1] bpdu-drop any

1.1.3  check region-configuration

Syntax

check region-configuration

View

MST region view

Parameter

None

Description

Use the check region-configuration command to display the configuration information about the inactivated regions, including region name, revision level, and VLAN mapping table.

In MSTP, the configuration of MST regions must be right, especially the VLAN mapping table. MSTP-enabled switches are in the same region only when they have the same MST region-related configuration, including region name, revision level, and VLAN mapping table. A switch cannot be in the expected region if any of the three MST region-related parameters above are not consistent with those of another switch in the region.

This command is used to display the configuration information of inactivated MST regions. 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-related 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     :00e0fc003900

   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

VLAN-to-MSTI mappings in the MST region

 

1.1.4  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. The value of 0 refers to 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-related 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 can also be used to make MSTP operate properly.

l           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 the order of port number.

l           If only one spanning tree instance is specified, the command displays information about the specified spanning tree instance on all ports in the order of the port number.

l           If only a port list is specified, the command displays information about all spanning tree instances on these ports in the order of the port numbers.

l           If both a spanning tree instance ID list and a port list are specified, the command displays spanning tree information about the specified spanning tree instances and the specified ports in the order of spanning tree instance ID.

MSTP state information includes:

1)         Global CIST parameters: Protocol operating 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 protection function (enabled or disabled), and the state of the digest snooping feature (enabled or disabled).

2)         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 a port is a point-to-point link, the maximum transmitting speed, type of the enabled root 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.

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

4)         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

ID of a spanning tree instance in the MST region

Port

Port index corresponding to a spanning tree instance

Role

Port role

STP State

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

Protection

Protection type of the port

 

1.1.5  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 VLAN-to-STI mappings configured for the switch.

Related command: stp region-configuration.

Example

# Display the configuration of the MST region.

<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

VLAN-to-STI mappings in the MST region

 

1.1.6  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. The value of 0 refers to 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 4,094. 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-MSTI mappings are recorded in the VLAN mapping table of an MSTP-enabled 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-MSTI 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.7  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 restore the MST region name to the default value.

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.8  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 statistics.

The spanning tree statistics includes the numbers of 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 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 statistics on all ports.

Related command: display stp.

Example

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

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

1.1.9  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. By default, the MSTP revision level of a switch is 0.

Description

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

Use the undo revision-level command to restore the revision level to the default value.

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.10  stp

Syntax

stp { enable | disable }

undo stp

View

System view, Ethernet port view

Parameter

enable: Enables MSTP globally or on the specified port(s).

disable: Disables MSTP globally or on the specified port(s).

Description

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

Use the undo stp command to restore the MSTP state to the default value globally or on the port(s).

By default, MSTP is disabled on switches.

After MSTP is enabled, the actual operating mode, which can be STP-compatible mode, RSTP-compatible mode, or MSTP mode, is determined by the user-defined 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.

<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.11  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 on the switch.

Use the undo stp bpdu-protection command to restore 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 are directly connected to terminals (such as PCs) or file servers. These ports are usually configured as edge ports to implement rapid transition. But they resume non-edge ports automatically upon receiving configuration BPDUs, which causes spanning trees recalculation 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 such attacks by enabling 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 an edge port is shut down, only the administrator can restore it.

Example

# Enable the BPDU protection function.

<H3C> system-view

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

[H3C] stp bpdu-protection

 

  Caution:

As Gigabit ports of an S3100-52P Ethernet switch cannot be shut down, the BPDU protection function is not applicable to these ports even if you enable the BPDU protection function and specify these ports to be MSTP edge ports.

 

1.1.12  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 terminal devices in a switched network.

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

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 the default value 7, the three time-relate settings, including hello time, forward delay, and max age, are set to their default values 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.13  stp compliance

Syntax

stp compliance { auto | legacy | dot1s }

undo stp compliance

View

Ethernet port view

Parameter

auto: Sets the MSTP packet format to auto.

legacy: Sets the MSTP packet format to legacy.

dot1s: Sets the MSTP packet format to dot1s.

Description

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

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

By default, the MSTP packet format for a port is legacy.

l           With the MSTP packet format set to auto for the port, the port automatically determines the format of received MSTP packets and then determines the format of the packets to be transmitted according to that of the received MSTP packets, thus implementing interconnection with the peer devices. 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 after login.

l           With the MSTP packet format set to legacy, the port only processes and transmits MSTP packets in legacy format, thus implementing interconnection with the peer devices transmitting 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, thus implementing communication with peer devices transmitting 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.14  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 interconnected 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 enabled, 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 other manufacturers' 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 another manufacturer’s switch that has the same MST region-related settings but adopts a proprietary spanning tree protocol, you can enable the digest snooping feature on the port when it receives BPDU packets from another manufacturer's switch. Then the switch considers these BPDU packets to be from its own MST region and records the configuration digests carried in the BPDU packets received from the switch, which will be put in the BPDU packets to be sent to another manufacturer’s switch. In this way, the switch can interwork with another manufacturer’s 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 switch is connected to another manufacturer’s switches adopting proprietary spanning tree protocols.

l      To enable the digest snooping feature successfully, you must first enable it on all the switch ports that connect to another manufacturer’s switches adopting proprietary spanning tree protocols 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 settings.

l      The digest snooping feature must be enabled on all the switch ports that connect to another manufacturer’s switches adopting proprietary spanning tree protocols in the same MST region.

l      With the digest snooping feature enabled, the VLAN-to-MSTI mapping cannot be modified.

l      The digest snooping feature is not applicable to edge ports in the MST region.

 

Example

# Enable the digest snooping feature on Ethernet1/0/1.

<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.15  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. The value of 0 refers to the CIST.

cost: Path cost to be set for the port. This argument ranges from 1 to 200,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 restore 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 in CIST.

The path cost of a port affects its port role. By configuring different path costs for the same port in different MSTIs, you can make flows of different VLANs travel 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 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.16  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 shared network segment. Rapid transition to the forwarding state is applied to edge ports because on these ports no loops can be incurred by network topology changes. You can enable a port to turn 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 turn 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 a port at one time.

 

Example

# Configure Ethernet1/0/1 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.17  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 MSTP is disabled on the ports if MSTP is globally disabled.

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

 

  Caution:

Disabling MSTP on ports may result in loops.

 

Related command: stp mode, and stp.

Example

# Enable MSTP on Ethernet1/0/1 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.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

interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the format 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 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 another manufacturer’s 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 another manufacturer’s switch that has the same MST region-related settings but adopts a proprietary spanning tree protocol, you can enable the digest snooping feature on the port when it receives BPDU packets from another manufacturer's switch. Then the switch considers these BPDU packets to be from its own MST region and records the configuration digests carried in the BPDU packets received from the switch, which will be put in the BPDU packets to be sent to the another manufacturer’s switch. In this way, the switch can interwork with another manufacturer’s 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 BPDUs. The port is not involved in the STP calculation until it receives BPDUs from the peer port.

l      The digest snooping feature is needed only when your switch is connected to another manufacturer’s switches adopting proprietary spanning tree protocols.

l      To enable the digest snooping feature successfully, you must first enable it on all the switch ports that connect to another manufacturer’s switches adopting proprietary spanning tree protocols 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 settings.

l      The digest snooping feature must be enabled on all the switch ports that connect to another manufacturer’s switches adopting proprietary spanning tree protocols in the same MST region.

l      With the digest snooping feature enabled, the VLAN-to-MSTI mapping cannot be modified.

l      The digest snooping feature is not applicable to edge ports in the MST region.

 

Example

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

<H3C> system-view

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

[H3C] stp interface Ethernet 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. The value of 0 refers to 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 restore the default value of the 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 cost of a port affects its port role. By configuring different path costs for the same port in different MSTIs, you can make flows of different VLANs travel 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 varies with port speed. Refer to Table 1-4 for details.

Related command: stp cost.

Example

# Set the path cost of Ethernet1/0/3 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 port to be an edge port.

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

Description

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

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

Use the undo stp interface edged-port command to restore the specified Ethernet ports to the 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 to the forwarding state is applied to edge ports because on these ports no loops can be incurred by network topology changes. You can enable a port to turn 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 turn 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 a port at one time.

 

Example

# Configure Ethernet1/0/3 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 restore 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 at one time.

 

Example

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

<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 migrates to the STP-/RSTP-compatible mode automatically if an STP-/RSTP-enabled switch has been connected to it. But when the STP-/RSTP-enabled switch is disconnected from the port, the port cannot migrate back to the MSTP mode automatically. In this case, you can force the port to migrate 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 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 the specified port.

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

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

Some manufactures' 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 H3C series switches running MSTP, the upstream designated port fails to change their states rapidly.

The rapid transition feature is developed on the H3C series switches to avoid this case. When a H3C series switch running MSTP is connected in the upstream direction to a manufacture's switch adopting proprietary spanning tree protocols, you can enable the rapid transition feature on the ports of the H3C 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:

l      The rapid transition feature can be enabled on root ports or alternate ports only.

l      You can enable the rapid transition feature on the designated port, however, the feature does not take effect on the port.

 

Example

# Enable the rapid transition feature on Ethernet1/0/1.

<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 connected to non-point-to-point links.

If an Ethernet port is the master port of aggregated ports 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 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 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. The value of 0 refers to 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 in system view.

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

If you specify the instance-id argument to 0, the two commands apply to the port priorities on the CIST. The role a port plays in a spanning tree instance is affected by its 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 implement VLAN-based load balancing. Changing port priorities results in port role recalculation and may cause state transition.

Related command: stp port priority.

Example

# Set the port priority of Ethernet1/0/3 in spanning tree instance 2 to 16.

<H3C> system-view

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

[H3C] stp interface Ethernet 1/0/3 instance 2 port priority 16

1.1.26  stp interface root-protection

Syntax

stp interface interface-list root-protection

undo stp interface interface-list root-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 root-protection command to enable the root protection function on specified port(s) in system view.

Use the undo stp interface root-protection command to restore the root protection function to the default state on specified port(s) in system view.

By default, the root protection function is disabled.

Because of configuration errors or malicious attacks, the root bridge in the network may receive configuration BPDUs with priorities higher than that of a root bridge, which causes new root bridge to be elected and network topology jitter to occur. In this case, flows that should have traveled along high-speed links are led to low-speed links, which causes network congestion.

You can avoid this problem by enabling the root protection function. Root-protection-enabled ports can only be kept as designated ports in all spanning tree instances. When a port of this type receives configuration BPDUs with higher priorities, that is, when it is to become a non-designated port, it turns to the discarding state and stops forwarding packets (as if it is disconnected from the link). It resumes the normal state if it does not receive any configuration BPDUs with higher priorities for a specified period.

Related command: stp root-protection.

 

  Caution:

Among loop prevention function, root protection function and edge port setting, only one can be valid on a port at one time.

 

Example

# Enable the root protection function on Ethernet1/0/1.

<H3C> system-view

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

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

1.1.27  stp interface transmit-limit

Syntax

stp interface interface-list transmit-limit packetnum

undo stp interface interface-list transmit-limit

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.

packetnum: Maximum number of configuration BPDUs a port can send in each hello time. This argument ranges from 1 to 255 and defaults to 10.

Description

Use the stp interface transmit-limit command to set the maximum number of configuration BPDUs each specified port can send in each hello time.

Use the undo stp interface transmit-limit command to restore the maximum number to the default value.

The larger the packetnum argument is, the more packets a port can transmit in each hello time, while the more switch resources are occupied. Configure the packetnum argument to a proper value to limit the number of BPDUs a port can send in each hello time to prevent MSTP from occupying too much bandwidth resources when network topology jitter occur.

Related command: stp transmit-limit.

Example

# Set the maximum transmitting speed of Ethernet1/0/3 to 15.

<H3C> system-view

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

[H3C] stp interface Ethernet 1/0/3 transmit-limit 15

1.1.28  stp loop-protection

Syntax

stp loop-protection

undo stp loop-protection

View

Ethernet port view

Parameter

None

Description

Use the stp loop-protection command to enable the loop prevention function on the current port.

Use the undo stp loop-protection command to restore the loop prevention function to the default state on the current port.

By default, the loop prevention function is disabled.

A switch maintains the states of the root port and other blocked ports by receiving and processing BPDUs from the upstream switch. These BPDUs may get lost because of network congestion or unidirectional link failures. If a switch does not receive BPDUs from the upstream switch for a certain period, the switch selects a new root port; the original root port becomes a designated port; and the blocked ports turn to the forwarding state. This may cause loops in the network.

The loop prevention function suppresses loops. With this function enabled, if link congestions or unidirectional link failures happen, a root port becomes a designated port, and the port turns to the discarding state. The blocked port also becomes the designated port and the port turns to the discarding state, that is, the port does not forward packets and thereby loops can be prevented.

Example

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

<H3C> system-view

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

[H3C] interface Ethernet1/0/1

[H3C-Ethernet1/0/1] stp loop-protection

1.1.29  stp max-hops

Syntax

stp max-hops hops

undo stp max-hops

View

System view

Parameter

hops: Maximum hops to be set. This argument ranges from 1 to 40. The default value of the maximum hops of an MST region is 20.

Description

Use the stp max-hops command to set the maximum hops for the MST region the current switch belongs to.

Use the undo stp max-hops command to restore the maximum hops to the default value.

The maximum hops configured on the region roots of the CIST and MSTIs in an MST region limit the size of the MST region.

A configuration BPDU contains a field that maintains the remaining hops of the configuration BPDU. And a switch discards the configuration BPDUs whose remaining hops are 0. After a configuration BPDU reaches a root bridge of a spanning tree in a MST region, the value of the remaining hops field in the configuration BPDU is decreased by 1 every time the configuration BPDU passes one switch. Such a mechanism disables the switches that are beyond the maximum hops from participating in spanning tree calculation, and thus limits the size of an MST region.

With such a mechanism, the maximum hops configured on the switch operating as the root bridge of the CIST or an MSTI in a MST region becomes the network diameter of the spanning tree, which limits the size of the spanning tree in the current MST region. The switches that are not root bridges in the MST region adopt the maximum hop settings of their root bridges.

Example

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

<H3C> system-view

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

[H3C] stp max-hops 35

1.1.30  stp mcheck

Syntax

stp mcheck

View

System view, Ethernet port view

Parameter

None

Description

Use the stp mcheck command to perform the mCheck operation on the current port.

When a port on an MSTP-enabled upstream switch connects with an STP-enabled downstream switch, the port operates in the STP-compatible mode automatically. But when the STP-enabled downstream switch is then replaced by an MSTP-enabled switch, the port cannot automatically transit to the MSTP mode but still remains in the STP-compatible mode. In this case, you can force the port to transit to the MSTP mode by performing the mCheck operation on the port.

Similarly, when a port on an RSTP-enabled upstream switch connects with an STP-enabled downstream switch, the port operates in the STP-compatible mode. But when the STP-enabled downstream switch is then replaced by an MSTP-enabled switch, the port cannot automatically transit to the MSTP mode but remains in the STP-compatible mode. In this case, you can force the port to transit to the MSTP-compatible mode by performing the mCheck operation on the port.

Related command: stp mode, and stp interface mcheck.

Example

# Perform the mCheck operation on Ethernet1/0/1.

<H3C> system-view

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

[H3C] interface Ethernet1/0/1

[H3C-Ethernet1/0/1] stp mcheck

1.1.31  stp mode

Syntax

stp mode { stp | rstp | mstp }

undo stp mode

View

System view

Parameter

stp: Enables the MSTP-enabled switch to operate in STP-compatible mode.

mstp: Enables the MSTP-enabled switch to operate in the MSTP mode.

rstp: Enables the MSTP-enabled switch to operate in the RSTP-compatible mode.

Description

Use the stp mode command to set the operating mode of an MSTP-enabled switch.

Use the undo stp mode command to restore the default operating mode of an MSTP-enabled switch.

By default, an MSTP-enabled switch operates in MSTP mode.

To make a switch compatible with STP/RSTP, MSTP provides following three operating modes:

l           STP-compatible mode, where a switch sends out STP BPDUs

l           RSTP-compatible mode, where a switch sends out RSTP BPDUs

l           MSTP mode, where a switch sends out MSTP BPDUs

Related command: stp mcheck, stp, stp interface, and stp interface mcheck.

Example

# Configure the MSTP-enabled switch to operate in STP-compatible mode.

<H3C> system-view

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

[H3C] stp mode stp

1.1.32  stp no-agreement-check

Syntax

stp no-agreement-check

undo stp no-agreement-check

View

Ethernet port view

Parameter

None

Description

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

Use the stp no-agreement-check command to disable the rapid transition feature.

By default, the rapid transition feature is disabled on a port.

Some manufactures' 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 a H3C series switch running MSTP, the upstream designated port fails to change their states rapidly.

The rapid transition feature aims to resolve this problem. When a H3C series switch running MSTP is connected in the upstream direction to another manufacture's switch adopting proprietary spanning tree protocols, you can enable the rapid transition feature on the ports of the H3C series switch operating as the downstream switch. Among these ports, those operating as the root ports will then actively 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 interface no-agreement-check.

 

&  Note:

l      The rapid transition feature can be enabled on only root ports or alternate ports.

l      You can enable the rapid transition feature on the designated port. However, the feature does not take effect on the port.

 

Example

# Enable the rapid transition feature on Ethernet1/0/1.

<H3C> system-view

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

[H3C]interface Ethernet1/0/1

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

1.1.33  stp pathcost-standard

Syntax

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

undo stp pathcost-standard

View

System view

Parameter

dot1d-1998: Uses the IEEE 802.1D-1998 standard to calculate the default path costs of ports.

dot1t: Uses the IEEE 802.1t standard to calculate the default path costs of ports.

legacy: Uses the proprietary standard to calculate the default path costs of ports.

Description

Use the stp pathcost-standard command to set the standard to be used to calculate the default path costs of the links connected to the switch.

Use the undo stp pathcost-standard command to specify to use the default standard.

By default, a switch uses the IEEE 802.1t standard to calculate the default path costs of ports.

Table 1-4 Link speeds and the corresponding path costs

Link speed

Operating mode (half-/full-duplex)

802.1D-1998

IEEE 802.1t

Proprietary standard

0

65,535

200,000,000

200,000

10 Mbps

Half-duplex/Full-duplex

Aggregated link 2 ports

Aggregated link 3 ports

Aggregated link 4 ports

100

95

95

95

200,000

1,000,000

666,666

500,000

2,000

1,800

1,600

1,400

100 Mbps

Half-duplex/Full-duplex

Aggregated link 2 ports

Aggregated link 3 ports

Aggregated link 4 ports

19

15

15

15

200,000

100,000

66,666

50,000

200

180

160

140

1,000 Mbps

Full-duplex

Aggregated link 2 ports

Aggregated link 3 ports

Aggregated link 4 ports

4

3

3

3

200,000

10,000

6,666

5,000

20

18

16

14

10 Gbps

Full-duplex

Aggregated link 2 ports

Aggregated link 3 ports

Aggregated link 4 ports

2

1

1

1

200,000

1,000

666

500

2

1

1

1

 

Normally, when a port operates in full-duplex mode, the corresponding path cost is slightly less than that when the port operates in half-duplex mode.

When the path cost of an aggregated link is calculated, the 802.1D-1998 standard does not take the number of the ports on the aggregated link into account, whereas the 802.1T standard does. The following formula is used to calculate the path cost of an aggregated link:

Path cost = 200,000 / link speed,

In this formula, the link speed is the sum of the speeds of the unblocked ports on the aggregated link, which is measured in 100 Kbps.

Example

# Configure to use the IEEE 802.1D-1998 standard to calculate the default path costs of ports.

<H3C> system-view

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

[H3C] stp pathcost-standard dot1d-1998

# Configure to use the IEEE 802.1t standard to calculate the default path costs of ports.

<H3C> system-view

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

[H3C] stp pathcost-standard dot1t

1.1.34  stp point-to-point

Syntax

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

undo stp point-to-point

View

Ethernet port view

Parameter

force-true: Specifies that the link connected to the current Ethernet port is a point-to-point link.

force-false: Specifies that the link connected to the current Ethernet port is not a point-to-point link.

auto: Specifies to automatically determine whether or not the link connected to the current Ethernet port is a point-to-point link.

Description

Use the stp point-to-point command to specify whether the link connected to the current Ethernet port is a point-to-point link.

Use the undo stp point-to-point command to restore the link connected to the current Ethernet port to its default link type, which is automatically determined by MSTP.

If no keyword is specified in the stp point-to-point command, the auto keyword is used by default, and so MSTP automatically determines the type of the link connected to the current port.

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

If an Ethernet port is the master port of aggregation ports 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 of ports.

The two commands only apply to CISTs and MSTIs. If you configure the link to which a port is connected is 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, temporary loops may occur.

Related command: stp interface point-to-point.

Example

# Configure the link connected to Ethernet1/0/3 as a point-to-point link.

<H3C> system-view

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

[H3C] interface Ethernet1/0/3

[H3C-Ethernet1/0/3] stp point-to-point force-true

1.1.35  stp port priority

Syntax

stp [ instance instance-id ] port priority priority

undo stp [ instance instance-id ] port priority

View

Ethernet port view

Parameter

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

port priority priority: Sets the port priority. The priority 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 port priority command to set the port priority of the current port in the specified spanning tree instance.

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

If you specify the instance-id argument to 0 or do not specify the argument, the two commands apply to the port priorities of ports 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 a 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 links, so as to implement VLAN-based load balancing. Changing port priorities result in port role recalculation and state transition.

Related command: stp interface port priority.

Example

# Set the port priority of Ethernet1/0/3 in spanning tree instance 2 to 16.

<H3C> system-view

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

[H3C] interface Ethernet1/0/3

[H3C-Ethernet1/0/3] stp instance 2 port priority 16

1.1.36  stp priority

Syntax

stp [ instance instance-id ] priority priority

undo stp [ instance instance-id ] priority

View

System view

Parameter

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

priority: Switch priority to be set. This argument ranges from 0 to 61,440 and must be a multiple of 4,096 (such as 0, 4,096, and 8,192). There are totally 16 available switch priorities.

Description

Use the stp priority command to set the priority of the switch in the specified spanning tree instance.

Use the undo stp priority command to restore the switch priority to the default priority in the specified spanning tree instance.

The default priority of a switch is 32,768.

The priorities of switches are used for spanning tree calculation. Switch priorities are spanning tree-specific. That is, you can set different priorities for the same switch in different spanning tree instances.

If you do not specify the instance-id argument, the two commands apply to only the CIST.

Example

# Set the bridge priority of the switch in spanning tree instance 1 to 4,096.

<H3C> system-view

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

[H3C] stp instance 1 priority 4096

1.1.37  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 MST region-related settings to the default value.

MST region-related parameters include: region name, revision level, and VLAN mapping table. By default:

l           MST region name is the first MAC address of the switch

l           All VLANs are mapped to the CIST in the VLAN mapping table

l           The MSTP revision level is 0

And you can modify the three parameters after entering MST region view by using the stp region-configuration command.

Example

# Enter MST region view.

<H3C> system-view

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

[H3C] stp region-configuration

[H3C-mst-region]

1.1.38  stp root primary

Syntax

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

undo stp [ instance instance-id ] root

View

System view

Parameter

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

bridgenum: Network diameter of the specified spanning tree. This argument ranges from 2 to 7 and defaults to 7.

centi-seconds: Hello time in centiseconds of the specified spanning tree. This argument ranges from 100 to 1,000 and defaults to 200.

Description

Use the stp root primary command to configure the current switch as the root bridge of a specified spanning tree instance.

Use the undo stp root command to cancel the current configuration.

By default, a switch is not configured as a root bridge.

If you do not specify the instance-id argument, these two commands apply to only the CIST.

You can specify the current switch as the root bridge of a spanning tree instance regardless of the priority of the switch. You can also specify the network diameter of the switched network by using the stp root primary command. The switch will then figure out the following three time parameters: hello time, forward delay, and max age. As the hello time figured out by the network diameter is not always the optimal one, you can set it manually through the hello-time centi-seconds parameter. Generally, you are recommended to obtain the forward delay and max age parameters through setting the network diameter.

 

  Caution:

l      You can configure only one root bridge for a spanning tree instance and can configure one or more secondary root bridges for a spanning tree instance. Specifying multiple root bridges for a spanning tree instance causes unpredictable spanning tree calculation results.

l      Once a switch is configured as the root bridge or a secondary root bridge, its priority cannot be modified.

 

Example

# Configure the current switch as the root bridge of spanning tree instance 1, set the network diameter of the switched network to 4, and the hello time to 500 centiseconds.

<H3C> system-view

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

[H3C] stp instance 1 root primary bridge-diameter 4 hello-time 500

1.1.39  stp root secondary

Syntax

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

undo stp [ instance instance-id ] root

View

System view

Parameter

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

bridgenum: Network diameter of the specified spanning tree. This argument ranges from 2 to 7 and defaults to 7.

centi-seconds: Hello time in centiseconds of the specified spanning tree. This argument ranges from 100 to 1,000 and defaults to 200.

Description

Use the stp root secondary command to configure the current switch as a secondary root bridge of a specified spanning tree instance.

Use the undo stp root command to cancel the current configuration.

By default, a switch does not operate as a secondary root bridge.

If you do not specify the instance-id argument, the two commands apply to only the CIST.

You can configure one or more secondary root bridges for a spanning tree instance. If the switch operating as the root bridge fails or is turned off, the secondary root bridge with the least MAC address becomes the root bridge.

You can specify the network diameter and the hello time of the switch when you are configuring it as a secondary root bridge. The switch will then figure out the other two time parameters: forward delay and max age. If the instance-id argument is specified to 0 in this command, the current switch is configured as the secondary root bridge of the CIST. You can configure only one root bridge for a spanning tree instance but you can configure one or more secondary root bridges for a spanning tree instance.

Once a switch is configured as the root bridge or a secondary root bridge, its priority cannot be modified.

Example

# Configure the current switch as a secondary root bridge of spanning tree instance 4, set the network diameter of the switched network to 5 and the hello time of the current switch to 300 centiseconds at the same time.

<H3C> system-view

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

[H3C] stp instance 4 root secondary bridge-diameter 5 hello-time 300

1.1.40  stp root-protection

Syntax

stp root-protection

undo stp root-protection

View

Ethernet port view

Parameter

None

Description

Use the stp root-protection command to enable the root protection function on the current switch.

Use the undo stp root-protection command to restore the root protection function to the default state on the current switch.

By default, the root protection function is disabled.

Because of configuration errors or malicious attacks, the valid root bridge in the network may receive configuration BPDUs with their priorities higher than that of the root bridge, which causes new root bridge to be elected and network topology jitter to occur. In this case, flows that should have traveled along high-speed links are led to low-speed links, causing network congestion.

You can avoid this problem by utilizing the root protection function. Root-protection-enabled ports can only be kept as designated ports in all spanning tree instances. When a port of this type receives configuration BPDUs with higher priorities, it turns to the discarding state before it is specified as a non-designated port and stops forwarding packets (as if it is disconnected from the link). It resumes the normal state if it does not receive any configuration BPDUs with higher priorities for a specified period.

Related command: stp interface root-protection.

Example

# Enable the root protection function on Ethernet1/0/1.

<H3C> system-view

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

[H3C] interface Ethernet1/0/1

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

1.1.41  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 prevention function.

Use the stp tc-protection disable command to disable the TC-BPDU prevention function.

By default, the TC-BPDU prevention function is enabled.

A switch removes MAC address entries and ARP entries upon receiving TC-BPDUs. If a malicious user sends a large amount of TC-BPDUs to a switch in a short period, the switch may be busy in removing MAC address entries and ARP entries, which may decrease the performance of the switch and affect the stability of the network.

With the TC-BPDU prevention function enabled, a switch performs only one removing operation in a specified period (10 seconds by default) after it receives a TC-BPDU. The switch also checks to see whether other TC-BPDUs arrive in this period and performs another removing operation in the next period if a TC-BPDU is received. Such a mechanism prevents a switch from being busy in removing MAC address entries and ARP entries.

Example

# Enable the TC-BPDU prevention function on the switch.

<H3C> system-view

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

[H3C] stp tc-protection enable

1.1.42  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 to be set. This argument ranges from 400 to 3,000 and defaults to 1,500.

Description

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

Use the undo stp timer forward-delay command to restore the forward delay to the default value.

To prevent the occurrence of temporary loops, when a port changes its state from discarding to forwarding, it undergoes an intermediate state and waits for a specific period to synchronize with the state transition of the remote switches. This state transition period is determined by the forward delay configured on the root bridge.

The forward delay setting configured on a root bridge applies to all non-root bridges.

As for the configuration of the three time-related parameters (namely, the hello time, forward delay, and max age parameters), the following formulas must be met to prevent frequent network jitter.

2 x (forward delay – 1 second) >= max age

Max age >= 2 x (hello time + 1 second)

You are recommended to specify the network diameter of the switched network and the hello time by using the stp root primary or stp root secondary command. After that, the three proper time-related parameters are automatically calculated by MSTP.

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

Example

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

<H3C> system-view

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

[H3C] stp timer forward-delay 2000

1.1.43  stp timer hello

Syntax

stp timer hello centi-seconds

undo stp timer hello

View

System view

Parameter

centi-seconds: Hello time in centiseconds to be set. This argument is an integer ranging from 100 to 1,000 and defaults to 200.

Description

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

Use the undo stp timer hello command to restore the hello time of the switch to the default value.

A root bridge regularly sends out configuration BPDUs to maintain the stability of existing spanning trees. If the switch does not receive BPDU packets in a specified period, spanning trees will be recalculated because BPDU packets time out. When a switch becomes a root bridge, it regularly sends BPDUs at the interval specified by the hello time you have configured on it. The other none-root-bridge switches adopt the interval specified by the hello time.

As for the configuration of the three time-related parameters (namely, the hello time, forward delay, and max age parameters), the following formulas must be met to prevent frequent network jitter.

2 × (forward delay – 1 second) >= max age

Max age >= 2 × (hello time + 1 second)

You are recommended to specify the network diameter of the switched network and the hello time by using the stp root primary or stp root secondary command. After that, the three proper time-related parameters are automatically calculated by MSTP.

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

Example

# Set the hello time to 400 centiseconds.

<H3C> system-view

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

[H3C] stp timer hello 400

1.1.44  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 to be set. This argument ranges from 600 to 4,000 and defaults to 2,000.

Description

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

Use the undo stp timer max-age command to restore the max age to the default value.

MSTP is capable of detecting link failures and automatically restoring redundant links to the forwarding state. In CIST, switches use the max age parameter to judge whether or not a received configuration BPDU times out. Spanning trees will be recalculated if a configuration BPDU received by a port times out.

The max age is meaningless to MSTIs. The max age configured for the root bridge of the CIST applies to all switches operating on the CIST, including the root bridge.

As for the configuration of the three time-related parameters (namely, the hello time, forward delay, and max age parameters), the following formulas must be met to prevent frequent network jitter:

2 × (forward delay – 1 second) >= max age,

Max age >= 2 × (hello time + 1 second).

You are recommended to specify the network diameter of the switched network and the hello time parameter by using the stp root primary or stp root secondary command. After that, the three proper time-related parameters are automatically determined by MSTP.

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

Example

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

<H3C> system-view

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

[H3C] stp timer max-age 1000

1.1.45  stp timer-factor

Syntax

stp timer-factor number

undo stp timer-factor

View

System view

Parameter

number: Hello time factor used to set the timeout time. This argument ranges from 1 to 10 and defaults to 3.

Description

Use the stp timer-factor command to set the timeout time of a switch in the form of a multiple of the hello time.

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

A switch regularly sends protocol packets to its neighboring devices at the interval specified by the hello time parameter to test the links. Generally, a switch regards its upstream switch faulty if the former does receive any protocol packets from the latter in a period three times of the hello time and then initiates the spanning tree recalculation process.

Spanning trees may be recalculated even in a steady network if an upstream switch is always busy. You can configure the hello time factor to a larger number to avoid this problem. Normally, the timeout time can be four (or more) times of the hello time. For a steady network, the timeout time can be five to seven times of the hello time.

Example

# Set the hello time factor to 7.

<H3C> system-view

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

[H3C] stp timer-factor 7

1.1.46  stp transmit-limit

Syntax

stp transmit-limit packetnum

undo stp transmit-limit

View

Ethernet port view

Parameter

packetnum: Maximum number of configuration BPDUs a port can transmit in each hello time. This argument ranges from 1 to 255 and defaults to 10.

Description

Use the stp transmit-limit command to set the maximum number of configuration BPDUs the current port can transmit in each hello time.

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

A larger number configured by the stp transmit-limit command allows more configuration BPDUs to be transmitted in each hello time, which may occupy more switch resources. So you are recommended configure it to a proper value to avoid network topology jitter and prevent MSTP from occupying too many bandwidth resources.

Related command: stp interface transmit-limit.

Example

# Set the maximum number of configuration BPDUs that can be transmitted by Ethernet1/0/1 in each hello time to 15.

<H3C> system-view

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

[H3C] interface Ethernet1/0/1

[H3C-Ethernet1/0/1] stp transmit-limit 15

1.1.47  vlan-mapping modulo

Syntax

vlan-mapping modulo modulo

View

MST region view

Parameter

modulo: Modulo ranging from 1 to 16.

Description

Use the vlan-mapping modulo command to map the specified VLAN list to the specific spanning tree instance.

By default, all VLANs in a network are mapped to the CIST (spanning tree instance 0).

MSTP uses a VLAN mapping table to describe VLAN-to-MSTI mappings. You can use this command to establish the VLAN mapping table and to map VLANs to the specific spanning tree instances.

Note that a VLAN cannot be mapped to multiple different spanning tree instances at the same time. A VLAN-to-MSTI mapping becomes invalid when you map the VLAN to another spanning tree instance.

 

&  Note:

You can map VLANs to the specific spanning tree instances rapidly by using the vlan-mapping modulo modulo command. The ID of the spanning tree instance to which a VLAN is mapped can be figured out by using the following formula:

(VLAN ID-1) % modulo + 1.

In this formula, (VLAN ID-1) % modulo yields the module of (VLAN ID-1) with regards to the modulo argument. For example, if you set the modulo argument to 16, then VLAN 1 is mapped to spanning tree instance 1, VLAN 2 is mapped to spanning tree instance 2, …, VLAN 16 is mapped to spanning tree instance 16, VLAN 17 is mapped to spanning tree instance 1, and so on.

 

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

Example

# Map VLANs to spanning tree instances, with the modulo being 16.

<H3C> system-view

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

[H3C] stp region-configuration

[H3C-mst-region] vlan-mapping modulo 16

 


Chapter 2  BPDU Tunnel Configuration Commands

2.1  BPDU Tunnel Configuration Commands

2.1.1  vlan-vpn tunnel

Syntax

vlan-vpn tunnel

undo vlan-vpn tunnel

View

System view

Parameter

None

Description

Use the vlan-vpn tunnel command to enable the BPDU Tunnel function for a switch.

Use the undo vlan-vpn tunnel command to disable the BPDU Tunnel function.

The BPDU Tunnel function enables BPDUs to be transparently transmitted between geographically dispersed user networks through specified VLAN VPNs in operator’s networks, through which spanning trees can be calculated across these user networks and are independent of those of the operator’s network.

By default, the BPDU Tunnel function is disabled.

 

&  Note:

l      The BPDU Tunnel function can only be enabled on STP-enabled devices.

l      The BPDU Tunnel function can be enabled only on access ports.

l      To enable the BPDU Tunnel function, make sure the links between operator’s networks are trunk links.

l      As the VLAN-VPN function is unavailable on ports with 802.1x, GVRP, GMRP, STP, or NTDP enabled, the BPDU Tunnel function is not applicable to these ports.

 

Example

# Enable the BPDU Tunnel function for the switch.

<H3C> system-view

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

[H3C] vlan-vpn tunnel

  • 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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网