Tuesday, May 12, 2009

Network Card Bonding On CentOS

Today I had to setup a network bond on CentOS. These are the necessary steps. In the /etc/modprobe.conf file added the following:
alias bond0 bonding
options bond0 miimon=80 mode=1

mode=1 is for my active-backup setup witch is common to all the SUN blades I had to setup. In the /etc/sysconfig/network-scripts/ directory I created ifcfg-bond0 (fill according to your setup):
DEVICE=bond0
IPADDR=
NETMASK=
NETWORK=
BROADCAST=
GATEWAY=
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

I changed ifcfg-eth0 to:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

I also changed ifcfg-eth1 to:
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

Finally you have to restart networking:
$ service network restart

Many thanks to De Zordo Patrick

No comments:

Post a Comment