Tips and Tuning for Ethernet Bonding With Linux - Page 2

By Carla Schroder | Posted Sep 4, 2007
Page 2 of 2   |  Back to Page 1
Print ArticleEmail Article
  • Share on Facebook
  • Share on Twitter
  • Share on LinkedIn

Fedora Configuration

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:

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.1.0
NETMASK=255.255.255.0
IPADDR=192.168.1.101
USERCTL=yes

Then create files for each of your slaves:

# ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=yes

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.

Troubleshooting

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.

Resources

  • bonding.txt
  • Thank you to Akkana Peck and the bonding driver developers for their excellent assistance

Comment and Contribute
(Maximum characters: 1200). You have
characters left.
Get the Latest Scoop with Enterprise Networking Planet Newsletter