H3C S9500 Series Routing Switches Command Manual-(V1.01)

HomeSupportSwitchesH3C S9500 Series SwitchesReference GuidesCommand ReferencesH3C S9500 Series Routing Switches Command Manual-(V1.01)
09-STP Command
Title Size Download
09-STP Command 179 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 check region-configuration. 1-2

1.1.3 debugging stp. 1-3

1.1.4 display stp. 1-4

1.1.5 display stp region-configuration. 1-6

1.1.6 display stp tc. 1-7

1.1.7 instance. 1-8

1.1.8 region-name. 1-9

1.1.9 reset stp. 1-10

1.1.10 revision-level 1-11

1.1.11 stp. 1-11

1.1.12 stp bpdu-protection. 1-12

1.1.13 stp bridge-diameter 1-13

1.1.14 stp cost 1-14

1.1.15 stp edged-port 1-15

1.1.16 stp instance root primary. 1-17

1.1.17 stp interface. 1-18

1.1.18 stp interface instance cost 1-19

1.1.19 stp interface edged-port 1-20

1.1.20 stp interface instance port priority. 1-21

1.1.21 stp interface loop-protection. 1-22

1.1.22 stp interface mcheck. 1-24

1.1.23 stp interface point-to-point 1-25

1.1.24 stp interface root-protection. 1-26

1.1.25 stp interface transmit-limit 1-27

1.1.26 stp loop-protection. 1-28

1.1.27 stp max-hops. 1-29

1.1.28 stp mcheck. 1-30

1.1.29 stp mode. 1-31

1.1.30 stp non-flooding. 1-32

1.1.31 stp pathcost-standard. 1-33

1.1.32 stp point-to-point 1-33

1.1.33 stp port priority. 1-34

1.1.34 stp region-configuration. 1-35

1.1.35 stp instance root secondary. 1-36

1.1.36 stp root-protection. 1-37

1.1.37 stp tc-protection. 1-38

1.1.38 stp timer forward-delay. 1-39

1.1.39 stp timer hello. 1-40

1.1.40 stp timer max-age. 1-41

1.1.41 stp timer-factor 1-42

1.1.42 stp transmit-limit 1-43

1.1.43 vlan-mapping modulo. 1-44

Chapter 2 Digest Snooping Configuration Commands. 2-1

2.1 Digest Snooping Configuration Commands. 2-1

2.1.1 stp config-digest-snooping. 2-1

Chapter 3 BPDU Tunnel Configuration Commands. 3-1

3.1 BPDU Tunnel Configuration Commands. 3-1

3.1.1 vlan-vpn enable. 3-1

3.1.2 vlan-vpn tunnel 3-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 configurations of MST region.

This command is used for manually activate the configurations of MST region. Configuring the related parameters, especially the VLAN mapping table, of the MST region, will lead to the recalculation of spanning tree and network topology flapping. To bate such flapping, MSTP applies the configured parameters and launches recalculation of the spanning tree only when you activate the configured MST region parameters or enable MSTP.

After you entered this command, MSTP will apply the MST region parameters you have configured to the system and recalculate the spanning tree.

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

Example

# Manually activate MST region configurations.

<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 view the configuration information (including switch region name, revision level, and VLAN mapping table) to be activated.

MSTP defines that the user must ensure the correct region configurations, especially the VLAN mapping table configuration. The switches can be configured in the same region only if their region names, VLAN mapping tables, and MSTP revision levels are configured exactly the same. The switch may not be configured in the expected region due to any slight deviation. You can use this command to display the MST region configuration information to be activated to know to which MST regions the switch belongs and check if the MST region configurations are correct.

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

Example

# Display the configuration information about the region.

<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     :00b010000001

   Revision level  :0

 

   Instance   Vlans Mapped

      0       1 to 9, 11 to 4094

     16       10

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

Field

Description

Format selector

The selector defined by MSTP

Region name

Region name of MST region

Revision level

Revision level of MST region

Instance Vlans Mapped

VLAN mapping table of MST region

 

1.1.3  debugging stp

Syntax

debugging stp { global-error | global-event | all | event | instance instance-id | lacp-key | packet | tc-protection | interface interface-type interface-number { lacp-key | packet | event } }

undo debugging stp { global-error | global-event | all | event | instance instance-id | lacp-key | packet | tc-protection | interface interface-type interface-number { lacp-key | packet | event } }

View

User view

Parameter

None

Description

Use the debugging stp { global-error | global-event } command to enable STP global error or event debugging.

Use the undo debugging stp { global-error | global-event } command to disable STP global error or event debugging.

Use the debugging stp all command to enable global debugging.

Use the undo debugging stp all command to disable global debugging.

Use the debugging stp event command to enable event debugging of MSTP.

Use the undo debugging stp event to disable event debugging of MSTP.

Use the debugging stp packet command to enable packet debugging of MSTP.

Use the undo debugging stp packet command to disable packet debugging of MSTP.

Use the debugging stp instance instance-id command to enable specified instance debugging of MTSP.

Use the undo debugging stp instance instance-id command to disable specified instance debugging of MTSP.

Use the debugging stp lacp-key command to enable MD5 summary information debugging of LACP protocol.

Use the undo debugging stp lacp-key command to disable MD5 summary information debugging of LACP protocol.

Use the debugging stp tc-protection command to enable TC protection debugging.

Use the undo debugging stp tc-protection command to disable TC protection debugging.

Use the debugging stp interface interface-type interface-number { lacp-key | packet | event } command to enable specified port debugging of MSTP.

Use the undo debugging stp interface interface-type interface-number { lacp-key | packet | event } command to disable specified port debugging of MSTP.

Example

# Enable STP global event debugging.

<H3C> debugging stp global-event

1.1.4  display stp

Syntax

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

View

Any view

Parameter

instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. Instance 0 represents CIST.

interface-list: Ethernet port list, containing multiple Ethernet ports and expressed as interface-list = { { interface-type interface-num | interface-name } [ to { interface-type interface-num | interface-name } ] }&<1-10>. For detail descriptions of interface-type, interface-num and interface-name parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

slot slot-num: Displays STP information about a specified slot.

brief: Displays only port state, port protection type and port role in the corresponding instance.

Description

Use the display stp command to view the state information and statistics information of the spanning tree.

The MSTP state and statistics information can help analyze and maintain the network topology and maintain the normal operation of MSTP.

If no spanning tree instance ID or port list is specified, the command will display the spanning tree information of all the instances on all the ports in port number order. If the instance ID is specified, the command will display the spanning tree information of the specified instance on all the port in port number order. If only the port list is specified, the command will display the information about all the MSTIs on the port in port number order. If both instance ID and port list are specified, the command will display the spanning tree information of the specified instance and port according to the port list of the instance ID.

If there is an aggregation port, the command will only display the instance information on the master port.

MSTP state information includes:

1)         Global CIST parameter: Protocol operation mode, switch priority in the CIST instance, MAC address, Hello Time, Max Age, Forward Delay, Max Hops, CIST common root, external path cost of the switch to the CIST common root, region root, internal path cost of the switch to the region root, CIST root port of the switch, and whether to enable BPDU protection; Number of received TC/TCN packets, time interval for receiving packets. If you specify the relationship between a master root and one or multiple slave roots, the global CIST parameters can also be displayed in CIST Root Type.

2)         CIST port parameter: Port state, role, priority, path cost, path cost standard designated bridge, designated port, edge port/non-edge port, whether connected to the point-to-point link, port transit limit, whether to enable Root protection, whether being a region edge port, Hello Time, Max Age, Forward Delay, Message-age time, and Remaining-hops; Num of VLANs Mapped, number of sent BPDU packets, and number of received BPDU packets.

3)         Global MSTIs parameter: MSTI instance ID, bridge priority of the instance, region root, internal path cost, MSTI root port, MASTER bridge, path cost to region root and number of the received TC packets. If you specify the relationship between master roots and slave roots in an instance, the global MSTI parameters can also be displayed in MSTI Root Type.

4)         MSTIs port parameter: Port state, role, priority, path cost, path cost standard, designated bridge, designated port, and remaining hops. You can view Num of VLANs Mapped in port view.

Statistics information: Count of TCN, CONFIG BPDU, RST, and MST BPDU transmitted/received via the port.

Related command: reset stp.

Example

# Display the state and statistics information about the spanning tree.

<H3C> display stp instance 0 interface Ethernet 2/1/1 to Ethernet 2/1/4    GigabitEthernet 3/2/1 to GigabitEthernet 3/2/4 GigabitEthernet 3/3/1 brief

  MSTID      Port                  Role  STP State     Protection

   0        Ethernet2/1/1         ALTE  DISCARDING      LOOP

   0        Ethernet2/1/2         DESI  FORWARDING      NONE

   0        Ethernet2/1/3         DESI  FORWARDING      NONE

   0        Ethernet2/1/4         DESI  FORWARDING      NONE

   0        GigabitEthernet3/2/1  DESI  FORWARDING      NONE

   0        GigabitEthernet3/2/2  DESI  FORWARDING      NONE

   0        GigabitEthernet3/2/3  DESI  FORWARDING      NONE

   0        GigabitEthernet3/2/4  DESI  FORWARDING      NONE

   0        GigabitEthernet3/3/1  ROOT  FORWARDING      NONE

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

Field

Description

MSTID

MST instance ID in a MST region

Port

Port number, corresponding to the related MST instance

Role

Role of the port

STP State

Port STP state, including enabled status and disabled status, and also monitoring and learning status during transition

Protection

Protection type on 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 view the effective MST region configurations.

MST region configuration information includes: region name, region revision level, and associations between VLANs and MSTIs. All these configurations together determine to which MST region a switch belongs.

Related command: stp region-configuration.

Example

# Display the MST region configuration information.

<H3C> display stp region-configuration

Oper Configuration

   Format selector :0

   Region name     :test

   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

Selector defined by MSTP

Region name

Region name of MST region

Revision level

Revision level of MST region

Instance Vlans Mapped

VLAN mapping table of MST region

 

1.1.6  display stp tc

Syntax

display stp [ instance instanceid ] tc { all | detected | received | sent }

View

Any view

Parameter

instance instanceid: Instance to be displayed. By default, TC (Topology Change) statistics of all the instances will be displayed.

detected: TC statistics detected by the bridge.

received: TC statistics received at the bridge.

sent: TC statistics sent from the bridge.

all: All TC statistics, including those detected, received and sent by the bridge.

Description

Use the display stp tc command to view TC (transaction capabilities) statistics.

Example

# Display all TC statistics.

<H3C> dis stp tc all

 ---------- Stp Instance 0 tc or tcn received count ----------

 Port Ethernet3/1/1              0

 Port Ethernet3/1/9              1

 ---------- Stp Instance 0 tc or tcn detected count ----------

 Port Ethernet3/1/1              1

 Port Ethernet3/1/9              0

 ---------- Stp Instance 0 tc or tcn sent count ----------

 Port Ethernet3/1/1              1

 Port Ethernet3/1/9              0     

 

&  Note:

The topology changes and notification information of Instance 0 will be recorded in the log.

 

1.1.7  instance

Syntax

instance instance-id vlan vlan-list

undo instance instance-id [ vlan vlan-list ]

View

MST region view

Parameter

instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. The value 0 indicates a CIST.

vlan vlan-list: Specifies the VLAN list, ranging from 1 to 4094. vlan-list = { vlan-id [ to vlan-id ] }&<1-10>. Where, &<1-10> represents that you can input vlan-ids up to 10 times

 Description

Use the instance command to map the specified VLAN list to the specified MSTI.

Use the undo instance command to cancel the specified VLAN list from the specified MSTI, and the removed VLAN will then be mapped to the CIST (i.e., the Instance 0). If no VLAN is specified in the undo command, all the VLANs associated with the specified MSTI will be mapped to CIST.

By default, all the VLANs are mapped to CIST, i.e., the Instance 0.

MSTP describes the association between VLANs and MSTIs with the VLAN mapping table. You can use this command to configure this table. Every VLAN can be mapped to an MSTI as per your configuration.

You cannot map one VLAN to different instances, while you can map multiple VLANs to one instance. When you remap the mapped VLAN to a different instance, the original mapping relation is removed automatically. The mapping relationship of VLANs and instances in the same MSTP domain must be correct. The data will be transmitted according to the spanning tree topology structure of the instance the VLAN maps to.

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

Example

# Map VLAN 2 to MSTI 1.

<H3C>system-view

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

[H3C]stp region-configuration

[H3C-mst-region] instance 1 vlan 2

# Map VLAN5-10 to MSTI 3.

[H3C-mst-region] instance 3 vlan 5 6 7 8 9 10

1.1.8  region-name

Syntax

region-name name

undo region-name

View

MST region view

Parameter

name: Specifies the MST region name of the switch with a character string not exceeding 32 bytes.

Description

Use the region-name command to configure the MST region name of a switch.

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

By default, the MST region name of the switch is the switch MAC address in hexadecimal notation.

The switch region name, together with VLAN mapping table of the MST region and MSTP revision level, is used for determining the region to which the switch belongs.

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

Example

# Set the MST region name of the switch as abcde.

<H3C>system-view

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

[H3C]stp region-configuration

[H3C-mst-region] region-name abcde

1.1.9  reset stp

Syntax

reset stp [ interface interface-list ]

View

User view

Parameter

interface-list: Ethernet port list, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to { interface-type interface-number] }&<1-10>. For detail descriptions of interface-type, interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

Description

Use the reset stp command to reset the spanning tree statistics information.

The spanning tree statistics information includes TCN, Config BPDU, RST, and MST BPDU, received and transmitted on the port. Among them, STP BPDU and TCN BPDU are counted on CIST.

If you specify a port list, the command clears the spanning tree statistics information of the specified port. If you do not specify any port, the command clears the spanning tree statistics information of all ports.

Related command: display stp.

Example

# Clear the statistics information on the ports from Ethernet2/1/1 through Ethernet2/1/3

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

1.1.10  revision-level

Syntax

revision-level level

undo revision-level

View

MST region view

Parameter

level: Specifies the MSTP revision level, ranging from 0 to 65535. By default, MSTP revision level takes 0.

Description

Use the revision-level command to configure MSTP revision level of the switch.

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

MSTP revision level, together with region name and VLAN mapping table, is used for determining the MST region to which the switch belongs.

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

Example

# Set the MSTP revision level of the switch 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.11  stp

Syntax

stp { enable | disable }

undo stp

View

System view, Ethernet port view

Parameter

enable: Enables global or port MSTP.

disable: Disables global or port MSTP.

Description

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

Use the undo stp command to restore the default MSTP state on a device or a port.

By default, MSTP is disabled on the switch.

After MSTP is enabled, the switch determines to run MSTP in STP-compatible mode or MSTP mode as per your configurations. The switch serves as a transparent bridge after MSTP is disabled.

After MSTP is enabled, it will dynamically maintain the spanning tree state of the corresponding VLAN according to the received configuration BPDU until it is disabled. After MSTP is disabled, it will not maintain the state.

By default, global and port MSTP are disabled. When you enable MSTP on a device or a port, both global and port MSTP are enabled; if you do not enable MSTP globally, you will fail to use the stp enable command on a port.

Related command: stp mode, stp interface.

Example

# Enable MSTP globally.

<H3C>system-view

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

[H3C] stp enable

# Disable MSTP on Ethernet 2/1/1

<H3C>system-view

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

[H3C] interface Ethernet 2/1/1

[H3C-Ethernet 2/1/1] stp disable

1.1.12  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 on the switch. Use the undo stp bpdu-protection command to restore the default state of BPDU protection.

By default, BPDU protection is disabled.

Generally, the access ports of the access layer devices are directly connected to user terminals (such as PC) or file servers. In this case, the access ports are set to edge ports to implement fast state transition. However, when such access ports receive configuration BPDU, the system will automatically set them to non-edge ports and recalculate the spanning tree, which makes the network topology flap. These ports will not receive any STP configuration BPDU in normal cases. Anyway, if someone maliciously attacks the switch with fake configuration BPDU, the network will flap.

MSTP provides BPDU protection function to avoid such attack: After configured with BPDU protection, the switch will disable the edge port through MSTP, which receives a BPDU, and notify the network manager at same time. These ports can be resumed by the network manager only.

Example

# Enable BPDU protection on the switch.

<H3C>system-view

System View: return to User View with Ctrl+Z

[H3C] stp bpdu-protection

1.1.13  stp bridge-diameter

Syntax

stp bridge-diameter bridgenum

undo stp bridge-diameter

View

System view

Parameter

bridgenum: Ranges from 2 to 7 and defaults to 7.

Description

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

The definition of network diameter: Maximum count of switches between the farthest communication ends.

The stp bridge-diameter command configures the switching network diameter and determines the three time parameters of MSTP accordingly. This configuration takes effect on CIST only but makes no sense for MSTI.

The spanning tree convergence can be speeded up, when Hello Time, Forward Delay, and Max Age are well configured. These parameters are related to the network scale.

You can configure the network scale to get the time parameters. When users configure the bridge-diameter parameter of the switch, MSTP will automatically set Hello Time, Forward Delay, and Max Age to moderate values. When bridge-diameter defaults to 7, the time parameters also take their respective default values.

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

 

&  Note:

The stp bridge-diameter command configures the switching network diameter and determines the three MSTP time parameters (Hello Time, Forward Delay, and Max Age) accordingly.

 

Example

# Set the diameter of the switching network to 5.

<H3C>system-view

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

[H3C] stp bridge-diameter 5

1.1.14  stp cost

Syntax

stp [ instance instance-id ] cost cost

undo stp [ instance instance-id ] cost

View

Ethernet port view

Parameter

instance instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. The Instance 0 represents CIST.

cost cost: Port path cost. Its range depends on the selected standard of path cost.

Description

Use the stp instance cost command to configure the port path cost on the specified MSTI for the current port.

Use the undo stp instance cost command to restore the path cost on the specified MSTI.

By default, switch calculates the path costs of a port on different MSTIs.

You may specify the instance-id parameter as 0 to configure CIST path cost of the port. The path cost has effect on the port role selection. A port can be configured with different path costs on different MSTIs. Thus the traffic from different VLANs can run over different physical links, thereby implementing the VLAN-based load-balancing. MSTP will recalculate the port role and transit its state, upon the port path cost changes.

Related command: stp interface instance cost.

Example

# Set the path cost of Ethernet 2/1/3 on MSTI 2 to 200.

<H3C>system-view

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

[H3C] interface Ethernet 2/1/3

[H3C-Ethernet2/1/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 port as an edge port.

disable: Configures the current 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 default state, i.e., non-edge port.

By default, all the switch ports are configured as non-edge ports.

If the current Ethernet port is connected to other switch, you can use the stp edged-port disable or no stp edged-port command to configure it as a non-edge port. The stp edged-port enable command is used for configuring the port as an edge port.

A port is considered as an edge port when it is directly connected to the user terminal, instead of any other switches or shared network segments. The edge port will not cause loop upon network topology changes. Accordingly, you can configure a port as an edge port, so that it can transit to forwarding state fast. For this purpose, configure the Ethernet port directly connected to the user terminal as an edge port.

Because the edge port is not connected to any other switches, it will not receive the configuration BPDUs from them.

 

  Caution:

If the STP function has been enabled on the downstream equipment of the switch, do not configure edge port on the equipment. Otherwise the system will fail to delete the MAC address table entries and ARP address table entries on the port.

 

Related command: stp interface edged-port.

Example

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

<H3C>system-view

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

[H3C] interface Ethernet 2/1/1

[H3C-Ethernet2/1/1] stp edged-port disable

1.1.16  stp instance root primary

Syntax

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

undo stp [ instance instance-id ] root

View

System view

Parameter

instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. Specify it as 0 to configure the root bridge of CIST.

root primary: Configures the current switch as the primary root of the specified MSTI.

bridge-diameter bridgenum: Specifies the network diameter of the spanning tree, ranging from 2 to 7.

hello-time centi-senconds: Specifies the Hello Time of the spanning tree, which is in the range from 100 to 1000 and measured in centiseconds.

Description

Use the stp root primary command to configure the current switch as the primary root of the specified MSTI.

Use the undo stp root command to cancel the current switch for the primary root of the designated MSTI.

If you execute these commands without using the instance instance-id option, your configuration takes effect only on the CIST instance.

When you set the instance-id parameter to 0, its following parameter setting takes effect.

By default, the switch does not server as a root bridge.

You can specify one root bridge for each MSTI regardless of the switch priority. When setting a root bridge, you can use this command to specify the switching network diameter and determine the three time parameters (Hello time, Forward Delay and Max Age). Because the switch calculates inaccurate Hello time value, you can specify the switching network diameter and the Hello Time for the root bridge, and thus determine other two parameter values for the root bridge. In general, you are recommended to determine the other two time parameter values by setting the network diameter.

 

  Caution:

In a switching network, you can configure only one root bridge for each MSTI and one or more secondary switches. Do not configure more than one root bridge for an MSTI at the same time. Otherwise, the calculation result will be unpredictable.

After a switch is configured as a primary root bridge or a secondary root bridge, users cannot modify the bridge priority of the switch.

 

Example

# Designate the current switch as the root bridge of MSTI 0 and specify the diameter of the switching network as 4 and the Hello Time as 500 centiseconds.

<H3C>system-view

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

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

1.1.17  stp interface

Syntax

stp interface interface-list { enable | disable }

View

System view

Parameter

interface-list: Ethernet port list, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

enable: Enables MSTP on the port.

disable: Disables MSTP on the port.

Description

Use the stp interface command to enable/disable MSTP on a switch port in system view.

By default, if MSTP is enabled globally, it is enabled on every port. If MSTP is disabled globally, it is also disabled on every port.

When MSTP is disabled, the corresponding port stays in forwarding state and does not take part in any MSTI calculation.

 

  Caution:

If you disable MSTP on a port, a loop may be generated.

 

Related command: stp mode, stp.

Example

# Enable MSTP on Ethernet 2/1/1 in system view.

<H3C>system-view

System View: return to User View with Ctrl+Z

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

1.1.18  stp interface instance 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, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. The instance 0 represents CIST.

cost: Port path cost. Its range depends on the selected standard of path cost.

Description

Use the stp interface cost command to configure the path cost of the specified port on the specified MSTI in system view.

Use the undo stp interface cost command to restore the path cost of the specified port on the specified MSTI to the default value in system view.

By default, switch automatically calculates the path costs of a port on different MSTIs based on corresponding standard.

You may specify the instance-id parameter as 0 to configure CIST path cost of the port. The path cost has effect on the port role selection. You can configure different path costs for different MSTIs on a port. Thus the traffic from different VLANs can run over different physical links, thereby implementing the VLAN-based load-balancing. MSTP will recalculate the port role and transit its state, upon the port path cost changes.

Related command: stp cost.

Example

# Set the path cost of Ethernet 2/1/3 on MSTI 2 to 400 in system view.

<H3C>system-view

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

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

1.1.19  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, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

enable: Configures the current port as an edge port.

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

Description

Use the stp interface edged-port enable command to configure a port as an edge port in system view.

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

Use the undo stp interface edged-port command to restore the port to the default type (that is, non-edge port) in system view.

By default, all the switch ports are configured as non-edge ports.

If the current Ethernet port is connected to other switches, you can use the stp interface edged-port disable or undo stp interface edged-port command to configure it as a non-edge port. The stp interface edged-port enable command is used for configuring the port as an edge port.

A port is considered as an edge port when it is directly connected to the user terminal, instead of any other switches or shared network segments. The edge port will not cause loop upon network topology changes. Accordingly, you can configure a port as an edge port, so that it can transit to forwarding state fast. For this purpose, configure the Ethernet port directly connected to the user terminal as an edge port.

Because the edge port is not connected to any other switches, it will not receive the configuration BPDUs from them.

Related command: stp edged-port.

Example

# Configure Ethernet2/1/3 as an edge port in system view.

<H3C>system-view

System View: return to User View with Ctrl+Z

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

1.1.20  stp interface instance 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, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times

instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. The Instance 0 represents CIST.

port priority priority: Specifies the port priority, ranging from 0 to 240 with a step length of 16, e.g., 0, 16 and 32. By default, the port has a priority of 128 on every MSTI.

Description

Use the stp interface instance port priority command to configure the priority of the specified port on the specified MSTI in system view.

Use the undo stp interface instance port priority command to restore the default priority.

You may specify the instance-id parameter as 0 to configure CIST priority of the port. The port priority has effect on the port role selection for the specified MSTI. A port can be configured with different priorities on different MSTIs. Thus the traffic from different VLANs can run over different physical links, thereby implementing the VLAN-based load-balancing. MSTP will recalculate the port role and transit its state, upon the port priority changes.

Related command: stp instance port priority.

Example

# Set the priority of Ethernet 2/1/3 on MSTI 2 to 16 in system view.

<H3C>system-view

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

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

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, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times

Description

Use the stp interface loop-protection command to enable loop protection on the switch in system view.

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

When port roles change, you can use the stp interface loop-protection command to change port state from forwarding state to discarding state, thus avoiding port loopback.

Use the undo stp interface loop-protection command to restore the default running state of loop protection in system view.

The root port and other blocked ports maintain their state according to the BPDUs sent by uplink switch. Due to link congestion or unidirectional link failure, these ports may be unable to receive BPDUs and the switch will select root port again. In this case, the former root port will turn into the specified port and the former blocked ports will change to the forwarding state, and link loop appears.

The loop protection function can inhibit the generation of loop. After it is enabled, the root port role will change according to the uplink port state. The blocked port will maintain in discarding state and do not forward packets, thus avoiding link loop.

By default, loop protection is disabled.

 

  Caution:

If the equipment connected to the port of the switch cannot send STP packets to the switch, do not configure the loop-protection command; otherwise the port will be congested for a long time.

 

Related command: stp loop-protection.

 

&  Note:

For a loopback port, if the port participates in STP calculation, it must be specified port regardless of internal loop or external loop. However, the port is always set to be in discarding state on all instances.

 

Example

# Enable loop protection on the Ethernet2/1/1.

<H3C>system-view

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

[H3C] stp interface Ethernet2/1/1 loop-protection

1.1.22  stp interface mcheck

Syntax

stp interface interface-list mcheck

View

System view

Parameter

interface-list: Ethernet port list, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times

Description

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

If a port of an MSTP switch on a switching network has ever been connected to an STP switch, the port will automatically transit to operate in STP-compatible mode. However, when the STP switch is removed, the port stays in STP-compatible mode and cannot automatically transit back to MSTP mode. In this case, you can perform mCheck operation to transit the port to MSTP mode by force.

 

&  Note:

By default, MSTP runs in MSTP mode, which is compatible with RSTP and STP (This mode can recognize MSTP BPDU, STP config BPDU and RSTP config BPDU). However, the STP switch can only recognize config BPDU (STP BPDU) sent by the STP and RSTP bridges. After the switch running STP-compatible mode switches back to MSTP mode, it will not send MSTP BPDU if you do not execute the stp mcheck command. Therefore, the connected device still sends config BPDU (STP BPDU) to it, causing the same configuration exist in different regions and other problems. Remember to perform stp interface mCheck after modifying stp mode.

 

Related command: stp mcheck, stp mode.

Example

# Set the mcheck parameter of Ethernet2/1/3 in system view.

<H3C>system-view

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

[H3C] stp interface Ethernet2/1/3 mcheck

1.1.23  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, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

force-true: Indicates the Ethernet port connected to a point-to-point link.

force-false: Indicates the Ethernet port not connected to a point-to-point link.

auto: Configures to automatically check if the link to the Ethernet port is a point-to-point link.

Description

Use the stp interface point-to-point command to configure a port (not) to be connected to a point-to-point link in system view.

Use the undo stp interface point-to-point command to restore the default state of the link to the Ethernet port.

By default, the parameter defaults to auto, that is, MSTP checks if the link to the Ethernet port is a point-to-point link.

The port not connected with the point-to-point link cannot transit fast.

The master ports of the link aggregation and the ports operating in full-duplex mode are connected to the point-to-point link. You are recommended to keep the default settings and let MSTP detect the link state automatically.

This configuration takes effect on the CIST and all the MSTIs. The settings of a port whether to connect the point-to-point link will be applied to all the MSTIs where the port belongs. Note that a temporary loop may be redistributed if you configure a port not physically connected with the point-to-point link as connected to such a link by force.

Related command: stp point-to-point.

Example

# Configure Ethernet2/1/3 to be connected to the point-to-point link.

<H3C>system-view

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

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

1.1.24  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, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

Description

Use the stp interface root-protection command to enable Root protection on the switch in system view.

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

By default, Root protection is disabled.

In case of configuration error or malicious attack, the legal primary root may receive the BPDU with a higher priority and then loose its place, which causes network topology change errors. Due to the illegal change, the traffic supposed to travel over the high-speed link may be pulled to the low-speed link and congestion will occur on the network.

Root protection function is used against such problem. The port configured with Root protection only plays a role of designated port on every instance. Whenever such port receives a higher-priority BPDU, that is, it is about to turn into non-designated port, it will be set to listening state and not forward packets any more (as if the link to the port is disconnected). So, Root protection takes effect only when it is enabled on a designated port. If the port has not received any higher-priority BPDU for a certain period of time thereafter, it will resume its original state.

Related command: stp root-protection.

Example

# Enable Root protection on the Ethernet2/1/1

<H3C>system-view

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

[H3C] stp interface Ethernet2/1/1root-protection

1.1.25  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, containing multiple Ethernet ports and expressed as interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. For detail descriptions of interface-type and interface-number parameters, refer to the corresponding descriptions in Port Command Manual. &<1-10> means that the preceding parameters can be entered up to 10 times.

packetnum: Maximum number of configuration BPDUs that can be transmitted via the port per Hello Time, ranging from 1 to 255 (expressed as a counter value without any units). By default, the transmission limit on every port is 3.

Description

Use the stp interface transmit-limit command to configure an amount limit to the configuration BPDU transmitted via a specified port during the Hello Time in system view.

Use the undo stp interface transmit-limit command to restore the default limit on the specified port in system view.

The larger the value is, the more packets can be transmitted in a time unit, yet the more switch resources will be occupied. With a moderate value, the amount of the BPDUs transmitted during Hello Time via every port can be limited and MSTP will not occupy too many bandwidth resources when the network topology flaps.

Related command: stp transmit-limit.

Example

# Set a limit of 5 to the packets transmitted via Ethernet2/1/3 in system view.

<H3C>system-view

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

[H3C] stp interface Ethernet2/1/3transmit-limit 5

1.1.26  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 loop protection function.

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

By default, the loop protection function is not enabled.

 

&  Note:

The port configured with loop protection can only turn into discarding state on every instance. When such port receives no configuration message for a long time, only the port role changes, its discarding state remains unchanged, so no packets are forwarded. In this way, if the peer end cannot send BPDU packets due to error operation, and the port enters forwarding state directly for not receiving configuration message for a long time, no loop will be generated by enabling the loop protection.

 

  Caution:

If the equipment connected to the port of the switch cannot send STP packets to the switch, do not configure the loop-protection command; otherwise the port will be congested for a long time.

 

Example

# Enable loop protection function in Ethernet2/1/1.

<H3C>system-view

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

[H3C] interface Ethernet2/1/1

[H3C-Ethernet2/1/1] stp loop-protection

1.1.27  stp max-hops

Syntax

stp max-hops hop

undo stp max-hops

View

System view

Parameter

hop: Specifies the max hops, ranging from 1 to 40. By default, MST region Max Hops is 20.

Description

Use the stp max-hops command to configure the Max Hops of an MST region.

Use the undo stp max-hops command to restore the default Max Hops.

On CIST and MSTIs, the Max Hops configured on the region root determines the max switching network diameter supported by the local MST region. As the BPDU travels from the spanning tree root, each time when it is forwarded by a switch, the max hops will be reduced by 1. The switch discards the configuration BPDU with 0 hops left, thereby limiting the network scale inside the region. If the current switch is a CIST root bridge or MSTI root bridge in an MST region, the Max Hops configured on it will be the network diameter of the spanning tree to limit its scale in the local MST region. The Max Hops configured on the root bridge in an MST region will be adopted by other switches in the same region.

Example

# Set the Max Hops of an MST region to 35.

<H3C>system-view

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

[H3C] stp max-hops 35

1.1.28  stp mcheck

Syntax

stp mcheck

View

Ethernet port view

Parameter

None

Description

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

If a port of an MSTP switch on a switching network has ever been connected to an STP switch, the port will automatically transit to operate in STP-compatible mode. However, when the STP switch is removed, the port stays in STP-compatible mode and cannot automatically transit back to MSTP mode. In this case, you can perform mCheck operation to transit the port to MSTP mode by force.

 

&  Note:

By default, MSTP runs in MSTP mode, which is compatible with RSTP and STP (This mode can recognize MSTP BPDU, STP config BPDU and RSTP config BPDU). However, the STP switch can only recognize config BPDU (STP BPDU) sent by the STP and RSTP bridges. After the switch running STP-compatible mode switches back to MSTP mode, it will not send MSTP BPDU if you do not execute the stp mcheck command. Therefore, the connected device still sends config BPDU (STP BPDU) to it, causing the same configuration exist in different regions and other problems. Remember to perform stp interface mCheck after modifying stp mode.

 

Related command: stp mode, stp interface mcheck.

Example

# Set mcheck parameter for Ethernet2/1/1.

<H3C>system-view

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

[H3C] interface Ethernet2/1/1

[H3C-Ethernet2/1/1] stp mcheck

1.1.29  stp mode

Syntax

stp mode { stp | mstp }

undo stp mode

View

System view

Parameter

stp: Configures the MSTP operation mode as STP-compatible.

mstp: Configures the MSTP operation mode as MSTP.

Description

Use the stp mode command to configure MSTP operation mode of the switch.

Use the undo stp mode command to restore the default MSTP operation mode.

By default, switch work in MSTP mode

MSTP and RSTP are compatible and they can recognize the packets of each other. However, STP cannot recognize MSTP packets. To implement the compatibility, MSTP provides two operation modes, STP-compatible mode and MSTP mode. In STP-compatible mode, the switch sends STP BPDU packets via every port. In MSTP mode, the switch ports send MSTP BPDU packets. When detecting it is connected to an STP switch (it receives config BPDU packets from the STP switch), the switch port enters automatically STP-compatible mode and sends config BPDU packets from the STP switch. The port enters MSTP mode only when receiving MSTP BPDU packets again.

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

Example

# Set MSTP operation mode as STP-compatible.

<H3C>system-view

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

[H3C] stp mode stp

1.1.30  stp non-flooding

Syntax

stp non-flooding [ slot slotnum ]

undo stp non-flooding [ slot slotnum ]

View

System view

Parameter

slot slotnum: Specifies the slot of the LPU (line process unit). The slotnum argument is the slot number.

Description

Use the stp non-flooding command to discard BPDU packets received by STP-disabled ports.

Use the undo stp non-flooding command to forward BPDU packets within the VLAN to which the STP-disabled ports belong.

By default, BPDU non-flooding is disabled.

Related command: stp enable.

Example

# -Discard BPDU packets received on STP-disabled port.

<H3C> system-view

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

[H3C] interface GigabitEthernet3/1/1

[H3C-GigabitEthernet3/1/1]stp disable

[H3C] stp non-flooding

# Discard BPDU packets received on STP-disabled port on slot 3.

<H3C> system-view

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

[H3C] interface GigabitEthernet3/1/1

[H3C-GigabitEthernet3/1/1]stp disable

[H3C] stp non-flooding slot 3

# Discard BPDU packets received on all ports when STP is not globally enabled.

<H3C> system-view

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

[H3C] stp disable

[H3C] stp non-flooding

1.1.31  stp pathcost-standard

Syntax

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

View

System view

Parameter

dot1t, dot1d-1998, legacy : Three standards of the path cost calculation on STP port.

Description

Use the stp pathcost-standard command to set the path cost calculation standard on STP port.

The port rate must be obtained first before you can calculate the path cost of a port as the path cost is associated with the port rate. The three standards use their own way to work out the port rate, based on which each standard calculates the port path cost by a certain algorithm.

By default, the legacy standard is applied for the switch S9500.

Example

# Set the DOT1D-1998 as the path cost calculation standard on the STP port.

<H3C>system-view

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

[H3C] stp pathcost-standard dot1d-1998  

1.1.32  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: Indicates the Ethernet port connected to a point-to-point link.

force-false: Indicates the Ethernet port not connected to a point-to-point link.

auto: Configures to automatically check if the link to the Ethernet port is a point-to-point link.

Description

Use the stp point-to-point command to configure the current Ethernet port (not) to connect with point-to-point link.

Use undo stp point-to-point command to configure the link state to the default state in which MSTP automatically detects if the link to the Ethernet port is point-to-point link.

By default, switch adopts auto mode.

The port not connected with the point-to-point link cannot transit fast.

The master ports of the link aggregation and the ports operating in full-duplex mode are connected to the point-to-point link. You are recommended to keep the default settings and let MSTP detect the link state automatically.

This configuration takes effect on the CIST and all the MSTIs. The settings of a port whether to connect the point-to-point link will be applied to all the MSTIs where the port belongs. Note that a temporary loop may be redistributed if you configure a port not physically connected with the point-to-point link as connected to such a link by force.

Related command: stp interface point-to-point.

Example

# Configure Ethernet2/1/3 to be connected to the point-to-point link.

<H3C> system-view

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

[H3C] interface Ethernet2/1/3

[H3C-Ethernet2/1/3] stp point-to-point force-true

1.1.33  stp port priority

Syntax

stp [ instance instance-id ] port priority priority

undo stp [ instance instance-id ] port priority

View

Ethernet port view

Parameter

instance instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. The Instance 0 represents CIST.

port priority priority: Specifies the port priority, ranging from 0 to 240, with a step length of 16, e.g., 0, 16, and 32. By default, the priorities of a port on the MSTIs are 128.

Description

Use the stp port priority command to configure the priority of a port on a specified MSTI.

Use the undo stp port priority command to restore the default priority of the port on the specified MSTI.

You may specify the instance-id parameter as 0 to configure CIST priority of the port. The port priority has effect on the port role selection. A port can be configured with different priorities on different MSTIs. Thus the traffic from different VLANs can run over different physical links, thereby implementing the VLAN-based load-balancing. MSTP will recalculate the port role and transit its state, upon the port priority changes.

If you execute these commands without using the instance instance-id option, your configuration takes effect only on the CIST instance.

Related command: stp interface port priority.

Example

# Set the priority of Ethernet2/1/3 on MSTI 2 to 16.

<H3C> system-view

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

[H3C] interface Ethernet2/1/3

[H3C-Ethernet2/1/3] stp instance 2 port priority 16

1.1.34  stp region-configuration

Syntax

stp region-configuration

undo stp region-configuration

View

System view

Parameter

None

Description

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

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

By default, the three MST region parameters take the default values. The MST region name of the switch is the first MAC address, all the VLANs are mapped to CIST, and MSTP revision level takes 0.

You can enter MST region view, using the stp region-configuration command. Then you can configure the parameters including region name, revision level, and VLAN mapping table of the region.

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.35  stp instance root secondary

Syntax

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

undo stp [ instance instance-id ] root

View

System view

Parameter

instance instance-id: Specifies the spanning tree instance ID, ranging from 0 to 48. Specify it as 0 to configure CIST.

root secondary: Configures the current switch as the secondary root of the designated MSTI.

bridge-diameter bridgenum: Specifies the network diameter of the spanning tree, ranging from 2 to 7.

hello-time centi-senconds: Specifies the Hello Time of the spanning tree, which is in the range from 100 to 1000 and is measured in centiseconds.

Description

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

Use the undo stp root command to cancel the current switch for the secondary root bridge of a specified MSTI.

Only when the instance-id parameter is set to 0, can its following parameters take effect.

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

You can configure one or more secondary root bridges in an MSTI. If the primary root is down or powered off, the secondary root will take its place. Among several secondary root bridges, the one with the smallest MAC address takes the place of the failed primary root.

When configuring the secondary root bridge, you may also specify the switching network diameter and the Hello Time of the switch, so that the other two parameters, Forward Delay and Max Age, of the switch can be determined. To configure the current switch as the root bridge of CIST, simply specify instance-id as 0. You can configure only one root bridge for an MSTI and one or more secondary root bridges for it.

After a switch is configured as a primary root bridge or a secondary root bridge, users cannot modify the bridge priority of the switch.

Example

# Configure the current switch as the secondary root bridge of MSTI 0 and specify the diameter of the switching network as 5 and the Hello Time of the switch as 300 centiseconds.

<H3C>system-view

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

[H3C] stp instance 0 root primary bridge-diameter 5 hello-time 300

1.1.36  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 on Root protection the switch.

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

By default, Root protection is disabled.

In case of configuration error or malicious attack, the legal primary root may receive the BPDU with a higher priority and then loose its place, which causes network topology change errors. Due to the illegal change, the traffic supposed to travel over the high-speed link may be pulled to the low-speed link and congestion will occur on the network.

MSTP provides Root protection function to protect the root bridge: The port configured with Root protection only plays a role of designated port on every instance. Whenever such a port receives a higher-priority BPDU, it will be set to listening state and not forward packets any more (as if the link to the port is disconnected). If the port has not received any higher-priority BPDU for a certain period of time thereafter, it will resume the normal state.

Related command: stp interface root-protection.

Example

# Enable Root protection on the Ethernet2/1/1 port of the switch.

<H3C>system-view

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

[H3C] interface Ethernet2/1/1

[H3C-Ethernet2/1/1] stp root-protection

1.1.37  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 protection function so that the switch is protected against attack from TC-BPDU packets.

Use the stp tc-protection disable command to disable the protection function.

By default, the protection against TC-BPDU packet attack is enabled.

As a general rule, the switch deletes the corresponding entries in the MAC address table and ARP table upon receiving TC-BPDU packets. Under malicious attacks of TC-BPDU packets, the switch shall receive a great number of TC-BPDU packets in a very short period. Too frequent delete operations shall consume huge switch resources and bring great risk to network stability.

When the protection from TC-BPDU packet attack is enabled, the switch just perform one delete operation in a specified period (generally, 15 seconds) after receiving TC-BPDU packets, as well as monitoring whether it receives TC-BPDU packets during this period. Even if it detects a TC-BPDU packet is received in a period shorter than the specified interval, the switch shall not run the delete operation till the specified interval is reached. This can avoid frequent delete operations to the MAC address table and ARP table.

Example

# Enable TC-BPDU protection on the switch.

<H3C>system-view

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

[H3C] stp tc-protection enable

1.1.38  stp timer forward-delay

Syntax

stp timer forward-delay centi-senconds

undo stp timer forward-delay

View

System view

Parameter

centi-senconds: Specifies Forward Delay, which is in the range from 400 to 3000 and measured in centiseconds. By default, the Forward Delay of the switch is 1500 centiseconds.

Description

Use the stp timer forward-delay command to configure Forward Delay for the switch.

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

To avoid temporary loop, MSTP defines a medium state, Learning, when the port switches from the Discarding state to Forwarding state. There is also a delay before state switchover to guarantee the synchronous switchover with the remote switch. The Forward Delay configured on the root bridge determines the state transition time.

The root bridge will determine the state transition time according to the configured values, while the other switches will apply the forward delay configured on it.

When configuring Hello time, Forward Delay and Max Age, guarantee the following equations:

2 x (Forward Delay - 1.0 second) >= Max Age

Max Age >= 2 x (Hello Time + 1.0 second)

Only if the above-mentioned formulas are equal can the MSTP normally operate on the entire network. Otherwise, the network may flap frequently. You are recommended to use the stp bridge-diameter command to specify the diameter of the switching network, so that MSTP can automatically calculate and give the moderate values for the time parameters.

 

&  Note:

Hello time, Forward Delay and Max Age affect each other. Modifying any of them will affect the value of other two parameters.

 

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

Example

# Set the Forward Delay of the device to 2000 centiseconds.

<H3C>system-view

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

[H3C] stp timer forward-delay 2000

1.1.39  stp timer hello

Syntax

stp timer hello centi-senconds

undo stp timer hello

View

System view

Parameter

centi-senconds: Specifies Hello Time value with an integer in the range of 100 to 1000 in units of centiseconds. By default, the Hello Time of the switch is 200 centiseconds.

Description

Use the stp timer hello command to configure Hello Time of the switch.

Use the undo stp timer hello command to restore the default Hello Time.

The STP defines to transmit configuration BPDU regularly at an interval specified with Hello Time to keep the spanning tree stable. If the switch receives no BPDU packets for a period of time, it will recalculate the spanning tree upon the BPDU timeouts. The root bridge transmits BPDU packets at an interval as you configured, while other switches apply the Hello Time configured on the root bridge.

When configuring Hello time, Forward Delay and Max Age, remember to guarantee the following equations:

2 x (Forward Delay -1.0 second) >= Max Age

Max Age >= 2 x (Hello Time + 1.0 second)

Only if the earlier-mentioned formulas are equal can the MSTP normally operate on the entire network. Otherwise, the network may flap frequently. You are recommended to use the stp bridge-diameter command to specify the diameter of the switching network, so that MSTP can automatically calculate and give the moderate values for the time parameters.

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

Example

# Set Hello Time of the switch to 400 centiseconds.

<H3C>system-view

System View: return to User View with Ctrl+Z

[H3C] stp timer hello 400

1.1.40  stp timer max-age

Syntax

stp timer max-age centi-senconds

undo stp timer max-age

View

System view

Parameter

centi-seconds: Specifies the Max Age, which is in the range from 600 to 4000 and measured with centiseconds. By default, the Max Age of the switch is 2000 centiseconds.

Description

Use the stp timer max-age command to configure the Max Age of the switch.

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

MSTP can detect the link fault and automatically resume the forwarding state of the redundant link. On the CIST, the switch checks if the configuration BPDU received via the port expires according to the Max Age. If the BPDU expires, the MSTI has to be calculated again.

Max Age takes no effect on MSTIs. If the current switch is CIST root bridge, it will check if the configuration BPDU expires according to the configured Max Age. Otherwise, the switch adopts the Max Age configured on the CIST root bridge.

When you configure Hello time, Forward Delay and Max Age, remember to guarantee the following equations:

2 x (Forward Delay -1.0 second) >= Max Age

Max Age >= 2 x (Hello Time + 1.0 second)

Only if the earlier-mentioned formulas are equal can the MSTP normally operate on the entire network. Otherwise, the network may flap frequently. You are recommended to use the stp bridge-diameter command to specify the diameter of the switching network, so that MSTP can automatically calculate and give the moderate values for the time parameters.

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

Example

# Set Max Age of the device to 1000 centiseconds.

<H3C>system-view

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

[H3C] stp timer max-age 1000

1.1.41  stp timer-factor

Syntax

stp timer-factor number

undo stp timer-factor

View

System view

Parameter

number: Specifies the multiple of hello time, in the range of 1 to 10. The default value is 3.

Description

Use the stp timer-factor command to configure the multiple of hello time for the switch.

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

The Ethernet switch transmits STP packets every hello time. Generally, if the switch does not receive the STP packets from the upstream switch for three times of hello time, the switch will decide the upstream switch is dead and will recalculate the topology of the network. Then in steady network, the recalculation may be caused when the upstream is busy. In this case, users can redefine the timeout interval to a longer time (four times the hello time or larger) by define the multiple of hello time. It is recommended to set 5, 6 or 7 as the value of multiple in the steady network.

Example

# Set the multiple value of hello time to 7.

<H3C>system-view

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

[H3C] stp timer-factor 7

1.1.42  stp transmit-limit

Syntax

stp transmit-limit packetnum

undo stp transmit-limit

View

Ethernet port view

Parameter

packetnum: Specifies the amount limit to the transmitted packets, ranging from 1 to 255 (expressed as a counter value without any units). By default, the value is 3.

Description

Use the stp transmit-limit command to configure an amount limit to the configuration BPDU transmitted via a port during the Hello Time.

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

The larger the value is, the more packets can be transmitted in a time unit, yet the more switch resources will be occupied. With a moderate value, the amount of the BPDUs transmitted during Hello Time via every port can be limited and MSTP will not occupy too many bandwidth resources when the network topology flaps.

Related command: stp interface transmit-limit.

Example

# Set a limit of 5 to the packets transmitted via Ethernet2/1/1.

<H3C>system-view

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

[H3C] interface Ethernet2/1/1

[H3C-Ethernet2/1/1] stp transmit-limit 5

1.1.43  vlan-mapping modulo

Syntax

vlan-mapping modulo modulo

undo vlan-mapping modulo

View

MST region view

Parameter

modulo: Specifies the modulus, ranging from 1 to 48.

Description

Use the vlan-mapping modulo command to map fast and symmetrically all VLAN lists to the specified MSTIs according to the modulo operation results.

Use the undo vlan-mapping modulo command to disable the function.

By default, all the VLANs are mapped to CIST, namely Instance 0.

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

Example

# Map VLAN to MSTI based on modulo 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  Digest Snooping Configuration Commands

2.1  Digest Snooping Configuration Commands

2.1.1  stp config-digest-snooping

Syntax

stp config-digest-snooping

undo stp config-digest-snooping

View

System view, Ethernet port view

Parameter

None

Description

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

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

Digest snooping is disabled by default.

According to IEEE 802.1s, two connected switches can communicate with each other through multiple spanning tree instances (MSTIs) in a multiple spanning tree protocol (MSTP) domain only when they are configured with the same domain settings. With MSTP employed, interconnected switches determine whether or not they are in the same domain by checking the configuration IDs of the bridge protocol data units (BPDUs) between them. (A configuration ID comprises information such as domain ID, configuration digest.)

As switches of some manufacturers come with some proprietary protocols concerning spanning trees employed, a switch of this type cannot communicate with other switches in an MSTP domain even if it is configured with the same domain settings as other switches in the MSTP domain.

This kind of problems can be overcome by implementing digest snooping. Digest snooping enables a switch to track and maintain configuration digests of other switches that are in the same domain and come from other manufacturers by examining their BPDUs. It also enables the switch to insert corresponding configuration digests in its BPDUs destined for these switches. In this way, switches of different manufacturers are capable of communicating with each other in an MSTP domain.

 

&  Note:

l      You must enable digest snooping on a port first before enabling it globally.

l      Digest snooping is unnecessary if the interconnected switches are from the same manufacturer.

l      When implementing digest snooping, make sure that the domain configurations of the switches of different manufacturers are exactly the same to prevent possible broadcast storm caused by otherwise inconsistent mapping relationships between VLANs and VPN instances of each switch.

l      If you want to change the configuration of a domain with one or multiple of its switches being digest snooping-enabled, be sure to disable digest snooping on these switches first to prevent possible broadcast storm caused by otherwise inconsistent mapping relationships between VLANs and VPN instances of each switch.

l      To enable digest snooping, all ports in an MSTP domain connecting to switches coming from other manufacturers must have digest snooping enabled.

l      Do not enable digest snooping on border ports of an MSTP domain.

l      A digest snooping-enabled switch always keeps the latest configuration digests it receives. A configuration digest remains valid even if the corresponding port goes down.

 

Example

# Enable digest snooping on the GigabitEthernet3/1/1 port.

<H3C> system-view

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

[H3C] interface GigabitEthernet3/1/1

[H3C-GigabitEthernet3/1/1] stp config-digest-snooping

[H3C-GigabitEthernet3/1/1] quit

[H3C]stp config-digest-snooping

 


Chapter 3  BPDU Tunnel Configuration Commands

3.1  BPDU Tunnel Configuration Commands

3.1.1  vlan-vpn enable

Syntax

vlan-vpn enable

undo vlan-vpn

View

Ethernet port view

Parameter

None

Description

Use the command vlan-vpn enable to enable VLAN VPN (QinQ) on the port.

Use the undo vlan-vpn command to disable VLAN VPN (QinQ) on the port.

By default, VLAN VPN is disabled on all the ports.

Example

# Enable VLAN VPN on the switch.

<H3C>system-view

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

[H3C] interface Ethernet3/1/3

[H3C-Ethernet3/1/3]vlan-vpn enable                

3.1.2  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 bridge protocol data unit (BPDU) Tunnel on the switch.

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

BPDU Tunnel enables geographically segmented user network to transmit BPDU packets transparently over the specified VLAN VPN on the operator’s network. This allows the user network to participate in a uniform spanning tree calculation while maintaining a separate spanning tree from the operator network.

By default, BPDU Tunnel is disabled.

 

  Caution:

l      To enable BPDU Tunnel on a switch, you must first enable STP on it. Otherwise, the client network BPDU will not be processed by the CPU when entering the switch, nor MAC address replacement or transparent transmission will be implemented.

l      To enable BPDU Tunnel on a port, you must configure the port as access and the intermediate carrier network as trunk.

l      You cannot enable BPDU Tunnel on a port on which DOT1X, GVRP, STP or NTDP is enabled.

 

Example

# Enable BPDU Tunnel on 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 Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网