Mode | Term | Characteristic | Applicable Scenarios |
mode 0 | balance-rr | Round robin, CLB (requires switch support for link aggregation) | Maximized throughput |
mode 1 | active-backup | Primary/secondary, high availability | Link redundancy |
mode 2 | balance-xor | Hash-based CLB | CLB |
mode 4 | 802.3ad (LACP) | Dynamic link aggregation (requires switch support for LACP) | High throughput + redundancy |
mode 5 | balance-tlb | Adaptive Transmit Load Balancing | Egress bandwidth balancing |
mode 6 | balance-alb | Adaptive Load Balancing | Bidirectional bandwidth balancing |
eth0 and eth1)nmcli command for configuration.# Create a Bond connection named bond0 (mode 1: primary/secondary mode)nmcli connection add type bond \\con-name bond0 \\ifname bond0 \\bond.options "mode=active-backup,miimon=100"# LACP mode (mode 4, requires switch configuration)nmcli connection add type bond \\con-name bond0 \\ifname bond0 \\bond.options "mode=802.3ad,miimon=100,lacp_rate=fast"
# Add eth0 as a slave of bond0nmcli connection add type ethernet \\con-name bond0-slave-eth0 \\ifname eth0 \\master bond0# Add eth1 as a slave of bond0nmcli connection add type ethernet \\con-name bond0-slave-eth1 \\ifname eth1 \\master bond0
# Configure a Static IPnmcli connection modify bond0 \\ipv4.addresses "192.168.1.100/24" \\ipv4.gateway "192.168.1.1" \\ipv4.dns "8.8.8.8,114.114.114.114" \\ipv4.method manual# Or configure DHCPnmcli connection modify bond0 ipv4.method auto
# Enable the slave connectionnmcli connection up bond0-slave-eth0nmcli connection up bond0-slave-eth1# Enable the Bond connectionnmcli connection up bond0
# Disable the standalone connections of eth0 and eth1 to prevent IP conflicts.nmcli connection modify eth0 connection.autoconnect nonmcli connection modify eth1 connection.autoconnect no
vim /etc/NetworkManager/system-connections/bond0.nmconnection file and change type = bond.[connection]id=bond0type=bondinterface-name=bond0autoconnect=yes[bond]mode=active-backupmiimon=100[ipv4]method=manualaddress1=192.168.1.100/24,192.168.1.1dns=8.8.8.8;114.114.114.114;[ipv6]method=ignore
[connection]id=bond0-slave-eth0type=ethernetinterface-name=eth0master=bond0slave-type=bondautoconnect=yes
nmcli connection reloadnmcli connection up bond0
# Check the Bond interface statuscat /proc/net/bonding/bond0# Check the network connection status.nmcli connection show# Verify the IP addressip addr show bond0# Check the Bond member statusip link show
/proc/net/bonding/bond0 (active-backup mode):Ethernet Channel Bonding Driver: v5.15.0Bonding Mode: fault-tolerance (active-backup)Primary Slave: eth0 (primary_reselect failure)Currently Active Slave: eth0MII Status: upMII Polling Interval (ms): 100Up Delay (ms): 0Down Delay (ms): 0Slave Interface: eth0MII Status: upSpeed: 1000 MbpsDuplex: fullLink Failure Count: 0Permanent HW addr: xx:xx:xx:xx:xx:xxSlave queue ID: 0Slave Interface: eth1MII Status: upSpeed: 1000 MbpsDuplex: fullLink Failure Count: 0Permanent HW addr: xx:xx:xx:xx:xx:xxSlave queue ID: 0
nmcli connection modify bond0 bond.options "mode=802.3ad,miimon=100,xmit_hash_policy=layer3+4"
layer3+4 performs hashing based on IP addresses and ports, distributing traffic from different connections more evenly.nmcli connection show eth0 | grep autoconnect
ls /etc/NetworkManager/system-connections/nmcli connection reloadnmcli connection show
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback