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

CLI-based Configuration Guide - Ethernet Switching

AR650, AR1600, and AR6100 V300R003

This document describes how to configure the components for LAN services, including link aggregation groups, VLANs, voice VLANs, MAC address tables, transparent bridging, as well as GVRP, STP/RSTP, and MSTP protocols.
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).
Example for Configuring Basic MSTP Functions

Example for Configuring Basic MSTP Functions

Networking Requirements

On a complex network, loops are inevitable. With the requirement for network redundancy backup, network designers tend to deploy multiple physical links between two devices, one of which is the master and the others are the backup. Loops are likely or bound to occur in such a situation.

Loops will cause broadcast storms, thereby exhausting network resources and paralyzing the network. Loops also cause flapping of MAC address tables and damages MAC address entries.

MSTP can be deployed to eliminate loops. MSTP blocks redundant links on a Layer 2 network and trims the network into a loop-free tree.

As shown in Figure 11-13, to load balance traffic of VLANs 2 to 10 and traffic of VLANs 11 to 20, multiple MSTIs are created. MSTP defines a VLAN mapping table in which VLANs are associated with spanning tree instances. Run MSTP on RouterA, SwitchA, SwitchB, SwitchC and SwitchD.

Figure 11-13  Networking diagram of configuring basic MSTP functions

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure basic MSTP functions, including:
    1. Configure the MSTP mode for the ring network.

    2. Configure an MST region and create multiple MSTIs to implement load balancing.

    3. In the MST region, configure a primary root bridge and a secondary root bridge for each MSTI.

    4. Set path costs for ports to be blocked in each MSTI.

    5. Enable MSTP to eliminate loops, including:
      • Enable MSTP globally.

      • Disable MSTP on the interfaces that connected to terminals, or configure those interfaces as edge ports.

      • Enable MSTP on all the interfaces except the interfaces connected to terminals.

      NOTE:

      MSTP is not required on the interfaces connected to terminals because these interfaces do not need to participate in MSTP calculation.

  2. Configure MSTP protection functions, for example, configure root protection on a designated port of a root bridge in each MSTI.

  3. Configure the Layer 2 forwarding function on devices.

Procedure

  1. Configure basic MSTP functions.

    1. Configure the MSTP mode for the devices on the ring network.

      # Configure the MSTP mode on RouterA.

      <Huawei> system-view
      [Huawei] sysname RouterA
      [RouterA] stp mode mstp

      # Configure the MSTP mode on SwitchA, SwitchB, SwitchC and SwitchD.

    2. Add all devices to MST region RG1, and create two MSTIs. MSTI1 maps to VLAN (2 to 10), and MSTI2 maps to VLAN (11 to 20).

      # Configure RouterA to MST region.

      [RouterA] stp region-configuration
      [RouterA-mst-region] region-name RG1
      [RouterA-mst-region] instance 1 vlan 2 to 10
      [RouterA-mst-region] instance 2 vlan 11 to 20
      [RouterA-mst-region] active region-configuration
      [RouterA] quit

      # Configure SwitchA, SwitchB, SwitchC and SwitchD to MST region RG1, and create two MSTIs. MSTI1 maps to VLAN (2 to 10), and MSTI2 maps to VLAN (11 to 20).

    3. In RG1, configure primary and secondary root bridges for MSTI1 and MSTI2.

      # Configure primary root bridge on RouterA in MSTI1.

      [RouterA] stp instance 1 root primary

      # Configure secondary root bridge on SwitchA in MSTI1.

      # Configure primary root bridge on RouterA in MSTI2.

      [RouterA] stp instance 2 root primary

      # Configure secondary root bridge on SwitchB in MSTI2.

    4. Set the path costs of the ports to be blocked in MSTI1 and MSTI2 to be larger than the default value.

      NOTE:
      • The values of path costs depend on path cost calculation methods. Use the Huawei proprietary calculation method as an example to set the path costs of the ports to be blocked to 200000.

      • If the switches are not Huawei 2300 Series, all switches on a network must use the same path cost calculation method. Refer to STP List of path costs to get standard of other calculation methods.

      # On RouterA, configure the path cost calculation method as the Huawei proprietary method.

      [RouterA] stp pathcost-standard legacy

      # On SwitchA, SwitchB, SwitchC and SwitchD, configure the path cost calculation method as the Huawei proprietary method.

      # As shown in Figure 11-13, set the path cost of Eth0/0/4 on SwitchC to 200000 in MSTI1.

      # As shown in Figure 11-13, set the path cost of Eth0/0/4 on SwitchD to 200000 in MSTI2.

    5. Enable MSTP to eliminate loops.

      • Disable MSTP on interfaces connected to PCs, or set those interfaces as edge ports.

        # As shown in Figure 11-13, disable MSTP on interface Eth0/0/2 and Eth0/0/3 of SwitchC, or set them as edge ports.

        # As shown in Figure 11-13, disable MSTP on interface Eth0/0/2 and Eth0/0/3 of SwitchD, or set them as edge ports.

      • Enable MSTP globally.

        # Enable MSTP globally on RouterA.

        [RouterA] stp enable

        # Enable MSTP globally on SwitchA, SwitchB, SwitchC and SwitchD.

      • Enable MSTP on all the interfaces except the interfaces connected to terminals.

        # Enable MSTP on RouterA Eth2/0/0 and Eth2/0/1.

        [RouterA] interface ethernet 2/0/0
        [RouterA-Ethernet2/0/0] stp enable
        [RouterA-Ethernet2/0/0] quit
        [RouterA] interface ethernet 2/0/1
        [RouterA-Ethernet2/0/1] stp enable
        [RouterA-Ethernet2/0/1] quit

        # As shown in Figure 11-13, Enable MSTP on all interfaces except the interfaces connected to terminals, for SwitchA, SwitchB, SwitchC and SwitchD.

  2. Configure MSTP protection function.

    # Enable root protection on RouterA Eth2/0/0 and Eth2/0/1.

    [RouterA] interface ethernet 2/0/0
    [RouterA-Ethernet2/0/0] stp root-protection
    [RouterA-Ethernet2/0/0] quit
    [RouterA] interface ethernet 2/0/1
    [RouterA-Ethernet2/0/1] stp root-protection
    [RouterA-Ethernet2/0/1] quit

  3. Configure the Layer 2 forwarding function on devices in the ring.

    • Create VLANs on RouterA, SwitchA, SwitchB, SwitchC and SwitchD.

      # Create VLANs 2 to 20 on RouterA.

      [RouterA] vlan batch 2 to 20

      # Create VLANs 2 to 20 on SwitchA and SwitchB.

      # Create VLANs 2 to 10 on SwitchC.

      # Create VLANs 11 to 20 on SwitchD.

    • Add interfaces on the switching devices in the ring to VLANs.

      # Add RouterA Eth2/0/0 and Eth2/0/1 to VLAN 2 to 20.

      [RouterA] interface ethernet 2/0/0
      [RouterA-Ethernet2/0/0] port link-type trunk
      [RouterA-Ethernet2/0/0] port trunk allow-pass vlan 2 to 20
      [RouterA-Ethernet2/0/0] quit
      [RouterA] interface ethernet 2/0/1
      [RouterA-Ethernet2/0/1] port link-type trunk
      [RouterA-Ethernet2/0/1] port trunk allow-pass vlan 2 to 20
      [RouterA-Ethernet2/0/1] quit

      # Add interfaces Eth0/0/1, Eth0/0/2 and Eth0/0/3 on SwitchA and SwitchB to VLAN 2 to 20.

      # Add interfaces Eth0/0/1, Eth0/0/2, Eth0/0/3 and Eth0/0/4 on SwitchC to VLAN 2 to 10.

      # Add interfaces Eth0/0/1, Eth0/0/2, Eth0/0/3 and Eth0/0/4 on SwitchD to VLAN 11 to 20.

  4. Verify the configuration.

    # After the previous configurations, run the following commands to verify the configuration when the network is stable:

    # run display stp brief on RouterA to view the interface status and protection type. The displayed information is as follows:

    [RouterA] display stp brief
     MSTID  Port                        Role  STP State     Protection
       0    Ethernet2/0/0               DESI  FORWARDING      ROOT
       0    Ethernet2/0/1               DESI  FORWARDING      ROOT
       1    Ethernet2/0/0               DESI  FORWARDING      ROOT
       1    Ethernet2/0/1               DESI  FORWARDING      ROOT
       2    Ethernet2/0/0               DESI  FORWARDING      ROOT
       2    Ethernet2/0/1               DESI  FORWARDING      ROOT

    # In MSTI1, after RouterA is configured as a root bridge, RouterA Eth2/0/0 and Eth2/0/1 are elected as designated ports during spanning tree calculation. In MSTI2, after RouterA is configured as a root bridge, RouterA Eth2/0/0 and Eth2/0/1 are elected as designated ports during spanning tree calculation.

    # Verify the interface status and protection type on SwitchA. In MSTI1, interface Eth0/0/1 is elected as root port, interfaces Eth0/0/2 and Eth0/0/3 are elected as designated ports. In MSTI2, interface Eth0/0/1 is elected as root port, interfaces Eth0/0/2 and Eth0/0/3 are elected as designated ports.

    # Verify the interface status and protection type on SwitchB. In MSTI1, interface Eth0/0/1 is elected as root port, interfaces Eth0/0/2 and Eth0/0/3 are elected as designated ports. In MSTI2, interface Eth0/0/1 is elected as root port, interfaces Eth0/0/2 and Eth0/0/3 are elected as designated ports.

    # Verify the interface status and protection type on SwitchC. In MSTI1, interface Eth0/0/1 is elected as root port, interface Eth0/0/4 is blocked. In MSTI2, interface Eth0/0/1 is elected as root port, interface Eth0/0/4 is elected as designated port.

    # Verify the interface status and protection type on SwitchD. In MSTI1, interface Eth0/0/1 is elected as root port, interface Eth0/0/4 is elected as designated port. In MSTI2, interface Eth0/0/1 is elected as root port, interface Eth0/0/4 is blocked.

Configuration Files

  • Configuration file of RouterA

    #
     sysname RouterA
    #
    vlan batch 2 to 20
    #
     stp instance 1 root primary
     stp instance 2 root primary
     stp pathcost-standard legacy
    #
     stp region-configuration
      region-name RG1
      instance 1 vlan 2 to 10
      instance 2 vlan 11 to 20
      active region-configuration
    #
    interface Ethernet2/0/0
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
     stp root-protection
    #
    interface Ethernet2/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
     stp root-protection
    #
    return
  • Configuration file of SwitchA

    #
     sysname SwitchA
    #
    vlan batch 2 to 20
    #
     stp instance 1 root secondary
     stp pathcost-standard legacy
    #
     stp region-configuration
      region-name RG1
      instance 1 vlan 2 to 10
      instance 2 vlan 11 to 20
      active region-configuration
    #
    interface Ethernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    interface Ethernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    interface Ethernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    return
  • Configuration file of SwitchB

    #
     sysname SwitchB
    #
    vlan batch 2 to 20
    #
     stp instance 2 root secondary
     stp pathcost-standard legacy
    #
     stp region-configuration
      region-name RG1
      instance 1 vlan 2 to 10
      instance 2 vlan 11 to 20
      active region-configuration
    #
    interface Ethernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    interface Ethernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    interface Ethernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    return
  • Configuration file of SwitchC

    #
     sysname SwitchC
    #
    vlan batch 2 to 10
    #
     stp pathcost-standard legacy
    #
     stp region-configuration
      region-name RG1
      instance 1 vlan 2 to 10
      instance 2 vlan 11 to 20
      active region-configuration
    #
    interface Ethernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 10
    #
    interface Ethernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 10
     stp disable
    #
    interface Ethernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 2 to 10
     stp disable
    #
    interface Ethernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 2 to 10
     stp instance 1 cost 200000
    #
    return
  • Configuration file of SwitchD

    #
     sysname SwitchD
    #
    vlan batch 11 to 20
    #
     stp pathcost-standard legacy
    #
     stp region-configuration 
      region-name RG1 
      instance 1 vlan 2 to 10 
      instance 2 vlan 11 to 20 
      active region-configuration 
    #
    interface Ethernet0/0/1 
     port link-type trunk
     port trunk allow-pass vlan 11 to 20
    #
    interface Ethernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 11 to 20
     stp disable
    #
    interface Ethernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 11 to 20
     stp disable
    #
    interface Ethernet0/0/4
     port link-type trunk
     port trunk allow-pass vlan 11 to 20
     stp instance 2 cost 200000 
    #
    return
Download
Updated: 2019-04-12

Document ID: EDOC1100041791

Views: 64696

Downloads: 41

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