2004-11-01 09:50:39

by Mark Watts

[permalink] [raw]
Subject: ethernet channel bonding (bonding.o) on 2.6.x

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I'm trying to migrate a couple of server from a 2.4 kernel to 2.6 (Mandrake
9.1 -> 10.0)
All servers have 4 nics (a mix of e1000 and bcm5700) arranged in two logical
interfaces.

Note: Mandrakes ifconfig/ifup scripts have the necessary logic to ifenslave
ethX interfaces to a bondX interface automatically (through options in the
ifcfg-ethX and ifcfg-bondX config files).

On 2.4 I used the following in /etc/modules.conf, which worked perfectly:

- --
alias bond0 bonding
alias bond1 bonding

options bond0 miimon=100 mode=1
options bond1 -o bonding1 miimon=100 mode=1
- --

When I come to use these settings with /etc/modprobe.conf, only bond0 comes
up. The system complains that there 'doesnt seem to be a device for bond1'
and doesn't bring it up.

Using 'generate-modprobe.conf' It thinks I should be using:

- --
alias bond0 bonding
alias bond1 bonding
options bond0 miimon=100 mode=1
options bond1 miimon=100
install bond1 /sbin/modprobe -o bonding1 --ignore-install bonding
- --

This doesn't work - I get the same error.

If I manually do:

# modprobe bonding -o bonding1
# ifconfig bond1 up

Then I can bring up bond1 by hand.

I'm guessing the 'install' line is supposed to load a second instance of the
bonding driver (which I didn't think I needed with 2.6's module loading
needed - I can load e1000 twice without doing anything special) but it isn't.


Does anyone have a system with more than one bonded interface that actually
works?

Cheers,

Mark.

- --
Mark Watts
Senior Systems Engineer
QinetiQ Trusted Information Management
Trusted Solutions and Services group
GPG Public Key ID: 455420ED

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBhgf0Bn4EFUVUIO0RAuAHAKCDS5DtJMzRJjJGnGXly6b0GjRL/wCg8h/A
PXmz2ltABkxPQWXfVY4XVBQ=
=Wsch
-----END PGP SIGNATURE-----


2004-11-02 09:28:20

by Mark Watts

[permalink] [raw]
Subject: Re: ethernet channel bonding (bonding.o) on 2.6.x

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


[cc: lkml for the archives]

>
> The module should support multiple bonds by loading just one module,
> however in:
>
> include/linux/if_bonding.h:81:#define BOND_DEFAULT_MAX_BONDS 1 /*
> Default maximum number of devices to support */
>
> Have you tried adding the option:
>
> max_bonds = 2
>
> the the options line?
>
> With regard to the line:
>
> options bond1 -o bonding1 miimon=100 mode=1
>
> I ran into this one a while ago as the -o option doesn't work with 2.6
> kernels in the modprobe.conf file. I believe the theory is that modules
> should be able to support multiple devices without having to be loaded
> twice.


This works perfectly!

I'll do a patch to the documentation to reflect this.

Thanks.

Mark.

- --
Mark Watts
Senior Systems Engineer
QinetiQ Trusted Information Management
Trusted Solutions and Services group
GPG Public Key ID: 455420ED

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBh1Q2Bn4EFUVUIO0RAjG5AKCSYDrVjLOHFcC4mycsBe9R6FtwzACcC2ki
LX/IhlscYF889fGU0U8IwYA=
=Vex7
-----END PGP SIGNATURE-----