From owner-freebsd-questions@FreeBSD.ORG Thu Nov 29 20:48:20 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 753BE592 for ; Thu, 29 Nov 2012 20:48:20 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id EE2AE8FC0C for ; Thu, 29 Nov 2012 20:48:19 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id 12so2398850wgh.31 for ; Thu, 29 Nov 2012 12:48:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to :x-gm-message-state; bh=Z8AgS001aUWpaIgCAKv3NBCllOifl1DF2kJjQtfgVPE=; b=VnkSSXuRcSML0Rw3i5XexQ2CaNDGTMBYw29DG0SE5svOxS4UvujI3Fe3sROeH+jUmL hY2KEeQRBb0GxrjJ8mwQxJ6g54ji/yN4W0RHijVOL9thvNuyfJkq0V1mww1EM71tYnzQ /F7hK0YWnHFniT50FFEQaVgnCzVoZE/Bxla1f5oydYYgRfKkYMUWGS8T9ty6Le4W+oy1 2sPboNgaL+xkNMRoOPKHE7AD+LDDDBOdyLrUg78nNbw/kOqGJsOy8DtkxPPbK8p7Xl6W 89tvWMSqmBj8ysJgXQtI6uxHFV8cYvYPyUyfMsC6OY/IP8tqE4CrzhS2ZMqFEwzgqbph zyJA== Received: by 10.180.109.132 with SMTP id hs4mr37271488wib.1.1354222098556; Thu, 29 Nov 2012 12:48:18 -0800 (PST) Received: from [10.26.186.210] ([92.90.20.7]) by mx.google.com with ESMTPS id g2sm4033677wiy.0.2012.11.29.12.48.16 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Nov 2012 12:48:17 -0800 (PST) References: <737f4b1c8bff13850af119f917ed811c@dweimer.net> <9232DDFC-F40B-4914-A92D-3B5D9C1ECE5F@my.gd> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <581B5D38-28D3-4AA4-9891-4D69DB3C87D4@my.gd> X-Mailer: iPhone Mail (9A405) From: Damien Fleuriot Subject: Re: CARP within VirtualBox Does it work? Date: Thu, 29 Nov 2012 21:47:37 +0100 To: "" X-Gm-Message-State: ALoCoQlAA1UPWxeAG9MNgz3e8KtUbw8YVJ3at2s2ugDQsRcVF8RBo5ITCuNRmnkJ2Z1Tm00c5VF9 Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2012 20:48:20 -0000 On 29 Nov 2012, at 21:07, dweimer wrote: > On 2012-11-29 12:53, Fleuriot Damien wrote: >> On Nov 29, 2012, at 6:43 PM, dweimer wrote: >>=20 >>> I was trying to setup a test of CARP on two virtual machines running in V= irtualBox 4.2.4r81684 I am not sure if I have something wrong with my CARP c= onfiguration or if VirtualBox just doesn't work right with it. I can only p= ing the CARP interface IP address from the machine listed as MASTER, if I do= an ifconfig carp0 down on the MASTER the other machine correctly switches f= orm BACKUP to MASTER and then I can ping the interface from it but not from t= he Original system. >>>=20 >>> The VirtualBox systems are both using bridged networking, and the host c= annot ping the carp0 IP address but can ping the interface IP address. >>>=20 >>> Before I go through more trouble shooting, does anyone know if CARP does= n't work with VirtualBox? >>>=20 >>> carp configuration >>> Machine1: >>> ifconfig_em0=3D"UP" >>> ifconfig_em0_name=3D"LAN" >>> ipv4_addrs_LAN=3D"10.20.190.201/16" >>> defaultrouter=3D"10.20.111.2" >>> cloned_interfaces=3D"carp0" >>> ifconfig_carp0=3D"vhid 1 advskew 100 pass ReduntantCarpTest 10.20.190.20= 3/16 >>>=20 >>> ifconfig carp0: >>> carp0 flags=3D49 metric 0 mtu 1500 >>> inet 10.20.190.203 netmask 0xffff0000 >>> nd6 options=3D29 >>> carp: MASTER vhid 1 advbase 1 advskew 100 >>>=20 >>>=20 >>> Machine2: >>> ifconfig_em0=3D"UP" >>> ifconfig_em0_name=3D"LAN" >>> ipv4_addrs_LAN=3D"10.20.190.202/16" >>> defaultrouter=3D"10.20.111.2" >>> cloned_interfaces=3D"carp0" >>> ifconfig_carp0=3D"vhid 1 pass ReduntantCarpTest 10.20.190.203/16 >>>=20 >>> ifconfig carp0: >>> carp0 flags=3D49 metric 0 mtu 1500 >>> inet 10.20.190.203 netmask 0xffff0000 >>> nd6 options=3D29 >>> carp: BACKUP vhid 1 advbase 1 advskew 0 >>>=20 >>> FreeBSD version is 9.1RC3 on both test machines. >>=20 >>=20 >>=20 >> We're using FreeBSD and CARP in virtualized environments at work, >> albeit not on VirtualBox but on Proxmox/KVM. >>=20 >> First, I would advise replacing 10.20.190.203/16 with 10.20.190.203/32 >>=20 >>=20 >> I notice your carp0 is MASTER on machine1 with an advskew of 100 vs >> machine 2 advskew 0, same advbase. >> Confirm this is *after* you've set carp0 down on machine2. >>=20 >> If both carps are up and machine1 with advskew 100 beats machine2 >> with advskew 0, you have an additional problem. >>=20 >>=20 >> See if you have any more luck with the /32 address on carp0 anyway. >=20 > The documentation shows the mask matching that of the interface: > hostname=3D"hostb.example.org" > ifconfig_fxp0=3D"inet 192.168.1.4 netmask 255.255.255.0" > cloned_interfaces=3D"carp0" > ifconfig_carp0=3D"vhid 2 pass testpass 192.168.1.51/24" >=20 > This is consistent with the man page for CARP on the system as well. Rega= rdless I tried with the /32 and had the same result as I did with the /16. I= had done various UP/DOWN on interfaces so the current MASTER was just the l= ast one to have not been DOWN. I think I might just copy these VMs to my VM= WARE Workstation 9 install on my home PC after work tonight and see if the p= roblem persists. >=20 > --=20 > Thanks, > Dean E. Weimer > http://www.dweimer.net/ You wouldn't be the famous Weimer from whom weidu originates would you ? Anyway back on topic, we've had problems here with masks shorter than /32 on= carp interaces on 8.x so we changed them all to /32 and they work like a ch= arm. Might you have the time to test on 8.3 with virtualbox ? I'll see if I can install 2 of these tomorrow during my lunch break if that'= s not possible for you, and reproduce your test case.=