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

AR500, AR510, and AR530 V200R007 CLI-based Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring transparent bridge, MAC table, link aggregation, VLANs, STP/RSTP/MSTP, and so on.The document provides the configuration procedures and configuration examples to illustrate the service configuration methods and application scenario.
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 STP Functions

Example for Configuring Basic STP Functions

Networking Requirements

On a complex network, multiple physical links are often deployed between two devices for link redundancy. Redundant links may cause loops on the network, and loops will result in broadcast storms and damage MAC address entries.

STP can be deployed on a network to eliminate loops by blocking redundant ports. As shown in Figure 11-16, loops exist on the network, and RouterA, SwitchA, SwitchB, SwitchC and SwitchD are all running STP. These devices exchange BPDUs to discover the loops and block appropriate ports to trim the ring topology into a loop-free tree topology. The tree topology prevents infinite looping of packets, which in turn helps improve packet processing performance.

Figure 11-16  Networking diagram of basic STP configurations

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure basic STP functions, including:
    1. Configure the STP mode for the switching devices on the ring network.

    2. Configure primary and secondary root bridges.

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

    4. Enable STP to eliminate loops.
      • Enable STP globally.

      • Enable STP on all the ports except those connected to terminals.

      NOTE:

      STP is not required on the ports connected to terminals because these ports do not need to participate in STP calculation. Disable STP on the ports or configure the ports as edge ports.

Procedure

  1. Configure basic STP functions.

    1. Configure the STP mode for the switching devices on the ring network.

      # Configure the STP mode on RouterA. The configurations of SwitchA, SwitchB, SwitchC and SwitchD are similar to that of RouterA.

      <Huawei> system-view
      [Huawei] sysname RouterA
      [RouterA] stp mode stp
    2. Configure primary and secondary root bridges.

      # Configure RouterA as the primary root bridge.

      [RouterA] stp root primary

      # Configure SwitchA as the secondary root bridge.

      [SwitchA] stp root secondary
    3. Set a path cost for the port to be blocked.

      NOTE:
      • The path cost value range depends on path cost calculation methods. This example uses the Huawei proprietary calculation method and sets the path cost to 200000.

      • All switching devices on a network must use the same path cost calculation method. To use other path cost calculation methods, see the list of recommended value ranges for the specific path cost calculation method.

      # On RouterA, set the path cost calculation method to the Huawei proprietary method. The configurations of SwitchA, SwitchB, SwitchC and SwitchD are similar to that of RouterA.

      [RouterA] stp pathcost-standard legacy

      # Set the path cost of ethernet0/0/4 on SwitchC and SwitchD to 200000.

      [SwitchC] interface ethernet 0/0/4
      [SwitchC-Ethernet0/0/4] stp cost 200000
      [SwitchC-Ethernet0/0/4] quit
      [SwitchD] interface ethernet 0/0/4
      [SwitchD-Ethernet0/0/4] stp cost 200000
      [SwitchD-Ethernet0/0/4] quit
    4. Enable STP to eliminate loops.

      • Disable STP on the ports directly connected to PCs.

        # Disable STP on Ethernet0/0/2 and Ethernet0/0/3 of SwitchC. The configuration of SwitchD is similar to that of SwitchC.

        [SwitchC] interface ethernet 0/0/2
        [SwitchC-Ethernet0/0/2] stp disable
        [SwitchC-Ethernet0/0/2] quit
        [SwitchC] interface ethernet 0/0/3
        [SwitchC-Ethernet0/0/3] stp disable
        [SwitchC-Ethernet0/0/3] quit
      • Enable STP globally.

        # Enable STP globally on RouterA. The configurations of SwitchA, SwitchB, SwitchC and SwitchD are similar to that of RouterA.

        [RouterA] stp enable
      • Enable STP on all the ports except those connected to PCs.

        # Enable STP on RouterA Eth2/0/0 and Eth2/0/1. The configurations of SwitchA, SwitchB, SwitchC and SwitchD are similar to that of RouterA.

        [RouterA] interface ethernet 2/0/0
        [RouterA-Ethernet2/0/0] stp enable
        [RouterA-Ethernet2/0/0] quit
        [RouterA] interface ethernet 2/0/1
        [RouterA-Ethernet2/0/1] stp enable
        [RouterA-Ethernet2/0/1] quit

  2. Verify the configuration.

    # Wait for 35s, and then run the display stp brief command on RouterA to view port roles and states. Eth2/0/0 and Eth2/0/1 are selected as designated ports through spanning tree calculation and are both in the Forwarding state.

    [RouterA] display stp brief
     MSTID  Port                        Role  STP State     Protection
       0    Ethernet2/0/0               DESI  FORWARDING      NONE
       0    Ethernet2/0/1               DESI  FORWARDING      NONE

    # Run the display stp brief command on SwitchA to view port roles and states. Eth0/0/1 is selected as the root port, whereas Eth0/0/2 and Eth0/0/3 are selected as designated ports. The ports are all in the Forwarding state.

    [SwitchA] display stp brief
     MSTID  Port                        Role  STP State     Protection
       0    Ethernet0/0/1               ROOT  FORWARDING      NONE
       0    Ethernet0/0/2               DESI  FORWARDING      NONE
       0    Ethernet0/0/3               DESI  FORWARDING      NONE

    # Run the display stp brief command on SwitchB to view port roles and states. Eth0/0/1 is selected as the root port, whereas Eth0/0/2 and Eth0/0/3 are selected as designated ports. The ports are all in the Forwarding state.

    [SwitchB] display stp brief
     MSTID  Port                        Role  STP State     Protection
       0    Ethernet0/0/1               ROOT  FORWARDING      NONE
       0    Ethernet0/0/2               DESI  FORWARDING      NONE
       0    Ethernet0/0/3               DESI  FORWARDING      NONE

    # Run the display stp brief command on SwitchC to view port roles and states. Eth0/0/1 is selected as root port and is in the Forwarding state. Eth0/0/4 is selected as designated port and is in the Discarding state.

    [SwitchC] display stp brief
     MSTID  Port                        Role  STP State     Protection
       0    Ethernet0/0/1               ROOT  FORWARDING      NONE
       0    Ethernet0/0/4               DESI  DISCARDING      NONE
    

    # Run the display stp brief command on SwitchD to view port roles and states. Eth0/0/1 is selected as root port and is in the Forwarding state. Eth0/0/4 is selected as designated port and is in the Discarding state.

    [SwitchD] display stp brief
     MSTID  Port                        Role  STP State     Protection
       0    Ethernet0/0/1               ROOT  FORWARDING      NONE
       0    Ethernet0/0/4               DESI  DISCARDING      NONE
    

Configuration Files

  • RouterA configuration file

    #
     sysname RouterA
    #
     stp mode stp
     stp instance 0 root primary
     stp pathcost-standard legacy
    #
    interface Ethernet2/0/0
    #
    interface Ethernet2/0/1
    #
    return
  • SwitchA configuration file

    #
     sysname SwitchA
    #
     stp mode stp
     stp instance 0 root secondary
     stp pathcost-standard legacy
    #
    interface Ethernet0/0/1
    #
    interface Ethernet0/0/2
    #
    interface Ethernet0/0/3
    #
    return
  • SwitchB configuration file

    #
     sysname SwitchB
    #
     stp mode stp
     stp pathcost-standard legacy
    #
    interface Ethernet0/0/1
    #
    interface Ethernet0/0/2
    #
    interface Ethernet0/0/3
    #
    return
  • SwitchC configuration file

    #
     sysname SwitchC
    #
     stp mode stp
     stp pathcost-standard legacy
    #
    interface Ethernet0/0/1
    #
    interface Ethernet0/0/2
     stp disable
    #
    interface Ethernet0/0/3
     stp disable
    #
    interface Ethernet0/0/4
     stp instance 0 cost 200000
    #
    return
  • SwitchD configuration file

    #
     sysname SwitchD
    #
     stp mode stp
     stp pathcost-standard legacy
    #
    interface Ethernet0/0/1
    #
    interface Ethernet0/0/2
     stp disable
    #
    interface Ethernet0/0/3
     stp disable
    #
    interface Ethernet0/0/4
     stp instance 0 cost 200000
    #
    return
Translation
Download
Updated: 2019-05-25

Document ID: EDOC1000097279

Views: 19863

Downloads: 64

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