Tuesday, March 17, 2009

nic bonding on Linux Fedora

as root: first of all disable NetworkManager service and start network service, then create /etc/sysconfig/network-scripts/ifcfg-bond0 and add these lines:

DEVICE=bond0
BONDING_OPTS="mode=1 miimon=100 primary=eth0"
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.208.0
NETMASK=255.255.255.0
IPADDR=192.168.208.128


or (if in dhcp configuration)

DEVICE=bond0
BONDING_OPTS="mode=1 miimon=100 primary=eth0"
BOOTPROTO=dhcp
ONBOOT=yes


then edit /etc/sysconfig/network-scripts/ifcfg-eth0 (keeping your HW Address)

DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0c:29:08:b5:19
ONBOOT=no
SLAVE=yes
MASTER=bond0

Repeat the last step for /etc/sysconfig/network-scripts/ifcfg-eth1 :

DEVICE=eth1
HWADDR=00:0c:29:08:b5:23
BOOTPROTO=none
ONBOOT=no
SLAVE=yes
MASTER=bond0


edit /etc/modprobe.conf adding the line:

alias bond0 bonding


restart network service:

/etc/init.d/network restart

3 comments:

Anonymous said...

Great help! One little thing which I had a little difficulty with was adding my default gateway. i.e. I added
GATEWAY=xxx.xxx.xxx.xxx to /etc/sysconfig/network-scripts/ifcfg-bond0
Might just be me being a bit of a noob, but took me a while to work out why I couldn't get interent access.

Kumar Narayanan said...

I still dont quite understand.....Can this tutorial be made with a little more detail?? I have 2 internet lines and which means I need a third eth to deliver the bonded output right??

root said...

from www.howtoforge.com
"The concept of NIC Bonding (or sometimes called NIC Teaming) is that you have two NICs bonded together to appear as if they are the same physical device."