From owner-freebsd-stable@FreeBSD.ORG Mon Oct 23 17:51:09 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D349916A492 for ; Mon, 23 Oct 2006 17:51:09 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24CA043D45 for ; Mon, 23 Oct 2006 17:50:46 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.176.29] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1Gc3wh1UpN-00074E; Mon, 23 Oct 2006 19:50:44 +0200 From: Max Laier Organization: FreeBSD To: freebsd-stable@freebsd.org Date: Mon, 23 Oct 2006 19:50:32 +0200 User-Agent: KMail/1.9.4 References: <8F9483A9-D387-443E-A325-356958211153@khera.org> In-Reply-To: <8F9483A9-D387-443E-A325-356958211153@khera.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2361973.vDJu7dn7XK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200610231950.39584.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Vivek Khera Subject: Re: CARP not balancing automatically X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Oct 2006 17:51:10 -0000 --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--