Network interface bonding is a Linux kernel feature which allows to aggregate multiple interfaces (eth0,eth1) into one virtual link such as bond0. Network card bonding is an effective way to increase the available bandwidth. If bonded the interfaces appears as same physical device and they have same MAC address. The other names for network interface bonding are port trunking, NIC teaming channel bonding and link aggregation. The main advantage of bonded network interface is to increase data throughput by load balancing and to provide redundancy by allowing fail over from one component device to another.
## How to create a network interface bond?
Create a file named ifcfg-bondN in the directory /etc/sysconfig/network-scripts, Here “N” is the number of interfaces. Then edit the contents of ifcfg-bondn and make it similar to the configuration settings for an Ethernet interface except that DEVICE is set to bondn instead of ethn.
BONDING_OPTS=”bonding parameters separated by spaces”
For each interface that you want to bond, edit its ifcfg-interface file so that it contains MASTER=bondN and SLAVE entries. An example is given below.
Create the file bonding.conf in the directory/etc/modprobe.d/, so that it contain entry for each bonded interface, for example:
alias bond0 bonding
It ensures that the kernel loads the bonding module is loaded when bring up the bonded interface. All bonded interfaces require entry in this file.
# ip link set eth0 down >> bring interface down
# ip link set eth1 down >> bring interface down
# ip link set bond0 up >> bring interface up
HAPPY BONDING 🙂
RHCE || Linux Server Administration || Networking || OnApp