Setting up Round-Robin vs LACP (802.3ad) on Linux Systems

Introduction

in this example we are setting up an aggregate on eth0,2,3 (not eth1 that is kept for other purposes).

Common

look for options on how to setup the module,

modinfo bonding
modinfo bonding | grep mode
modinfo bonding | grep xmit

setup the module,

vi /etc/modprobe.d/bonding.conf

alias bond0 bonding

load it already while watching the logs,

tail -F /var/log/messages &
#rmnod bonding
lsmod | grep bonding
modprobe bonding

RHEL/CentOS 7

systemctl stop NetworkManager
systemctl disable NetworkManager

cd /etc/sysconfig/network-scripts/
vi ifcfg-bond0

NAME=bond0
DEVICE=bond0
IPADDR=IP_ADDRESS
PREFIX=24
ONBOOT=yes

vi ifcfg-eth0

NAME=eth0
DEVICE=eth0
MASTER=bond0
SLAVE=yes
ONBOOT=yes

same for eth2,3.

tail -F /var/log/messages &
systemctl restart network

Slackware Linux

set it up manually,

echo -n LON SLAVES eth0,2,3...
modprobe bonding && echo -n bonding,
echo 100 > /sys/class/net/bond0/bonding/miimon && echo -n miimon,
echo 4 > /sys/class/net/bond0/bonding/mode && echo -n mode4,
echo 1 > /sys/class/net/bond0/bonding/lacp_rate && echo -n lacp_rate,
echo 1 > /sys/class/net/bond0/bonding/xmit_hash_policy && echo -n xmit1,
echo 200 > /sys/class/net/bond0/bonding/downdelay && echo -n downdelay,
echo 200 > /sys/class/net/bond0/bonding/updelay && echo -n updelay,
echo +eth0 > /sys/class/net/bond0/bonding/slaves && echo -n eth0,
echo +eth2 > /sys/class/net/bond0/bonding/slaves && echo -n eth2,
echo +eth3 > /sys/class/net/bond0/bonding/slaves && echo eth3.

finally proceed with network setup as usual but yet against the bond0 interface.

Obsolete way to do things manually, for the record,

#options bond0 miimon=100 mode=4 lacp_rate=1

ifenslave -a
ifenslave bond0 eth0
ifenslave bond0 eth2
ifenslave bond0 eth3

Ready to go

cat /sys/class/net/bonding_masters
cat /proc/net/bonding/bond0
cat /sys/class/net/bond0/bonding/miimon 
cat /sys/class/net/bond0/bonding/mode 
cat /sys/class/net/bond0/bonding/lacp_rate
cat /sys/class/net/bond0/bonding/xmit_hash_policy

References

balance-rr vs LACP