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

S9300, S9300E, and S9300X V200R012C00 Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, VLAN aggregation, MUX VLAN, VLAN termination, Voice VLAN, VLAN mapping, QinQ, GVRP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, HVRP, 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 13-18, 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 13-18  Networking diagram of basic STP configurations

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure the STP mode for the switches 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. Because ports connected to the PCs do not participate in STP calculation, configure both of these ports as edge ports.

Procedure

  1. Configure basic STP functions.

    1. Configure the STP mode for the switches on the ring network.

      # Configure the STP mode on SwitchA.

      <Quidway> system-view
      [Quidway] sysname SwitchA
      [SwitchA] stp mode stp

      # Configure the STP mode on SwitchB.

      <Quidway> system-view
      [Quidway] sysname SwitchB
      [SwitchB] stp mode stp

      # Configure the STP mode on SwitchC.

      <Quidway> system-view
      [Quidway] sysname SwitchC
      [SwitchC] stp mode stp

      # Configure the STP mode on SwitchD.

      <Quidway> system-view
      [Quidway] sysname SwitchD
      [SwitchD] stp mode stp
    2. Configure the root bridge and secondary root bridge.

      # Configure SwitchA as the root bridge.

      [SwitchA] stp root primary

      # Configure SwitchD as the secondary root bridge.

      [SwitchD] stp root secondary
    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 Switch A, set the path cost calculation method to the Huawei proprietary method.

      [SwitchA] stp pathcost-standard legacy

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

      [SwitchB] stp pathcost-standard legacy

      # On Switch C, set the path cost of GigabitEthernet1/0/1 to 20000.

      [SwitchC] stp pathcost-standard legacy
      [SwitchC] interface gigabitethernet 1/0/1
      [SwitchC-GigabitEthernet1/0/1] stp cost 20000
      [SwitchC-GigabitEthernet1/0/1] quit

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

      [SwitchD] stp pathcost-standard legacy
    4. Enable STP to eliminate loops.

      • Configure the ports connected to PCs both as edge ports.

        # Configure GigabitEthernet1/0/2 of SwitchB as an edge port.

        [SwitchB] interface gigabitethernet 1/0/2
        [SwitchB-GigabitEthernet1/0/2] stp edged-port enable
        [SwitchB-GigabitEthernet1/0/2] quit

        (Optional) Configure BPDU protection on SwitchB.

        [SwitchB] stp bpdu-protection

        # Configure GigabitEthernet1/0/2 of SwitchC as an edge port.

        [SwitchC] interface gigabitethernet 1/0/2
        [SwitchC-GigabitEthernet1/0/2] stp edged-port enable
        [SwitchC-GigabitEthernet1/0/2] quit

        (Optional) Configure BPDU protection on SwitchC.

        [SwitchC] stp bpdu-protection
        NOTE:
        If edge ports are connected to network devices that have STP enabled and BPDU protection is enabled, the edge ports will be shut down and their attributes remain unchanged after they receive BPDUs.
      • Enable STP globally.

        # Enable STP globally on SwitchA.

        [SwitchA] stp enable

        # Enable STP globally on SwitchB.

        [SwitchB] stp enable

        # Enable STP globally on SwitchC.

        [SwitchC] stp enable

        # Enable STP globally on SwitchD.

        [SwitchD] stp enable

  2. 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 check the port states and protection type.

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

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

    # Run the display stp interface gigabitethernet 1/0/1 brief command on SwitchB to check the status of GigabitEthernet1/0/1.

    [SwitchB] display stp interface gigabitethernet 1/0/1 brief
     MSTID  Port                        Role  STP State     Protection
       0    GigabitEthernet1/0/1        DESI  FORWARDING      NONE      

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

    # Run the display stp brief command on SwitchC to check the interface states and protection type.

    [SwitchC] display stp brief
     MSTID  Port                        Role  STP State     Protection
       0    GigabitEthernet1/0/1        ALTE  DISCARDING      NONE     
       0    GigabitEthernet1/0/3        ROOT  FORWARDING      NONE      

    GigabitEthernet 1/0/3 is elected as a root port and is in Forwarding state.

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

Configuration Files

  • SwitchA configuration file

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

    # 
    sysname SwitchB   
    # 
    stp mode stp   
    stp bpdu-protection
    stp pathcost-standard legacy
    stp enable 
    #  
    interface GigabitEthernet1/0/2   
     stp edged-port enable 
    #  
    return                    
  • SwitchC configuration file

    # 
    sysname SwitchC  
    #  
    stp mode stp 
    stp pathcost-standard legacy
    stp bpdu-protection
    stp enable 
    #  
    interface GigabitEthernet1/0/1          
     stp instance 0 cost 20000 
    #  
    interface GigabitEthernet1/0/2     
     stp edged-port enable 
    #  
    return           
  • SwitchD configuration file

    # 
    sysname SwitchD 
    # 
    stp mode stp  
    stp instance 0 root secondary      
    stp pathcost-standard legacy
    stp enable 
    #   
    return 
Translation
Download
Updated: 2019-01-18

Document ID: EDOC1100038290

Views: 112687

Downloads: 24

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