Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2017 12:10:04 +1100
From:      Aristedes Maniatis <ari@ish.com.au>
To:        Freddie Cash <fjwcash@gmail.com>
Cc:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Re: CARP forcing failover
Message-ID:  <513164a2-1a73-dd03-2feb-43fa53dd1b88@ish.com.au>
In-Reply-To: <CAOjFWZ5O9xvS3sZCEO-5M%2Bu1yWaijnRhD4CwKRW7UeNJMtvk=A@mail.gmail.com>
References:  <cceefde6-5bef-0900-3f0a-e84b161c8ef4@ish.com.au> <CAOjFWZ5O9xvS3sZCEO-5M%2Bu1yWaijnRhD4CwKRW7UeNJMtvk=A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--30db6BTRCR2timlbPCMmLXdDqn24lwTnu
Content-Type: multipart/mixed; boundary="0PxOqHSkE9frGv67TISx5FN20CXFL64eF";
 protected-headers="v1"
From: Aristedes Maniatis <ari@ish.com.au>
To: Freddie Cash <fjwcash@gmail.com>
Cc: FreeBSD Stable <freebsd-stable@freebsd.org>
Message-ID: <513164a2-1a73-dd03-2feb-43fa53dd1b88@ish.com.au>
Subject: Re: CARP forcing failover
References: <cceefde6-5bef-0900-3f0a-e84b161c8ef4@ish.com.au>
 <CAOjFWZ5O9xvS3sZCEO-5M+u1yWaijnRhD4CwKRW7UeNJMtvk=A@mail.gmail.com>
In-Reply-To: <CAOjFWZ5O9xvS3sZCEO-5M+u1yWaijnRhD4CwKRW7UeNJMtvk=A@mail.gmail.com>

--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" <ari@ish.com.au <mailto:a=
ri@ish.com.au>> 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<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> m=
etric 0 mtu 1500
>             media: Ethernet autoselect (100baseTX <full-duplex>)
>             status: active
>             carp: BACKUP vhid 1 advbase 1 advskew 50
>     igb0: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> =
metric 0 mtu 1500
>             media: Ethernet autoselect (1000baseT <full-duplex>)
>             status: active
>             carp: BACKUP vhid 2 advbase 1 advskew 50
>     igb0.2: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST=
> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?513164a2-1a73-dd03-2feb-43fa53dd1b88>