From owner-freebsd-questions@freebsd.org Thu Dec 10 19:40:43 2015 Return-Path: Delivered-To: freebsd-questions@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 99EF19D762F for ; Thu, 10 Dec 2015 19:40:43 +0000 (UTC) (envelope-from jcigar@ulb.ac.be) Received: from relay-b02.edpnet.be (relay-b02.edpnet.be [212.71.1.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "edpnet.email", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4364A14A4 for ; Thu, 10 Dec 2015 19:40:42 +0000 (UTC) (envelope-from jcigar@ulb.ac.be) X-ASG-Debug-ID: 1449776438-0a7b8d53978497c0001-jLrpzn Received: from mordor.lan (77.109.103.53.adsl.dyn.edpnet.net [77.109.103.53]) by relay-b02.edpnet.be with ESMTP id 2Gbp9Ds4ZPfamkrl (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 10 Dec 2015 20:40:40 +0100 (CET) X-Barracuda-Envelope-From: jcigar@ulb.ac.be X-Barracuda-Effective-Source-IP: 77.109.103.53.adsl.dyn.edpnet.net[77.109.103.53] X-Barracuda-Apparent-Source-IP: 77.109.103.53 Date: Thu, 10 Dec 2015 20:40:38 +0100 From: Julien Cigar To: Emmanuel Vadot Cc: freebsd-questions@freebsd.org Subject: Re: CARP demotion counter Message-ID: <20151210194038.GN13477@mordor.lan> X-ASG-Orig-Subj: Re: CARP demotion counter References: <20151210182821.GM13477@mordor.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qngN6uuxP6gxHZuU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Barracuda-Connect: 77.109.103.53.adsl.dyn.edpnet.net[77.109.103.53] X-Barracuda-Start-Time: 1449776438 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://212.71.1.222:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2083 X-Virus-Scanned: by bsmtpd at edpnet.be X-Barracuda-Malware-Scanned: by bsmtpd at edpnet.be X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.25144 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 19:40:43 -0000 --qngN6uuxP6gxHZuU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 10, 2015 at 08:00:48PM +0100, Emmanuel Vadot wrote: > On 2015-12-10 19:28, Julien Cigar wrote: > > Hello, > >=20 > > I'm busy to setup a redundant router/firewall with two Soekris 6501,=20 > > PF, > > CARP and PFSync. > >=20 > > I wondered if it was normal that the CARP demotion counter > > (net.inet.carp.demotion) is greater than 0 at boot? > >=20 > > I'm asking this because it seems that the MASTER never returns from a > > BACKUP state, and it seems that's because the demotion counter is > > greater than 0 on both boxes (480) .. > >=20 > > Any idea .. ? > >=20 > > Thanks, > > Julien >=20 > You need net.inet.carp.preempt=3D1 for MASTER returning to MASTER after= a=20 > BACKUP state. > Otherwise as long as another machine have the carp ip, it will stay to= =20 > BACKUP. Both machines have net.inet.carp.preempt=3D1 To sum up, with "A" the original MASTER, "B" the BACKUP: - At first boot net.inet.carp.demotion is > 0 on A and B (which is not expected) - A is in MASTER state and B is in BACKUP state (which is expected) - If I unplug the cable from A, the state changes from BACKUP -> MASTER on B (which is expected) - When I re-plug the cable in A, the state remains the same (A is in BACKUP and B is in MASTER, which is *not* expexted) - As soon as set net.inet.carp.demotion to "0" the states change as expected (A in MASTER and B in BACKUP) Is it normal and expected that the demotion counter is > 0 at first=20 boot? Could this be related to the order of the interfaces? Thanks! Julien >=20 > --=20 > Emmanuel Vadot > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" --=20 Julien Cigar Belgian Biodiversity Platform (http://www.biodiversity.be) PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0 No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. --qngN6uuxP6gxHZuU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJWadUzAAoJEAi2KiTKQR5p4UQP/0TwMwd6toiMxlNGXIIYP3jR NnV6cbdtBjlm4lI2JEsXDrBaeBVqTtUlmkM6o6kffH5OIBAM5H6Ra9GT/E4t1cr5 JfzFZB2554ZNpHuTqUWL+89KPLjkiCDWoKYJ/NLqfEGRLitPQ4mIGPio0rcmmcEb ptrPrHp5HBYdf32BxC1n1oHfmRxEh2RLFGvOalCTkPOG/K8OXPJ5LIuUlmJuv8Yn CZyuZRur0MgI3gKBdctEfYdDvLr4d01SEyniXAUUGE/mq8qztciEn0hyUkrxMO7f OtJeHPgCtu9f8TvBBOen3qUkB3CeuuIe3GgV0tCF3qRy/RnvFM4LZIecBLTEJ4iH D3LipTUOSaBvW+J+m+caJE9l91RgxysQb+zCknwev1lWFMq0ZgVvDId7bh8hRynC pmCoHK+pbMEqtmqD3E2DIoEenpfa7MRj0AuPARq7gB1Tmiuqw5bbPJc1PqMNOEDz Hs8SRbKIHC98VjMyJQ1QyxDho4ZyZ9jROl7rxfQmK9ZXYVHmpHYcu39gtxc/d3kd VmxD6KhHUC6wAaI+nvs6AE5dHrofSK7J3UJQpNP9wEzkkqMcGPe3ne0R8UVz4Xwv 5nxfZUzpNSqIjRz7cMvcDX2i9ethu6pkqWelxgGCY5N7mmO/1YDgOOxn+rXxQA8x XacMwoROFFE1VGDoaHiq =/+vQ -----END PGP SIGNATURE----- --qngN6uuxP6gxHZuU--