Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2006 11:34:44 -0400
From:      Vivek Khera <vivek@khera.org>
To:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   CARP not balancing automatically
Message-ID:  <8F9483A9-D387-443E-A325-356958211153@khera.org>

next in thread | raw e-mail | index | archive | help

--Apple-Mail-7-774374722
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

I'm attempting to use CARP with arpbalance to load balance some  
services.  My only problem is that the balancing doesn't happen  
automatically.

The configuration is just from the carp man page:

ifconfig_em0="inet XXX.XXX.XXX.55 netmask 255.255.255.192 "
ifconfig_em1="inet 192.168.100.55 netmask 255.255.255.0 "
ifconfig_carp0="inet 192.168.100.100 netmask 255.255.255.0 vhid 5  
pass dns-prv"
ifconfig_carp1="inet 192.168.100.100 netmask 255.255.255.0 vhid 6  
advskew 100 pass dns-prv"
cloned_interfaces="carp0 carp1"

and on the other box:

ifconfig_em0="inet XXX.XXX.XXX.56 netmask 255.255.255.192 "
ifconfig_em1="inet 192.168.100.56 netmask 255.255.255.0 "
ifconfig_carp0="inet 192.168.100.100 netmask 255.255.255.0 vhid 5  
advskew 100 pass dns-prv"
ifconfig_carp1="inet 192.168.100.100 netmask 255.255.255.0 vhid 6  
pass dns-prv"
cloned_interfaces="carp0 carp1"


and of course net.inet.carp.arpbalance=1 in /etc/sysctl.conf.


When I reboot the systems, the first one to boot up becomes the  
MASTER for both carp0 and carp1 interfaces and remains so even after  
the other machine comes up.  The second machine to boot comes up in  
BACKUP mode for both interfaces.

The only way to make the balance change is to bring down carp0 on the  
box not designated as the master for it momentarily until such time  
that the first one (the designated master for carp0) takes over, then  
bring up carp0 again.

Until I perform this manual step, all traffic goes to the single box.  
After I perform this step, the traffic is balanced nicely as expected  
amongst the local network hosts.  Each box then has one MASTER and  
one BACKUP carp interface for this IP.

What can I do to make the balance automatic as the docs imply?  This  
also happens on another pair of machines I have which are CARP +  
arpbalance for another IP.

The NICs in question are hooked up to a gigabit switch.

Thanks!



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                MailerMailer, LLC     Rockville, MD
http://www.MailerMailer.com/                     +1-301-869-4449 x806



--Apple-Mail-7-774374722--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8F9483A9-D387-443E-A325-356958211153>