Network Bonding on Linux: Combining Interfaces for Redundancy or Speed
Bonding combines several network interfaces into one logical interface. Depending on the mode, that buys redundancy, more aggregate bandwidth, or both.
What it does not do
It does not make a single transfer faster. Most modes hash each connection to one interface, so one file copy uses one link.
Two bonded gigabit links do not give you a two-gigabit download. They give you two gigabits of total capacity across many simultaneous connections, plus survival if one cable fails.
Being clear about this before configuring saves disappointment afterwards.
The modes worth knowing
mode 1, active-backup. One interface carries traffic, the others stand by. On failure, traffic moves. No switch configuration at all, works with anything, and gives no extra bandwidth.
This is the right default for most homelab and small server use, because it delivers the thing people actually want, which is surviving a failed cable or switch port.
mode 4, 802.3ad, LACP. Standards-based aggregation. Provides both redundancy and aggregate bandwidth, and requires a managed switch with a matching link aggregation group configured.
mode 6, balance-alb. Adaptive load balancing across both send and receive, using ARP negotiation, with no switch configuration. A reasonable middle ground and it interacts oddly with some setups, particularly bridging.
mode 0, balance-rr. Round-robin across links, the only mode that can speed up a single connection. It also delivers packets out of order, which makes TCP retransmit and often performs worse than a single link.
Configuring active-backup
sudo ip link add bond0 type bond mode active-backup miimon 100
sudo ip link set eth0 down && sudo ip link set eth0 master bond0
sudo ip link set eth1 down && sudo ip link set eth1 master bond0
sudo ip link set bond0 up
sudo ip addr add 192.168.1.10/24 dev bond0
sudo ip route add default via 192.168.1.1
miimon 100 polls link state every 100ms. Without link monitoring the bond never notices a failure, which defeats the entire purpose and is a genuinely common misconfiguration.
Configuring LACP
sudo ip link add bond0 type bond mode 802.3ad miimon 100 lacp_rate fast xmit_hash_policy layer3+4
xmit_hash_policy layer3+4 hashes on addresses and ports rather than MAC addresses alone, which distributes traffic far better when most of it goes to one gateway.
The switch side must match. On the switch, configure both ports as one LACP port-channel. Mismatched configuration causes either a loop or a bond that quietly uses a single link while reporting success.
Checking it
cat /proc/net/bonding/bond0
Bonding Mode: fault-tolerance (active-backup)
Currently Active Slave: eth0
MII Status: up
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
That file is the authoritative view: mode, active interface, per-link status, and failure counts.
Then test it. Unplug a cable and watch the active slave change:
watch -n1 'grep -E "Currently Active|MII Status" /proc/net/bonding/bond0'
An untested failover is a hypothesis. Doing this before you need it is the difference between redundancy and the appearance of it.
Persisting
systemd-networkd:
# /etc/systemd/network/10-bond0.netdev
[NetDev]
Name=bond0
Kind=bond
[Bond]
Mode=active-backup
MIIMonitorSec=0.1s
# /etc/systemd/network/20-bond-slaves.network
[Match]
Name=eth0 eth1
[Network]
Bond=bond0
NetworkManager handles it through nmcli con add type bond, and Netplan generates configuration for either backend.
Bonding with bridges and VLANs
The full stack on a virtualization host: bond the physical links, put VLAN interfaces on the bond, and bridge each VLAN for guests.
eth0 ─┐
├─ bond0 ─┬─ bond0.10 ─ br-vlan10
eth1 ─┘ └─ bond0.20 ─ br-vlan20
Our VLANs and bridges guide covers the upper layers, and note the ordering: bond first, then VLAN, then bridge.
Is it worth it
Yes for a server where a failed cable or switch port would matter, since active-backup costs one extra cable and no switch configuration.
Probably not for a desktop, where the failure mode is that you notice and plug in a different cable.
Only with a managed switch for LACP. Without one you cannot configure the other end, and the mode will not work correctly.
Frequently Asked Questions
Does bonding double my speed?
Not for a single connection. Most modes hash each flow to one interface, so one transfer uses one link. Aggregation increases total throughput across many simultaneous connections rather than making one connection faster.
Which bonding mode should I use?
active-backup for pure redundancy with no switch configuration required, which covers most homelab cases. 802.3ad LACP for aggregate bandwidth and redundancy together, which requires a managed switch configured to match.
Do I need a managed switch?
For active-backup and balance-alb, no. For 802.3ad LACP, yes, and the switch ports must be configured as a matching link aggregation group. Mismatched configuration causes packet loops or a bond that silently uses one link.
What is the difference between bonding and teaming?
They solve the same problem. Bonding is the older in-kernel driver and teaming is a newer implementation with more logic in userspace. Bonding is more widely used and better documented, and either is a reasonable choice.
How do I check a bond is actually working?
Read the file under /proc/net/bonding for the bond, which shows the mode, the current active slave, each link status, and the failure count. Then unplug a cable and watch it fail over rather than assuming it will.
Can I bond wireless and wired interfaces?
Not usefully. Bonding expects links with similar characteristics and wireless behaves too differently. For automatic switching between wired and wireless, NetworkManager connection priorities are the right mechanism.