NETWORK BONDING…

Network Bonding
Bonding:-Bonding allows you to aggregate multiple ports into a single group such that you can aggregate 3MB ports of 3 cards (1MB each). This provides faults tolerance as well as Load Balancing.
————————————————————————————————
Firstly check whether bonding driver is installed & ‘ifenslave’ user level control program installed. If not:- Configure kernel with ‘make menuconfig’ then select “configure drivers with modules” –> “Network device support”–> “Bonding driver support”
=====================================================================
Now enable the modules:-
# vi /etc/modprobe.conf
alias bond0 bonding
alias bond1 bonding
options bond0 max_bonds=2 miimon=100 mode=1
options bond1 miimon=100 mode=0

——————————————————————————————-
max_bonds= Specifies the no. of bonding devices to create for this bonding driver
miimon= Specifies the MII link monitoring frequency in milliseconds. This determines how often the link state of each slave is inspected for link failure. 0- disables MII link monitoring.
primary= Specifies which slave device will always be active
——————————————————————————————-
# modprobe bond0 bonding
(to load module without restart)

Configure the devices:
# cd /etc/sysconfig/network-scripts
# vi ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=NO

# vi ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=NO

# vi ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.1.0
NETMASK=255.255.255.0
IPADDR=192.168.1.2
USERCTL=NO

# vi ifcfg-bond1
DEVICE=bond1
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.1.0
NETMASK=255.255.255.0
IPADDR=192.168.1.3
USERCTL=NO

Confirm: # cat /proc/net/bonding/bond0

————————————————————————————————

Modes:
i) balance-rr or 0 (Default):- Round Robin policy: Transmit packets in sequential manner. Provide load balancing & fault tolerance.
ii) active-backup or 1:- Only one slave in bond is active.
iii) balance-x or 1:- XOR policy. This selects the same slave for each destination MAC address. Provides fault tolerance and load balancing.
iv) Broadcast or 3:- Transmit everything on all slave interfaces. Provides fault tolerance.
v) 802.3ad or 4:- Only for IEEE 802.3ad links devices.
vi) balance-tlb or 5:- Transmit load balancing. The outgoing traffic is distributed according to current load on each slave. Incoming traffic is received by current slave. if receiving slave fails, another slave takes over the MAC address of the failed slave.
vii)balance-alb or 6:- adaptive LB = TLB + receive load balance. The bonding driver intercepts the APR replies sent by the local system on their way out and overwrites the source H/W address with the unique hardware address of one of the slaves in the bond such that different peers use different H/W address for the server.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

sixteen + fourteen =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>