Date: Thu, 29 Nov 2012 19:53:07 +0100 From: Fleuriot Damien <ml@my.gd> To: dweimer@dweimer.net Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: CARP within VirtualBox Does it work? Message-ID: <9232DDFC-F40B-4914-A92D-3B5D9C1ECE5F@my.gd> In-Reply-To: <737f4b1c8bff13850af119f917ed811c@dweimer.net> References: <737f4b1c8bff13850af119f917ed811c@dweimer.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 29, 2012, at 6:43 PM, dweimer <dweimer@dweimer.net> 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. >=20 > The VirtualBox systems are both using bridged networking, and the host = cannot 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 = doesn'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.203/16 >=20 > ifconfig carp0: > carp0 flags=3D49<UP,LOOPBACK,RUNNING> metric 0 mtu 1500 > inet 10.20.190.203 netmask 0xffff0000 > nd6 options=3D29<PREFORMNUD,IFDISABLED,AUTO_LINKLOCAL> > 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<UP,LOOPBACK,RUNNING> metric 0 mtu 1500 > inet 10.20.190.203 netmask 0xffff0000 > nd6 options=3D29<PREFORMNUD,IFDISABLED,AUTO_LINKLOCAL> > carp: BACKUP vhid 1 advbase 1 advskew 0 >=20 > 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9232DDFC-F40B-4914-A92D-3B5D9C1ECE5F>