What is Network Bonding? Types of Network Bonding

Network bonding is a process of combing or joining two or more network interfaces together into a single interface. Network bonding offers performance improvements and redundancy by increasing the network throughput and bandwidth. If one interface is down or unplugged the other one will work. It can be used in situations where you need fault tolerance, redundancy or load balancing networks. In Linux, a special kernel module named bonding is used to connect multiple network interfaces into a single interface. Two or more network interfaces can be connected into a single logical “bonded” interface. The behavior of the bonded interfaces depends on the type of bonding method used.


Types of Network Bonding

1) mode=0 (balance-rr)

This mode is based on Round-robin policy and it is the default mode. This mode offers fault tolerance and load balancing features. It transmits the packets in Round robin fashion that is from the first available slave through the last.


2) mode-1 (active-backup)

This mode is based on Active-backup policy. Only one slave is active in this band, and another one will act only when the other fails. The MAC address of this bond is available only on the network adapter part to avoid confusing the switch. This mode also provides fault tolerance.


3) mode=2 (balance-xor)

This mode sets an XOR (exclusive or) mode that is the source MAC address is XOR’d with destination MAC address for providing load balancing and fault tolerance. Each destination MAC address the same slave is selected.


4) mode=3 (broadcast)

This method is based on broadcast policy that is it transmitted everything on all slave interfaces. It provides fault tolerance. This can be used only for specific purposes.


5) mode=4 (802.3ad)

This mode is known as a Dynamic Link Aggregation mode that has it created aggregation groups having same speed. It requires a switch that supports IEEE 802.3ad dynamic link. The slave selection for outgoing traffic is done based on a transmit hashing method. This may be changed from the XOR method via the xmit_hash_policy option.


6) mode=5 (balance-tlb)

This mode is called Adaptive transmit load balancing. The outgoing traffic is distributed based on the current load on each slave and the incoming traffic is received by the current slave. If the incoming traffic fails, the failed receiving slave is replaced by the MAC address of another slave. This mode does not require any special switch support.


7) mode=6 (balance-alb)

This mode is called adaptive load balancing. This mode does not require any special switch support.


Configure Network Bonding on CentOS

1) Create the bond file ( ifcfg-bond0 ) and specify the IP address, netmask & gateway.

# vi /etc/sysconfig/network-scripts/ifcfg-bond0









2) Edit the files of eth0 & eth1 and make sure you enter the master and slave entry.

# vi /etc/sysconfig/network-scripts/ifcfg-eth0









# vi /etc/sysconfig/network-scripts/ifcfg-eth1







3) Create the Bond file(bonding.conf)

# vi /etc/modprobe.d/bonding.conf

alias bond0 bonding

options bond0 mode=1 miimon=100

4) Now Restart the network Service

     # service network restart

5) To check the bond interface, use command:

  #  ifconfig bond0

6) To verify the status of bond interface, use command:

  #  cat /proc/net/bonding/bond0


If you need any further assistance please contact our support department.