From owner-freebsd-stable@FreeBSD.ORG Fri Sep 12 14:33:41 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABB1FD0D for ; Fri, 12 Sep 2014 14:33:41 +0000 (UTC) Received: from mail-oa0-x230.google.com (mail-oa0-x230.google.com [IPv6:2607:f8b0:4003:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 700048F6 for ; Fri, 12 Sep 2014 14:33:41 +0000 (UTC) Received: by mail-oa0-f48.google.com with SMTP id g18so549951oah.35 for ; Fri, 12 Sep 2014 07:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VBxYBh1w1/gVHKCRbScEAqTgXq9iOMxNhqN4Ay3YPfM=; b=SffVGPOvdF89uUd0AczzikifzCGcbE0w9XSlRBbffV3+jBQslKGAKg/lRiWWLpuTkO StopsERs8vO30wXhffUoNkjTA/Popy1ph+jW/IQPbqSGbvPkN++zereUyCB/mzHFp8nv lGJdHULcUSC2cS+39hpabxMEaBHGq3X/RfdTFoKyBQIlS6ZTTCQqq/rpyNeJ/4V8qlE6 8xNQngusIKjuWxFg5FlpvTSiByjwzIWPUs49FuRBbEHk7XzDI1cy1s6+yhvF8tWzyNWA Mrd8r6HKz/bqZN+AQ4ztYRahApKAj4yEECGLz/kU4trFP2RmYWVfOvgv90eKZfYTdf7q UzKA== MIME-Version: 1.0 X-Received: by 10.182.153.68 with SMTP id ve4mr8907054obb.60.1410532419179; Fri, 12 Sep 2014 07:33:39 -0700 (PDT) Received: by 10.202.199.11 with HTTP; Fri, 12 Sep 2014 07:33:39 -0700 (PDT) In-Reply-To: References: <7925563B043E419996CD7FEE8C7DFDB6@multiplay.co.uk> <2401599.spj3ijL0cc@overcee.wemm.org> Date: Fri, 12 Sep 2014 07:33:39 -0700 Message-ID: Subject: Re: Using CARP with multiple IP aliases (FBSD 10.0) From: Freddie Cash To: Peter Wemm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Steven Hartland , FreeBSD Stable 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: Fri, 12 Sep 2014 14:33:41 -0000 On Thu, Sep 11, 2014 at 11:04 AM, Freddie Cash wrote: > On Thu, Sep 11, 2014 at 10:39 AM, Peter Wemm wrote: > >> This is the method we use extensively in the freebsd.org cluster. eg: >> the >> routers have public IP addresses, private RFC1918, IPv6 etc addresses, >> all on >> the same vhid for each interface. >> >> * One vhid presence, with multiple aliases on the same vhid. >> * Configure vhid params once, aliases attached without params. >> >> carp state checking uses link local addresses to communicate. >> >> Having multiple IP's per vhid means they change master->backup state as = a >> group, not individually and that's what we wanted for things like router >> default gateways. >> > > =E2=80=8BExcellent. Thanks for the confirmation. > > =E2=80=8BI'll be testing the updated configuration tomorrow morning (set = all vhid > params in rc.conf.local, and only set vhid number in firewall scripts whe= n > adding IPs). > =E2=80=8B > =E2=80=8BEverything is working correctly now. :) /etc/rc.conf.local configures all the carp-related options. And the firewall scripts now only set the vhid when adding the IP to the interface, nothing else. Seems I also had a typo in one of my scripts that wasn't adding one of the IPs to the vhid on sys2, so the IP list on both systems wasn't identical, which could also be part of the reason they were both MASTER at the same time.=E2=80=8B Now, igb0 on each system is showing the correct CARP status (MASTER on sys1, BACKUP on sys2). And, downing any of the 4 interfaces on sys1 correctly sets all interfaces on sys2 to MASTER. Thanks for all the help, and for pointing me in the right direction. :D --=20 Freddie Cash fjwcash@gmail.com