Setting up LACP on Redhat linux
Modify /etc/modprobe.conf (Not needed as of RHEL and OEL 6+)
cat /etc/modprobe.conf alias eth0 igb alias eth1 igb alias bond0 bonding options bond0 mode=4 miimon=100 lacp_rate=1 xmit_hash_policy=layer3+4 alias scsi_hostadapter aacraid alias scsi_hostadapter1 ahci
In order for the kernel bonding module to come up when the machine boots, create a file:
/etc/modprobe.d/bonding.conf
alias bond0 bonding
Create /etc/sysconfig/network-scripts/ifcfg-bond0
cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 BOOTPROTO=none ONBOOT=yes NETMASK=255.255.255.0 IPADDR=10.10.10.10 GATEWAY=10.10.100.1 USERCTL=no BONDING_OPTS="mode=4 miimon=100 lacp_rate=1 xmit_hash_policy=layer3+4"
Modify /etc/sysconfig/network-scripts/ifcfg-eth0
cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 #HWADDR=00:21:28:4E:D2:26 BOOTPROTO=none #IPADDR=10.10.10.10 #NETMASK=255.255.255.0 ONBOOT=yes MASTER=bond0 SLAVE=yes USERCTL=no
Modify /etc/sysconfig/network-scripts/ifcfg-eth1
cat /etc/sysconfig/network-scripts/ifcfg-eth1 # Intel Corporation 82575EB Gigabit Network Connection DEVICE=eth1 #HWADDR=00:21:28:4E:D2:27 ONBOOT=no BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes USERCTL=no
Restart networking:
/etc/init.d/network restart
Check the status of the bond:
cat /proc/net/bonding/bond0
It should look something like the below (important things highlighted in red):
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008) Bonding Mode: '''IEEE 802.3ad Dynamic link aggregation''' Transmit Hash Policy: '''layer3+4''' (1) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 802.3ad info LACP rate: '''fast''' Active Aggregator Info: Aggregator ID: 1 Number of ports: 2 Actor Key: 17 Partner Key: 32992 Partner Mac Address: 00:23:04:ee:be:0e Slave Interface: eth0 MII Status: '''up''' Link Failure Count: 1 Permanent HW addr: 00:21:28:4e:d1:56 Aggregator ID: 1 Slave Interface: eth1 MII Status: '''up''' Link Failure Count: 1 Permanent HW addr: 00:21:28:4e:d1:57 Aggregator ID: 1