From owner-freebsd-questions@FreeBSD.ORG Thu Nov 29 20:07:12 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 6F1D8EBB for ; Thu, 29 Nov 2012 20:07:12 +0000 (UTC) (envelope-from dweimer@dweimer.net) Received: from webmail.dweimer.net (24-240-198-187.static.stls.mo.charter.com [24.240.198.187]) by mx1.freebsd.org (Postfix) with ESMTP id 2834D8FC08 for ; Thu, 29 Nov 2012 20:07:11 +0000 (UTC) Received: from www.dweimer.net (webmail.dweimer.net [192.168.5.1]) by webmail.dweimer.net (8.14.5/8.14.5) with ESMTP id qATK79i7008126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 29 Nov 2012 14:07:10 -0600 (CST) (envelope-from dweimer@dweimer.net) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 29 Nov 2012 14:07:09 -0600 From: dweimer To: Fleuriot Damien Subject: Re: CARP within VirtualBox Does it =?UTF-8?Q?work=3F?= Organization: dweimer.net Mail-Reply-To: In-Reply-To: <9232DDFC-F40B-4914-A92D-3B5D9C1ECE5F@my.gd> References: <737f4b1c8bff13850af119f917ed811c@dweimer.net> <9232DDFC-F40B-4914-A92D-3B5D9C1ECE5F@my.gd> Message-ID: X-Sender: dweimer@dweimer.net User-Agent: Roundcube Webmail/0.8.1 Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dweimer@dweimer.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2012 20:07:12 -0000 On 2012-11-29 12:53, Fleuriot Damien wrote: > On Nov 29, 2012, at 6:43 PM, dweimer wrote: > >> I was trying to setup a test of CARP on two virtual machines running >> in VirtualBox 4.2.4r81684 I am not sure if I have something wrong with >> my CARP configuration or if VirtualBox just doesn't work right with >> it. I can only ping 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 form BACKUP to MASTER and then I can >> ping the interface from it but not from the Original system. >> >> The VirtualBox systems are both using bridged networking, and the >> host cannot ping the carp0 IP address but can ping the interface IP >> address. >> >> Before I go through more trouble shooting, does anyone know if CARP >> doesn't work with VirtualBox? >> >> carp configuration >> Machine1: >> ifconfig_em0="UP" >> ifconfig_em0_name="LAN" >> ipv4_addrs_LAN="10.20.190.201/16" >> defaultrouter="10.20.111.2" >> cloned_interfaces="carp0" >> ifconfig_carp0="vhid 1 advskew 100 pass ReduntantCarpTest >> 10.20.190.203/16 >> >> ifconfig carp0: >> carp0 flags=49 metric 0 mtu 1500 >> inet 10.20.190.203 netmask 0xffff0000 >> nd6 options=29 >> carp: MASTER vhid 1 advbase 1 advskew 100 >> >> >> Machine2: >> ifconfig_em0="UP" >> ifconfig_em0_name="LAN" >> ipv4_addrs_LAN="10.20.190.202/16" >> defaultrouter="10.20.111.2" >> cloned_interfaces="carp0" >> ifconfig_carp0="vhid 1 pass ReduntantCarpTest 10.20.190.203/16 >> >> ifconfig carp0: >> carp0 flags=49 metric 0 mtu 1500 >> inet 10.20.190.203 netmask 0xffff0000 >> nd6 options=29 >> carp: BACKUP vhid 1 advbase 1 advskew 0 >> >> FreeBSD version is 9.1RC3 on both test machines. > > > > We're using FreeBSD and CARP in virtualized environments at work, > albeit not on VirtualBox but on Proxmox/KVM. > > First, I would advise replacing 10.20.190.203/16 with > 10.20.190.203/32 > > > 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. > > If both carps are up and machine1 with advskew 100 beats machine2 > with advskew 0, you have an additional problem. > > > See if you have any more luck with the /32 address on carp0 anyway. The documentation shows the mask matching that of the interface: hostname="hostb.example.org" ifconfig_fxp0="inet 192.168.1.4 netmask 255.255.255.0" cloned_interfaces="carp0" ifconfig_carp0="vhid 2 pass testpass 192.168.1.51/24" This is consistent with the man page for CARP on the system as well. Regardless 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 last one to have not been DOWN. I think I might just copy these VMs to my VMWARE Workstation 9 install on my home PC after work tonight and see if the problem persists. -- Thanks, Dean E. Weimer http://www.dweimer.net/