ETHERNET BONDING

ETHERNET BONDING:

Description:

          Bonding is a creation of a single bonded interface by combining 2 or more Ethernet interfaces, bonding helps in high availability of your network interface. And improvements on your data traffic flows bonding is also referred as NIC trunking or teaming.

What is the use of Ethernet bonding?

You can use the bonding driver that is provided with the Linux kernel to aggregate multiple network interfaces, such as eth0 and eth1, into a single logical interface such as bond0.

Definition:

The Linux bonding driver provides a method for aggregating multiple network interface into a single logical bonded interface.

Linux allows binding of multiple network interfaces into a single channel/NIC using special kernel module called bonding.

Modes of bonding:

  • Mode0 (balance-rr)
  • Mode1 (active backup)
  • Mode2 (balance-xor)
  • Mode3 (broadcast)
  • Mode4 (802.3ad)
  • Mode5(balance-tlb)
  • Mode6(balance-alb)

Mode0: (balance-rr) this mode transmits packets in a sequential or order from the first available slave through the last.

Mode1: (active-backup) sets all interfaces to the backup state while one remains active. Upon failure on the active interface, a backup interface replace it as the only active interface in the bond, the MAC address of the bond in mode1 is visible on only one port to prevent configuration for the switch.

Mode2: (Xor policy) selects an interface to transmit packages to based on the result of an XOR operation on the source and destination MAC addresses modulo NIC slave count. This calculation ensures that the same interface is selected for each destination MAC address used. Mode 2 provides fault tolerance and load balancing and is supported in Red Hat Enterprise Virtualization.

Mode3: (broadcast) broadcast policy transmits everything on all slave interfaces, this mode provides fault tolerance.

Mode4: (IEEE 802.3ad policy) IEEE 802.3ad dynamic link aggregation, creates aggregation which included interfaces share the speed and duplex settings, utilizes all slaves in the active aggregator according to the 802.3ad specification.

Mode5: (adaptive transmit load balancing policy ) adaptive transmit load balancing channel bonding that does not require any special switch support. The outgoing traffic distribution is according to the load on each interface and that the current interface receives all incoming traffic. Incoming traffic is received by the current slave.

Mode6: (balance-alb) This is Adaptive load balancing mode. This includes balance-tlb+receive load balancing (rlb) for IPV4 traffic. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the server on their way out and overwrites the src hw address with the unique hw address of one of the slaves in the bond such that different clients use different hw addresses for the server.

Create a file named ifcfg-bond N in the /etc/sysconfig/network-scripts directory where N is number of the interface such as 0.

STEP #1:

Create a bond0 configuration file.

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

Append the following linest:

STEP #2:

Modify eth0 configuration file.

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

Modify/append directive as follows:

Modify eth1 configuration file.

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

Modify/append directive as follows:

 

Modify eth2 configuration file.

# vim  /etc/sysconfig/network-scripts/ifcfg-eth2

Modify/append directive as follows:

STEP #3:

Set the parameters for bond0 bonding kernel module. Select the network bonding mode based on you need.

  • Mode0 (balance-rr)
  • Mode1 (active backup)
  • Mode2 (balance-xor)
  • Mode3 (broadcast)
  • Mode4 (802.3ad)
  • Mode5(balance-tlb)
  • Mode6(balance-alb)

STEP #4:

 

STEP #5:

# service network restart

 

 

 

 

Be the first to comment on "ETHERNET BONDING"

Leave a comment

Your email address will not be published.


*