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 12

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).
Configuration Examples

Configuration Examples

This section provides several configuration examples of MSTP.

Example for Configuring MSTP

Networking Requirements

On a complex network, to implement redundancy, network designers tend to deploy multiple physical links between two devices, one of which is the master and the others are the backup. Loops occur, causing broadcast storms or damaging MAC addresses. After the network designer plans a network, you can deploy MSTP on the network to prevent loops. MSTP blocks redundant links and prunes a network into a tree topology free from loops.

As shown in Figure 5-119,SwitchA, SwitchB, SwitchC, and SwitchD run MSTP. to load balance traffic from VLANs 2 to 10 and VLANs 11 to 20, use MSTP multi-instance. You can configure a VLAN mapping table to associate VLANs with MSTIs.

Figure 5-119 Networking diagram of MSTP configuration

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic MSTP functions on the switching device on the ring network.

  2. Configure protection functions to protect devices or links. You can configure root protection on the designated port of the root bridge.

  3. Configure Layer 2 forwarding.

Procedure

  1. Configure basic MSTP functions.

    1. Configure SwitchA, SwitchB, SwitchC, and SwitchD in the same MST region named RG1 and create MSTI 1 and MSTI 2.

      NOTE:
      Two switching devices belong to the same MST region when they have the same:
      • Name of the MST region

      • Mapping between VLANs and MSTIs

      • Revision level of the MST region

      # Configure an MST region on SwitchA.

      <HUAWEI> system-view
      [~HUAWEI] sysname SwitchA
      [*HUAWEI] commit
      [~SwitchA] stp region-configuration
      [~SwitchA-mst-region] region-name RG1
      [*SwitchA-mst-region] instance 1 vlan 2 to 10
      [*SwitchA-mst-region] instance 2 vlan 11 to 20
      [*SwitchA-mst-region] commit
      [~SwitchA-mst-region] quit

      # Configure an MST region on SwitchB.

      <HUAWEI> system-view
      [~HUAWEI] sysname SwitchB
      [*HUAWEI] commit
      [~SwitchB] stp region-configuration
      [~SwitchB-mst-region] region-name RG1
      [*SwitchB-mst-region] instance 1 vlan 2 to 10
      [*SwitchB-mst-region] instance 2 vlan 11 to 20
      [*SwitchB-mst-region] commit
      [~SwitchB-mst-region] quit

      # Configure an MST region on SwitchC.

      <HUAWEI> system-view
      [~HUAWEI] sysname SwitchC
      [*HUAWEI] commit
      [~SwitchC] stp region-configuration
      [~SwitchC-mst-region] region-name RG1
      [*SwitchC-mst-region] instance 1 vlan 2 to 10
      [*SwitchC-mst-region] instance 2 vlan 11 to 20
      [*SwitchC-mst-region] commit
      [~SwitchC-mst-region] quit

      # Configure an MST region on SwitchD.

      <HUAWEI> system-view
      [~HUAWEI] sysname SwitchD
      [*HUAWEI] commit
      [~SwitchD] stp region-configuration
      [~SwitchD-mst-region] region-name RG1
      [*SwitchD-mst-region] instance 1 vlan 2 to 10
      [*SwitchD-mst-region] instance 2 vlan 11 to 20
      [*SwitchD-mst-region] commit
      [~SwitchD-mst-region] quit
    2. In the MST region RG1, configure the root bridge and secondary root bridge in MSTI 1 and MSTI 2.

      • Configure the root bridge and secondary root bridge in MSTI 1.

        # Configure SwitchA as the root bridge in MSTI 1.

        [~SwitchA] stp instance 1 root primary
        [*SwitchA] commit

        # Configure SwitchB as the secondary root bridge in MSTI 1.

        [~SwitchB] stp instance 1 root secondary
        [*SwitchB] commit
      • Configure the root bridge and secondary root bridge in MSTI 2.

        # Configure SwitchB as the root bridge in MSTI 2.

        [~SwitchB] stp instance 2 root primary
        [*SwitchB] commit

        # Configure SwitchA as the secondary root bridge in MSTI 2.

        [~SwitchA] stp instance 2 root secondary
        [*SwitchA] commit
    3. Set the path costs of the ports to be blocked in MSTI 1 and MSTI 2 to be greater than the default value.

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

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

      # Configure SwitchA to use Huawei calculation method to calculate the path cost.

      [~SwitchA] stp pathcost-standard legacy
      [*SwitchA] commit

      # Configure SwitchB to use Huawei calculation method to calculate the path cost.

      [~SwitchB] stp pathcost-standard legacy
      [*SwitchB] commit

      # Configure SwitchC to use Huawei calculation method to calculate the path cost, and set the path cost of 10GE1/17/2 in MSTI 2 to 20000.

      [~SwitchC] stp pathcost-standard legacy
      [*SwitchC] interface 10ge 1/17/2
      [*SwitchC-10GE1/17/2] stp instance 2 cost 20000
      [*SwitchC-10GE1/17/2] commit
      [~SwitchC-10GE1/17/2] quit

      # Configure SwitchD to use Huawei calculation method to calculate the path cost, and set the path cost of 10GE1/17/2 in MSTI 1 to 20000.

      [~SwitchD] stp pathcost-standard legacy
      [*SwitchD] interface 10ge 1/17/2
      [*SwitchD-10GE1/17/2] stp instance 1 cost 20000
      [*SwitchD-10GE1/17/2] commit
      [~SwitchD-10GE1/17/2] quit
    4. Enable MSTP to eliminate loops.

      • Enable MSTP globally.

        # Enable MSTP on SwitchA.

        [~SwitchA] stp enable
        [*SwitchA] commit

        # Enable MSTP on SwitchB.

        [~SwitchB] stp enable
        [*SwitchB] commit

        # Enable MSTP on SwitchC.

        [~SwitchC] stp enable
        [*SwitchC] commit

        # Enable MSTP on SwitchD.

        [~SwitchD] stp enable
        [*SwitchD] commit
      • Disable MSTP on the interface connected to the terminal.

        # Disable STP on 10GE1/17/1 of SwitchC.

        [~SwitchC] interface 10ge 1/17/1
        [~SwitchC-10GE1/17/1] stp disable
        [*SwitchC-10GE1/17/1] commit
        [~SwitchC-10GE1/17/1] quit

        # Disable STP on 10GE1/17/1 of SwitchD.

        [~SwitchD] interface 10ge 1/17/1
        [~SwitchD-10GE1/17/1] stp disable
        [*SwitchD-10GE1/17/1] commit
        [~SwitchD-10GE1/17/1] quit

  2. Configure root protection on the designated port of the root bridge.

    # Enable root protection on 10GE1/17/1 of SwitchA.

    [~SwitchA] interface 10ge 1/17/1
    [~SwitchA-10GE1/17/1] stp root-protection
    [*SwitchA-10GE1/17/1] commit
    [~SwitchA-10GE1/17/1] quit

    # Enable root protection on 10GE1/17/1 of SwitchB.

    [~SwitchB] interface 10ge 1/17/1
    [~SwitchB-10GE1/17/1] stp root-protection
    [*SwitchB-10GE1/17/1] commit
    [~SwitchB-10GE1/17/1] quit

  3. Configure Layer 2 forwarding on devices on the ring network.

    • Create VLANs 2 to 20 on SwitchA, SwitchB, SwitchC, and SwitchD.

      # Create VLANs 2 to 20 on SwitchA.

      [~SwitchA] vlan batch 2 to 20
      [*SwitchA] commit

      # Create VLANs 2 to 20 on SwitchB.

      [~SwitchB] vlan batch 2 to 20
      [*SwitchB] commit

      # Create VLANs 2 to 20 on SwitchC.

      [~SwitchC] vlan batch 2 to 20
      [*SwitchC] commit

      # Create VLANs 2 to 20 on SwitchD.

      [~SwitchD] vlan batch 2 to 20
      [*SwitchD] commit
    • Add ports on switching devices to VLANs.

      # Add 10GE1/17/1 on SwitchA to a VLAN.

      [~SwitchA] interface 10ge 1/17/1
      [~SwitchA-10GE1/17/1] port link-type trunk
      [*SwitchA-10GE1/17/1] port trunk allow-pass vlan 2 to 20
      [*SwitchA-10GE1/17/1] commit
      [~SwitchA-10GE1/17/1] quit

      # Add 10GE1/17/2 on SwitchA to a VLAN.

      [~SwitchA] interface 10ge 1/17/2
      [~SwitchA-10GE1/17/2] port link-type trunk
      [*SwitchA-10GE1/17/2] port trunk allow-pass vlan 2 to 20
      [*SwitchA-10GE1/17/2] commit
      [~SwitchA-10GE1/17/2] quit

      # Add 10GE1/17/1 on SwitchB to a VLAN.

      [~SwitchB] interface 10ge 1/17/1
      [~SwitchB-10GE1/17/1] port link-type trunk
      [*SwitchB-10GE1/17/1] port trunk allow-pass vlan 2 to 20
      [*SwitchB-10GE1/17/1] commit
      [~SwitchB-10GE1/17/1] quit

      # Add 10GE1/17/2 on SwitchB to a VLAN.

      [~SwitchB] interface 10ge 1/17/2
      [~SwitchB-10GE1/17/2] port link-type trunk
      [*SwitchB-10GE1/17/2] port trunk allow-pass vlan 2 to 20
      [*SwitchB-10GE1/17/2] commit
      [~SwitchB-10GE1/17/2] quit

      # Add 10GE1/17/1 on SwitchC to a VLAN.

      [~SwitchC] interface 10ge 1/17/1
      [~SwitchC-10GE1/17/1] port link-type access
      [*SwitchC-10GE1/17/1] port default vlan 2
      [*SwitchC-10GE1/17/1] commit
      [~SwitchC-10GE1/17/1] quit

      # Add 10GE1/17/2 on SwitchC to a VLAN.

      [~SwitchC] interface 10ge 1/17/2
      [~SwitchC-10GE1/17/2] port link-type trunk
      [*SwitchC-10GE1/17/2] port trunk allow-pass vlan 2 to 20
      [*SwitchC-10GE1/17/2] commit
      [~SwitchC-10GE1/17/2] quit

      # Add 10GE1/17/3 on SwitchC to a VLAN.

      [~SwitchC] interface 10ge 1/17/3
      [~SwitchC-10GE1/17/3] port link-type trunk
      [*SwitchC-10GE1/17/3] port trunk allow-pass vlan 2 to 20
      [*SwitchC-10GE1/17/3] commit
      [~SwitchC-10GE1/17/3] quit

      # Add 10GE1/17/1 on SwitchD to a VLAN.

      [~SwitchD] interface 10ge 1/17/1
      [~SwitchD-10GE1/17/1] port link-type access
      [*SwitchD-10GE1/17/1] port default vlan 11
      [*SwitchD-10GE1/17/1] commit
      [~SwitchD-10GE1/17/1] quit

      # Add 10GE1/17/2 on SwitchD to a VLAN.

      [~SwitchD] interface 10ge 1/17/2
      [~SwitchD-10GE1/17/2] port link-type trunk
      [*SwitchD-10GE1/17/2] port trunk allow-pass vlan 2 to 20
      [*SwitchD-10GE1/17/2] commit
      [~SwitchD-10GE1/17/2] quit

      # Add 10GE1/17/3 on SwitchD to a VLAN.

      [~SwitchD] interface 10ge 1/17/3
      [~SwitchD-10GE1/17/3] port link-type trunk
      [*SwitchD-10GE1/17/3] port trunk allow-pass vlan 2 to 20
      [*SwitchD-10GE1/17/3] commit
      [~SwitchD-10GE1/17/3] quit

  4. Verify the configuration.

    After the preceding configurations are complete and the network topology becomes stable, perform the following operations to verify the configuration.

    NOTE:

    MSTI 1 and MSTI 2 are used as examples. You do not need to focus on the interface status in MSTI 0.

    # Run the display stp brief command on SwitchA to view the status and protection type on the ports. The displayed information is as follows:

    [~SwitchA] display stp brief
     MSTID  Port             Role  STP State       Protection  Cost       Edged
         0  10GE1/17/1        DESI  forwarding      root           2       disable
         0  10GE1/17/2        DESI  forwarding      none           2       disable
         1  10GE1/17/1        DESI  forwarding      root           2       disable
         1  10GE1/17/2        DESI  forwarding      none           2       disable
         2  10GE1/17/1        DESI  forwarding      root           2       disable
         2  10GE1/17/2        ROOT  forwarding      none           2       disable

    In MSTI 1, 10GE1/17/1 and 10GE1/17/2 are designated ports because SwitchA is the root bridge. In MSTI 2, 10GE1/17/1 on SwitchA is the designated port and 10GE1/17/2 is the root port.

    # Run the display stp brief command on SwitchB. The displayed information is as follows:

    [~SwitchB] display stp brief
     MSTID  Port             Role  STP State       Protection  Cost       Edged
         0  10GE1/17/1        DESI  forwarding      root           2       disable
         0  10GE1/17/2        ROOT  forwarding      none           2       disable
         1  10GE1/17/1        DESI  forwarding      root           2       disable
         1  10GE1/17/2        ROOT  forwarding      none           2       disable
         2  10GE1/17/1        DESI  forwarding      root           2       disable
         2  10GE1/17/2        DESI  forwarding      none           2       disable

    In MSTI 2, 10GE1/17/1 and 10GE1/17/2 are designated ports because SwitchB is the root bridge. In MSTI 1, 10GE1/17/1 on SwitchB is the designated port and 10GE1/17/2 is the root port.

    # Run the display stp interface brief commands on SwitchC. The displayed information is as follows:

    [~SwitchC] display stp interface 10ge 1/17/3 brief
     MSTID  Port             Role  STP State       Protection  Cost       Edged
         0  10GE1/17/3        ROOT  forwarding      none           2       disable
         1  10GE1/17/3        ROOT  forwarding      none           2       disable
         2  10GE1/17/3        ROOT  forwarding      none           2       disable
    [~SwitchC] display stp interface 10ge 1/17/2 brief
     MSTID  Port             Role  STP State       Protection  Cost       Edged
         0  10GE1/17/2        DESI  forwarding      none           2       disable
         1  10GE1/17/2        DESI  forwarding      none           2       disable
         2  10GE1/17/2        ALTE  discarding      none       20000       disable

    10GE1/17/3 on SwitchC is the root port in MSTI 1 and MSTI 2. 10GE1/17/2 on SwitchC is the designated port in MSTI 1 but is blocked in MSTI 2.

    # Run the display stp interface brief commands on SwitchD. The displayed information is as follows:

    [~SwitchD] display stp interface 10ge 1/17/3 brief
     MSTID  Port             Role  STP State       Protection  Cost       Edged
         0  10GE1/17/3        ALTE  discarding      none           2       disable
         1  10GE1/17/3        ROOT  forwarding      none           2       disable
         2  10GE1/17/3        ROOT  forwarding      none           2       disable
    [~SwitchD] display stp interface 10ge 1/17/2 brief
     MSTID  Port             Role  STP State       Protection  Cost       Edged
         0  10GE1/17/2        ROOT  forwarding      none           2       disable
         1  10GE1/17/2        ALTE  discarding      none       20000       disable
         2  10GE1/17/2        DESI  forwarding      none           2       disable

    10GE1/17/3 on SwitchD is the root port in MSTI 1 and MSTI 2. 10GE1/17/2 on SwitchD is the blocked port in MSTI 1 and is the designated port in MSTI 2.

Configuration Files
  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    vlan batch 2 to 20
    #
    stp instance 1 root primary
    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
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
     stp root-protection
    #
    interface 10GE1/17/2
     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 1 root secondary
    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
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
     stp root-protection
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    return
  • Configuration file of SwitchC

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

    #
    sysname SwitchD
    #
    vlan batch 2 to 20
    #
    stp pathcost-standard legacy
    #
    stp region-configuration
     region-name RG1
     instance 1 vlan 2 to 10
     instance 2 vlan 11 to 20
    #
    interface 10GE1/17/1
     port default vlan 11
     stp disable
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
     stp instance 1 cost 20000
    #
    interface 10GE1/17/3
     port link-type trunk
     port trunk allow-pass vlan 2 to 20
    #
    return
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 59025

Downloads: 3621

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