PDA

View Full Version : Network Card Bonding On CentOS - Setup Question


BlahBlah
22nd August 2007, 18:42
I have been trying to setup network card bonding on my CentOS server, and I must be missing something, because I cannot get it to work... At all.

My server has two onboard 10/100/1000bT NICs, but I'd like to take advantage of some fault tolerance and redundancy because this server will eventually be colocated a few hundred miles away from me.

The machine is freshly installed and my NIC configurations look like this:

/etc/modprobe.confalias eth0 e1000
alias eth1 e1000
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias scsi_hostadapter2 usb-storage
/etc/sysconfig/network-scripts/ifcfg-eth0# Intel Corporation 82573E Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=static
BROADCAST=24.123.xxx.xx7
HWADDR=00:30:48:8C:2A:1E
IPADDR=24.123.xxx.xx5
IPV6ADDR=
IPV6PREFIX=
NETMASK=255.255.255.248
NETWORK=24.123.xxx.xx0
ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-eth1# Intel Corporation 82573L Gigabit Ethernet Controller
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=00:30:48:8C:2A:1F
ONBOOT=no
DHCP_HOSTNAME=host.mydomainname.comSo what files do I need to create and edit to get my network bonding going (I'd like to run in mode 5 or 6)? How should the files look when I'm done?

BlahBlah
22nd August 2007, 19:03
Here is what I've got so far:

/etc/modprobe.confalias eth0 e1000
alias eth1 e1000
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias scsi_hostadapter2 usb-storage
alias bond0 bonding
options bond0 miimon=80 mode=6
/etc/sysconfig/network-scripts/ifcfg-bond0CE=bond0
IPADDR=24.123.xxx.xx5
NETMASK=
NETWORK=
BROADCAST=
GATEWAY=
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
/etc/sysconfig/network-scripts/ifcfg-eth0# Intel Corporation 82573E Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
/etc/sysconfig/network-scripts/ifcfg-eth1# Intel Corporation 82573L Gigabit Ethernet Controller
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
But... The machine is inaccessible. What am I doing wrong?

BlahBlah
22nd August 2007, 19:28
I just tried this as well, also to no avail:

/etc/sysconfig/network-scripts/ifcfg-bond0CE=bond0
IPADDR=24.123.xxx.xx5
NETMASK=255.255.255.248
NETWORK=24.123.xxx.xx0
BROADCAST=24.123.xxx.xx7
GATEWAY=24.123.xxx.xx1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
I used the values originally present on eth0 from the fresh install with working networking.

I did notice an issue with an IP conflict during a reboot. During startup, the machine was trying to bind the IP to (I assume) bond0, but it failed saying the "Another host is using that IP."

For a simple how-to, this is starting to wear on my nerves. :(

falko
23rd August 2007, 20:24
Any errors in your logs? Are you sure that no other system is using that IP?

BlahBlah
23rd August 2007, 22:17
The only machine using this IP was this same machine, before I started messing with the bonding settings. Everything worked fine when I just had the IP set static on eth0.

BlahBlah
4th September 2007, 17:22
Anyone have any suggestions? I still am not able to get bonding to work. :(

falko
5th September 2007, 21:19
I don't know what's wrong.. :(

adaughterson
7th February 2008, 00:59
BlahBlah;

Try this:

cat /proc/net/bonding/bond0

What does that output?

AD