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

ME60 V800R010C10SPC500 Configuration Guide - LAN Access and MAN Access 01

This is ME60 V800R010C10SPC500 Configuration Guide - LAN Access and MAN Access
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

This example shows how to configure basic Multiple Spanning Tree Protocol (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 thus 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 14-7, to load balance traffic of VLANs 1 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. In addition, MSTP divides a switching network into multiple regions, each of which has multiple independent spanning tree instances.

As shown in Figure 14-7, Device A, Device B, Device C, and Device D all run MSTP.

Figure 14-7 Networking diagram of configuring basic MSTP functions
NOTE:

Interfaces 1 through 3 in this example are GE 1/0/1, GE 1/0/2, GE 1/0/3, respectively.



Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic MSTP functions:

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

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

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

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

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

      By default, MSTP is enabled on a Layer 2 interface.

  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.

Data Preparation

To complete the configuration, you need the following data:

  • Region name RG1

  • MSTIs, MSTI 1 and MSTI 2

  • GE interface numbers

  • Primary and secondary root bridges of MSTI 1 (Device A and Device B respectively) and primary and secondary root bridges of MSTI 2 (Device B and Device A respectively)

  • Path costs of the ports to be blocked (20000)

  • VLAN IDs (1 to 20)

  • VLAN to which PC1 belongs (VLAN 10) and VLAN to which PC2 belongs (VLAN 20)

Procedure

  1. Configure basic MSTP functions.

    1. Add Device A, Device B, Device C, and Device D to MST region RG1, and create two MSTIs, MSTI 1 and MSTI 2.

      # Add Device A to RG1.

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

      # Add Device B to RG1.

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

      # Add Device C to RG1.

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

      # Add Device D to RG1.

      <HUAWEI> system-view
      [~HUAWEI] sysname DeviceD
      [*HUAWEI] commit
      [~DeviceD] stp region-configuration
      [~DeviceD-mst-region] region-name RG1
      [*DeviceD-mst-region] instance 1 vlan 1 to 10
      [*DeviceD-mst-region] instance 2 vlan 11 to 20
      [*DeviceD-mst-region] commit
      [~DeviceD-mst-region] quit
    2. In RG1, configure primary and secondary root bridges for MSTI 1 and MSTI 2.

      • Configure primary and secondary root bridges for MSTI 1.

        # Configure Device A as a primary root bridge of MSTI 1.

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

        # Configure Device B as a secondary root bridge of MSTI 1.

        [~DeviceB] stp instance 1 root secondary
        [*DeviceB] commit
      • Configure primary and secondary root bridges for MSTI 2.

        # Configure Device B as a primary root bridge of MSTI 2.

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

        # Configure Device A as a secondary root bridge of MSTI 2.

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

      NOTE:
      • Different calculation methods define different path costs. Use the Huawei proprietary calculation method as an example to set the path costs of the ports to be blocked in MSTI 1 and MSTI 2 to 20000.

      • All switching devices on a network must use the same calculation for path costs.

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

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

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

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

      # On Device C, configure the path cost calculation method as the Huawei proprietary method and set the path cost of GE 1/0/2 in MSTI 2 to 20000.

      [~DeviceC] stp pathcost-standard legacy
      [*DeviceC] interface gigabitethernet 1/0/2
      [*DeviceC-GigabitEthernet1/0/2] stp instance 2 cost 20000
      [*DeviceC-GigabitEthernet1/0/2] commit
      [~DeviceC-GigabitEthernet1/0/2] quit

      # On Device D, configure the path cost calculation method as the Huawei proprietary method and set the path cost of GE 1/0/2 in MSTI 1 to 20000.

      [~DeviceD] stp pathcost-standard legacy
      [*DeviceD] interface gigabitethernet 1/0/2
      [*DeviceD-GigabitEthernet1/0/2] stp instance 1 cost 20000
      [*DeviceD-GigabitEthernet1/0/2] commit
      [~DeviceD-GigabitEthernet1/0/2] quit
    4. Enable MSTP to eliminate loops.

      • Disable MSTP on interfaces connected to PCs.

        # Disable MSTP on GE 1/0/1 of Device C.

        [~DeviceC] interface gigabitethernet 1/0/1
        [~DeviceC-GigabitEthernet1/0/1] stp disable
        [*DeviceC-GigabitEthernet1/0/1] commit
        [~DeviceC-GigabitEthernet1/0/1] quit

        # Disable MSTP on GE 1/0/1 of Device D.

        [~DeviceD] interface gigabitethernet 1/0/1
        [~DeviceD-GigabitEthernet1/0/1] stp disable
        [*DeviceD-GigabitEthernet1/0/1] commit
        [~DeviceD-GigabitEthernet1/0/1] quit
      • Enable MSTP globally.

        # Enable MSTP on Device A.

        [~DeviceA] stp enable
        [*DeviceA] commit

        # Enable MSTP on Device B.

        [~DeviceB] stp enable
        [*DeviceB] commit

        # Enable MSTP on Device C.

        [~DeviceC] stp enable
        [*DeviceC] commit

        # Enable MSTP on Device D.

        [~DeviceD] stp enable
        [*DeviceD] commit
      • Enable MSTP on all the interfaces except the interfaces connected to terminals.

        # Enable MSTP on GE 1/0/1 of Device A.

        [~DeviceA] interface gigabitethernet 1/0/1
        [~DeviceA-GigabitEthernet1/0/1] undo shutdown
        [*DeviceA-GigabitEthernet1/0/1] portswitch
        [*DeviceA-GigabitEthernet1/0/1] stp enable
        [*DeviceA-GigabitEthernet1/0/1] commit
        [~DeviceA-GigabitEthernet1/0/1] quit

        # Enable MSTP on GE 1/0/2 of Device A.

        [~DeviceA] interface gigabitethernet 1/0/2
        [~DeviceA-GigabitEthernet1/0/2] undo shutdown
        [*DeviceA-GigabitEthernet1/0/2] portswitch
        [*DeviceA-GigabitEthernet1/0/2] stp enable
        [*DeviceA-GigabitEthernet1/0/2] commit
        [~DeviceA-GigabitEthernet1/0/2] quit

        # Enable MSTP on GE 1/0/1 of Device B.

        [~DeviceB] interface gigabitethernet 1/0/1
        [~DeviceB-GigabitEthernet1/0/1] undo shutdown
        [*DeviceB-GigabitEthernet1/0/1] portswitch
        [*DeviceB-GigabitEthernet1/0/1] stp enable
        [*DeviceB-GigabitEthernet1/0/1] commit
        [~DeviceB-GigabitEthernet1/0/1] quit

        # Enable MSTP on GE 1/0/2 of Device B.

        [~DeviceB] interface gigabitethernet 1/0/2
        [~DeviceB-GigabitEthernet1/0/2] undo shutdown
        [*DeviceB-GigabitEthernet1/0/2] portswitch
        [*DeviceB-GigabitEthernet1/0/2] stp enable
        [*DeviceB-GigabitEthernet1/0/2] commit
        [~DeviceB-GigabitEthernet1/0/2] quit

        # Enable MSTP on GE 1/0/2 of Device C.

        [~DeviceC] interface gigabitethernet 1/0/2
        [~DeviceC-GigabitEthernet1/0/2] undo shutdown
        [*DeviceC-GigabitEthernet1/0/2] portswitch
        [*DeviceC-GigabitEthernet1/0/2] stp enable
        [*DeviceC-GigabitEthernet1/0/2] commit
        [~DeviceC-GigabitEthernet1/0/2] quit

        # Enable MSTP on GE 1/0/3 of Device C.

        [~DeviceC] interface gigabitethernet 1/0/3
        [~DeviceC-GigabitEthernet1/0/3] undo shutdown
        [*DeviceC-GigabitEthernet1/0/3] portswitch
        [*DeviceC-GigabitEthernet1/0/3] stp enable
        [*DeviceC-GigabitEthernet1/0/3] commit
        [~DeviceC-GigabitEthernet1/0/3] quit

        # Enable MSTP on GE 1/0/2 of Device D.

        [~DeviceD] interface gigabitethernet 1/0/2
        [~DeviceD-GigabitEthernet1/0/2] undo shutdown
        [*DeviceD-GigabitEthernet1/0/2] portswitch
        [*DeviceD-GigabitEthernet1/0/2] stp enable
        [*DeviceD-GigabitEthernet1/0/2] commit
        [~DeviceD-GigabitEthernet1/0/2] quit

        # Enable MSTP on GE 1/0/3 of Device D.

        [~DeviceD] interface gigabitethernet 1/0/3
        [~DeviceD-GigabitEthernet1/0/3] undo shutdown
        [*DeviceD-GigabitEthernet1/0/3] portswitch
        [*DeviceD-GigabitEthernet1/0/3] stp enable
        [*DeviceD-GigabitEthernet1/0/3] commit
        [~DeviceD-GigabitEthernet1/0/3] quit

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

    # Enable root protection on GE 1/0/1 of Device A.

    [~DeviceA] interface gigabitethernet 1/0/1
    [~DeviceA-GigabitEthernet1/0/1] stp root-protection
    [*DeviceA-GigabitEthernet1/0/1] commit
    [~DeviceA-GigabitEthernet1/0/1] quit

    # Enable root protection on GE 1/0/1 of Device B.

    [~DeviceB] interface gigabitethernet 1/0/1
    [~DeviceB-GigabitEthernet1/0/1] stp root-protection
    [*DeviceB-GigabitEthernet1/0/1] commit
    [~DeviceB-GigabitEthernet1/0/1] quit

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

    • Create VLANs 1 to 20 on Device A, Device B, Device C, and Device D.

      # Create VLANs 1 to 20 on Device A.

      [~DeviceA] vlan batch 1 to 20
      [*DeviceA] commit

      # Create VLANs 1 to 20 on Device B.

      [~DeviceB] vlan batch 1 to 20
      [*DeviceB] commit

      # Create VLANs 1 to 20 on Device C.

      [~DeviceC] vlan batch 1 to 20
      [*DeviceC] commit

      # Create VLANs 1 to 20 on Device D.

      [~DeviceD] vlan batch 1 to 20
      [*DeviceD] commit
    • Add interfaces on the switching devices in the ring to VLANs.

      # Add GE 1/0/1 on Device A to VLANs.

      [~DeviceA] interface gigabitethernet 1/0/1
      [~DeviceA-GigabitEthernet1/0/1] port trunk allow-pass vlan 1 to 20
      [*DeviceA-GigabitEthernet1/0/1] commit
      [~DeviceA-GigabitEthernet1/0/1] quit

      # Add GE 1/0/2 on Device A to VLANs.

      [~DeviceA] interface gigabitethernet 1/0/2
      [~DeviceA-GigabitEthernet1/0/2] port trunk allow-pass vlan 1 to 20
      [*DeviceA-GigabitEthernet1/0/2] commit
      [~DeviceA-GigabitEthernet1/0/2] quit

      # Add GE 1/0/1 on Device B to VLANs.

      [~DeviceB] interface gigabitethernet 1/0/1
      [~DeviceB-GigabitEthernet1/0/1] port trunk allow-pass vlan 1 to 20
      [*DeviceB-GigabitEthernet1/0/1] commit
      [~DeviceB-GigabitEthernet1/0/1] quit

      # Add GE 1/0/2 on Device B to VLANs.

      [~DeviceB] interface gigabitethernet 1/0/2
      [~DeviceB-GigabitEthernet1/0/2] port trunk allow-pass vlan 1 to 20
      [*DeviceB-GigabitEthernet1/0/2] commit
      [~DeviceB-GigabitEthernet1/0/2] quit

      # Add GE 1/0/2 on Device C to VLANs.

      [~DeviceC] interface gigabitethernet 1/0/2
      [~DeviceC-GigabitEthernet1/0/2] port trunk allow-pass vlan 1 to 20
      [*DeviceC-GigabitEthernet1/0/2] commit
      [~DeviceC-GigabitEthernet1/0/2] quit

      # Add GE 1/0/3 on Device C to VLANs.

      [~DeviceC] interface gigabitethernet 1/0/3
      [~DeviceC-GigabitEthernet1/0/3] port trunk allow-pass vlan 1 to 20
      [*DeviceC-GigabitEthernet1/0/3] commit
      [~DeviceC-GigabitEthernet1/0/3] quit

      # Add GE 1/0/2 on Device D to VLANs.

      [~DeviceD] interface gigabitEthernet 1/0/2
      [~DeviceD-GigabitEthernet1/0/2] port trunk allow-pass vlan 1 to 20
      [*DeviceD-GigabitEthernet1/0/2] commit
      [~DeviceD-GigabitEthernet1/0/2] quit

      # Add GE 1/0/3 on Device D to VLANs.

      [~DeviceD] interface gigabitethernet 1/0/3
      [~DeviceD-GigabitEthernet1/0/3] port trunk allow-pass vlan 1 to 20
      [*DeviceD-GigabitEthernet1/0/3] commit
      [~DeviceD-GigabitEthernet1/0/3] quit

  4. Verify the configuration.

    After completing the previous configurations, run the following commands to verify the configurations.

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

    [~DeviceA] display stp brief
     MSTID      Port                  Role  STP State     Protection
       0        GigabitEthernet1/0/1  DESI  FORWARDING    NONE
       0        GigabitEthernet1/0/2  DESI  FORWARDING    NONE
       1        GigabitEthernet1/0/1  DESI  FORWARDING    NONE
       1        GigabitEthernet1/0/2  DESI  FORWARDING    NONE
       2        GigabitEthernet1/0/1  DESI  FORWARDING    NONE
       2        GigabitEthernet1/0/2  ROOT  FORWARDING    NONE

    In MSTI 1, Device A is a root bridge and thus GE 1/0/2 and GE 1/0/1 on Device A are designated ports. In MSTI 2, GE 1/0/1 on Device A is a designated port and GE 1/0/2 is a root port.

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

    [~DeviceB] display stp brief
     MSTID      Port                  Role  STP State       Protection
       0        GigabitEthernet1/0/1  DESI  FORWARDING      NONE
       0        GigabitEthernet1/0/2  ROOT  FORWARDING      NONE
       1        GigabitEthernet1/0/1  DESI  FORWARDING      NONE
       1        GigabitEthernet1/0/2  ROOT  FORWARDING      NONE
       2        GigabitEthernet1/0/1  DESI  FORWARDING      NONE
       2        GigabitEthernet1/0/2  DESI  FORWARDING      NONE

    In MSTI 2, Device B is a root bridge and thus GE 1/0/1 and GE 1/0/2 on Device B are designated ports. In MSTI 1, GE 1/0/1 of Device B is a designated port and GE 1/0/2 is a root port.

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

    [~DeviceC] display stp interface gigabitethernet 1/0/3 brief
     MSTID      Port                    Role  STP State       Protection
       0        GigabitEthernet1/0/3    ROOT  FORWARDING      NONE
       1        GigabitEthernet1/0/3    ROOT  FORWARDING      NONE
       2        GigabitEthernet1/0/3    ROOT  FORWARDING      NONE
    [~DeviceC] display stp interface gigabitethernet 1/0/2 brief
     MSTID      Port                    Role  STP State       Protection
       0        GigabitEthernet1/0/2    DESI  FORWARDING      NONE
       1        GigabitEthernet1/0/2    DESI  FORWARDING      NONE
       2        GigabitEthernet1/0/2    ALTE  DISCARDING      NONE

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

    [~DeviceD] display stp interface gigabitethernet 1/0/3 brief
     MSTID      Port                    Role  STP State       Protection
       0        GigabitEthernet1/0/3    ALTE  DISCARDING      NONE
       1        GigabitEthernet1/0/3    ROOT  FORWARDING      NONE
       2        GigabitEthernet1/0/3    ROOT  FORWARDING      NONE
    [~DeviceD] display stp interface gigabitethernet 1/0/2 brief
     MSTID      Port                    Role  STP State       Protection
       0        GigabitEthernet1/0/2    ROOT  FORWARDING      NONE
       1        GigabitEthernet1/0/2    ALTE  DISCARDING      NONE
       2        GigabitEthernet1/0/2    DESI  FORWARDING      NONE   

    GE 1/0/3 on Device D is a root port in both MSTI 1 and MSTI 2. GE 1/0/2 on Device D is blocked in MSTI 1 but is calculated to be a designated port in MSTI 2.

Configuration Files

  • Configuration file of Device A

    #                                                                               
     sysname DeviceA                                                                
    #                                                                               
     vlan batch 1 to 20                                                             
    #                                                                               
     stp instance 1 root primary                                                    
     stp instance 2 root secondary                                                  
     stp pathcost-standard legacy                                                   
     stp enable                
    #                                                                               
     stp region-configuration                                                       
      region-name RG1                                                               
      instance 1 vlan 1 to 10                                                       
      instance 2 vlan 11 to 20                                                      
    #                                                                               
    interface GigabitEthernet1/0/1                                                  
     undo shutdown
     portswitch
     port trunk allow-pass vlan 1 to 20                                               
     stp root-protection                                                            
    #                                                                               
    interface GigabitEthernet1/0/2                                                  
     undo shutdown
     portswitch
     port trunk allow-pass vlan 1 to 20                   
    #                                                                               
    return
  • Configuration file of Device B

    #                                                                               
     sysname DeviceB                                                                
    #                                                                               
     vlan batch 1 to 20                                                             
    #                                                                               
     stp instance 1 root secondary                                                  
     stp instance 2 root primary                                                    
     stp pathcost-standard legacy                                                   
     stp enable                                                        
    #                                                                               
     stp region-configuration                                                       
      region-name RG1                                                               
      instance 1 vlan 1 to 10                                                       
      instance 2 vlan 11 to 20                                                      
    #                                                                                
    interface GigabitEthernet1/0/1                                                  
     undo shutdown
     portswitch
     port trunk allow-pass vlan 1 to 20                                             
     stp root-protection                                                            
    #                                                                               
    interface GigabitEthernet1/0/2                                                  
     undo shutdown
     portswitch
     port trunk allow-pass vlan 1 to 20                                                        
    #                                                                               
    return
  • Configuration file of Device C

    #                                                                               
     sysname DeviceC                                                                
    #                                                                               
     vlan batch 1 to 20                                                             
    #                                                                               
     stp pathcost-standard legacy                                                   
     stp enable                                                                     
    #                                                                               
     stp region-configuration                                                       
      region-name RG1                                                               
      instance 1 vlan 1 to 10                                                       
      instance 2 vlan 11 to 20                                                      
    #                                                                               
    interface GigabitEthernet1/0/1                                                  
     stp disable                                                                    
    #                                                                               
    interface GigabitEthernet1/0/2                                                  
     port trunk allow-pass vlan 1 to 20                                             
     stp instance 2 cost 20000                                                      
    #                                                                               
    interface GigabitEthernet1/0/3                                                  
     port trunk allow-pass vlan 1 to 20                                                         
    #                                                                               
    return
  • Configuration file of Device D

    #                                                                               
     sysname DeviceD                                                                
    #                                                                               
     vlan batch 1 to 20                                                             
    #                                                                               
     stp pathcost-standard legacy                                                   
     stp enable                                                                     
    #                                                                               
     stp region-configuration                                                       
      region-name RG1                                                               
      instance 1 vlan 1 to 10                                                       
      instance 2 vlan 11 to 20                                                                          
    #                                                                               
    interface GigabitEthernet1/0/1                                                  
     stp disable                                                                    
    #                                                                               
    interface GigabitEthernet1/0/2                                                  
     port trunk allow-pass vlan 1 to 20                                             
     stp instance 1 cost 20000                                                      
    #                                                                               
    interface GigabitEthernet1/0/3                                                  
     port trunk allow-pass vlan 1 to 20                                             
    #                                                                         
    return
Translation
Download
Updated: 2019-01-04

Document ID: EDOC1100059440

Views: 26523

Downloads: 18

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