Many bonding interface with different module parameters

This is a discussion on Many bonding interface with different module parameters within the Linux Networking forums, part of the Linux Forums category; Hello. I know it's possible to have many bonding interface with the parameter max_bonds. The problem is that all ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-04-2004
tibo
 
Posts: n/a
Default Many bonding interface with different module parameters

Hello.

I know it's possible to have many bonding interface with the parameter
max_bonds. The problem is that all my bonding interfaces will have the same
parameters.

Does anyone know if it is possible to have many bonding interfaces with
different module parameters ?

For example,
bond0 with mode=balance-rr
and
bond1 with mode=balance-tlb

Would be something like, in /etc/modules.conf

options bond0 mode=0 miimon=100 etc.
options bond1 mode=5 miimon=200 etc...

Thanks !


Reply With Quote
  #2 (permalink)  
Old 06-06-2004
Cameron Kerr
 
Posts: n/a
Default Re: Many bonding interface with different module parameters

tibo <bartol_78SPAMSUXXX@yahoo.com> wrote:

> Does anyone know if it is possible to have many bonding interfaces with
> different module parameters ?


Probably, why don't you try and find out?

--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!
Reply With Quote
  #3 (permalink)  
Old 06-07-2004
tibo
 
Posts: n/a
Default Re: Many bonding interface with different module parameters


"Cameron Kerr" <cameron.kerr@paradise.net.nz> a écrit dans le message de
news:40c39d83@news.maxnet.co.nz...
> tibo <bartol_78SPAMSUXXX@yahoo.com> wrote:
>
> > Does anyone know if it is possible to have many bonding interfaces with
> > different module parameters ?

>
> Probably, why don't you try and find out?


Eh eh already tried...

But didn't find out. That's why I'm asking.

In /etc/modules.conf, on the line where you give the parameters, you cannot
specify with interface you want (bond0, bond1, etc.) but only the module
name (bonding). So these parameters affect all the bond interface.

Look, no way of specify a bond interface :
options bonding mode=3 miimon=100

Someone told me to look in the /usr/src/Linux/.../bonding.txt, but nothing
in there...

> --
> Cameron Kerr
> cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
> Empowered by Perl!



Reply With Quote
  #4 (permalink)  
Old 06-07-2004
Roshan Sequeira
 
Posts: n/a
Default Re: Many bonding interface with different module parameters

Here is how you do it, from bonding.txt(lines 157-165, 2.4.18-14 kernel)

alias bond0 bonding
alias bond1 bonding

options bond0 mode=balance-rr
options bond1 -o bonding1 mode=balance-tlb

Not sure what the 'bonding1' on the last line is for. Would be great if
someone could explain that. I've been able to configure two bond
interfaces with the above configuration.

HTH,
Roshan.

tibo wrote:

> "Cameron Kerr" <cameron.kerr@paradise.net.nz> a écrit dans le message de
> news:40c39d83@news.maxnet.co.nz...
>
>>tibo <bartol_78SPAMSUXXX@yahoo.com> wrote:
>>
>>
>>>Does anyone know if it is possible to have many bonding interfaces with
>>>different module parameters ?

>>
>>Probably, why don't you try and find out?

>
>
> Eh eh already tried...
>
> But didn't find out. That's why I'm asking.
>
> In /etc/modules.conf, on the line where you give the parameters, you cannot
> specify with interface you want (bond0, bond1, etc.) but only the module
> name (bonding). So these parameters affect all the bond interface.
>
> Look, no way of specify a bond interface :
> options bonding mode=3 miimon=100
>
> Someone told me to look in the /usr/src/Linux/.../bonding.txt, but nothing
> in there...
>
>
>>--
>>Cameron Kerr
>>cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
>>Empowered by Perl!

>
>
>


Reply With Quote
  #5 (permalink)  
Old 06-11-2004
tibo
 
Posts: n/a
Default Re: Many bonding interface with different module parameters


"Roshan Sequeira" <roshans@india.hp.com> a écrit dans le message de
news:40C4337F.5030108@india.hp.com...
> Here is how you do it, from bonding.txt(lines 157-165, 2.4.18-14 kernel)
>
> alias bond0 bonding
> alias bond1 bonding
>
> options bond0 mode=balance-rr
> options bond1 -o bonding1 mode=balance-tlb
>
> Not sure what the 'bonding1' on the last line is for. Would be great if
> someone could explain that. I've been able to configure two bond
> interfaces with the above configuration.
>
> HTH,
> Roshan.


Thanks a lot, it works for me.

What we are doing on these two lines ("options") is to load two instances of
the same bonding module, with different parameters.

on the first "options" line, we are loading the bonding module, which name
will be "bonding" (same as module name)
on the second line, we are loading another instance of the module, but we
need a different handle to identify this instance and to give it parameters.
This is the aim of "-o bonding1" ; to name the second instance.

This is confirmed by a the lsmod command, where you can see that you have
two modules loaded, with the same size : bonding and bonding1

This whole stuff is made at the start in /etc/modules.conf.

My problem then was to do the same on the command line (no need to
restart).

I used to use the modprobe command, to load the bonding module with
parameters, but with this, no way to add an instance and give it a name and
parameters.
So now I use the insmod command, with the "-o" option :

insmod bonding mode=1 ; ifup bond0 ; ifup eth0
insmod bonding -o bonding1 mode=2 ; ifup bond0 ; ifup eth0
(I tell to load the bonding module and give it the name "bonding1" and give
it the parameter mode=2

with lsmod you see that the module has been loaded twice.


You can unload one with the rmmod command, for example to load it again with
new parameters
rmmod bonding1 ; insmod bonding -o bonding1 mode=4 ; etc.

In /proc/net/bond0/info, bond1/info, you can see the state of the bonding
interface.


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:26 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0