Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Oct 2006 19:50:32 +0200
From:      Max Laier <max@love2party.net>
To:        freebsd-stable@freebsd.org
Cc:        Vivek Khera <vivek@khera.org>
Subject:   Re: CARP not balancing automatically
Message-ID:  <200610231950.39584.max@love2party.net>
In-Reply-To: <8F9483A9-D387-443E-A325-356958211153@khera.org>
References:  <8F9483A9-D387-443E-A325-356958211153@khera.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2361973.vDJu7dn7XK
Content-Type: text/plain;
  charset="iso-8859-6"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Monday 23 October 2006 17:34, Vivek Khera wrote:
> 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=3D"inet XXX.XXX.XXX.55 netmask 255.255.255.192 "
> ifconfig_em1=3D"inet 192.168.100.55 netmask 255.255.255.0 "
> ifconfig_carp0=3D"inet 192.168.100.100 netmask 255.255.255.0 vhid 5
> pass dns-prv"
> ifconfig_carp1=3D"inet 192.168.100.100 netmask 255.255.255.0 vhid 6
> advskew 100 pass dns-prv"
> cloned_interfaces=3D"carp0 carp1"
>
> and on the other box:
>
> ifconfig_em0=3D"inet XXX.XXX.XXX.56 netmask 255.255.255.192 "
> ifconfig_em1=3D"inet 192.168.100.56 netmask 255.255.255.0 "
> ifconfig_carp0=3D"inet 192.168.100.100 netmask 255.255.255.0 vhid 5
> advskew 100 pass dns-prv"
> ifconfig_carp1=3D"inet 192.168.100.100 netmask 255.255.255.0 vhid 6
> pass dns-prv"
> cloned_interfaces=3D"carp0 carp1"
>
>
> and of course net.inet.carp.arpbalance=3D1 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.

Sounds like you forgot the net.inet.carp.preempt sysctl.  See the begining=
=20
of the EXAMPLES section of carp(4).

> 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.

=2D-=20
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

--nextPart2361973.vDJu7dn7XK
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQBFPQDvXyyEoT62BG0RAk0GAJ9LC0ZF4ttOgot+6N22+fIfgAqHWgCfY9GU
oNU8BMhed2vv0Gc5OM20Mls=
=vq47
-----END PGP SIGNATURE-----

--nextPart2361973.vDJu7dn7XK--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610231950.39584.max>