From owner-freebsd-net@FreeBSD.ORG Wed Oct 15 15:36:05 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4F1FBFB for ; Wed, 15 Oct 2014 15:36:05 +0000 (UTC) Received: from smtp-outbound.userve.net (smtp-outbound.userve.net [217.196.1.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.userve.net", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 769CB850 for ; Wed, 15 Oct 2014 15:36:05 +0000 (UTC) Received: from owa.usd-group.com (owa.usd-group.com [217.196.1.2]) by smtp-outbound.userve.net (8.14.7/8.14.7) with ESMTP id s9FFTnF9040120 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 15 Oct 2014 16:29:49 +0100 (BST) (envelope-from matt.churchyard@userve.net) Received: from SERVER.ad.usd-group.com (192.168.0.1) by SERVER.ad.usd-group.com (192.168.0.1) with Microsoft SMTP Server (TLS) id 15.0.516.32; Wed, 15 Oct 2014 16:29:49 +0100 Received: from SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9]) by SERVER.ad.usd-group.com ([fe80::b19d:892a:6fc7:1c9%12]) with mapi id 15.00.0516.029; Wed, 15 Oct 2014 16:29:49 +0100 From: Matt Churchyard To: "freebsd-net@freebsd.org" Subject: Carp stuck in INIT Thread-Topic: Carp stuck in INIT Thread-Index: Ac/oisnIy7pzRtICQlegI7PCf1AzEw== Date: Wed, 15 Oct 2014 15:29:48 +0000 Message-ID: <102a877d8483473bbd4a5c701c23aaa7@SERVER.ad.usd-group.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.0.10] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2014 15:36:06 -0000 Hello, I've just been providing help on the forums to a user trying to get carp to= work with a /30 network, where only 1 address is available. Two FreeBSD routers with one of the addresses in the /30 taken by the upstr= eam ISP. Looking through the carp manpage, which seems to show an example of carp ad= dresses being used as the primary address on an interface (whereas I believ= e it had to be an alias before), I came up with the following example (with= preempt enabled in /etc/sysctl.conf): ifconfig_em0=3D"vhid 10 pass mypass 192.168.0.100/24" defaultrouter=3D"192.168.0.10" However, on boot, I got the following messages, and carp would stick foreve= r in INIT mode. (May not be word for word, written from memory) em0: promiscuous mode enabled carp: demoted by 240 to 240 (interface down) I had to down/up the interface to get it to correctly jump into master or b= ackup mode This seems to have been fixed by changing rc.conf as follows (note the up k= eyword) With this on master and backup, everything seems to work perfectly ifconfig_em0=3D"vhid 10 pass mypass 192.168.0.100/24 up" In comparison to the above messages, which were from the master booting up,= I now see the following: em0: promiscuous mode enabled carp: VHID 10@em0: INIT -> BACKUP carp: VHID 10@em0: BACKUP -> MASTER (preempting a slower master) Is this something that's known to be required, is there a problem, or is it= just because I'm testing with virtualbox? The examples on the carp man page don't use the up keyword. (By the way I realise my tests don't use a /30 network like the one I was o= riginally trying the help with, I was more interested in testing the use of= carp as the only address on a machine. If it works with a single /24 carp = address, I'd expect it to work with a single /30 carp address) Regards, Matt Churchyard