Bonding in RedHat RHEL4

This is a rather common knowledge now that on RHEL4 you need to state inside /etc/modprobe.conf the following line, when you want more than one bonding interfaces:

options bonding max_bonds=2

Then you attempt to use a trick to address different bonding devices with their name (aka, bond0 and bond1, and maybe bond2, etc), using an option as follows in your /etc/modprobe.conf:

options bond1 -o bond1 miimon=100

It works perfectly fine, until you try to set different parameters for your bonding devices, such as in this example (again, from /etc/modprobe.conf):

options bond0 -o bond0 mode=1 miimon=100
options bond1 -o bond1 mode=1 arp_validate=1 arp_ip_target= arp_interval=1000

These different options will not work. The 2nd (and all next) bonding devices will use bond0’s settings.

A note about this can be found in /usr/share/doc/kernel-doc-2.6.9/Documentation/networking/bonding.txt (requires the package “kernel-doc”):

NOTE: It has been observed that some Red Hat supplied kernels are apparently unable to rename modules at load time (the “-o bond1” part).  Attempts to pass that option to modprobe will produce an “Operation not permitted” error.  This has been reported on some Fedora Core kernels, and has been seen on RHEL 4 as well.  On kernels exhibiting this problem, it will be impossible to configure multiple bonds with differing parameters.

Without the ability to rename modules, we are unable to set, through /etc/modprobe.conf any bond-specific options.

An option which cannot be found in /usr/share/doc/initscripts-7.93.31.EL/sysconfig.txt (part of the “initscripts” package) is to remove any bond-specific parameters from /etc/modprobe.conf and to add to /etc/sysconfig/network-scripts/ifcfg-bondX a line as follows:

BONDING_MODULE_OPTS=’miimon=100 primary=eth0′

Here you can state your bonding options, and when you will restart your networking (provided you actually unload the “bonding” module during that process), your bonds will behave as you expect them to.

A small thing I need to confirm yet is the behavior of the bonding device if settings are changed without unloading the “bonding” module between the ifdown and ifup commands.

Similar Posts


    1. No. It works correctly. Starting at RHEL4U3 (I think) and above, it works. This specific bug describes exactly what I have described in my post. Using the BONDING_MODULE_OPTS flag, you can have fine-grained control over the functionality of each bonding device.
      Notice that you still need to add in /etc/modprobe.conf:
      options bonding max_bonds=2
      (or 3 or 4 or whatever). It just defaults to one.

  1. I could not get this method to work for me with RHEL4.6. While I specified BONDING_MODULE_OPTS=’mode=1 miimon=100 primary=eth0′ in my ifcfg-bond0 and BONDING_MODULE_OPTS=’mode=1 miimon=100 primary=eth1′ in my ifcfg-bond1, both bonds showed they were in load balance mode when I checked /proc/net/bonding/bond* files. The workaround that Mark linked to did work for me though. The only parameter I really needed to be different was the primary=eth*.

    1. It seems that there is no reference to BONDING_MODULE_OPTS anywhere in ‘ifup’ scripts. I will test it again, but still – it worked for me somehow. I cannot exactly specify how.
      RedHat’s init scripts, with emphasis on the networking scripts, are known to be buggy, and tend to behave differently between versions.
      I will check it as soon as I can, and get back to you.

  2. Hi,

    I am using two different arp targets for two different bonds on a server,as you explained above bond1 also picking up bond0 options.Is this BONDING_MODULE_OPTS work on rhel 4.6 and 2.6.9-67.ELsmp kenrnel?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.