What Is Network Bonding?
Network bonding (or teaming) combines multiple network interfaces into a single logical interface. This provides redundancy (failover) and optionally increased throughput (aggregation).
Bonding Modes
| Mode | Name | Use Case |
|---|---|---|
| 0 | balance-rr | Round-robin for load balancing |
| 1 | active-backup | Failover (most common) |
| 2 | balance-xor | XOR-based load balancing |
| 4 | 802.3ad (LACP) | Dynamic link aggregation |
| 5 | balance-tlb | Adaptive transmit load balancing |
| 6 | balance-alb | Adaptive load balancing (no switch support needed) |
Configure Active-Backup on Ubuntu
Edit /etc/netplan/01-bond.yaml:
network:
version: 2
bonds:
bond0:
interfaces: [eth0, eth1]
addresses: [198.48.63.241/28]
routes:
- to: default
via: 198.48.63.1
parameters:
mode: active-backup
primary: eth0
mii-monitor-interval: 100sudo netplan applyVerify Bond Status
cat /proc/net/bonding/bond0
# Shows active interface, link status, and failover countTesting Failover
# Simulate interface failure
sudo ip link set eth0 down
# Check that bond0 switches to eth1
cat /proc/net/bonding/bond0
# Bring back
sudo ip link set eth0 up