cbaWorkflow : Adding bonding for multiple network adapters

This example is for Red Hat RHEL7

Check if the bonding module is loaded in the kernel:

modinfo bonding

If no information comes up, load the bonding module into the kernel:

modprobe --first-time bonding

create a bonding master interface configuration file:

cd /etc/sysconfig/network-scripts

vi ifcfg-bond0

DEVICE=bond0

NAME=bond0

TYPE=Bond

BONDING_MASTER=yes

IPADDR=192.168.2.23

PREFIX=24

ONBOOT=yes

BOOTPROTO=none

NM_CONTROLLED="no"

NETMASK=255.255.255.0

GATEWAY=192.168.2.1

BONDING_OPTS="mode=5 miimon=100"

DNS1=192.168.2.1

DNS2=207.164.234.129

Save the changes and update slave interface configuration files,in this case em1,em2,em3,em4:

vi ifcfg-em1

DEVICE=em1

NAME=bond0-slave

TYPE=Ethernet

BOOTPROTO=none

ONBOOT=yes

MASTER=bond0

SLAVE=yes

NM_CONTROLLED="no"

Save and repeat for the other network adapters

Restart the network service:

systemctl restart network.service

Check the interfaces:

ifconfig -a

For master interface you should see:

bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>

For slave interfaces:

em1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>