[Switch] Link Aggregation Configuration

Example for Configuring Link Aggregation in Manual Mode (Direct Connection Between Switches)

Introduction to Link Aggregation in Manual Mode

Ethernet link aggregation refers to bundling multiple Ethernet physical links together into one logical link, so as to achieve the purpose of increasing link bandwidth. Link aggregation is divided into manual mode and LACP mode.

In manual mode, the establishment of Eth-Trunk and the addition of member interfaces are manually configured without the participation of the link aggregation control protocol LACP. When a large link bandwidth needs to be provided between two directly connected devices but the devices do not support the LACP protocol, the manual mode can be used. Manual mode can achieve the purpose of increasing bandwidth, improving reliability, and load sharing.

In manual mode, all active links participate in data forwarding and share traffic.

Configuration Notes

  • The member interfaces of an Eth-Trunk interface must be of the same Ethernet type and rate.
  • The number, rate, duplex mode, and flow control configuration of the physical interfaces connected to both ends of the Eth-Trunk link must be consistent.
  • If the local device interface is added to the Eth-Trunk, the peer interface directly connected to the interface must also be added to the Eth-Trunk so that the two ends can communicate normally.
  • When two devices are interconnected, it is necessary to ensure that the link aggregation modes on the two devices are consistent.
  • This example applies to all versions of all S series switches.

Networking requirements

As shown in Figure 3-75 , SwitchA and SwitchB are connected to networks in VLAN 10 and VLAN 20 respectively through Ethernet links, and there is heavy data traffic between SwitchA and SwitchB.

The user hopes that a large link bandwidth can be provided between SwitchA and SwitchB so that the same VLAN can communicate with each other. At the same time, users also hope to provide a certain degree of redundancy to ensure the reliability of data transmission and links.

Figure 3-75 Networking diagram for configuring link aggregation in manual mode

Configuration idea

Configure link aggregation in manual mode as follows:

  1. Create an Eth-Trunk interface and add member interfaces to increase link bandwidth.

  2. Create a VLAN and add interfaces to the VLAN.

  3. Configure a load balancing mode to implement load balancing of traffic among member interfaces of the Eth-Trunk and improve reliability.

Steps

  1. Create Eth-Trunk interfaces on SwitchA and SwitchB and add member interfaces

    <HUAWEI> system-view 
    [HUAWEI] sysname SwitchA 
    [SwitchA] interface eth-trunk 1    //Create an Eth-Trunk interface with ID 1
    [SwitchA-Eth-Trunk1] trunkport gigabitethernet 1/0/1 to 1/0/3    //Add three member interfaces GE1/0/1 to GE1/0/3 to the Eth-Trunk1 interface
    [SwitchA-Eth-Trunk1] quit
    <HUAWEI> system-view 
    [HUAWEI] sysname SwitchB 
    [SwitchB] interface eth-trunk 1    //Create an Eth-Trunk interface with ID 1
    [SwitchB-Eth-Trunk1] trunkport gigabitethernet 1/0/1 to 1/0/3    //Add three member interfaces GE1/0/1 to GE1/0/3 to the Eth-Trunk1 interface
    [SwitchB-Eth-Trunk1] quit

  2. Create a VLAN and add the interface to the VLAN

    # Create VLAN10 and VLAN20 and add interfaces to them respectively. The configuration of SwitchB is similar to that of SwitchA and will not be repeated here.

    [SwitchA] vlan batch 10 20 
    [SwitchA] interface gigabitethernet 1/0/4 
    [SwitchA-GigabitEthernet1/0/4] port link-type trunk    //Set the link type of the interface to trunk, and the default link type of the interface is not a trunk port
    [SwitchA-GigabitEthernet1/0/4] port trunk allow-pass vlan 10 
    [SwitchA-GigabitEthernet1/0/4] quit 
    [SwitchA] interface gigabitethernet 1/0/5 
    [SwitchA-GigabitEthernet1/0/5] port link-type trunk    //Set the link type of the interface to trunk, the default link type of the interface is not the trunk port
    [SwitchA-GigabitEthernet1/0/5] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet1/0/5] quit
    

    # Configure the Eth-Trunk1 interface to allow VLAN10 and VLAN20 to pass through. The configuration of SwitchB is similar to that of SwitchA and will not be repeated here.

    [SwitchA] interface eth-trunk 1 
    [SwitchA-Eth-Trunk1] port link-type trunk    //Set the interface link type to trunk, the default link type of the interface is not a trunk port
    [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
    [SwitchA-Eth-Trunk1] quit

  3. Configure the load balancing mode of Eth-Trunk1. The configuration of SwitchB is similar to that of SwitchA and will not be repeated here.

    [SwitchA] interface eth-trunk 1 
    [SwitchA-Eth-Trunk1] load-balance src-dst-mac    //Configure Eth-Trunk1 to perform load balancing based on the source MAC address and destination MAC address
    [SwitchA-Eth-Trunk1] quit
    

  4. Verify configuration results

    Run the display eth-trunk 1 command in any view to check whether the Eth-Trunk is successfully created and whether the member interfaces are correctly added.

    [SwitchA] display eth-trunk 1
    Eth-Trunk1's state information is: 
    WorkingMode: NORMAL           Hash arithmetic: According to SA-XOR-DA
    Least Active-linknumber: 1     Max Bandwidth-affected-linknumber: 8
    Operate status: up             Number Of Up Port In Trunk: 3 
    --------------------------------------------------------------------------------
    PortName                           Status       Weight
    GigabitEthernet1/0/1               Up           1
    GigabitEthernet1/0/2               Up           1
    GigabitEthernet1/0/3               Up           1
    

    From the above information, it can be seen that Eth-Trunk 1 includes three member interfaces GigabitEthernet1/0/1, GigabitEthernet1/0/2, and GigabitEthernet1/0/3, and the status of the member interfaces is Up. The "Operate status" of Eth-Trunk 1 is up .

configuration file

  • Configuration file of SwitchA

    #
    switchA sysname
    #
    vlan batch 10 20
    # 
    interface Eth-Trunk1
     port link-type trunk 
     port trunk allow-pass vlan 10 20
     load-balance src-dst-mac
    # 
    interface GigabitEthernet1/0/1 
     eth-trunk 1
    #
    interface GigabitEthernet1/0/2 
     eth-trunk 1
    #
    interface GigabitEthernet1/0/3 
     eth-trunk 1
    #
    interface GigabitEthernet1/0/4 
     port link-type trunk 
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/5 
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 10 20
    #
    interface Eth-Trunk1
     port link-type trunk
     port trunk allow-pass vlan 10 20
     load-balance src-dst-mac
    #
    interface GigabitEthernet1/0/1
     eth-trunk 1
    #
    interface GigabitEthernet1/0/2
     eth-trunk 1
    #
    interface GigabitEthernet1/0/3
     eth-trunk 1
    #
    interface GigabitEthernet1/0/4
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/5
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return

Introduction to Link Aggregation in LACP Mode

Ethernet link aggregation refers to bundling multiple Ethernet physical links together into one logical link, so as to achieve the purpose of increasing link bandwidth. Link aggregation is divided into manual mode and LACP mode.

LACP mode requires the participation of link aggregation control protocol LACP. When a larger link bandwidth needs to be provided between two directly connected devices and the devices support the LACP protocol, it is recommended to use the LACP mode. LACP mode can not only achieve the purpose of increasing bandwidth, improving reliability, and load sharing, but also can improve the fault tolerance of Eth-Trunk and provide backup functions.

In LACP mode, some links are active links, and all active links participate in data forwarding. If an active link fails, the link aggregation group automatically selects a link among the inactive links as the active link, and the number of links participating in data forwarding remains unchanged.

Configuration Notes

  • The member interfaces of an Eth-Trunk interface must be of the same Ethernet type and rate.
  • The number, rate, duplex mode, and flow control configuration of the physical interfaces connected to both ends of the Eth-Trunk link must be consistent.
  • If the local device interface is added to the Eth-Trunk, the peer interface directly connected to the interface must also be added to the Eth-Trunk so that the two ends can communicate normally.
  • When two devices are interconnected, it is necessary to ensure that the link aggregation modes on the two devices are consistent.
  • This example applies to all versions of all S series switches.

Background Information

As shown in Figure 3-76 , SwitchA and SwitchB are connected to networks in VLAN 10 and VLAN 20 respectively through Ethernet links, and there is heavy data traffic between SwitchA and SwitchB. The user hopes that a large link bandwidth can be provided between SwitchA and SwitchB so that the same VLAN can communicate with each other. Configure a link aggregation group in LACP mode on two Switches to improve the bandwidth and reliability between the two Switches. The specific requirements are as follows:

  • The two active links are capable of load sharing.

  • The link between the two devices has a redundant backup link. When the active link fails, the backup link replaces the failed link to maintain the reliability of data transmission.

  • The same VLAN can communicate with each other.

Configuration idea

Configure link aggregation in LACP mode as follows:

  1. Create an Eth-Trunk and configure the Eth-Trunk to work in LACP mode to implement link aggregation.

  2. Add member interfaces to the Eth-Trunk.

  3. Configure the system priority, determine the active end, and select the active interface according to the interface of the active end device.

  4. Configure the upper threshold of active interfaces to improve network reliability while guaranteeing bandwidth.

  5. Configure the interface priority to determine the active link interface, and the interface with higher priority will be selected as the active interface.

  6. Create a VLAN and add interfaces to the VLAN.

Steps

  1. Create Eth-Trunk1 on SwitchA and configure it in LACP mode. The configuration of SwitchB is similar to that of SwitchA and will not be repeated here.

    <HUAWEI> system-view 
    [HUAWEI] sysname SwitchA 
    [SwitchA] interface eth-trunk 1    //Create an Eth-Trunk interface with ID 1
    [SwitchA-Eth-Trunk1] mode lacp    //Set the link aggregation mode to LACP mode
    [SwitchA-Eth-Trunk1] quit

  2. Add member interfaces on SwitchA to Eth-Trunk1. The configuration of SwitchB is similar to that of SwitchA and will not be repeated here.

    [SwitchA] interface gigabitethernet 1/0/1 
    [SwitchA-GigabitEthernet1/0/1] eth-trunk 1    //Add GE1/0/1 interface to Eth-Trunk1
    [SwitchA-GigabitEthernet1/0/1] quit 
    [SwitchA] interface gigabitethernet 1/0/2 
    [SwitchA-GigabitEthernet1/0/2] eth-trunk 1    //Add GE1/0/2 interface to Eth-Trunk1
    [SwitchA-GigabitEthernet1/0/2] quit 
    [SwitchA] interface gigabitethernet 1/0/3 
    [SwitchA-GigabitEthernet1/0/3] eth-trunk 1    //Add GE1/0/3 interface to Eth-Trunk1
    [SwitchA-GigabitEthernet1/0/3] quit
    

  3. Configure the system priority on SwitchA to be 100, making it the LACP active end

    [SwitchA] lacp priority 100    //The default LACP priority of the system is 32768, modify the priority of SwitchA to be higher than that of SwitchB, as the active end
    

  4. Set the upper threshold of active interfaces on SwitchA to 2

    [SwitchA] interface eth-trunk 1 
    [SwitchA-Eth-Trunk1] max active-linknumber 2    //The upper threshold of the number of active interfaces in the link aggregation group is 8 by default. Change the upper threshold of the number of active interfaces to 2
    [SwitchA-Eth-Trunk1] quit

  5. Configure the interface priority on SwitchA to determine the active link

    [SwitchA] interface gigabitethernet 1/0/1 
    [SwitchA-GigabitEthernet1/0/1] lacp priority 100    //The default LACP priority of the interface is 32768. Change the LACP priority of GE1/0/1 interface to 100 and make it the active interface
    [SwitchA-GigabitEthernet1/0/1] quit 
    [SwitchA] interface gigabitethernet 1/0/2 
    [SwitchA-GigabitEthernet1/0/2] lacp priority 100    //The interface LACP priority is defaulted to 32768, modify GE1/0/2 interface The LACP priority is 100, as the active interface
    [SwitchA-GigabitEthernet1/0/2] quit
    

  6. Create a VLAN and add interfaces to the VLAN.

    # Create VLAN10 and VLAN20 and add interfaces to them respectively. The configuration of SwitchB is similar to that of SwitchA and will not be repeated here.

    [SwitchA] vlan batch 10 20 
    [SwitchA] interface gigabitethernet 1/0/4 
    [SwitchA-GigabitEthernet1/0/4] port link-type trunk    //Set the link type of the interface to trunk, and the default link type of the interface is not a trunk port
    [SwitchA-GigabitEthernet1/0/4] port trunk allow-pass vlan 10 
    [SwitchA-GigabitEthernet1/0/4] quit 
    [SwitchA] interface gigabitethernet 1/0/5 
    [SwitchA-GigabitEthernet1/0/5] port link-type trunk    //Set the link type of the interface to trunk, the default link type of the interface is not the trunk port
    [SwitchA-GigabitEthernet1/0/5] port trunk allow-pass vlan 20
    [SwitchA-GigabitEthernet1/0/5] quit
    

    # Configure the Eth-Trunk1 interface to allow VLAN10 and VLAN20 to pass through. The configuration of SwitchB is similar to that of SwitchA and will not be repeated here.

    [SwitchA] interface eth-trunk 1 
    [SwitchA-Eth-Trunk1] port link-type trunk    //Set the interface link type to trunk, the default link type of the interface is not a trunk port
    [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 10 20
    [SwitchA-Eth-Trunk1] quit

  7. Verify configuration results

    # Check the Eth-Trunk information of each Switch to check whether the link negotiation is successful.

    [SwitchA] display eth-trunk 1
    Eth-Trunk1's state information is:
    Local:                                                                          
    LAG ID: 1                       WorkingMode: LACP                             
    Preempt Delay: Disabled         Hash arithmetic: According to SIP-XOR-DIP       
    System Priority: 100            System ID: 00e0-fca8-0417
    Least Active-linknumber: 1      Max Active-linknumber: 2                        
    Operate status: up              Number Of Up Port In Trunk: 2
    --------------------------------------------------------------------------------
    ActorPortName                    Status     PortType PortPri   PortNo PortKey   PortState  Weight
    GigabitEthernet1/0/1             Selected  1GE       100      6145    2865      11111100     1
    GigabitEthernet1/0/2             Selected  1GE       100      6146    2865      11111100     1
    GigabitEthernet1/0/3             Unselect  1GE       32768    6147    2865      11100000     1
    
    Partner:
    --------------------------------------------------------------------------------
    ActorPortName                     SysPri    SystemID    PortPri PortNo PortKey   PortState
    GigabitEthernet1/0/1              32768  00e0-fca6-7f85  32768     6145   2609      11111100
    GigabitEthernet1/0/2              32768  00e0-fca6-7f85  32768     6146   2609      11111100
    GigabitEthernet1/0/3              32768  00e0-fca6-7f85  32768     6147   2609      11110000
    
    [SwitchB] display eth-trunk 1
    Eth-Trunk1's state information is:
    Local:
    LAG ID: 1                      WorkingMode: LACP
    Preempt Delay: Disabled        Hash arithmetic: According to SIP-XOR-DIP
    System Priority: 32768         System ID: 00e0-fca6-7f85
    Least Active-linknumber: 1     Max Active-linknumber: 8
    Operate status: up             Number Of Up Port In Trunk: 2
    --------------------------------------------------------------------------------
    ActorPortName                   Status     PortType    PortPri   PortNo  PortKey   PortState  Weight
    GigabitEthernet1/0/1            Selected  1GE        32768      6145    2609      11111100     1
    GigabitEthernet1/0/2            Selected  1GE        32768      6146    2609      11111100     1
    GigabitEthernet1/0/3            Unselect  1GE        32768      6147    2609      11110000     1
    
    Partner:
    --------------------------------------------------------------------------------
    ActorPortName                     SysPri    SystemID     PortPri  PortNo  PortKey   PortState
    GigabitEthernet1/0/1              100    00e0-fca8-0417  100      6145     2865      11111100
    GigabitEthernet1/0/2              100    00e0-fca8-0417  100      6146     2865      11111100
    GigabitEthernet1/0/3              100    00e0-fca8-0417  32768    6147     2865      11100000
    

    The preceding information shows that the system priority of SwitchA is 100, which is higher than that of SwitchB. Among the member interfaces of the Eth-Trunk, GigabitEthernet1/0/1 and GigabitEthernet1/0/2 become active interfaces and are in the Selected state, and GigabitEthernet1/0/3 is in the Unselected state. At the same time, the load balancing and Redundant backup function of N links.

configuration file

  • Configuration file of SwitchA

    #
    switchA sysname
    #
    vlan batch 10 20
    #
    lacp priority 100
    #
    interface Eth-Trunk1
     port link-type trunk
     port trunk allow-pass vlan 10 20
     mode lacp
     max active-linknumber 2
    #
    interface GigabitEthernet1/0/1
     eth-trunk 1
     lacp priority 100
    #
    interface GigabitEthernet1/0/2
     eth-trunk 1
     lacp priority 100
    #
    interface GigabitEthernet1/0/3
     eth-trunk 1
    #
    interface GigabitEthernet1/0/4
     port link-type trunk 
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/5
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 10 20
    #
    interface Eth-Trunk1
     port link-type trunk
     port trunk allow-pass vlan 10 20
     mode lacp
    #
    interface GigabitEthernet1/0/1
     eth-trunk 1
    #
    interface GigabitEthernet1/0/2
     eth-trunk 1
    #
    interface GigabitEthernet1/0/3
     eth-trunk 1
    #
    interface GigabitEthernet1/0/4
     port link-type trunk 
     port trunk allow-pass vlan 10
    #
    interface GigabitEthernet1/0/5
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    return

Related Information

technology Forum

Link Aggregation Feature Interconnection and Replacement Guide for S Series Switches

video

How Switches and Servers Are Interconnected Through Link Aggregation

Example for Configuring E-Trunk Access to VPLS

Introduction to E-Trunk

E-Trunk (Enhanced Trunk) is a mechanism for cross-device link aggregation. It is extended based on LACP (a single-device link Reliability is improved from the board level to the device level.

The E-Trunk mechanism is mainly used in the link protection between CE and PE and the protection of PE equipment node failure when CE is dual-homed to VPLS, VLL, and PWE3 networks. Before an E-Trunk is used, a CE can only be single-homed to one PE through an Eth-Trunk link. If the Eth-Trunk fails or the PE fails, the CE cannot communicate with the PE. After E-Trunk is used, CE can be dual-homed to PE to implement inter-device protection.

Guess you like

Origin blog.csdn.net/2301_76769041/article/details/132606452