Network interface bonding combines multiple physical/virtual network interfaces into a single logical interface — providing redundancy (if one fails, traffic continues on the other) or increased throughput, depending on the bonding mode chosen. Relevant primarily for dedicated servers or specific VPS configurations with multiple network interfaces available.
When Bonding Applies to VPS Environments
Most standard VPS instances have a single virtual network interface, making bonding less relevant — this technique primarily applies to dedicated servers or specific cloud configurations offering multiple network interfaces per instance. Verify your hosting environment actually provides multiple interfaces before proceeding.
Common Bonding Modes
| Mode | Name | Behavior |
|---|---|---|
| 0 | balance-rr | Round-robin, load balances but needs switch support |
| 1 | active-backup | One active interface, other on standby — simplest, works without special switch config |
| 4 | 802.3ad (LACP) | Link aggregation, needs switch-side LACP support |
For most redundancy-focused (rather than throughput-focused) use cases, active-backup is the simplest and most broadly compatible mode.
Step 1 — Install the Bonding Kernel Module
sudo modprobe bonding
echo "bonding" | sudo tee -a /etc/modules
Step 2 — Identify Available Interfaces
ip a
Step 3 — Configure Bonding via Netplan
sudo nano /etc/netplan/01-bonding.yaml
network:
version: 2
ethernets:
eth0:
dhcp4: no
eth1:
dhcp4: no
bonds:
bond0:
interfaces: [eth0, eth1]
addresses: [203.0.113.10/24]
gateway4: 203.0.113.1
parameters:
mode: active-backup
primary: eth0
Step 4 — Apply the Configuration
sudo netplan apply
Step 5 — Verify the Bond Is Active
cat /proc/net/bonding/bond0
Shows the current active interface and status of each slave interface within the bond.
Testing Failover
With care (ideally in a maintenance window, and only if you have out-of-band console access as a fallback), simulate a failure on the active interface and confirm traffic continues via the backup:
sudo ip link set eth0 down
cat /proc/net/bonding/bond0
Should show eth1 has become the active slave. Re-enable eth0 afterward:
sudo ip link set eth0 up
Important Caution
Always test interface bonding changes with out-of-band access (provider's console/KVM feature) available as a fallback — a misconfiguration during this process can result in complete loss of network connectivity to the server.
Common Errors
Bond interface doesn't come up — verify the bonding kernel module is loaded and both underlying interfaces are correctly referenced by their actual names (which can differ from generic examples).
No failover occurring on interface failure — verify the bonding mode configuration and check /proc/net/bonding/bond0 for any reported errors.
Best Practices
- Always maintain out-of-band console access before testing bonding/failover configurations
- Use active-backup mode unless you specifically need load-balancing and have confirmed switch-side support for it
- Document the bonding configuration clearly, since it's less commonly encountered than standard single-interface setups
Related Articles
- How to Configure Static Routes on a Linux VPS
- How to Diagnose and Fix High Network Latency
- How to Configure Multiple IP Addresses on One VPS
