Coraid Odyssey: Part 4 (ethernet bonding)
On the plate today is getting ethernet interface bonding working to provide load balancing and failover on the dual onboard gigabit interfaces on our home-built Coraid.
This actually turns out to be much easier than expected…
The first thing we need to do is install the ifenslave utility:
root@stor01:~# apt-get install ifenslave
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
ifenslave-2.6
The following NEW packages will be installed:
ifenslave ifenslave-2.6
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.4kB of archives.
After unpacking 57.3kB of additional disk space will be used.
Do you want to continue [Y/n]?
Now we create /etc/modprobe.d/bonding and add to it:
alias bond0 bonding
options bonding mode=802.3ad miimon=100 downdelay=200 updelay=200
Once that file is created, run “update-modules” to, well, update our module parameters. Of special note is the mode parameter. It tells the ethernet bonding modules to use 802.3ad bonding mode, which is supported by my Cisco Catalyst 2900 series gigabit switch.
Now add a new bond0 interface to /etc/network/interfaces (removing all the “slave” interfaces from that file at the same time):
auto bond0
iface bond0 inet static
address 192.168.1.4
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254
dns-search pixelchaos.net
up /sbin/ifenslave bond0 eth0
up /sbin/ifenslave bond0 eth1
Thats it! For the sake of simplicity, I just rebooted my server at this point. I’m of course leaving out the configuration of my Cisco Catalyst 2900 series switch to enable an 802.3ad etherchannel on the two ports we are plugged in to.
Next up will be performance testing AoE vs iSCSI…