Linux Nic Bonding
Linux Nic Bonding
Linux allows binding multiple network interfaces into a single channel/NIC using special
kernel module called bonding. According to official bonding documentation, “The Linux
bonding driver provides a method for aggregating multiple network interfaces into a single
logical “bonded” interface. The behavior of the bonded interfaces depends upon the mode;
generally speaking, modes provide either hot standby or load balancing services.
Additionally, link integrity monitoring may be performed.”
Open both configuration using vi text editor and make sure file read as follows for eth0
interface# vi /etc/sysconfig/network-scripts/ifcfg-eth0Modify/append directive as
follows:DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=noneOpen eth1 configuration file using vi text editor:# vi
/etc/sysconfig/network-scripts/ifcfg-eth1Make sure file read as follows for eth1
interface:DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=noneSave file and exit to shell prompt.
Make sure bonding module is loaded when the channel-bonding interface (bond0) is brought
up. You need to modify kernel modules configuration file:# vi
/etc/modprobe.confAppend following two lines:alias bond0 bonding
options bond0 mode=balance-alb miimon=100Save file and exit to shell prompt. You can
learn more about all bounding options in kernel source documentation file (click here to read
file online).
Step # 4: Test configuration
First, load the bonding module:# modprobe bondingRestart networking service in order to
bring up bond0 interface:# service network restartVerify everything is working:# less
/proc/net/bonding/bond0Output: