In order to move our Nagios installation from a virtual server to a dedicated hardware machine i installed Debian Lenny on a HP Proliant DL 380 G5. This server has two integrated NICs which can easily be used together as a network bond. So if one way to or from the server failes, the machine is still available through the other card.
All the necessary requirements such as the bonding module and stuff are available in the debain standard kernel (the time i wrote this: 2.6.26-2-amd64)
What’s still left to do is to install the ifenslave package:
apt-get install ifenslave-2.6
and to modify some configuration files
/etc/modprobe.d/arch/i386 or /etc/modprobe.d/arch/i386 (depending on your architecture):
alias bond0 bonding
options bonding mode=1 miimon=100 downdelay=200 updelay=200
Mode 1 (also called: active-backup) means, that only one interface is active. The other one comes only into play, when the first (active) card fails. So this mode is only for fault tolerance and not for loadbalancing, but the configuration of this mode is very simple, because it doesn’t require additional switch configuration.
Edit /etc/network/interfaces and configure the bond0 interface:
iface bond0 inet static
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eth0 eth1
Don’t configure any additional network settings for eth0 and eth1!
For testing purposes you can now load the bonding module (will also be done automatically when the servers boots):
and restart your network:
Now you should be able to ping the server from another host and plug/unplug the cables of the two integrated NICs while the server always answers the ping requests.