Link Aggregation
Implementation of Link Aggregation in LACP Mode
LACP, as specified in IEEE 802.3ad, implements dynamic link aggregation and de-aggregation, allowing both ends to exchange LACPDUs.
After member interfaces are added to the Eth-Trunk interface in LACP mode, each end sends LACPDUs to inform its peer of its system priority, MAC address, member interface priorities, interface numbers, and keys. After being informed, the peer compares this information with that saved on itself, and selects which interfaces to be aggregated. Then, LACP negotiation occurs, selecting the active interfaces and links.
For detailed information about LACPDUs, see Figure 1.

Figure 1 LACPDU
Explanation of main fields follow as:
| Item | Description |
| Actor_Port/Partner_Port | Interface of the Actor or Partner. |
| Actor_State/Partner_State | Status of the Actor or Partner. |
| Actor_System_Priority/Partner_System_Priority | System priority of the Actor or Partner. |
| Actor_System/Partner_System | System ID of the Actor or Partner. |
| Actor_Key/Partner_Key | Operational Key of the Actor or Partner. |
| Actor_Port_Priority/Partner_Port_Priority | Interface priority of the Actor or Partner. |
The process of setting up an Eth-Trunk link in LACP mode is as follows:
1. Devices at both ends send LACPDUs to each other.
As shown in Figure 2, you need to manually create an Eth-Trunk link in LACP mode on Device A and Device B and add member interfaces to the Eth-Trunk. Then the member interfaces are enabled with LACP, and devices at both ends can send LACPDUs to each other.

Figure 2 LACPDUs sent in LACP mode network diagram
2. Determine the Actor and active links.
As shown in Figure 3, devices at both ends receive LACPDUs from each other. For example, when Device B receives LACPDUs from Device A, Device B checks and records information about Device A and compares system priorities. If the system priority of Device A is higher than that of Device B, Device A acts as the Actor.
After devices at both ends select the Actor, they select active interfaces according to the priorities of the Actor's interfaces. Then active interfaces are selected, active links in the LAG are specified, and load balancing is implemented across these active links.

Figure 3 Actor selection process in LACP mode network diagram
LACP preemption
After LACP preemption is enabled, interfaces with higher priorities in an LAG function as active interfaces.
As shown in Figure 4, port1, port2, and port3 are member interfaces of an Eth-Trunk. The upper threshold for the number of active interfaces is 2. LACP priorities of port1, port2, and port3 are 10, 20, and 30 respectively. When LACP negotiation is complete, port1 and port2 are selected as active interfaces because their LACP priorities are higher, and port3 is selected as the backup interface.

Figure 4 LACP preemption
LACP preemption is typically enabled in the following situations:
port1 becomes faulty, and then recovers. When port1 fails, port3 replaces port1 to transmit services. After port1 recovers, if LACP preemption is not enabled on Eth-Trunk, port1 still retains in backup state. If LACP preemption is enabled on Eth-Trunk, port1 becomes the active interface and port3 becomes the backup interface.
If LACP preemption is enabled and port3 needs to replace port1 or port2 to become the active interface, set the highest LACP priority value for port3. If LACP preemption is not enabled, the system neither re-selects the active interface nor switches the active interface when the priority of a backup interface is higher than that of the active interface.
LACP preemption delay
After LACP preemption occurs, the backup link waits for a set period of time before switching to active status. This period is called LACP preemption delay. The LACP preemption delay is set to prevent unstable data transmission along Eth-Trunk links caused by frequent status changes in member links.
As shown in Figure 4, port1 becomes inactive due to a link failure. After a period, the link recovers. If LACP preemption is enabled and the LACP preemption delay is set, port1 switches to active after the LACP preemption delay.
Switchover between active links and inactive links
In LACP mode, a link switchover in the LAG is triggered if a device at one end detects one of the following events:
An active link goes Down.
Ethernet OAM detects a link fault.
LACP detects a link fault.
An active interface becomes unavailable.
If LACP preemption is enabled, the backup interface's priority is changed to be higher than that of the current active interface.
When any of the preceding triggering conditions is met, the link switchover is performed in the following steps:
The faulty link is disabled.
The highest priority backup link is selected to replace the faulty active link.
The highest priority backup link becomes the active link and begins forwarding data.
- END -



