From owner-freebsd-stable@freebsd.org Wed Mar 1 04:56:15 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 5C144CF28AE for ; Wed, 1 Mar 2017 04:56:15 +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 1D0D885B for ; Wed, 1 Mar 2017 04:56:13 +0000 (UTC) (envelope-from prvs=02331596ec=ari@ish.com.au) Received: from ip-136.ish.com.au ([203.29.62.136]:56819) by fish.ish.com.au with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1ciwIy-0002sn-2q; Wed, 01 Mar 2017 15:56:00 +1100 Subject: Re: CARP forcing failover To: Freddie Cash References: <513164a2-1a73-dd03-2feb-43fa53dd1b88@ish.com.au> Cc: FreeBSD Stable From: Aristedes Maniatis Message-ID: <2b6ecb94-b53f-5ae8-a842-d897e515380a@ish.com.au> Date: Wed, 1 Mar 2017 15:55:58 +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="mnQNRbMOpGkAVsBtt2HpNC2qpUABvUftP" 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 04:56:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mnQNRbMOpGkAVsBtt2HpNC2qpUABvUftP Content-Type: multipart/mixed; boundary="ktHoKe7r23f2DIFHn3I9JgNsPnG3lk8fO"; protected-headers="v1" From: Aristedes Maniatis To: Freddie Cash Cc: FreeBSD Stable Message-ID: <2b6ecb94-b53f-5ae8-a842-d897e515380a@ish.com.au> Subject: Re: CARP forcing failover References: <513164a2-1a73-dd03-2feb-43fa53dd1b88@ish.com.au> In-Reply-To: --ktHoKe7r23f2DIFHn3I9JgNsPnG3lk8fO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable My experience is that it doesn't cause them all the failover, even though= an interface going down does cause them all to failover with the pre-emp= tion feature enabled. Ari On 1/3/17 2:31pm, Freddie Cash wrote: > Doesn't "ifconfig vhid XX state master" do what you want? It forces tha= t vhid over to master, which should preempt the other interfaces to switc= h as well. >=20 > One command. >=20 > On Feb 28, 2017 5:10 PM, "Aristedes Maniatis" > wrote: >=20 > Yes, the automatic failover is great and works perfectly to bring a= ll interfaces over at once. But to manually force a failover I need to ch= ange the advskew one interface at a time with ifconfig. >=20 > Ari >=20 >=20 > On 1/3/17 12:04pm, Freddie Cash wrote: > > Do you have the preemption sysctl enabled? That will fail-over al= l carp interfaces when any one fails. > > > > "sysctl -a | grep carp" > > > > I'm pretty sure there's also an ifconfig command to force the sta= te as either master or backup. Check the man page. > > > > > > On Feb 28, 2017 5:01 PM, "Aristedes Maniatis" >> wro= te: > > > > I have a pair network gateway boxes running FreeBSD 11 and pf= =2E Upstream runs VRRP to provide redundant links, one to each gateway. I= nternally I'm using CARP for failover. > > > > All works well, but I find that manually failing over the lin= k is a bit complicated. In short I have this: > > > > em0: flags=3D8943 metric 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 > > > > That's two internal vlans and one external network. Each inte= rface has its own vhid since that's the advice I had in the past. > > > > Now, what command can I type that I could run remotely (SSH o= ver the em0 link) to force all the CARP addresses simultaneously to decre= ase the advskew and become MASTER. Alternatively I could run something on= the MASTER to make it BACKUP. Everything I've done so far is one command= per interface which has got me in trouble before as I manage to accident= ally remove my own access to the box before I'm done. > > > > Cheers > > Ari > > > > please cc me. > > > > -- > > --------------------------> > > Aristedes Maniatis > > CEO, ish > > https://www.ish.com.au > > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49= 102A > > >=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 --ktHoKe7r23f2DIFHn3I9JgNsPnG3lk8fO-- --mnQNRbMOpGkAVsBtt2HpNC2qpUABvUftP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAli2VF4ACgkQ72p9Lj5JECq1xQCeKywT8lsslD1vozTVdt6/lSO4 B7sAn15uG5+XPoSm3waLCvNBjfp50Rw0 =1u+s -----END PGP SIGNATURE----- --mnQNRbMOpGkAVsBtt2HpNC2qpUABvUftP--