From owner-freebsd-stable@freebsd.org Wed Mar 1 01:10:10 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2887CF2412 for ; Wed, 1 Mar 2017 01:10:10 +0000 (UTC) (envelope-from prvs=02331596ec=ari@ish.com.au) Received: from fish.ish.com.au (202-161-115-54.static.tpgi.com.au [202.161.115.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B29B23C6 for ; Wed, 1 Mar 2017 01:10:10 +0000 (UTC) (envelope-from prvs=02331596ec=ari@ish.com.au) Received: from ip-136.ish.com.au ([203.29.62.136]:52865) by fish.ish.com.au with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1cismM-0001nB-2X; Wed, 01 Mar 2017 12:10:06 +1100 Subject: Re: CARP forcing failover To: Freddie Cash References: Cc: FreeBSD Stable From: Aristedes Maniatis Message-ID: <513164a2-1a73-dd03-2feb-43fa53dd1b88@ish.com.au> Date: Wed, 1 Mar 2017 12:10:04 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="30db6BTRCR2timlbPCMmLXdDqn24lwTnu" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 01:10:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --30db6BTRCR2timlbPCMmLXdDqn24lwTnu Content-Type: multipart/mixed; boundary="0PxOqHSkE9frGv67TISx5FN20CXFL64eF"; protected-headers="v1" From: Aristedes Maniatis To: Freddie Cash Cc: FreeBSD Stable Message-ID: <513164a2-1a73-dd03-2feb-43fa53dd1b88@ish.com.au> Subject: Re: CARP forcing failover References: In-Reply-To: --0PxOqHSkE9frGv67TISx5FN20CXFL64eF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Yes, the automatic failover is great and works perfectly to bring all int= erfaces over at once. But to manually force a failover I need to change t= he advskew one interface at a time with ifconfig. Ari On 1/3/17 12:04pm, Freddie Cash wrote: > Do you have the preemption sysctl enabled? That will fail-over all carp= interfaces when any one fails. >=20 > "sysctl -a | grep carp" >=20 > I'm pretty sure there's also an ifconfig command to force the state as = either master or backup. Check the man page. >=20 >=20 > On Feb 28, 2017 5:01 PM, "Aristedes Maniatis" > wrote: >=20 > I have a pair network gateway boxes running FreeBSD 11 and pf. Upst= ream runs VRRP to provide redundant links, one to each gateway. Internall= y I'm using CARP for failover. >=20 > All works well, but I find that manually failing over the link is a= bit complicated. In short I have this: >=20 > em0: flags=3D8943 m= etric 0 mtu 1500 > media: Ethernet autoselect (100baseTX ) > status: active > carp: BACKUP vhid 1 advbase 1 advskew 50 > igb0: flags=3D8943 = metric 0 mtu 1500 > media: Ethernet autoselect (1000baseT ) > status: active > carp: BACKUP vhid 2 advbase 1 advskew 50 > igb0.2: flags=3D8943 metric 0 mtu 1500 > status: active > vlan: 2 vlanpcp: 0 parent interface: igb0 > carp: BACKUP vhid 3 advbase 1 advskew 50 > groups: vlan >=20 > That's two internal vlans and one external network. Each interface = has its own vhid since that's the advice I had in the past. >=20 > Now, what command can I type that I could run remotely (SSH over th= e em0 link) to force all the CARP addresses simultaneously to decrease th= e advskew and become MASTER. Alternatively I could run something on the M= ASTER to make it BACKUP. Everything I've done so far is one command per i= nterface which has got me in trouble before as I manage to accidentally r= emove my own access to the box before I'm done. >=20 > Cheers > Ari >=20 > please cc me. >=20 > -- > --------------------------> > Aristedes Maniatis > CEO, ish > https://www.ish.com.au > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A >=20 --=20 --------------------------> Aristedes Maniatis CEO, ish https://www.ish.com.au GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A --0PxOqHSkE9frGv67TISx5FN20CXFL64eF-- --30db6BTRCR2timlbPCMmLXdDqn24lwTnu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAli2H2wACgkQ72p9Lj5JECrr2wCfbqmLQZFi/hcTMX2fkXlParBZ FLYAniJVcrF4WhCYHSyPE8wiXW00Atti =Im+c -----END PGP SIGNATURE----- --30db6BTRCR2timlbPCMmLXdDqn24lwTnu--