LinuxXXI · Advanced Linux NetworkingBond
Bonding and LACP - aggregating links for redundancy and throughput
What you'll learn
- Create a bond with two physical interfaces
- Choose between bonding modes for different use cases
- Configure LACP and verify it is active
- Recognise when teaming is a better choice (rare)
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
Link bonding (also called NIC teaming or link aggregation) combines two or more physical interfaces into one logical interface. The benefits are:
- Redundancy: if one link fails, traffic continues on the others.
- Throughput: with the right mode, traffic is load-balanced across all links.
Bonding is configured at layer 2; the switch must be configured to match.
Bond modes
| Mode | Name | Behaviour |
|---|---|---|
| 0 | balance-rr | Stripes packets of the same flow across links. Causes out-of-order delivery, which TCP reads as loss — a 2x1G balance-rr bond usually delivers less single-stream TCP throughput than one link on its own. Needs a static switch aggregation group. Do not use for TCP workloads. |
| 1 | active-backup | One link active, others standby. No switch config needed. |
| 2 | balance-xor | Hash-based selection. Needs switch support. |
| 3 | broadcast | All packets on all links. Needs switch support. |
| 4 | 802.3ad (LACP) | Standard LACP. Needs switch configured as LACP. |
| 5 | balance-tlb | Adaptive transmit load balancing. No switch config. |
| 6 | balance-alb | Adaptive load balancing (TLB + receive). No switch config. |
For most production use, mode 1 (active-backup) or mode 4 (LACP) are the right choices. Mode 1 needs no switch configuration and gives no throughput gain. Mode 4 gives redundancy plus aggregate throughput across many flows, but requires switch configuration.
balance-rr is the only mode that stripes a single flow, and that is precisely why it is not on the list. Consecutive frames of one connection go out different links with different queue depths, so they arrive at the receiver out of order. TCP does not distinguish reordering from loss: it fires duplicate ACKs, triggers fast retransmit, and collapses the congestion window. The reordering costs more than the striping gains, which is how a bond built to double the bandwidth ends up slower than the single link it replaced.
Create a bond
ip link add bond0 type bond mode 802.3ad miimon 100 lacp_rate fast
ip link set bond0 up
ip link set eth0 down
ip link set eth1 down
ip link set eth0 master bond0
ip link set eth1 master bond0
ip link set eth0 up
ip link set eth1 up
ip addr add 10.0.0.10/24 dev bond0
ip route add default via 10.0.0.1 dev bond0
Inspect
ip -d link show bond0
cat /proc/net/bonding/bond0
The /proc/net/bonding/bond0 file is the most useful
diagnostic. It shows:
- Bond mode.
- LACP rate (slow or fast).
- MII status of each slave.
- LACP partner information (when mode 4 is active).
Ethernet Channel Bonding Driver: v6.1.0
Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer3+4 (1)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: aa:bb:cc:00:00:01
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: aa:bb:cc:00:00:02
Slave queue ID: 0
If MII Status for any slave is down, the link is broken
or the cable is wrong. If Aggregator ID differs between
slaves, they are in different aggregators - usually a switch
misconfiguration.
LACP considerations
LACP (Link Aggregation Control Protocol, 802.3ad / 802.1AX) negotiates with the switch:
- LACP active: the host sends LACP frames. The switch responds.
- LACP passive: the host only listens. Switch must be active.
- LACP rate slow: LACPDU every 30 seconds.
- LACP rate fast: LACPDU every 1 second. Required to detect a failure within ~3 seconds.
For most data centre use, fast LACP is correct. Slow is fine for non-critical links.
ip link set bond0 type bond lacp_rate fast
ip link set bond0 type bond ad_select bandwidth
Configure with Netplan
network:
version: 2
renderer: networkd
bonds:
bond0:
interfaces:
- eth0
- eth1
addresses:
- 10.0.0.10/24
routes:
- to: default
via: 10.0.0.1
parameters:
mode: 802.3ad
lacp-rate: fast
transmit-hash-policy: layer3+4
mii-monitor-interval: 100
Configure with systemd-networkd
A .netdev file creates the bond:
# /etc/systemd/network/10-bond0.netdev
[NetDev]
Name=bond0
Kind=bond
[Bond]
Mode=802.3ad
LACPTransmitRate=fast
MIIMonitorSec=100ms
TransmitHashPolicy=layer3+4
A .network file attaches the slaves:
# /etc/systemd/network/11-eth0.network
[Match]
Name=eth0
[Network]
Bond=bond0
Switch configuration
Both member ports must be configured for LACP, and both must belong to the same channel group on the same LACP system. On a single Cisco switch:
interface range GigabitEthernet0/1 - 2
channel-group 1 mode active
On a single Arista switch:
interface Ethernet1-2
channel-group 100 mode active
Knowledge check
Knowledge check · 5 questions
Q1. Which file is the canonical diagnostic for a bond?
Q2. Mode 4 (802.3ad) needs the switch ports configured as one aggregation group, while mode 1 (active-backup) needs nothing on the switch.
Q3. Which of the following are bond modes? Select all that apply.
Q4. A nightly backup pushes one large TCP stream to a backup server. It runs at 9.4 Gbps over a 2x10G mode 4 bond, and the team asks you to "fix the bond" so it reaches 20 Gbps. What is the correct answer?
Q5. A bond created with "ip link add bond0 type bond mode 802.3ad" (no miimon) was tested with "ip link set eth0 down" and failed over correctly, so it will survive a cable pull.
Passing score: 75%. Answers are checked in this browser.