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

NE20E-S2 V800R010C10SPC500 Configuration Guide - LAN Access and MAN Access 01

This is NE20E-S2 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 RSTP Functions

Example for Configuring Basic RSTP Functions

This example shows how to configure basic Rapid Spanning Tree Protocol (RSTP) 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.

RSTP can be deployed on a network to eliminate loops by blocking some ports, and it is developed to implement the rapid convergence based on STP but outperforms STP. On the network shown in Figure 13-7, after Device A, Device B, Device C, and Device D running RSTP discover loops on the network by exchanging information with each other, they trim the ring topology into a loop-free tree topology by blocking a certain port. In this manner, replication and circular propagation of packets are prevented on the network and the switching devices are released from processing duplicated packets, thereby improving their processing performance.

Figure 13-7 Networking diagram of configuring basic RSTP functions
NOTE:

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



Configuration Roadmap

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

    2. Configure primary and secondary root bridges.

    3. Set path costs for ports in each MSTI to block certain ports.

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

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

      NOTE:

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

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

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

Data Preparation

To complete the configuration, you need the following data.
  • GE interface number, as shown in Figure 13-7

  • Primary root bridge Device A and secondary root bridge Device D

  • Path cost of a port to be blocked (20000 is used in this example)

Procedure

  1. Configure basic RSTP functions.

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

      # Configure the RSTP mode on Device A.

      <HUAWEI> system-view
      [~HUAWEI] sysname DeviceA
      [*HUAWEI] stp mode rstp
      [*HUAWEI] commit

      # Configure the RSTP mode on Device B.

      <HUAWEI> system-view
      [~HUAWEI] sysname DeviceB
      [*HUAWEI] stp mode rstp
      [*HUAWEI] commit

      # Configure the RSTP mode on Device C.

      <HUAWEI> system-view
      [~HUAWEI] sysname DeviceC
      [*HUAWEI] stp mode rstp
      [*HUAWEI] commit

      # Configure the RSTP mode on Device D.

      <HUAWEI> system-view
      [~HUAWEI] sysname DeviceD
      [*HUAWEI] stp mode rstp
      [*HUAWEI] commit
    2. Configure primary and secondary root bridges.

      # Configure Device A as a primary root bridge.

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

      # Configure Device D as a secondary root bridge.

      [~DeviceD] stp root secondary
      [*DeviceD] commit
    3. Set path costs for ports in each spanning tree to block certain ports.

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

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

      # 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 0/1/1 to 20000.

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

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

      [~DeviceD] stp pathcost-standard legacy
      [*DeviceD] commit
    4. Enable RSTP to eliminate loops.

      • Disable RSTP on interfaces connected to PCs.

        # Disable RSTP on GE 0/1/2 on Device B.

        [~DeviceB] interface gigabitethernet 0/1/2
        [~DeviceB-GigabitEthernet0/1/2] stp disable
        [*DeviceB-GigabitEthernet0/1/2] commit
        [~DeviceB-GigabitEthernet0/1/2] quit

        # Disable RSTP on GE 0/1/2 on Device C.

        [~DeviceC] interface gigabitethernet 0/1/2
        [~DeviceC-GigabitEthernet0/1/2] stp disable
        [*DeviceC-GigabitEthernet0/1/2] commit
        [~DeviceC-GigabitEthernet0/1/2] quit
      • Enable RSTP globally.

        # Enable RSTP globally on Device A.

        [~DeviceA] stp enable
        [*DeviceA] commit

        # Enable RSTP globally on Device B.

        [~DeviceB] stp enable
        [*DeviceB] commit

        # Enable RSTP globally on Device C.

        [~DeviceC] stp enable
        [*DeviceC] commit

        # Enable RSTP globally on Device D.

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

        # Enable RSTP on GE 0/1/1 and GE 0/1/2 on Device A.

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

        # Enable RSTP on GE 0/1/1 and GE 0/1/3 on Device B.

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

        # Enable RSTP on GE 0/1/1 and GE 0/1/3 on Device C.

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

        # Enable RSTP on GE 0/1/1 and GE 0/1/2 on Device D.

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

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

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

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

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

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

  3. Verify the configuration.

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

    # 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    GigabitEthernet0/1/1        DESI  FORWARDING    ROOT
       0    GigabitEthernet0/1/2        DESI  FORWARDING    ROOT

    After Device A is configured as a root bridge, GE 0/1/2 and GE 0/1/1 connected to Device B and Device D respectively are elected as designated ports in spanning tree calculation. The root protection function is enabled on the designated ports.

    # Run the display stp interface gigabitethernet 0/1/1 brief command on Device B to view status of GE 0/1/1. The displayed information is as follows:

    [~DeviceB] display stp interface gigabitethernet 0/1/1 brief
     MSTID  Port                        Role  STP State     Protection
       0    GigabitEthernet0/1/1        DESI  FORWARDING    NONE      

    GE 0/1/1 is elected as a designated port in spanning tree calculation and is in the Forwarding state.

    # Run the display stp interface gigabitethernet 0/1/3 brief command on Device C to view status of GE 0/1/3. The displayed information is as follows:

    [~DeviceC] display stp interface gigabitethernet 0/1/3 brief
     MSTID  Port                        Role  STP State     Protection
       0    GigabitEthernet0/1/3        ROOT  FORWARDING    NONE      

    GE 0/1/3 is elected as a designated port in spanning tree calculation and is in the Forwarding state.

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

    [~DeviceD] display stp
    -------[CIST Global Info][Mode RSTP]-------
    CIST Bridge         :4096 .00e0-2c09-9200
    Bridge Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
    CIST Root/ERPC      :0    .00e0-0543-6a00 / 20000
    CIST RegRoot/IRPC   :4096 .00e0-2c09-9200 / 0
    CIST RootPortId     :128.1
    BPDU-Protection     :Disabled
    CIST Root Type      :SECONDARY root
    TC or TCN received  :4
    TC count per hello  :0
    STP Converge Mode   :Normal
    Time since last TC :0 days 0h:5m:44s
    ----[Port1(GigabitEthernet0/1/1)][FORWARDING]----
     Port Protocol       :enabled
     Port Role           :Root Port
     Port Priority       :128
     Port Cost(Dot1T )   :Config=auto / Active=20000
     Desg. Bridge/Port   :0.00e0-0543-6a00 / 128.1
     Port Edged          :Config=default / Active=disabled
     Point-to-point      :Config=auto / Active=true
     Transit Limit       :147 packets/hello-time
     Protection Type     :None
     Port Stp Mode       :RSTP
     Port Protocol Type  :Config=auto / Active=dot1s
     BPDU Encapsulation  :Config=stp / Active=stp
     PortTimes           :Hello 2s MaxAge 20s FwDly 15s RemHop 0
     TC or TCN send  :4
     TC or TCN received  :2
     BPDU Sent           :5
              TCN: 0, Config: 0, RST: 5, MST: 0
     BPDU Received       :177
              TCN: 0, Config: 0, RST: 177, MST: 0
    ----[Port2(GigabitEthernet0/1/2)][FORWARDING]----
     Port Protocol       :enabled
     Port Role           :Designated Port
     Port Priority       :128
     Port Cost(Dot1T )   :Config=auto / Active=20000
     Desg. Bridge/Port   :4096.00e0-2c09-9200 / 128.2
     Port Edged          :Config=default / Active=disabled
     Point-to-point      :Config=auto / Active=true
     Transit Limit       :147 packets/hello-time
     Protection Type     :None
     Port Stp Mode       :RSTP
     Port Protocol Type  :Config=auto / Active=dot1s
     BPDU Encapsulation  :Config=stp / Active=stp
     PortTimes           :Hello 2s MaxAge 20s FwDly 15s RemHop 20
     TC or TCN send  :2
     TC or TCN received  :2
     BPDU Sent           :165
              TCN: 0, Config: 0, RST: 165, MST: 0
     BPDU Received       :2
              TCN: 0, Config: 0, RST: 2, MST: 0

Configuration Files

  • Configuration file of Device A

    #
     sysname DeviceA                                                                
    #                                                                               
     stp mode rstp                                                                  
     stp instance 0 root primary                                                    
     stp pathcost-standard legacy                                                   
     stp enable                                                                     
    #                                                                               
    interface GigabitEthernet0/1/1                                                  
     portswitch
     undo shutdown
     stp root-protection                                                            
    #                                                                               
    interface GigabitEthernet0/1/2                                                  
     portswitch
     undo shutdown
     stp root-protection                                                            
    #
    return
  • Configuration file of Device B

    #                                                                               
     sysname DeviceB                                                                
    #                                                                               
     stp mode rstp                                                                  
     stp pathcost-standard legacy                                                   
     stp enable                                                                     
    #                                                                               
    interface GigabitEthernet0/1/1                                                  
     portswitch
     undo shutdown
     stp enable                                                            
    #                                                                               
    interface GigabitEthernet0/1/2            stp disable                                                                    
    #                                                                               
    interface GigabitEthernet0/1/3                                                  
     portswitch
     undo shutdown
     stp enable                                                            
    #                                                                               
    return                    
  • Configuration file of Device C

    #                                                                               
     sysname DeviceC                                                                
    #                                                                               
     stp mode rstp                                                                  
     stp pathcost-standard legacy                                                   
     stp enable                                                                     
    #                                                                               
    interface GigabitEthernet0/1/1                                                  
     stp instance 0 cost 20000                                                      
     portswitch
     undo shutdown
     stp enable                                                            
    #                                                                               
    interface GigabitEthernet0/1/2                                                  
     stp disable                                                                    
    #                                                                               
    interface GigabitEthernet0/1/3                                                  
     portswitch
     undo shutdown
     stp enable                                                            
    #                                                                               
    return           
  • Configuration file of Device D

    #                                                                               
     sysname DeviceD                                                                
    #                                                                               
     stp mode rstp                                                                  
     stp instance 0 root secondary                                                  
     stp pathcost-standard legacy                                                   
     stp enable                                                                     
    #                                                                               
    interface GigabitEthernet0/1/1                                                  
     undo shutdown
     portswitch
     stp enable                                                                     
    #                                                                               
    interface GigabitEthernet0/1/2                                                  
     undo shutdown
     portswitch
     stp enable                                                                     
    #                                                                               
    return                        
    
Translation
Download
Updated: 2019-01-02

Document ID: EDOC1100055378

Views: 16649

Downloads: 35

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