From owner-freebsd-stable@FreeBSD.ORG Thu Sep 11 15:54:36 2014 Return-Path: Delivered-To: freebsd-stable@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 ESMTPS id 5166F17B for ; Thu, 11 Sep 2014 15:54:36 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 138A5EF5 for ; Thu, 11 Sep 2014 15:54:35 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 95FC420E7088D; Thu, 11 Sep 2014 15:54:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 39B0020E7088B; Thu, 11 Sep 2014 15:54:27 +0000 (UTC) Message-ID: From: "Steven Hartland" To: "Freddie Cash" , "FreeBSD Stable" References: Subject: Re: Using CARP with multiple IP aliases (FBSD 10.0) Date: Thu, 11 Sep 2014 16:54:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 15:54:36 -0000 ----- Original Message ----- From: "Freddie Cash" To: "FreeBSD Stable" Sent: Thursday, September 11, 2014 4:15 PM Subject: Using CARP with multiple IP aliases (FBSD 10.0) > Good morning, > > Just looking for some clarification around the proper use of CARP on > interfaces with multiple IPs. > > I've been using the new CARP on FreeBSD 10.0 with great success on a pair > of systems with lots of vlans across 3 physical NIC ports. However, those > systems only have a single IP per vlan. The ifconfig lines are very > simple, and everything just works the way I expect it to, failing back and > forth between the two systems as needed. > > I'm now trying to get CARP working on a second pair of systems, and running > into issues with one of the physical interfaces. I think I might be doing > the ifconfig commands wrong, but the ifconfig(8) and carp(4) man pages > aren't very clear on this usage. > > Are all of the carp-related parameters required for every IP alias added to > an interface? Or are the pass/advbase/advskew only needed once per > interface, and you just pass the vhid to each IP alias? > > Currently, I'm doing the former and having issues with both boxes claiming > to be master for that one interface. > > Which is correct: > > ifconfig igb0 inet 1.2.3.4/24 vhid 30 pass mypass > ifconfig igb0 inet 1.2.3.5/32 vhid 30 pass mypass alias > ifconfig igb0 inet 1.2.3.6/32 vhid 30 pass mypass alias > ifconfig igb0 inet 1.2.3.7/32 vhid 30 pass mypass alias > ifconfig igb0 inet 1.2.3.8/32 vhid 30 pass mypass alias > > OR > > ifconfig igb0 inet 1.2.3.4/24 vhid 30 pass mypass > ifconfig igb0 inet 1.2.3.5/32 vhid 30 alias > ifconfig igb0 inet 1.2.3.6/32 vhid 30 alias > ifconfig igb0 inet 1.2.3.7/32 vhid 30 alias > ifconfig igb0 inet 1.2.3.8/32 vhid 30 alias > > Neither the ifconfig nor the carp man pages show examples with multiple IPs > configured within the same vhid. I believe you need a seperate vhid per IP assuming you want each to fail over to another machine when it goes down e.g. ifconfig igb0 inet 1.2.3.4/24 vhid 30 pass mypass ifconfig igb0 inet 1.2.3.5/32 vhid 31 pass mypass alias ifconfig igb0 inet 1.2.3.6/32 vhid 32 pass mypass alias ifconfig igb0 inet 1.2.3.7/32 vhid 33 pass mypass alias ifconfig igb0 inet 1.2.3.8/32 vhid 34 pass mypass alias Regards Steve