The other option is to use the following in modprobe.conf
alias bond0 bonding
alias bond1 bonding
options bond0 miimon=100 mode=1 max_bonds=2
options bond1 miimon=100 mode=1 max_bonds=2
This will only load the module once, and setup 2 (as specified by max_bonds) bonded interfaces in it's initialisation. However this means that if you wanted to add another bonded interface at a later date you would have to re-load the bonding driver causing the other bonded interfaces to be disrupted.
I can't see any reason why using both config simultaneously wouldn't work. So intially you could setup modprobe.conf with the above config, and then add some of the config below to setup a new interface with no down time.
i.e:
# Inital 2 Bonded interfaces
alias bond0 bonding
alias bond1 bonding
options bond0 miimon=100 mode=1 max_bonds=2
options bond1 miimon=100 mode=1 max_bonds=2
# Additional (temporary) bonded interface:
alias bond3 bonding
options bond1 -o bonding3 miimon=100 mode=1
Alternatively, setting max_bonds to a high number such as 8 or 16 would also help solve this issue, but would leave you with a large number of unused interfaces.
Using RedHat Enterprise 4, I was having major trouble getting multiple bonded interfaces to work.
I tired:
/etc/modprobe.conf:
alias bond0 bonding
alias bond1 bonding
options bond0 miimon=100 mode=1
options bond1 -o bonding1 miimon=100 mode=1
But I kept getting the error:
[root@newbuild ~]# ifup bond1
bonding device bond1 does not seem to be present, delaying initialization.
However bond0 would come up at boot time fine.
When trying /sbin/modprobe bond1 manually there was nothing returned, no log entries created and no interface appeared. Adding the options to modprobe directly worked correctly:
/sbin/modprobe bonding -o bonding1 miimon=100 mode=1
I eventually solved the problem by completely removing the above configuration and putting the following in /etc/modprobe.conf:
install bond0 /sbin/modprobe bonding -o bonding0 miimon=100 mode=1
install bond1 /sbin/modprobe bonding -o bonding1 miimon=100 mode=1
And finally both bonded interfaces initialized correctly.

8 comments:
Thank you for your solution... It worked perfectly!
Hi,
I also had problems with bringing bond devices up and I finally renamed bond0 to zbond0 and bond1 to zbond1 and it worked. I found somewhere that this way drivers will be loaded last after eth drivers (because of z in the name). But now, ifconfig only show lo, zbond0 and zbond1 links.
Hi,
I found my problem ;-)
I added MAC address to the bonding interfaces and this is why it wasn't working. When I removed it, it works great. (shame)
This post was very helpful on getting a second bonded interface to start. I would like to comment, when you use the "install .." option, you need to remove the "alias bond? bonding" entries.
yha.. guys..
This is true , its working..
thanks..lot..
Thx ... Work fine for me ..
Works great on RHEL 4.7
had the same problem with RHEL4 U4
I removed the alias lines because those were forcing the bonding module to load without an parameters.
you could add:
options bonding max_bonds=(number of devices)
underneath it and that also works..
Post a Comment