Link Aggregation Control Protocol (LACP) is a method for creating ethernet port bonds, such that multiple network ports act and operate as a single logical port. There are a number of ways to create bonds, including statically configured “EtherChannels”. The problem with a static configuration though, is that if there’s a port failure, in this configuration you will continue to send some traffic into a blackhole. LACP periodically (either every 1 second or 30 seconds) sends control packets, which ensure that a port is passing traffic, and will be pulled out of the bond and failover traffic to remaining links.

Kernel Module Configuration

CentOS 6 & Later Configuration

# /etc/modprobe.d/bonding.conf
alias netdev-bond0 bonding
options bond0 miimon=100 mode=4 lacp_rate=1

Debian

# /etc/modules
bonding mode=4 miimon=100 lacp_rate=1

Ubuntu

# /etc/modprobe.d/bonding.conf
bonding mode=4 miimon=100 lacp_rate=1

CentOS & RedHat Network Configuration

# /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

# /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

# /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.0.2.2
NETMASK=255.255.255.0
BROADCAST=192.0.2.255
GATEWAY=192.0.2.1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

Debian & Ubuntu Network Configuration

auto bond0
iface bond0 inet manual
	bond-slaves none
	bond-miimon 100
	bond-mode 802.3ad
	bond-xmit-hash-policy layer2+3

iface bond0 inet static
	address 192.0.2.2
	netmask	255.255.255.0
	gateway 192.0.2.1
	dns-nameservers 162.213.2.255 72.5.72.72
	mtu 9000

iface bond0 inet6 static
	address 2001:db8:0:b::2
	netmask 64
	gateway 2001:db8:0:b:::1
	dns-nameservers 2606:C680:0:4::2 2606:C680:0:3::2

Check Status of bond0

$ cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2+3 (2)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: enp7s0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 1606
Permanent HW addr: 00:25:90:66:ab:9b
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 2

Slave Interface: enp6s0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 821
Permanent HW addr: 00:25:90:66:ab:9a
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 1