How to Bond Multiple Network Interfaces for Redundancy

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

ModeNameBehavior
0balance-rrRound-robin, load balances but needs switch support
1active-backupOne active interface, other on standby — simplest, works without special switch config
4802.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

Continue Reading

Browse more articles in Advanced Networking & VPN.

  • network bonding, interface redundancy, active-backup bonding, network high availability
  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

How to Set Up a VPN Server with WireGuard

WireGuard is a modern, fast, and simple VPN protocol — significantly easier to configure...

How to Set Up an OpenVPN Server on a VPS

OpenVPN is a mature, widely-supported VPN protocol — a solid choice when you need broad...

How to Configure a VPS as a Forward Proxy with Squid

A forward proxy routes outbound requests through your VPS, useful for accessing geo-restricted...

How to Set Up IPv6 on Your VPS

IPv6 adoption continues to grow, and many VPS providers now offer IPv6 addresses alongside IPv4....

How to Set Up a Site-to-Site VPN Between Two VPS Servers

A site-to-site VPN creates a persistent, secure tunnel between two servers (or entire networks),...