Ethernet link aggregation (manual load sharing and LACP configuration)

Overview of Link Aggregation Preface

Link aggregation is to bundle multiple physical interfaces into one logical interface to achieve the purpose of increasing link bandwidth. While increasing the bandwidth, link aggregation uses the mechanism of backup links, which can also effectively improve the link between devices. Road reliability.

Link aggregation advantages

In the traditional technology, the network scale expands and the bandwidth needs to be increased. Usually, it is necessary to replace the high-speed interface board and the method of replacing the equipment supporting the high-speed interface board. This solution requires high costs and is inflexible.

Link aggregation can increase link bandwidth, enhance network availability, and support load sharing.

Link aggregation application scenarios
Insert picture description here

Link aggregation is generally deployed at the core node (backbone link) to improve the data throughput of the entire network.

Link aggregation mode

There are two types of link aggregation, namely manual load sharing mode and LACP mode.

mode Overview
Manual load sharing mode In manual load sharing mode, all active interfaces participate in data forwarding and load traffic sharing
LACP mode LACP mode supports backup

Data flow control

In an aggregation port, all the parameters of the physical ports at both ends of the aggregation link (that is, the member ports include Layer 2 / Layer 3 interfaces) must be consistent, including the number of physical ports, transmission rate, duplex mode, and flow control mode.

Data flow and data flow control

A data stream can be regarded as a group of frames with the same MAC address and IP address. For example, an SSH or SFTP connection between two devices can be regarded as a data stream.
The data stream is transmitted on the aggregate link, and the data sequence must remain unchanged.

Transmission mode of ordinary link and link aggregation

A normal link is a link that is not configured for link aggregation. A physical link is used to transmit data, so the frames in a data stream can always reach the destination in the correct order.

In the link aggregation mode, multiple physical links are bound into an aggregate link,
and the frames in a data stream are transmitted through different physical links. If the first frame is transmitted through one physical link, and the second frame is transmitted through another physical link, then the second data frame of the same data stream may reach the peer device more than the first data frame. , Resulting in out-of-order received packets.

Flow-by-flow load sharing

In order to avoid out-of-order data packets, Eth-Trunk adopts a flow-by-flow load sharing mechanism. This mechanism uses IP or MAC to generate different HASH-KEY values ​​through the HASH algorithm, and searches for the corresponding outgoing interface in the Eth-Trunk forwarding table according to the KEY value. It ensures that the frames of the same data flow are forwarded on the same physical link, and the load sharing of the traffic on the physical links in the aggregation group is realized.
Flow-by-flow load sharing can guarantee the order of data packets, but it cannot guarantee bandwidth utilization.

Load sharing type

The types of load sharing mainly include the following types. Users can choose different load sharing types according to specific applications.

Serial number Types of
1 Load sharing based on the source MAC address of the packet
2 Load sharing based on the destination MAC address of the message
3 Load sharing based on the source IP address of the packet
4 Load sharing based on the destination IP address of the packet
5 Load sharing based on the source MAC address and destination MAC address of the message
6 Load sharing based on the source and destination IP addresses of packets
7 Perform enhanced load sharing on L2, IPv4, IPv6, and MPLS packets based on the VLAN and source physical port of the packets.

Ethernet interface and link configuration

Topology diagram
Insert picture description here
Configure link aggregation function on two Huawei S5700 series switches to improve link bandwidth and reliability between switches.

First modify the device name of the switch, and then view the detailed information of the G0/0/9 and G0/0/10 interfaces on S1.

#
undo terminal monitor  //关闭终端显示
system-view  
sysname S1 
display interface GigabitEthernet 0/0/9 //查看G0/0/9接口详细信息
display interface GigabitEthernet 0/0/10
#

In S1 and S2, the auto-negotiation function of the interface should be turned off before configuring the interface rate of 100Mbits and full duplex mode.

#
interface GigabitEthernet 0/0/9  
undo negotiation auto   //关闭自协商
speed 100   //速率
duplex full  //全双工
quit
interface GigabitEthernet 0/0/10
undo negotiation auto
speed 100
duplex full
quit

Manual link aggregation mode

Configure link aggregation in manual mode, create Eth-trunk1 on S1 and S2, and add the interface to Eth-Trunk1 (Note: Before adding the interface to the Eth-Trunk, make sure that there is no configuration under the member interface)

interface eth-trunk 1  //创建eth-trunk1
quit
inter g0/0/9
eth-trunk 1
quit
inter g0/0/10
eth-trunk 1

Verify Eth-trunk configuration results on S1

display eth-trunk 1

In the response information, the selected part indicates that the Eth-Trunk is working normally and all member interfaces have been added.
Insert picture description here

Static LACP mode configuration

If you have configured manual link mode, you need to delete the configuration under the G0/0/9 and G0/0/10 interfaces of S1 and S2

#
interface gigabitethernet0/0/9
undo eth-trunk
quit
interface GigabitEthernet 0/0/10
undo Eth-Trunk
#

Create eth-trunk 1 on S1 and S2 and configure it in static lacp mode, and add S1 and S2 interfaces g0/0/9 and g0/0/10 to eth-trunk.

#
interface eth-trunk 1
mode lacp-static
quit
interface gigabitethernet 0/0/9
eth-trunk 1
quit
interface gigabitethernet 0/0/10
eth-trtnk 1
quit
#
display eth-trunk  //查看交换机eth-trunk信息,查询是否协商成功
#

Configure the system priority of lacp on S1 to 100, making it the active end of lacp,

lacp priority 100

Configure the priority of the interface to determine the active link

#
interface gigabitethernet 0/0/9
lacp priority 100
quit
interface gigabitethernet 0/0/10
lacp priority 100
#
display eth-trunk 1 //验证配置结果

Link aggregation experiment (manual load sharing)

Insert picture description here
Insert picture description here
Insert picture description here
ping test
Insert picture description here

SW1 configuration

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW1
[SW1]interface eth	
[SW1]interface Eth-Trunk 1
[SW1-Eth-Trunk1]mode ?
  lacp-static  Static working mode
  manual       Manual working mode

[SW1-Eth-Trunk1]mode man	
[SW1-Eth-Trunk1]mode manual ?
  load-balance  Load balance working mode

[SW1-Eth-Trunk1]mode manual load-balance
[SW1-Eth-Trunk1]quit
[SW1]interface g0/0/1
[SW1-GigabitEthernet0/0/1]eth	
[SW1-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-GigabitEthernet0/0/1]quit
[SW1]interface g0/0/2
[SW1-GigabitEthernet0/0/2]eth-	
[SW1-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-GigabitEthernet0/0/2]quit
[SW1]

SW2 configuration

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW2
[SW2]eth	
[SW2]interfa	
[SW2]interface eth	
[SW2]interface Eth-Trunk 1

备注:mode 选择的是链路聚合的模式,manual代表手工负载分担
     另一种则是静态LACP模式,其余配置

[SW2-Eth-Trunk1]mode ?
  lacp-static  Static working mode
  manual       Manual working mode

[SW2-Eth-Trunk1]mode manual ?
  load-balance  Load balance working mode

[SW2-Eth-Trunk1]mode manual load-bal	
[SW2-Eth-Trunk1]mode manual load-balance ?
  <cr>  

[SW2-Eth-Trunk1]mode manual load-balance 
[SW2-Eth-Trunk1]quit
[SW2]inter g0/0/1
[SW2-GigabitEthernet0/0/1]eth	
[SW2-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-GigabitEthernet0/0/1]quit
[SW2]inter g0/0/2
[SW2-GigabitEthernet0/0/2]erh	
[SW2-GigabitEthernet0/0/2]eth	
[SW2-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-GigabitEthernet0/0/2]quit




备注:NORMAL(手工负载分担方式)为SW1与SW2的工作模式,
GE0/0/1与GE0/0/2接口已经添加到eth-trunk1中,状态为up。

[SW2]disp eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL         Hash arithmetic: According to SIP-XOR-DIP         
Least Active-linknumber: 1  Max Bandwidth-affected-linknumber: 8              
Operate status: up          Number Of Up Port In Trunk: 2                     
--------------------------------------------------------------------------------
PortName                      Status      Weight 
GigabitEthernet0/0/1          Up          1      
GigabitEthernet0/0/2          Up          1      

测试eth-trunk 1故障,将GE0/0/1关闭(两台设备接口必须同时shutdown)
[SW2]

Static LACP configuration

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>sys	
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys	
[Huawei]sysname SW1
[SW1]inter eth	
[SW1]inter Eth-Trunk 1
[SW1-Eth-Trunk1]q
[SW1]inter Eth-Trunk 1
[SW1-Eth-Trunk1]mode ?
  lacp-static  Static working mode
  manual       Manual working mode
  
[SW1-Eth-Trunk1]mode lacp-static 
[SW1-Eth-Trunk1]q
[SW1]inter g0/0/1
[SW1-GigabitEthernet0/0/1]eth	
[SW1-GigabitEthernet0/0/1]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-GigabitEthernet0/0/1]quit
[SW1]inter g0/0/2
[SW1-GigabitEthernet0/0/2]eth	
[SW1-GigabitEthernet0/0/2]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-GigabitEthernet0/0/2]quit
[SW1]inter g0/0/5
[SW1-GigabitEthernet0/0/5]eth 	
[SW1-GigabitEthernet0/0/5]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-GigabitEthernet0/0/5]quit

备注:修改LACP的优先级,优先级小的优先


[SW1]lacp priority 100  
[SW1]disp eth	
[SW1]disp eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1                   WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 100        System ID: 4c1f-cc70-2016                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: up          Number Of Up Port In Trunk: 3                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1   Selected 1GE      32768   2      305     10111100  1     
GigabitEthernet0/0/2   Selected 1GE      32768   3      305     10111100  1     
GigabitEthernet0/0/5   Selected 1GE      32768   6      305     10111100  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
GigabitEthernet0/0/1   32768    4c1f-cc6e-76d3  32768   2      305     10111100
GigabitEthernet0/0/2   32768    4c1f-cc6e-76d3  32768   3      305     10111100
GigabitEthernet0/0/5   32768    4c1f-cc6e-76d3  32768   6      305     10111100
    
[SW1]

Guess you like

Origin blog.csdn.net/qq_39689711/article/details/103507524