-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Network Bonding
Complete beginner-friendly guide to network bonding on Linux, covering Arch Linux, CachyOS, and other distributions including bond creation, bond modes, and bond configuration.
Network bonding combines multiple network interfaces into one logical interface.
Benefits:
- Increased bandwidth
- Fault tolerance
- Load balancing
Common uses:
- Servers with multiple NICs
- High-availability setups
- Performance optimization
Load module:
# Load bonding module
sudo modprobe bonding
# Make permanent
echo "bonding" | sudo tee -a /etc/modules-load.d/bonding.confUsing ip command:
# Create bond interface
sudo ip link add bond0 type bond
# Bring up bond
sudo ip link set bond0 upUsing systemd-networkd:
# Create bond config
sudo vim /etc/systemd/network/bond0.netdevAdd:
[NetDev]
Name=bond0
Kind=bond
[Bond]
Mode=active-backup
Available modes:
-
mode=0 (balance-rr): Round-robin
-
Transmits packets in round-robin fashion
-
Provides load balancing
-
mode=1 (active-backup): Active-backup
-
One interface active, others backup
-
Provides fault tolerance
-
mode=4 (802.3ad): LACP
-
Requires switch support
-
Provides aggregation
-
mode=6 (balance-alb): Adaptive load balancing
-
Provides load balancing and fault tolerance
Configure mode:
# Set mode
sudo ip link set bond0 type bond mode active-backup
# Or in config
sudo vim /etc/systemd/network/bond0.netdevAdd:
[Bond]
Mode=active-backup
Add to bond:
# Add interface
sudo ip link set eth0 master bond0
sudo ip link set eth1 master bond0
# Or in config
sudo vim /etc/systemd/network/eth0.networkAdd:
[Match]
Name=eth0
[Network]
Bond=bond0
Set IP address:
# Using systemd-networkd
sudo vim /etc/systemd/network/bond0.networkAdd:
[Match]
Name=bond0
[Network]
DHCP=yes
# Or static
# Address=192.168.1.100/24
# Gateway=192.168.1.1
Check bond:
# Check bond status
cat /proc/net/bonding/bond0
# Check interfaces
ip link show master bond0
# Check bond state
ip link show bond0Verify:
# Check interface
ip link show eth0
# Check bond membership
cat /proc/net/bonding/bond0
# Re-add if needed
sudo ip link set eth0 master bond0This guide covered network bonding for Arch Linux, CachyOS, and other distributions, including creation, modes, configuration, and troubleshooting.
- Networking - Network setup
- Network Bridges - Bridges
- ArchWiki Network Bonding: https://wiki.archlinux.org/title/Network_bonding
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.