From owner-freebsd-net@FreeBSD.ORG Tue Aug 13 13:35:01 2013 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6154E29F for ; Tue, 13 Aug 2013 13:35:01 +0000 (UTC) (envelope-from dhartmei@insomnia.benzedrine.cx) Received: from insomnia.benzedrine.cx (cust.static.213-3-30-106.swisscomdata.ch [213.3.30.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF33B2744 for ; Tue, 13 Aug 2013 13:35:00 +0000 (UTC) Received: from insomnia.benzedrine.cx (localhost [127.0.0.1]) by insomnia.benzedrine.cx (8.14.6/8.14.5) with ESMTP id r7DDYxhF018125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 13 Aug 2013 15:34:59 +0200 (MEST) Received: (from dhartmei@localhost) by insomnia.benzedrine.cx (8.14.6/8.14.5/Submit) id r7DDYws0025166; Tue, 13 Aug 2013 15:34:58 +0200 (MEST) Date: Tue, 13 Aug 2013 15:34:58 +0200 From: Daniel Hartmeier To: Karl Pielorz Subject: Re: Create CARP interface in state INIT? Message-ID: <20130813133458.GA31184@insomnia.benzedrine.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@FreeBSD.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 13:35:01 -0000 On Thu, Aug 08, 2013 at 01:11:58PM +0100, Karl Pielorz wrote: > Is there any way from rc.conf of creating a carp interface in the > 'down' state - i.e. INIT? I think any interface configured with ifconfig_* in rc.conf will cause an explicit additional "ifconfig up" call from /etc/network.subr. Furthermore, ifconfig itself will add "up" when setting the IP address. So, don't configure the carp interface in rc.conf, but do it in /etc/rc.local, and be careful to add the address while the vhid is not yet configured, as in: ifconfig carp0 create ifconfig carp0 inet 192.168.107.21 ifconfig carp0 down ifconfig carp0 vhid 21 pass secret advskew 100 HTH, Daniel