Operating System - Linux
1753329 Members
5215 Online
108792 Solutions
New Discussion юеВ

Linux RH4.6AS bonding - active standby primary options

 
motech
Occasional Contributor

Linux RH4.6AS bonding - active standby primary options

Hi I am having issues with the options within Active Standby bonding. modprobe.conf looks like this -

alias bond0 bonding
options bond0 mode=1 miimon=100 max_bonds=3 primary=eth0 downdelay=0 updelay=10000
alias bond1 bonding
options bond1 mode=1 miimon=100 primary=eth3 downdelay=0 updelay=10000
alias bond2 bonding
options bond2 mode=1 miimon=100 primary=eth4 downdelay=0 updelay=10000

I am trying to create three bonds - bond0 bond1 and bond2. The bonds create successfully, but they do not read the options for primary correctly - if I do more /proc/net/bonding/bond0 I see that primary is eth0, but if I do the same for bond1 - it's primary is eth0 too - even though I have specified it above. It must be reading the options as I can see it's reading the startup delay options.

Can anyone help?
5 REPLIES 5
Ivan Krastev
Honored Contributor

Re: Linux RH4.6AS bonding - active standby primary options

Maybe you have errors in your net config files in /etc/sysconfig/networc-scripts.

You chould have one file for every bond interface and one for every normal interface.

In the normal interfaces you should specify which is the master bonding interface for that lan:

DEVICE=eth
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no



See the examples - http://kbase.redhat.com/faq/FAQ_79_899.shtm

regards,
ivan
motech
Occasional Contributor

Re: Linux RH4.6AS bonding - active standby primary options

The ifcfg-scripts are there and look like this:

For eth3 (the one I want to be primary in bond1) the script is:

DEVICE=eth3
BOOTPROTO=static
MASTER=bond1
SLAVE=yes
ONBOOT=no
TYPE=Ethernet

For bond1 (the teamed interface who's primary adapter I want to be eth3) it looks like this:

DEVICE=bond0
BOOTPROTO=static
IPADDR=10.7.20.22
NETMASK=255.255.255.0
BROADCAST=10.7.20.255
ONBOOT=yes
TYPE=Ethernet

Any ideas what I'm doing wrong?
Ivan Krastev
Honored Contributor

Re: Linux RH4.6AS bonding - active standby primary options

For bond1 you have :
DEVICE=bond0

regards,
ivan
Ross Minkov
Esteemed Contributor

Re: Linux RH4.6AS bonding - active standby primary options

Hello motech,

In adition to what Ivan said (in your /etc/sysconfig/network-scripts/ifcfg-bond1 file instead of "DEVICE=bond1" you have "DEVICE=bond0") also do the following.

In all of the /etc/sysconfig/network-scripts/ifcfg-ethX files for the slave interfaces you should have:

BOOTPROTO=none

Your example for eth3 showed that you had "BOOTPROTO=static" instead. Fix /etc/sysconfig/network-scripts/ifcfg-eth3 file and check the rest of your slave interfaces ifcfg-ethX files.

I use "BOOTPROTO=none" in all of the /etc/sysconfig/network-scripts/ifcfg-bondX files too.

Also add "USERCTL=no" to all of the slave interfaces ifcfg-ethX files.

Here is an example of what I usually put in /etc/modprobe.conf.

In this example I have 2 bond interfaces:

bond0: eth5 & eth8

bond1: eth0 & eth6


/etc/modprobe.conf:

#-----------------------------------------------------------------------------
#install bond# /sbin/modprobe -a ethX ethY && /sbin/modprobe bonding
#alias bond# bonding
#options bond# -o bond# miimon=100 mode=1 downdelay=100 updelay=100
# mode=0 --> Round-robin policy: Transmit in a sequential order
# from the first available slave through the last. This
# mode provides load balancing and fault tolerance.
# mode=1 --> Active-backup policy: Only one slave in the bond is
# active. A different slave becomes active if, and only
# if, the active slave fails. The bond's MAC address is
# externally visible on only one port (network adapter)
# to avoid confusing the switch. This mode provides
# fault tolerance. The primary option affects the
# behavior of this mode.
# miimon=100 -> Specifies the frequency in milli-seconds that MII link
# monitoring will occur. A value of zero disables MII link
# monitoring. A value of 100 is a good starting point.
# max_bonds=2 -> this is the maximum number of bondN devices created
# If you need to create more, change _every_ options line
#-----------------------------------------------------------------------------

install bond0 /sbin/modprobe -a eth5 eth8 && /sbin/modprobe bonding
alias bond0 bonding
options bond0 miimon=100 mode=1 downdelay=100 updelay=100 max_bonds=2

install bond1 /sbin/modprobe -a eth0 eth6 && /sbin/modprobe bonding
alias bond1 bonding
options bond1 miimon=100 mode=1 downdelay=100 updelay=100 max_bonds=2

#-----------------------------------------------------------------------------

Another tip -- you can add lines like the following to your ifcfg files:

ETHTOOL_OPTS="speed 1000 duplex full autoneg off"

Of course customize this to your environment.


HTH,
Ross
Steven E. Protter
Exalted Contributor

Re: Linux RH4.6AS bonding - active standby primary options

Shalom,

I recommend the above mentioned changes to the ifcfg files ans a simpler bonding mechanism.

You really have six network cards you want to bond into three groups?

If you really do you should be able to take ifcfg-ethX configuration from a simpler system that has bonding working, replicate it and comment out the hardware address.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com