News

Industry News

Switch Link Aggregation (LACP): Principles and Configuration Examples

2026-10-14

Switch Link Aggregation (LACP): Principles and Configuration Examples

Switch Link Aggregation (LACP): Principles and Configuration Examples

1. Why link aggregation is needed

Connecting two switches with a single cable creates two problems: limited bandwidth and a single point of failure. Link aggregation bundles several physical links into one logical link, resolving both at the same time:

  • Bandwidth aggregation: four gigabit links aggregated give a logical bandwidth of 4 Gbps
  • Improved reliability: if any member link fails, traffic automatically switches to the remaining links and services are not interrupted
  • Loop avoidance: the aggregated logical port is treated as a single link by the spanning tree, so no loop is formed

LACP (Link Aggregation Control Protocol, IEEE 802.3ad) adds protocol negotiation on top of aggregation, allowing both ends to negotiate member link status automatically. It is more reliable than purely manual aggregation.

2. Two aggregation modes

ModeDescriptionApplicable scenario
Manual load sharingNo negotiation; aggregation is forcedWhen the peer does not support LACP
Static LACPNegotiated by LACP; member port status is controlled by the protocolMainstream recommendation

The advantage of static LACP is that an abnormal peer link can be detected and removed automatically, whereas manual mode can end up in a "half-working" state.

3. Configuration example (using the Huawei S series)

Scenario: aggregate the three links GE0/0/1 to GE0/0/3 on a switch to connect to a peer switch.

```

system-view

[Switch] interface Eth-Trunk 1

[Switch-Eth-Trunk1] mode lacp-static

[Switch-Eth-Trunk1] quit

[Switch] interface GigabitEthernet 0/0/1

[Switch-GigabitEthernet0/0/1] eth-trunk 1

[Switch-GigabitEthernet0/0/1] quit

[Switch] interface GigabitEthernet 0/0/2

[Switch-GigabitEthernet0/0/2] eth-trunk 1

[Switch-GigabitEthernet0/0/2] quit

[Switch] interface GigabitEthernet 0/0/3

[Switch-GigabitEthernet0/0/3] eth-trunk 1

[Switch-GigabitEthernet0/0/3] quit

```

Configuring the aggregated port as a trunk carrying multiple VLANs:

```

[Switch] interface Eth-Trunk 1

[Switch-Eth-Trunk1] port link-type trunk

[Switch-Eth-Trunk1] port trunk allow-pass vlan 10 20 30

[Switch-Eth-Trunk1] quit

```

Verification:

```

display eth-trunk 1 // view the aggregation group status and member ports

display lacp peer // view LACP peer negotiation information

```

Member port status should show as `Selected`; if it shows as `Unselected`, the link is not being used for forwarding.

4. Load sharing algorithm

How traffic is distributed across the member links after aggregation is determined by the hashing algorithm:

```

[Switch-Eth-Trunk1] load-balance src-dst-mac

```

Common options: `src-ip`, `dst-ip`, `src-dst-ip`, `src-dst-mac`.

Key point: link aggregation means "multiple links share multiple flows", not "a single flow gets aggregated bandwidth". The traffic of one TCP connection still travels over a single member link. In a scenario with one large flow, aggregation therefore does not increase the speed of that connection. This is the most common misunderstanding.

5. Configuration points and common pitfalls

1. Member ports must be consistent

Speed, duplex and VLAN configuration must be identical. Ports with mismatched speeds cannot join the same aggregation group.

2. The peer configuration must match

Both ends must be configured for aggregation, using the same mode. Manual mode at one end and LACP at the other causes negotiation to fail.

3. Quantity and numbering

The Eth-Trunk ID should be the same at both ends (not mandatory, but easier to maintain). The number of member ports should not be excessive; pay attention to the specification limits of the device model.

4. Do not treat an aggregated port as loop protection

Aggregation protects against "member link failure", not "device failure". Device-level redundancy still requires stacking, VRRP or dual uplinks.

5. Carry out changes one link at a time

When adding or removing member ports, bear in mind that instantaneous re-hashing of traffic may cause brief jitter, and schedule the work in a maintenance window where possible.

6. Summary

Link aggregation is a basic building block of high-availability network design, but its benefits rest on correct configuration. Before going live, always verify member port status, carry out a cable-pull test to confirm that switchover works properly, and be clear that what it solves is "link redundancy" rather than "unlimited bandwidth aggregation".

Note: This article is provided for technical exchange and experience sharing. Always refer to the original manufacturer's technical documentation and the conditions of your own environment. Maintenance and change operations should be carried out by qualified engineers.