Info
Content

LACP Bonding on CentOS 6/7


For convenience's sake, navigate to the folder which all the network scripts reside in

cd /etc/sysconfig/network-scripts/

Using your favourite text editor, edit the network interfaces' script to ensure it look identical to the template below. You will have to do this for each interface which needs to be incorporated into the bond.

nano ifcfg-em1
DEVICE=em1
BOOTPROTO=none
NM_CONTROLLED=no
ONBOOT=yes
USERCTL=no
SLAVE=yes
MASTER=bond0

Once all slave interfaces have been configured correctly, a new script file for the new bond will have to be created.
Create the aforementioned file using your favourite text editor.

nano ifcfg-bond0

Ensure it looks like the template below, keeping in mind to make adjustments where necessary for the ip addressnetmaskgateway.

DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
USERCTL=no
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
DNS1=77.247.176.114
DNS2=77.247.176.115
DNS3=85.159.238.17
BONDING_OPTS="mode=4 miimon=100 xmit_hash_policy=1"

To bring the changes into effect and activate the new bond, you may simply restart the network service.

service network restart

If you run into any errors at this point, you might want to load the bonding kernel module.

modprobe bonding
No Comments
Back to top