Wednesday, December 9, 2009

Network Teaming

Multiple network interfaces into a single interface

Bind both NIC so that it works as a single device

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

Create a bond0 configuration file

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

Append following lines to it:

DEVICE=bond0
IPADDR=192.168.100.20
NETWORK=192.168.100.0
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
USERCTL=no
BOOTPROTO=none
ONBOOT=yes


Modify eth0 and eth1 config files:

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

DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none


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

DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Add bond driver/module


vi /etc/modprobe.conf

Append following two lines:

alias bond0 bonding
options bond0 mode=balance-alb miimon=100


# modprobe bonding

Restart Network

Done!

No comments: