Boost Reliability with Ethernet Bonding and Linux - page 3
Recycling the Ethernet
Your next step is to install
ifenslave-2.6, which means "interface slave":
# aptitude install ifenslave-2.6
Now load the
# modprobe bonding mode=balance-alb miimon=100
This works some special magic, so let's take a quick detour to talk about it.
adaptive load balancing. This is the special option that rewrites ARP mappings so that ARP sees your two NICs as the same one.
miimon=100 means "tell MII to check every 100 milliseconds to see if the interface is up." This is important because the
bonding driver provides automatic failover if one of the links goes down, so their state must be continually monitored.
bond0 is your new logical bonded interface name. You'll configure this pretty much like ordinary
eth0, eth1 etc. interfaces. For now create it temporarily with
# ifconfig bond0 192.168.1.101 netmask 255.255.255.0 up
ifconfig to make sure, even though you'll get an error message if it didn't work, because being too careful is just fine:
# ifconfig bond0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MASTER MULTICAST MTU:1500 Metric:1 [...]
And now, the big moment: assign your slave devices. Both interfaces must be down and not have IP addresses assigned to them:
# ifenslave bond0 eth0 eth1
If everything works, your new bonded interface is operational and you'll be able to ping back and forth between your new interface and the other nodes on your network. You can use iperf to test throughput, and a really fun test is to disconnect one of the interfaces while ping is running. You shouldn't see any interruptions.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: RHEL 6.5, Debian 7.2 and EOL for Linux 3.0.x
- 5Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10