19 January 2009

Fault tolerance for NIC

More and more data centers are in the process of setting up unmaned data centers.Admins are trying their best to have a fault tolerance solution for each software and Hardware component.
Here is a fault tolerance soultion for a Network interface via bonding in Linux

1.Create a file ifcfg-bond under /etc/sysconfig/network-scripts where is the binding number.
2.cat ifcfg-bond0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.41.0

NETMASK=255.255.255.0
IPADDR=192.168.41.250
USERCTL=no


3.Network interfaces to be bound together must be configured by adding MASTER= and SLAVE= directives to their configuration files.

4.Configuration files for the two interface files

DEVICE=eth<0/1>
BOOTPROTO=none

ONBOOT=yes
MASTER=bond0

SLAVE=yes
USERCTL=no

5.Configuring alias in modprobe.conf
alias bond0 bonding

options bond0 milmon=80 mode=1

modprobe to activate the aliases and restart the network service.

6. Now bond0 will be up.Output of ifconfig will show the same ip-address for bond0,eth0 & eth1.