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

Configuration Guide - Ethernet Switching

CloudEngine 8800, 7800, 6800, and 5800 V200R003C00

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, MUX VLAN, Voice VLAN, VLAN mapping, QinQ, GVRP, VCMP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, and Layer 2 protocol transparent transmission.
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 STP

Example for Configuring STP

Networking Requirements

On a complex network, multiple physical links are often deployed between two devices for link redundancy (one as the active link and the others as standby links). However, redundant links may cause loops on the network, which result in broadcast storms and unstable MAC address entries.

STP can be deployed on a network to eliminate loops by blocking ports. In Figure 9-17, a loop exists on the network, and SwitchA, SwitchB, SwitchC, and SwitchD are all running STP. These devices exchange STP BPDUs to discover loops and block some ports to prune the network into a loop-free tree network, improving packet processing performance.

Figure 9-17 Networking diagram of STP configuration

Configuration Roadmap

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

  2. Configure the root bridge and secondary root bridge.

  3. Set a path cost for the ports to be blocked.

  4. Enable STP to eliminate loops.
    NOTE:

    The ports connected to servers do not participate in STP calculation. Disable STP on these ports.

  5. Verify the configuration.

Procedure

  1. Configure the STP mode for the devices on the ring network. The configurations on SwitchB, SwitchC, and SwitchD are similar to the configurations on SwitchA, and are not mentioned here.

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

  2. Configure the root bridge and secondary root bridge.

    # Configure SwitchA as the root bridge.

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

    # Configure SwitchB as the secondary root bridge.

    [~SwitchB] stp root secondary
    [*SwitchB] commit

  3. Set a path cost for the ports to be blocked.

    The path cost value range depends on path cost calculation methods, which must be the same on all switches. This example uses the Huawei proprietary calculation method.

    # On SwitchA, set the path cost calculation method to the Huawei proprietary method.

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

    # On SwitchB, set the path cost calculation method to the Huawei proprietary method.

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

    # Set the path cost of 10GE1/0/1 on SwitchC to 20000.

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

    # On SwitchD, set the path cost calculation method to the Huawei proprietary method.

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

  4. Enable STP to eliminate loops.

    • Disable STP on the port connected to the server.

      # Disable STP on 10GE1/0/2 of SwitchB.

      [~SwitchB] interface 10ge 1/0/2
      [~SwitchB-10GE1/0/2] stp disable
      [*SwitchB-10GE1/0/2] commit
      [~SwitchB-10GE1/0/2] quit

      # Disable STP on 10GE1/0/2 of SwitchC.

      [~SwitchC] interface 10ge 1/0/2
      [~SwitchC-10GE1/0/2] stp disable
      [*SwitchC-10GE1/0/2] commit
      [~SwitchC-10GE1/0/2] quit
    • Enable STP globally on devices.

      [~SwitchA] stp enable
      [*SwitchA] commit
      [~SwitchB] stp enable
      [*SwitchB] commit
      [~SwitchC] stp enable
      [*SwitchC] commit
      [~SwitchD] stp enable
      [*SwitchD] commit

  5. Verify the configuration.

    After the preceding configuration is complete and the network becomes stable, perform the following operations to verify the configuration:

    # Run the display stp brief command on SwitchA to view the port roles and states. The following information is displayed:

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

    After SwitchA is configured as the root bridge, 10GE1/0/2 and 10GE1/0/1 connected to SwitchB and SwitchD respectively are elected as designated ports through spanning tree calculation.

    # Run the display stp interface 10GE 1/0/1 brief command on SwitchB to view the role and state of 10GE1/0/1. The following information is displayed:

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

    10GE1/0/1 is elected as a designated port and is in Forwarding state.

    # Run the display stp brief command on SwitchC to check the port roles and states. The following information is displayed:

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

    10GE1/0/1 is elected as an alternate port and is in Discarding state.

    10GE1/0/3 is elected as a root port and is in Forwarding state.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    stp mode stp
    stp instance 0 root primary
    stp pathcost-standard legacy
    #
    return
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    stp mode stp
    stp instance 0 root secondary
    stp pathcost-standard legacy
    #
    interface 10GE1/0/2  
     stp disable
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    stp mode stp
    stp pathcost-standard legacy
    #
    interface 10GE1/0/1
     stp instance 0 cost 20000
    #
    interface 10GE1/0/2
     stp disable
    #
    return
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    stp mode stp
    stp pathcost-standard legacy
    #
    return
Translation
Download
Updated: 2019-05-08

Document ID: EDOC1100004351

Views: 117687

Downloads: 290

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