Tips and Tuning for Ethernet Bonding With Linux - Page 2
In part 1 we learned how to configure Debian. Fedora is just the same, only different. First create a configuration file for your bond interface, like /etc/sysconfig/network-scripts/ifcfg-bond0. Remember that these files have a strict naming convention–they must say ifcfg- followed by the interface's kernel name. Configure it as you would any interface:
Then create files for each of your slaves:
Then add your alias and module options to /etc/modules.conf:
alias bond0 bonding
options bond0 mode=balance-rr miimon=100
Run modprobe bonding, restart networking, and you should see your nice new bonded interface come up with happy messages like
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
And ifconfig will show all of your interfaces, both the bond and the slaves.
You can test everything on the command line before committing your configurations to files. (See part 1.) You can unload kernel modules without rebooting using rmmod:
# rmmod bonding
Remember lsmod for listing loaded kernel modules, and cat /proc/net/bonding/bond0 to view your interface statistics.
What if things don't work and you get weirdo error messages that don't help? Just fire up dmesg and see if it brings enlightenment. You should also check /var/log/messages, and you can even follow along in realtime by running tail -f /var/log/messages. But most likely dmesg will tell you more.
Well now, that was quite a whirlwind tour. There are many more useful things to know, such as controlling your bonded interfaces with sysfs instead of ifenslave, additional bonding driver parameters, creating multiple bonded interfaces on a single machine, configuring switches, routing, and lots of additional information on the bits we already covered. You'll find all of this in the Documentation/networking/bonding.txt file in the kernel sources, which is a complete, well-written document.
- Thank you to Akkana Peck and the bonding driver developers for their excellent assistance