Link aggregation (LACP): bundling several network lines
In short: Link aggregation combines several physical network connections into one logical one to obtain more total bandwidth and failure protection; a single data stream does not become faster, though.
In more detail: A NAS or server with two 1 Gbit ports should not choke at the switch port. Link aggregation (LAG, IEEE 802.3ad/802.1AX, Linux “bonding/teaming”, Cisco “EtherChannel”) bundles lines.
In Depth
How it works
Several ports become one logical port (LAG). The sender distributes data streams (flows) by hash (MAC, IP, port) across the lines. Consequence: many simultaneous connections (several clients) use the sum of the bandwidth, a single connection (one copy operation) stays on one line (1 Gbit). If a cable fails, the rest continue (redundancy). LACP (Link Aggregation Control Protocol) negotiates bundles automatically and detects faults; static bundles without protocol are more error-prone.
Setup and modes
- Switch: enable LACP/802.3ad on the port pair of a managed switch; both sides must match.
- Linux bonding:
mode=802.3ad(LACP),balance-alb/balance-tlb(without switch support),active-backup(pure redundancy). Configuration via NetworkManager/netplan/systemd-networkd. - Windows Server/Synology/QNAP: “link aggregation/teaming” in the settings.
- Hash policy (
layer2+3,layer3+4) determines distribution. - Same speed and duplex of member lines, preferably same switch (or MLAG/vPC/stacking for failure protection across two switches).
When is it worth it?
- Servers/NAS with many clients, virtualisation hosts, uplinks between switches.
- Not necessary for single users who want to copy faster: rather 2.5/10 GbE (new cards, Cat 6A/7 cables) or SMB multichannel.
- Cost/benefit: managed switch needed (cheap from about €50–100).
- Sources of error: differently configured sides, loops (mind STP), hash distributes unevenly (one flow dominates), driver problems.
- Diagnosis:
cat /proc/net/bonding/bond0, switch LAG status,iperf3with several parallel streams (-P 4). - Related: VLAN, spanning tree, switch, SMB multichannel, NAS.
Classification (exam)
LAG belongs to the data link layer (layer 2). Goals: bandwidth, load distribution, failure protection. Distinction: load balancer (layer 4/7, distributes requests across servers), routing ECMP (layer 3), failover/VRRP (backup gateway). In network design LAG often belongs to core/distribution uplinks. Document (port assignment, cabling plan).
See also: VLAN, Switch, NAS server