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 STP/RSTP.

Example for Configuring STP

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 STP on the network to prevent loops. When loops exist on the network, STP blocks a port to remove loops. As shown in Figure 5-98, loops occur on the network. Switch ModuleA, Switch ModuleB, Switch ModuleC, and Switch ModuleD running STP exchange STP BPDUs to discover loops on the network and block some ports to prune the network into a loop-free tree network. STP prevents infinite looping of packets to ensure packet processing capabilities of switches.

Figure 5-98 Networking diagram of STP configuration

Configuration Roadmap
The configuration roadmap is as follows:
  1. Configure the STP mode on the ring network.

  2. Configure the root bridge and secondary root bridge.

  3. Set path costs for ports to block certain ports.

  4. Enable STP to eliminate loops.
    NOTE:

    The interface connected to a server does not participate in STP calculation; therefore, disable STP on it.

  5. Verify the configuration.

Procedure

  1. Configure devices to work in STP mode on the ring network. The configurations on Switch ModuleB, Switch ModuleC, and Switch ModuleD are similar to the configurations on Switch ModuleA, and are not mentioned here.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] stp mode stp
    [*Switch ModuleA] commit

  2. Configure the root bridge and secondary root bridge.

    # Configure Switch ModuleA as a root bridge.

    [~Switch ModuleA] stp root primary
    [*Switch ModuleA] commit

    # Configure Switch ModuleB as a secondary root bridge.

    [~Switch ModuleB] stp root secondary
    [*Switch ModuleB] commit

  3. Set path costs for ports to block certain ports.

    NOTE:
    • The values of path costs depend on path cost calculation methods. This example uses 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 Switch ModuleA, configure the path cost calculation method as the Huawei proprietary method.

    [~Switch ModuleA] stp pathcost-standard legacy
    [*Switch ModuleA] commit

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

    [~Switch ModuleB] stp pathcost-standard legacy
    [*Switch ModuleB] commit

    # Set the path cost of 10GE1/17/1 on Switch ModuleC to 20000.

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

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

    [~Switch ModuleD] stp pathcost-standard legacy
    [*Switch ModuleD] commit

  4. Enable STP to eliminate loops.

    • Disable STP on the interface connected to the server.

      # Disable STP on 10GE1/17/2 of Switch ModuleB.

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

      # Disable STP on 10GE1/17/2 of Switch ModuleC.

      [~Switch ModuleC] interface 10ge 1/17/2
      [~Switch ModuleC-10GE1/17/2] stp disable
      [*Switch ModuleC-10GE1/17/2] commit
      [~Switch ModuleC-10GE1/17/2] quit
    • Enable STP globally on devices. The configurations on Switch ModuleB, Switch ModuleC, and Switch ModuleD are similar to the configurations on Switch ModuleA, and are not mentioned here.

      [~Switch ModuleA] stp enable
      [*Switch ModuleA] commit

  5. Verify the configuration.

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

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

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

    After Switch ModuleA is configured as a root bridge, 10GE1/17/2 and 10GE1/17/1 connected to Switch ModuleB and Switch ModuleD respectively are elected as designated ports in spanning tree calculation.

    # Run the display stp interface 10GE 1/17/1 brief command on Switch ModuleB to view the status of 10GE1/17/1. The displayed information is as follows:

    [~Switch ModuleB] display stp interface 10ge 1/17/1 brief
     MSTID  Port                        Role  STP State     Protection      Cost    Edged
         0  10GE1/17/1                   DESI  forwarding    none              2     disable
    

    10GE1/17/1 is elected as a designated port in spanning tree calculation and is in Forwarding state.

    # Run the display stp brief command on Switch ModuleC to check the interface status. The following information is displayed:

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

    10GE1/17/1 is elected as an alternate port in spanning tree calculation and is in DISCARDING state.

    10GE1/17/3 is elected as a root port in spanning tree calculation and is in FORWARDING state.

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    stp mode stp
    stp instance 0 root primary
    stp pathcost-standard legacy
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    stp mode stp
    stp instance 0 root secondary
    stp pathcost-standard legacy
    #
    interface 10GE1/17/2  
     stp disable
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    stp mode stp
    stp pathcost-standard legacy
    #
    interface 10GE1/17/1
     stp instance 0 cost 20000
    #
    interface 10GE1/17/2
     stp disable
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    stp mode stp
    stp pathcost-standard legacy
    #
    return

Example for Configuring RSTP

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 RSTP on the network to prevent loops. When loops exist on the network, RSTP blocks a port to remove loops. As shown in Figure 5-99, loops occur on the network. Switch ModuleA, Switch ModuleB, Switch ModuleC, and Switch ModuleD running RSTP exchange STP BPDUs to discover loops on the network and block some ports to prune the network into a loop-free tree network. RSTP prevents infinite looping of packets to ensure packet processing capabilities of switches.

Figure 5-99 Networking diagram of RSTP configuration

Configuration Roadmap
The configuration roadmap is as follows:
  1. Configure the RSTP mode on the ring network.

  2. Configure the root bridge and secondary root bridge.

  3. Set path costs for ports to block certain ports.

  4. Enable RSTP to eliminate loops.
    NOTE:

    The interface connected to a server does not participate in RSTP calculation; therefore, disable RSTP on it.

  5. Configure protection functions to protect devices or links.

  6. Verify the configuration.

Procedure

  1. Configure the RSTP mode for devices on the ring network. The configurations on Switch ModuleB, Switch ModuleC, and Switch ModuleD are similar to the configurations on Switch ModuleA, and are not mentioned here.

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

  2. Configure the root bridge and secondary root bridge.

    # Configure Switch ModuleA as a root bridge.

    [~Switch ModuleA] stp root primary
    [*Switch ModuleA] commit

    # Configure Switch ModuleB as a secondary root bridge.

    [~Switch ModuleB] stp root secondary
    [*Switch ModuleB] commit

  3. Set path costs for ports to block certain ports.

    NOTE:
    • The values of path costs depend on path cost calculation methods. This example uses 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 Switch ModuleA, configure the path cost calculation method as the Huawei proprietary method.

    [~Switch ModuleA] stp pathcost-standard legacy
    [*Switch ModuleA] commit

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

    [~Switch ModuleB] stp pathcost-standard legacy
    [*Switch ModuleB] commit

    # Set the path cost of 10GE1/17/1 on Switch ModuleC to 20000.

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

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

    [~Switch ModuleD] stp pathcost-standard legacy
    [*Switch ModuleD] commit

  4. Enable RSTP to eliminate loops.

    • Disable RSTP on the interface connected to the server.

      # Disable RSTP on 10GE1/17/2 of Switch ModuleB.

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

      # Disable RSTP on 10GE1/17/2 of Switch ModuleC.

      [~Switch ModuleC] interface 10ge 1/17/2
      [~Switch ModuleC-10GE1/17/2] stp disable
      [*Switch ModuleC-10GE1/17/2] commit
      [~Switch ModuleC-10GE1/17/2] quit
    • Enable RSTP globally on devices. The configurations on Switch ModuleB, Switch ModuleC, and Switch ModuleD are similar to the configurations on Switch ModuleA, and are not mentioned here.

      [~Switch ModuleA] stp enable
      [*Switch ModuleA] commit

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

    # Configure root protection on 10GE1/17/1 and 10GE1/17/2 of Switch ModuleA.

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

  6. Verify the configuration.

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

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

    [~Switch ModuleA] 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    root              2    disable
    

    After Switch ModuleA is configured as a root bridge, 10GE1/17/2 and 10GE1/17/1 connected to Switch ModuleB and Switch ModuleD respectively are elected as designated ports in spanning tree calculation and configured with root protection.

    # Run the display stp interface 10GE 1/17/1 brief command on Switch ModuleB to view the status of 10GE1/17/1. The displayed information is as follows:

    [~Switch ModuleB] display stp interface 10ge 1/17/1 brief
     MSTID  Port                        Role  STP State     Protection      Cost    Edged
         0  10GE1/17/1                   DESI  forwarding    none              2    disable
    

    10GE1/17/1 is elected as a designated port in spanning tree calculation and is in Forwarding state.

    # Run the display stp brief command on Switch ModuleC to check the interface status. The following information is displayed:

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

    10GE1/17/1 is elected as an alternate port in spanning tree calculation and is in DISCARDING state.

    10GE1/17/3 is elected as a root port in spanning tree calculation and is in FORWARDING state.

Configuration Files
  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    stp mode rstp
    stp instance 0 root primary
    stp pathcost-standard legacy
    #
    interface 10GE1/17/1
     stp root-protection
    #
    interface 10GE1/17/2
     stp root-protection
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    stp mode rstp
    stp instance 0 root secondary
    stp pathcost-standard legacy
    #
    interface 10GE1/17/2
     stp disable
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    stp mode rstp
    stp pathcost-standard legacy
    #
    interface 10GE1/17/1
     stp instance 0 cost 20000
    #
    interface 10GE1/17/2
     stp disable
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    stp mode rstp
    stp pathcost-standard legacy
    #
    return
Translation
Download
Updated: 2019-08-09

Document ID: EDOC1000041694

Views: 58409

Downloads: 3621

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