No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 13

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring MSTP

Configuring MSTP

This section describes the MSTP configuration.

Configuring Basic MSTP Functions

MSTP based on the basic STP/RSTP function divides a switching network into multiple regions, each of which has multiple spanning trees that are independent of each other. MSTP isolates different VLANs' traffic, and load-balances VLAN traffic.

Context

MSTP is commonly configured on switching devices to trim a ring network to a loop-free network. Devices start spanning tree calculation after the working mode is set and MSTP is enabled. Use any of the following methods if you need to intervene in the spanning tree calculation:

  • Manually configure the root bridge and secondary root bridge.

  • Set a priority for a switching device in an MSTI: The lower the numerical value, the higher the priority of the switching device and the more likely the switching device becomes a root bridge; the higher the numerical value, the lower the priority of the switching device and the less likely that the switching device becomes a root bridge.

  • Set a path cost for a port in an MSTI: With the same calculation method, the lower the numerical value, the smaller the cost of the path from the port to the root bridge and the more likely the port becomes a root port; the higher the numerical value, the larger the cost of the path from the port to the root bridge and the less likely that the port becomes a root port.

  • Set a priority for a port in an MSTI: The lower the numerical value, the more likely the port becomes a designated port; the higher the numerical value, the less likely that the port becomes a designated port.

Configuring the MSTP Mode

Context

Before configuring basic MSTP functions, set the working mode of a switching device to MSTP. MSTP is compatible with STP and RSTP.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp mode mstp

    The working mode of the switching device is set to MSTP. By default, the working mode is MSTP.

    STP and MSTP cannot recognize packets of each other, but MSTP and RSTP can. If an MSTP-enabled switching device is connected to switching devices running STP, interfaces of the MSTP-enabled switching device connected to devices running STP automatically transition to STP mode, and other interfaces still work in MSTP mode. This enables devices running different spanning tree protocols to interwork with each other.

  3. Run:

    commit

    The configuration is committed.

Configuring an MST Region

Context

An MST region contains multiple directly connected switching devices and network segments between these switching devices. These switching devices run MSTP and have the same MST region name, VLAN mapping table, and MSTP revision level. A switching network can contain multiple MST regions. You can run MSTP configuration commands to divide multiple switching devices into an MST region.

Two switching devices belong to the same MST region when they have the same following items:
  • MST region name

  • Mapping between VLANs and MSTIs

  • Revision level of the MST region

Do as follows on the switching device that needs to be added to the MST region.

Procedure

  • Configure the name of an MST region.
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp region-configuration

      The MST region view is displayed.

    3. Run:

      region-name name

      The name of an MST region is configured.

      By default, the name of an MST region is the MAC address of the management network port on the switch module.

    4. (Optional) Run:

      check region-configuration

      The device is configured to check the MST region name.

    5. Run:

      commit

      The configuration is committed.

  • Configure the mapping between MSTIs and VLANs.

    You can configure the mapping between MSTIs and VLANs in the MST region view and VLAN instance view.

    Configure the mapping between an MSTI and VLANs in the MST region view.

    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp region-configuration

      The MST region view is displayed.

    3. Run:

      instance instance-id vlan { vlan-id1 [ to vlan-id2 ] }&<1-10>

      The mapping between MSTIs and VLANs is configured.

      By default, all VLANs in an MST region are mapped to MSTI 0.

      A VLAN can be mapped to only one MSTI. After a VLAN has been mapped to an MSTI, the previous mapping is deleted if you map the VLAN to another MSTI.

    4. (Optional) Run:

      check region-configuration

      The device is configured to check the mapping between MSTIs and VLANs.

    5. Run:

      commit

      The configuration is committed.

    Configure the mapping between an MSTI and VLANs in the VLAN instance view.

    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      vlan instance

      The VLAN instance view is displayed.

    3. Run:

      instance instance-id vlan { vlan-id1 [ to vlan-id2 ] }&<1-10>

      The mapping between MSTIs and VLANs is configured.

      By default, all VLANs in VLAN instance view are mapped to MSTI 0.

      The vlan instance and stp region-configuration commands cannot be used simultaneously.

    4. (Optional) Run:

      check vlan instance mapping

      The configuration is checked.

    5. Run:

      commit

      The configuration is committed.

  • (Optional) Configure the revision level of the MST region.
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp region-configuration

      The MST region view is displayed.

    3. Run:

      revision-level level

      The MSTP revision level of the MST region is configured.

      By default, the revision level of an MST region is 0.

      If the MSTP revision level of the MST region that the switching device resides is not 0, perform this operation.

    4. (Optional) Run:

      check region-configuration

      The device is configured to check the MSTP revision level of the MST region.

    5. Run:

      commit

      The configuration is committed.

(Optional) Configuring the Root Bridge and Secondary Root Bridge

Context

The root bridge can be calculated through calculation. You can also manually configure the root bridge or secondary root bridge.
  • A switching device plays different roles in different spanning trees. The switching device can function as the root switch or secondary root switch of a spanning tree and the root switch or secondary root switch of another spanning tree. The switching device can function as only the root switch or secondary root switch of the same spanning tree.
  • In a spanning tree, only one root bridge takes effect. When two or more than two devices are specified as root bridges of a spanning tree, the device with the smallest MAC address is used as the root bridge.
  • You can specify multiple secondary root bridges for each spanning tree. When the root bridge fails or is powered off, the secondary root bridge becomes the new root bridge. If a new root bridge is specified, the secondary root bridge will not become the root bridge. If multiple secondary root bridges are configured, the secondary root bridge with smallest MAC address will become the root bridge of the spanning tree.

It is recommended that the root bridge and secondary root bridge be configured manually.

Procedure

  • Perform the following operations on the device to be used as the root bridge.
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp [ instance instance-id ] root primary

      The device is configured as the root bridge.

      By default, a switching device does not function as the root bridge. After the configuration is complete, the priority value of the device is 0 and cannot be changed.

      If instance is not specified, the device in MSTI 0 is a root bridge.

    3. Run:

      commit

      The configuration is committed.

  • Perform the following operations on the device to be used as the secondary root bridge.
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp [ instance instance-id ] root secondary

      The device is configured as the secondary root bridge.

      By default, a switching device does not function as the secondary root bridge. After the configuration is complete, the priority value of the device is 4096 and cannot be changed.

      If instance is not specified, the device in MSTI 0 is a backup root bridge.

    3. Run:

      commit

      The configuration is committed.

(Optional) Configuring a Priority for a Switching Device in an MSTI

Context

In an MSTI, there is only one root bridge, which is the logic center of the MSTI. During root bridge selection, a high-performance switching device at a high network layer should be selected as the root bridge; however, the priority of such a device may not be the highest on the network. It is therefore necessary to set a high priority for the switching device to ensure that the device functions as a root bridge.

Low-performance devices at lower network layers are not fit to serve as a root bridge. Therefore, set low priorities for these devices.

A switching device with a high priority is more likely to be selected as the root bridge in an MSTI. A smaller priority value indicates a higher priority.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp [ instance instance-id ] priority priority

    A priority is set for the switching device in an MSTI.

    The default priority value of the switching device is 32768.

    If the instance-id is not designated, a priority is set for the switching device in MSTI0.

    If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root secondary command has been executed to configure the device as the root bridge or secondary root bridge, to change the device priority, run the undo stp [ instance instance-id ] root command to disable the root bridge or secondary root bridge function and run the stp [ instance instance-id ] priority priority command to set a priority.

  3. Run:

    commit

    The configuration is committed.

(Optional) Configuring a Path Cost of a Port in an MSTI

Context

A path cost is port-specific and is used by MSTP to select a link.

Path costs of ports are an important basis for calculating spanning trees. If you set different path costs for a port in different MSTIs, VLAN traffic can be transmitted along different physical links for load balancing.

The MSTP path cost determines root port selection in an MSTI. The port with the lowest path cost to the root bridge is selected as the root port.

If a network has loops, it is recommended that you set a relatively large path cost for ports with low link rates. MSTP then blocks these ports.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

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

    A path cost calculation method is configured.

    By default, the IEEE 802.1t standard (dot1t) is used to calculate the default path cost.

    All switching devices on a network must use the same path cost calculation method.

  3. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  4. Run:

    stp [ process process-id ] [ instance instance-id ] cost cost

    A path cost is set for the port in the current MSTI.

    • When the Huawei calculation method is used, cost ranges from 1 to 200000.
    • When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
    • When the IEEE 802.1t standard method is used, cost ranges from 1 to 200000000.

  5. Run:

    commit

    The configuration is committed.

(Optional) Configuring a Port Priority in an MSTI

Context

During spanning tree calculation, port priorities in MSTIs determine which ports are selected as designated ports.

To block a port in an MSTI to eliminate loops, set the port priority value to larger than the default value. This port will be blocked during designated port selection.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  3. Run:

    stp instance instance-id port priority priority

    A port priority is set in an MSTI.

    By default, the port priority is 128.

    The value range of the priority is from 0 to 240, in steps of 16.

  4. Run:

    commit

    The configuration is committed.

Enabling MSTP

Context

After configuring basic MSTP functions on a switching device, enable MSTP function.

After MSTP is enabled on a ring network, it immediately calculates spanning trees on the network. Configurations on the switching device, such as, the switching device priority and port priority, will affect spanning tree calculation. Any change to the configurations may cause network flapping. Therefore, to ensure rapid and stable spanning tree calculation, perform basic configurations on the switching device and its ports and enable MSTP.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp enable

    MSTP is enabled on the switching device.

  3. Run:

    commit

    The configuration is committed.

Follow-up Procedure

When the topology of a spanning tree changes, the forwarding paths to associated VLANs are changed. The ARP entries corresponding to those VLANs on the switching device need to be updated. MSTP processes ARP entries in either fast or normal mode.

  • In fast mode, ARP entries to be updated are directly deleted.

  • In normal mode, ARP entries to be updated are rapidly aged.

    The remaining lifetime of ARP entries to be updated is set to 0. The switching device rapidly processes these aged entries. If the number of ARP aging probe attempts is not set to 0, ARP implements aging probe for these ARP entries.

You can run the stp converge { fast | normal } command in the system view to configure the STP/RSTP convergence mode.

By default, the normal MSTP convergence mode is used.

The normal mode is recommended. If the fast mode is adopted, ARP entries will be frequently deleted, causing the CPU usage on device to reach 100%. As a result, network flapping will frequently occur.

Checking the Configuration

Procedure

  • Run the display stp [ process process-id ] [ instance instance-id ] [ interface interface-type interface-number | slot slot-id ] [ brief ] command to view spanning-tree status and statistics.
  • Run the display stp region-configuration command to view configurations of activated MST regions.
  • Run the display stp region-configuration digest command to view the digest configurations of activated MST regions.

Configuring MSTP Multi-Process

On a network with Layer 2 single-access rings and multi-access rings deployed, configure multiple MSTP processes so that spanning trees of different processes are calculated independently and do not affect each other.

Pre-configuration Tasks

MSTP ensures that spanning trees in rings are calculated independently. After MSTP multi-process is enabled, each MSTP process can manage some ports on a device. Layer 2 interfaces are managed by multiple MSTP processes, each of which runs the standard MSTP.

Before configuring MSTP multi-process, complete the following task:

  • Completing and activating the MST region configuration

Creating an MSTP Process

Context

A process ID uniquely identifies an MSTP multi-process. After an MSTP device binds its ports to different processes, the MSTP device performs the MSTP calculation based on processes, and only relevant ports in each process take part in MSTP calculation. Do as follows on the devices connected to access rings:

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp process process-id

    An MSTP process is created and the MSTP process view is displayed.

  3. Run:

    stp mode mstp

    A working mode is configured for the MSTP process.

    The default mode is MSTP.

    • After a device starts, there is a default MSTP process with the ID 0. MSTP configurations in the system view and interface view belong to this process. The default working mode of this process is MSTP.

    • To add an interface to an MSTP process with the ID of non-zero, run the stp process command and then the stp binding process command.

  4. Run:

    commit

    The configuration is committed.

Adding a Port to an MSTP Process

Context

After being added to MSTP processes, interfaces can participate in MSTP calculation:
  • The links connecting MSTP devices and access rings are called access links.

  • The link shared by multiple access rings are called a share link. The interfaces on the share link need to participate in MSTP calculation in multiple access rings in different MSTP processes.

Procedure

  • Adding a port to an MSTP process-access link
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      interface interface-type interface-number

      The Ethernet interface view is displayed.

      The interface specified in this command must be the interface that connects the device and the access ring.

    3. Run:

      stp binding process process-id

      The port is added to the specified MSTP process.

  • Adding a port to an MSTP process in link-share mode
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      interface interface-type interface-number

      The view of the Ethernet interface that participates in spanning tree calculation is displayed.

      The interface specified in this command must be an interface on the share link between the devices configured with MSTP multi-process but not the interfaces that connect an access ring and a device.

    3. Run:

      stp binding process process-id1 [ to process-id2 ] link-share

      The port is added to multiple MSTP processes to complete MSTP calculation.

      In an MSTP process where there are multiple share links, run the stp enable command in the MSTP multi-instance view. On an interface that is added to an MSTP process in link-share mode, run the stp enable command in the interface view.

(Optional) Configuring the Root Bridge and Secondary Root Bridge

Context

The root bridge can be calculated through calculation. You can also manually configure the root bridge or secondary root bridge.
  • A switching device plays different roles in different spanning trees. The switching device can function as the root switch or secondary root switch of a spanning tree and the root switch or secondary root switch of another spanning tree. The switching device can function as only the root switch or secondary root switch of the same spanning tree.
  • In a spanning tree, only one root bridge takes effect. When two or more than two devices are specified as root bridges of a spanning tree, the device with the smallest MAC address is used as the root bridge.
  • You can specify multiple secondary root bridges for each spanning tree. When the root bridge fails or is powered off, the secondary root bridge becomes the new root bridge. If a new root bridge is specified, the secondary root bridge will not become the root bridge. If multiple secondary root bridges are configured, the secondary root bridge with smallest MAC address will become the root bridge of the spanning tree.

It is recommended that the root bridge and secondary root bridge be configured manually.

Procedure

  • Perform the following operations on the device to be used as the root bridge.
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp process process-id

      The MSTP process view is displayed.

    3. Run:

      stp [ instance instance-id ] root primary

      The device is configured as the root bridge.

      By default, a switching device does not function as the root bridge. After the configuration is complete, the BID of the device is 0 and cannot be changed.

      If instance is not specified, the device in MSTI 0 is a root bridge.

    4. Run:

      commit

      The configuration is committed.

  • Perform the following operations on the device to be used as the secondary root bridge.
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp process process-id

      The MSTP process view is displayed.

    3. Run:

      stp [ instance instance-id ] root secondary

      The device is configured as the secondary root bridge.

      By default, a switching device does not function as the secondary root bridge. After the configuration is complete, the BID of the device is 4096 and cannot be changed.

      If instance is not specified, the device in MSTI 0 is a secondary root bridge.

    4. Run:

      commit

      The configuration is committed.

(Optional) Configuring a Priority for a Switching Device in an MSTI

Context

In an MSTI, there is only one root bridge, which is the logic center of the MSTI. During root bridge selection, a high-performance switching device at a high network layer should be selected as the root bridge; however, the priority of such a device may not be the highest on the network. It is therefore necessary to set a high priority for the switching device to ensure that the device functions as a root bridge.

A switching device with a high priority is more likely to be selected as the root bridge in an MSTI. A smaller priority value indicates a higher priority.

Low-performance devices at lower network layers are not fit to serve as a root bridge. Therefore, set low priorities for these devices.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp process process-id

    The MSTP process view is displayed.

  3. Run:

    stp [ instance instance-id ] priority priority

    A priority is set for the switching device in an MSTI.

    The default priority value of the switching device is 32768.

    If the instance is not designated, a priority is set for the switching device in MSTI0.

    • To configure a switching device as the primary root bridge, run the stp [ instance instance-id ] root primary command directly. The priority value of this switching device is 0.

    • To configure a switching device as the secondary root bridge, run the stp [ instance instance-id ] root secondary command. The priority value of this switching device is 4096.

      In an MSTI, a switching device cannot act as the primary root bridge and secondary root bridge at the same time.

    • If the stp [ instance instance-id ] root primary or stp [ instance instance-id ] root secondary command has been executed to configure the device as the root bridge or secondary root bridge, to change the device priority, run the undo stp [ instance instance-id ] root command to disable the root bridge or secondary root bridge function and run the stp [ instance instance-id ] priority priority command to set a priority.

  4. Run:

    commit

    The configuration is committed.

(Optional) Configuring a Path Cost of a Port in an MSTI

Context

A path cost is port-specific and is used by MSTP to select a link.

Path costs of ports are an important basis for calculating spanning trees. If you set different path costs for a port in different MSTIs, VLAN traffic can be transmitted along different physical links for load balancing.

The MSTP path cost determines root port selection in an MSTI. The port with the lowest path cost to the root bridge is selected as the root port.

If a network has loops, it is recommended that you set a relatively large path cost for ports with low link rates. MSTP then blocks these ports.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

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

    A path cost calculation method is configured.

    By default, the IEEE 802.1t standard (dot1t) is used to calculate the default path cost.

    All switching devices on a network must use the same path cost calculation method.

  3. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  4. Run:

    stp binding process process-id

    A port is bound to an MSTP process.

  5. Run:

    stp [ process process-id ] instance instance-id cost cost

    A path cost is set for the port in the current MSTI.

    • When the Huawei calculation method is used, cost ranges from 1 to 200000.
    • When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
    • When the IEEE 802.1t standard method is used, cost ranges from 1 to 200000000.

  6. Run:

    commit

    The configuration is committed.

(Optional) Configuring a Port Priority in an MSTI

Context

During spanning tree calculation, port priorities in MSTIs determine which ports are selected as designated ports.

To block a port in an MSTI to eliminate loops, set the port priority value to larger than the default value. This port will be blocked during designated port selection.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  3. Run:

    stp binding process process-id

    A port is bound to an MSTP process.

  4. Run:

    stp [ process process-id ] instance instance-id port priority priority

    A port priority is set in an MSTI.

    By default, the port priority is 128.

    The value range of the priority is from 0 to 240, in steps of 16.

  5. Run:

    commit

    The configuration is committed.

Configuring TC Notification in MSTP Multi-process

Context

After the TC notification function is configured for MSTP multi-process, the current MSTP process can notify the MSTIs in other specified MSTP processes to refresh MAC address entries and ARP entries after receiving a TC-BPDU. Nonstop services are ensured. Do as follows on the devices connected to access rings:

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp process process-id

    The view of the created MSTP process is displayed.

  3. Run:

    stp tc-notify process 0

    TC notification is enabled in the MSTP process.

    After the stp tc-notify process 0 command is run, the current MSTP process notifies the MSTIs in MSTP process 0 to update MAC entries and ARP entries after receiving a TC-BPDU. This prevents services from being interrupted.

  4. Run:

    commit

    The configuration is committed.

Enabling MSTP

Context

After MSTP multi-process is enabled on the switching device, you must enable MSTP in the MSTP process view so that the MSTP configuration can take effect in the MSTP process.

After MSTP is enabled on a ring network, it immediately calculates spanning trees on the network. Configurations on the switching device, such as, the switching device priority and port priority, will affect spanning tree calculation. Any change to the configurations may cause network flapping. Therefore, to ensure rapid and stable spanning tree calculation, perform basic configurations on the switching device and its ports and enable MSTP.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp process process-id

    The view of a created MSTP process is displayed.

  3. Run:

    stp enable

    MSTP is enabled on the MSTP process of the device.

    By default, MSTP is disabled on an MSTP process.

  4. Run:

    commit

    The configuration is committed.

Checking the Configuration

Procedure

  1. Run the display stp [ process process-id ] [ instance instance-id ] [ interface interface-type interface-number | slot slot-id ] [ brief ] command to view spanning-tree status and statistics.

Configuring MSTP Parameters on an Interface

Proper MSTP parameter settings achieve rapid convergence.

Pre-configuration Tasks

Before configuring MSTP parameters that affect route convergence, complete the following task:

  • Configuring MSTP or MSTP multi-process

Setting the MSTP Network Diameter

Context

On a switched network, any two terminals on the switching network are connected through a specific path along which multiple devices reside. The network diameter is the maximum number of devices between any two terminals. A larger network diameter indicates a larger network scale.

An improper network diameter may cause slow network convergence and affects communication. Run the stp bridge-diameter command to set a network diameter based on the network scale, which helps speed up convergence.

It is recommended that all devices use the same network diameter.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. (Optional) Run:

    stp process process-id

    The MSTP process view is displayed.

    This step is needed only when you perform configurations in an MSTP process with a non-zero ID. If you perform configurations in the MSTP process 0, skip this step.

  3. Run:

    stp bridge-diameter diameter

    The network diameter is configured.

    By default, the network diameter is 7.

    • RSTP uses a single spanning tree instance on the entire network. As a result, performance deterioration cannot be prevented when the network scale grows. Therefore, the network diameter cannot be larger than 7.

    • It is recommended that you run the stp bridge-diameter diameter command to set the network diameter. Then, the switching device calculates the optimal Forward Delay period, Hello timer value, and Max Age timer value based on the set network diameter.

  4. Run:

    commit

    The configuration is committed.

Setting the MSTP Timeout Interval

Context

If the device does not receive any BPDU from the upstream device in the set period, the device considers that the upstream device fails and then it re-calculates its spanning tree.

Sometimes, the device cannot receive the BPDU in a long time from the upstream device because the upstream device is very busy. In this case, the device should not re-calculate its spanning tree. Therefore, you can set a long period for the device on a stable network to avoid waste of network resources.

If the local switching device does not receive a BPDU from the upstream switching device within the timeout interval, spanning tree recalculation is performed. The timeout interval is calculated as follows:
  • Timeout interval = Hello time x 3 x Timer Factor

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. (Optional) Run:

    stp process process-id

    The MSTP process view is displayed.

    This step is needed only when you perform configurations in an MSTP process with a non-zero ID. If you perform configurations in the MSTP process 0, skip this step.

  3. Run:

    stp timer-factor factor

    The timeout period for waiting for BPDUs from the upstream device is set.

    By default, the timeout period is 9 times the Hello timer value.

  4. Run:

    commit

    The configuration is committed.

Setting the Values of MSTP Timers

Context

The following parameters are used in spanning tree calculation:
  • Forward Delay: determines the interval for port status transition. To prevent temporary loops, an interface first enters the Learning state when transiting from Discarding to Forwarding. The status transition lasts for the time specified by Forward Delay so that the local device can synchronize the status with the remote switch.
  • Hello Time: is the interval at which hello packets are sent. The switching device sends configuration BPDUs at an interval of Hello Time to check whether links are faulty. If the switching device does not receive any BPDU at an interval of the timeout period (timeout period = Hello Time x 3 x Timer Factor), the switching device recalculates the spanning tree due to BPDU timeout.
  • Max Age: determines whether BPDUs expire. The switching device determines whether the received BPDU expires based on this value. If the received BPDU expires, the spanning tree needs to be recalculated.

Devices on a ring network must use the same values of Forward Delay, Hello Time, and Max Age.

Generally, you are not advised to directly adjust the preceding three parameters. This is because the three parameters are relevant to the network scale. It is recommended that the network diameter be adjusted so that the spanning tree protocol automatically adjusts the three parameters. When the default network diameter is used, the default values of the three parameters are used.

To prevent frequent network flapping, make sure that Hello Time, Forward Delay, and Max Age conform to the following formulas:

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

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

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. (Optional) Run:

    stp process process-id

    The MSTP process view is displayed.

    This step is needed only when you perform configurations in an MSTP process with a non-zero ID. If you perform configurations in the MSTP process 0, skip this step.

  3. Set Forward Delay, Hello Time, and Max Age.
    1. Run:

      stp timer forward-delay forward-delay

      The value of Forward Delay of the switching device is set.

      By default, the value of Forward Delay of the switching device is 1500 centiseconds.

    2. Run:

      stp timer hello hello-time

      The value of Hello Time of the switching device is set.

      By default, the value of Hello Time of the switching device is 200 centiseconds.

    3. Run:

      stp timer max-age max-age

      The value of Max Age of the switching device is set.

      By default, the value of Max Age of the switching device is 2000 centiseconds.

  4. Run:

    commit

    The configuration is committed.

Setting the Maximum Number of Connections That Affect Spanning Tree Calculation

Context

The interface path cost affects spanning tree calculation. When the path cost changes, the system performs spanning tree recalculation. The interface path cost is affected by the bandwidth, so you can change the interface bandwidth to affect spanning tree calculation.

As shown in Figure 5-118, deviceA and deviceB are connected through two Eth-Trunks. Eth-Trunk 1 has three member interfaces in Up state and Eth-Trunk 2 has two member interfaces in Up state. If each member link has the same bandwidth, deviceA is selected as the root bridge.
  • Eth-Trunk 1 has larger bandwidth than Eth-Trunk 2. After STP calculation, Eth-Trunk 1 on deviceB is selected as the root port and Eth-Trunk 2 is selected as the alternate port.
  • If the maximum number of connections is 1 in Eth-Trunk 1, the path cost of Eth-Trunk 1 is larger than the path cost of Eth-Trunk 2. The system performs spanning tree recalculation. Then Eth-Trunk 1 on deviceB becomes the alternate port and Eth-Trunk 2 becomes the root port.
Figure 5-118 Setting the maximum number of connections

The maximum number of connections affects only the path cost of an interface where spanning tree calculation is performed, but does not affect the actual link bandwidth. The actual bandwidth for an Eth-Trunk to forward traffic depends on the number of active interfaces.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface eth-trunk trunk-id

    The Eth-Trunk interface view is displayed.

  3. Run:

    max bandwidth-affected-linknumber link-number

    The maximum number of connections is set.

    By default, the upper threshold for the number of interfaces that determine the bandwidth of an Eth-Trunk is 8 on the CX110 switch module GE switching plane and 16 on other models.

  4. Run:

    commit

    The configuration is committed.

Setting the Link Type of a Port

Context

It is easy to implement rapid convergence on a P2P link. If the two ports connected to a P2P link are root or designated ports, the ports can transit to the forwarding state quickly by sending Proposal and Agreement packets. This reduces the forwarding delay.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The view of the Ethernet interface participating in STP calculation is displayed.

  3. Run:

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

    The link type is configured for the interface.

    By default, an interface automatically determines whether to connect to a P2P link. The P2P link supports rapid network convergence.

  4. Run:

    commit

    The configuration is committed.

Setting the Maximum Transmission Rate of an Interface

Context

.A larger value of packet-number indicates more BPDUs sent in a hello interval and therefore more system resources occupied. Setting the proper value of packet-number prevents excess bandwidth usage when route flapping occurs.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The view of the Ethernet interface participating in STP calculation is displayed.

  3. Run:

    stp transmit-limit packet-number

    The maximum number of BPDUs sent by a port in a specified period is set.

    By default, the maximum number of BPDUs that an interface sends per second is the value configured using the stp transmit-limit (system view) command. If the stp transmit-limit (system view) command is not configured, an interface sends a maximum of 6 BPDUs per second.

    If the same maximum number of BPDUs need to be sent by each interface on a device, run the stp transmit-limit (system view) command. The stp transmit-limit (interface view) command takes precedence over the stp transmit-limit (system view) command. If the stp transmit-limit (interface view) command is run on an interface, the stp transmit-limit (system view) command does not take effect on the interface.

  4. Run:

    commit

    The configuration is committed.

Switching to the MSTP Mode

Context

If an interface on an MSTP-enabled device is connected to an STP-enabled device, the interface switches to the STP compatible mode.

If the STP-enabled device is powered off or disconnected from the MSTP-enabled device, the interface cannot switch to the MSTP mode. In this case, you can switch the interface to the MSTP mode by using the stp mcheck command.

In the following cases, you need to manually switch the interface back to the MSTP mode manually:

  • The STP-enabled device is shut down or disconnected.

  • The STP-enabled device is switched to the MSTP mode.

Procedure

  • Switching to the MSTP mode in the interface view
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      interface interface-type interface-number

      The view of the Ethernet interface that participates in spanning tree calculation is displayed.

    3. Run:

      stp mcheck

      The device is switched to the MSTP mode.

    4. Run:

      commit

      The configuration is committed.

  • Switching to the MSTP mode in the system view
    1. Run:

      system-view

      The system view is displayed.

    2. (Optional) Run:

      stp process process-id

      The MSTP process view is displayed.

      This step is needed only when you perform configurations in an MSTP process with a non-zero ID. If you perform configurations in the MSTP process 0, skip this step.

    3. Run:

      stp mcheck

      The device is switched to the MSTP mode.

    4. Run:

      commit

      The configuration is committed.

Configuring a Port as an Edge Port and BPDU Filter Port

Context

If a designated port is located at the edge of a network and is directly connected to terminal devices, this port is called edge port.

An edge port does not receive or process configuration BPDUs, or MSTP calculation. It can transit from Disable to Forwarding without any delay.

After a designated port is configured as an edge port, the port can still send BPDUs. Then BPDUs are sent to other networks, causing flapping of other networks. You can configure a port as an edge port and BPDU filter port so that the port does not process or send BPDUs.

After all ports are configured as edge ports and BPDU filter ports in the system view, none of ports on the device send BPDUs or negotiate the STP status with directly connected ports on the peer device. All ports are in forwarding state. This may cause loops on the network, leading to broadcast storms. Exercise caution when you configure a port as an edge port and BPDU filter port.

After a port is configured as an edge port and BPDU filter port in the interface view, the port does not process or send BPDUs. The port cannot negotiate the STP status with the directly connected port on the peer device. Exercise caution when you configure a port as an edge port and BPDU filter port.

Procedure

  • Configuring all ports as edge ports and BPDU filter ports in the system view
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      stp edged-port default

      All ports are configured as edge ports.

      By default, all ports are non-edge ports.

    3. Run:

      stp bpdu-filter default

      All ports are configured as BPDU filter ports.

      By default, a port is a non-BPDU filter port.

    4. Run:

      commit

      The configuration is committed.

  • Configuring a port as an edge port and BPDU filter port in the interface view
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      interface interface-type interface-number

      The view of the Ethernet interface that participates in spanning tree calculation is displayed.

    3. (Optional) Run:

      stp edged-port enable

      The port is configured as an edge port.

      By default, all ports are non-edge ports.

    4. Run:

      stp bpdu-filter enable

      The port is configured as a BPDU filter port.

      By default, a port is a non-BPDU filter port.

    5. Run:

      commit

      The configuration is committed.

Setting the Maximum Number of Hops in an MST Region

Context

Switching devices on a Layer 2 network running MSTP communicate with each other by exchanging MST BPDUs. An MST BPDU has a field that indicates the number of remaining hops.
  • The number of remaining hops in a BPDU sent by the root switching device equals the maximum number of hops.

  • The number of remaining hops in a BPDU sent by a non-root switching device equals the maximum number of hops minus the number of hops from the non-root switching device to the root switching device.

  • If a switching device receives a BPDU in which the number of remaining hops is 0, the switching device will discard the BPDU.

Therefore, the maximum number of hops of a spanning tree in an MST region determines the network scale. The stp max-hops command can be used to set the maximum number of hops in an MST domain so that the network scale of a spanning tree can be controlled.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. (Optional) Run:

    stp process process-id

    The MSTP process view is displayed.

    This step is needed only when you perform configurations in an MSTP process with a non-zero ID. If you perform configurations in the MSTP process 0, skip this step.

  3. Run:

    stp max-hops hop

    The maximum number of hops in an MST region is set.

    By default, the maximum number of hops of the spanning tree in an MST region is 20.

  4. Run:

    commit

    The configuration is committed.

Checking the Configuration

Procedure

  • Run the display stp [ process process-id ] [ instance instance-id ] [ interface interface-type interface-number | slot slot-id ] [ brief ] command to view spanning-tree status and statistics.

Configuring MSTP Protection Functions

Huawei datacom devices provide the following MSTP protection functions. You can configure one or more functions.

Pre-configuration Tasks

Before configuring MSTP protection functions, complete the following task:

  • Configuring MSTP or MSTP multi-process

Configuring BPDU Protection on a Switching Device

Context

Edge ports are directly connected to user terminal and will not receive BPDUs. Attackers may send pseudo BPDUs to attack the switching device. If the edge ports receive the BPDUs, the switching device configures the edge ports as non-edge ports and triggers a new spanning tree calculation. Network flapping then occurs. BPDU protection can be used to protect switching devices against malicious attacks.

After BPDU protection is enabled on a switching device, the switching device shuts down an edge port if the edge port receives a BPDU, and notifies the NMS of the shutdown event.

Perform the following steps on a switching device that has an edge port.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. (Optional) Run:

    stp process process-id

    The MSTP process view is displayed.

    This step is needed only when you perform configurations in an MSTP process with a non-zero ID. If you perform configurations in the MSTP process 0, skip this step.

  3. Run:

    stp bpdu-protection

    BPDU protection is enabled on the switching device.

    By default, BPDU protection is not enabled on the switching device.

  4. Run:

    commit

    The configuration is committed.

Follow-up Procedure

To allow an edge port to automatically start after being error-down, you can run the error-down auto-recovery cause bpdu-protection interval interval-value command to configure the auto recovery function and set the delay on the port. After the delay expires, the port automatically goes Up. Note the following when setting this parameter:
  • By default, the auto recovery function is disabled, so there is no delay. When you enable the auto recovery function, you must specify the recovery delay.
  • The smaller the interval-value is, the shorter it takes for the edge port to go Up, and the more frequently the edge port alternates between Up and Down.
  • The larger the interval-value is, the longer it takes for the edge port to go Up, and the longer the service interruption lasts.
  • The auto recovery function takes effect only for the interface that transitions to the error down state after the error-down auto-recovery command is executed.

Configuring TC Protection on a Switching Device

Context

If attackers forge TC-BPDUs to attack the switching device, the switching device receives a large number of TC BPDUs within a short time. If MAC address entries and ARP entries are deleted frequently, the switching device is heavily burdened, causing potential risks to the network.

TC protection is used to suppress TC BPDUs. The number of times that TC BPDUs are processed by a switching device within a given time period is configurable. If the number of TC BPDUs that the switching device receives within a given time exceeds the specified threshold, the switching device handles TC BPDUs only for the specified number of times. Excess TC BPDUs are processed by the switching device as a whole for once after the specified time period expires. This protects the switching device from frequently deleting MAC entries and ARP entries, therefore avoiding overburden.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. (Optional) Run:

    stp process process-id

    The MSTP process view is displayed.

    This step is needed only when you perform configurations in an MSTP process with a non-zero ID. If you perform configurations in the MSTP process 0, skip this step.

  3. Run:

    stp tc-protection

    TC protection is enabled for the MSTP process.

    By default, TC protection is not enabled on the switching device.

  4. Run either or both of the following commands to configure TC protection parameters.

    • To set the time for a device to process the maximum number of TC BPDUs, run the stp tc-protection interval interval-value command.

      By default, the time for a device to process the maximum number of TC BPDUs is the Hello time.

    • To set the maximum number of TC BPDUs that a device processes within a specified period, run the stp tc-protection threshold threshold command.

      By default, a device processes one TC BPDU within a specified period.

    • There are two TC protection parameters: time needed to process the maximum number of TC BPDUs and the maximum number of TC BPDUs processed within a specified period. For example, if the time is set to 10 seconds and the maximum number is set to 5, when a device receives TC BPDUs, the device processes only the first 5 TC BPDUs within 10 seconds and processes the other TC BPDUs after the time expires.

    • The device processes only the maximum number of TC BPDUs specified in the stp tc-protection threshold command within the time specified in the stp tc-protection interval command. The processing of other TC BPDUs is delayed, which may slow down spanning tree convergence.

  5. Run:

    commit

    The configuration is committed.

Configuring Root Protection on an Interface

Context

Due to incorrect configurations or malicious attacks on the network, a root bridge may receive BPDUs with a higher priority. Consequently, the legitimate root bridge is no longer able to serve as the root bridge and the network topology is changed, triggering spanning tree recalculation. This also may cause the traffic that should be transmitted over high-speed links to be transmitted over low-speed links, leading to network congestion. The root protection function on a switching device is used to protect the root bridge by preserving the role of the designated port.

Root protection takes effect only on designated ports.

Perform the following steps on the root bridge in an MST region.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The view of the Ethernet interface participating in STP calculation is displayed.

  3. (Optional) Run:

    stp binding process process-id

    The port is bound to an MSTP process.

    This step is performed only when the interface needs to be bound to an MSTP process with a non-zero ID. If the interface belongs to process 0, skip this step.

  4. Run:

    stp root-protection

    Root protection is configured on the switching device.

    By default, root protection is disabled.

  5. Run:

    commit

    The configuration is committed.

Configuring Loop Protection on an Interface

Context

On a network running MSTP, a switching device maintains the root port status and status of blocked ports by receiving BPDUs from an upstream switching device. If the switching device cannot receive BPDUs from the upstream device because of link congestion or unidirectional-link failure, the switching device re-selects a root port. The original root port becomes a designated port and the original blocked ports change to the Forwarding state. This switching may cause network loops, which can be mitigated by configuring loop protection.

After loop protection is configured, if the root port or alternate port does not receive BPDUs from the upstream switching device, the root port is blocked and the switching device notifies the NMS that the port enters the Discarding state. The blocked port remains in the Blocked state and no longer forwards packets. This function helps prevent loops on the network. The root port or alternate port transitions to the Forwarding state after receiving new BPDUs.

An alternate port is a backup port for a root port. If a switching device has an alternate port, you need to configure loop protection on both the root port and the alternate port.

Perform the following steps on the root port and alternate port on a switching device in an MST region.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  3. (Optional) Run:

    stp binding process process-id

    The port is bound to an MSTP process.

    This step is performed only when the interface needs to be bound to an MSTP process with a non-zero ID. If the interface belongs to process 0, skip this step.

  4. Run:

    stp loop-protection

    Loop protection for the root port is configured on the switching device.

    By default, loop protection is disabled.

    Root protection and loop protection cannot be configured simultaneously.

  5. Run:

    commit

    The configuration is committed.

Configuring Share-Link Protection on a Switching Device

Context

Share-link protection is used in the scenario where a switching device is dual homed to a network.

When a share link fails, share-link protection forcibly changes the working mode of a local switching device to RSTP. This function can also be used together with root protection to avoid network loops.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    stp process process-id

    The MSTP process view is displayed.

  3. Run:

    stp link-share-protection

    Share-link protection is enabled.

  4. Run:

    commit

    The configuration is committed.

Checking the Configuration

Procedure

  • Run the display stp [ process process-id ] [ instance instance-id ] [ interface interface-type interface-number | slot slot-id ] [ brief ] command to view spanning-tree status and statistics.

Configuring MSTP Interoperability Between Huawei Devices and Non-Huawei Devices

To communicate with a non-Huawei device, set proper parameters on the MSTP-enabled Huawei device.

Configuring a Proposal/Agreement Mechanism

Context

The rapid transition mechanism is also called the Proposal/Agreement mechanism. All switching devices support the following modes:

  • Enhanced mode: The current interface counts the root port calculation when it computes the synchronization flag bit.
    • An upstream device sends a Proposal message to a downstream device, requesting rapid status transition. After receiving the message, the downstream device sets the port connected to the upstream device as a root port and blocks all non-edge ports.

    • The upstream device then sends an Agreement message to the downstream device. After the downstream device receives the message, the root port transitions to the Forwarding state.

    • The downstream device responds to the Proposal message with an Agreement message. After receiving the message, the upstream device sets the port connected to the downstream device as a designated port, and the designated port transitions to the Forwarding state.

  • Common mode: The current interface ignores the root port when it computes the synchronization flag bit.
    • An upstream device sends a Proposal message to a downstream device, requesting rapid status transition. After receiving the message, the downstream device sets the port connected to the upstream device as a root port and blocks all non-edge ports. The root port then transitions to the Forwarding state.

    • The downstream device responds to the Proposal message with an Agreement message. After receiving the message, the upstream device sets the port connected to the downstream device as a designated port. The designated port then transitions to the Forwarding state.

When Huawei devices are connected to non-Huawei devices, select the same mode as that used on non-Huawei devices.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  3. Run:

    stp no-agreement-check

    The common rapid transition mechanism is configured.

    By default, the interface uses the enhanced rapid transition mechanism.

  4. Run:

    commit

    The configuration is committed.

Configuring the MSTP Protocol Packet Format on an Interface

Context

MSTP protocol packets have two formats: dot1s (IEEE 802.1s standard packets) and legacy (proprietary protocol packets).

You can specify the packet format and use the auto mode. In auto mode, the switching device switches the MSTP protocol packet format based on the received MSTP protocol packet format so that the switching device can communicate with the peer device.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  3. Run:

    stp compliance { auto | dot1s | legacy }

    The MSTP protocol packet format is configured on the interface.

    The auto mode is used by default.

  4. Run:

    commit

    The configuration is committed.

Enabling the Digest Snooping Function

Context

Interconnected Huawei and non-Huawei devices cannot communicate with each other if they have the same region name, revision number, and VLAN-to-instance mappings but different BPDU keys. To address this problem, enable the digest snooping function on the Huawei device.

Perform the following steps on a switching device in an MST region to enable the digest snooping function.

Procedure

  1. Run:

    system-view

    The system view is displayed.

  2. Run:

    interface interface-type interface-number

    The Ethernet interface view is displayed.

  3. Run:

    stp config-digest-snoop

    The digest snooping function is enabled.

  4. Run:

    commit

    The configuration is committed.

Checking the Configuration

Procedure

  • Run the display stp [ process process-id ] [ instance instance-id ] [ interface interface-type interface-number | slot slot-id ] [ brief ] command to view spanning-tree status and statistics.
Translation
Download
Updated: 2019-12-13

Document ID: EDOC1000041694

Views: 61117

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next