1827636 Members
3286 Online
109966 Solutions
New Discussion

Setting up bonding

 
Praveen Bezawada
Respected Contributor

Setting up bonding

Hi
I am having problem setting up bonding on Linux with a primary option enabled.
The functionality I am looking for is, all traffic should go through eth0 initially, when it goes down traffic should go through eth2 and when eth0 is brought up, traffic should failback to eth0 even though eth2 is up.
In modules.conf I set
alias bond0 bonding
options bond0 -o bonding0 miimon=100 mode=1 primary=eth0

In the directory /etc/sysconfig/network-scripts, I configure the three files, ifcfg-bond0 with entries:
DEVICE=bond0
BOOTPROTO=none
IPADDR=10.200.8.5
NETMASK=255.255.255.0
NETWORK=10.200.8.0
BROADCAST=10.200.8.255
ONBOOT=yes
USERCTL=no

ifcfg-eth0, ifcfg-eth2 with entries
DEVICE=eth0 or eth2
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes

But with this configuration, my machine does not boot up at all. Boot sequence gets struck at initiating eth0.
What's is that I am missing here.
Any ideas ???

Praveen
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Setting up bonding

Does the NIC driver in the kernel support bonding?

Check that, it could be the problem right there.

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
Roberto Polli
Trusted Contributor

Re: Setting up bonding

Which ethernet card do you have?
Are you using a Proliant Server?

Pax, R>
Jeroen Peereboom
Honored Contributor

Re: Setting up bonding

Praveen,


no need to reboot your server.
Just do a 'service network restart'.

Also check this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=517376

JP.

P.S.: I didn't have the opportunity to fix my own bonding problem. Oracle also offers hanicd on oss.oracle.com for NIC failover. It's because of Oracle's RAC (Real Application Cluster) on Linux
Praveen Bezawada
Respected Contributor

Re: Setting up bonding

I am running on HP DL380, Redhat advanced server 2.1.

I am confident that the bonding works because failover happens correctly, that is eth0 goes down, the traffic goes through eth1. But when eth0 is up again traffic does not go through eth0 and it still goes through eth1. Only if the eth1 goes down, traffic will go through eth0.
What is want is traffic should only go through eth0 is it is up.
Roberto Polli
Trusted Contributor

Re: Setting up bonding

Did you download from www.hp.com/linux the proliant support pack? It contains all patched network drivers and other stuff to corrctly manage these things.

You should install hpasm (I use v6.4 because had problems with 7.0) and cmanic (stuff for eth0). You should compile/install the bonding module and read the following files from PSP:
bonding-1.0.3-3.src.txt
/usr/share/doc/bonding-1.0.3/bonding.txt

Hope it helps.
Peace, R>
Jeroen Peereboom
Honored Contributor

Re: Setting up bonding

Praveen,

you wrote: ... But when eth0 is up again traffic does not go through eth0 and it still goes through eth1. Only if the eth1 goes down, traffic will go through eth0.

Reading the bonding.txt document I find the following desription for mode 1:
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.

So what you want, eth0 becoming active again when eth0 link comes up again, is not possible with this mode. Your description of what's happening conforms to the Mode 1 description.

None of the other 'bonding' modes support what you want.

So maybe you must think again: why do I want this?

JP.
Praveen Bezawada
Respected Contributor

Re: Setting up bonding

Hi JP
I know that this is the default behaviour of bonding. But atleast as per the bonding manual, there is a "primary" option which works with only mode 1 where a primary can be configured which will be preferred when all the interfaces in a bond group are up.


...BPK...
Peeyush
Regular Advisor

Re: Setting up bonding

go throught this...
http://geocities.com/peeyush_maurya//bonding.htm
any suggestion for my site.. http://geocities.com/peeyush_maurya/