What is Network Bonding? Types of Network Bonding

Posted at November 29, 2016 at 1:46 pm by Jithin

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

DEVICE=bond0

IPADDR=192.x.x.x

NETMASK=255.255.255.0

GATEWAY=192.x.x.1

TYPE=Bond

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=static

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

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

DEVICE=eth0

HWADDR=08:00:27:5C:A8:8F

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=no

MASTER=bond0

SLAVE=yes

 

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

DEVICE=eth1

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=no

MASTER=bond0

SLAVE=yes

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.

 

 

 

5.00 avg. rating (89% score) - 1 vote

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply