From owner-freebsd-net@FreeBSD.ORG Sun Mar 20 18:58:56 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EA13106566C for ; Sun, 20 Mar 2011 18:58:56 +0000 (UTC) (envelope-from dhartmei@insomnia.benzedrine.cx) Received: from insomnia.benzedrine.cx (106-30.3-213.fix.bluewin.ch [213.3.30.106]) by mx1.freebsd.org (Postfix) with ESMTP id BB1CD8FC0A for ; Sun, 20 Mar 2011 18:58:55 +0000 (UTC) Received: from insomnia.benzedrine.cx (localhost.benzedrine.cx [127.0.0.1]) by insomnia.benzedrine.cx (8.14.1/8.13.4) with ESMTP id p2KIwub2012137 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Sun, 20 Mar 2011 19:58:56 +0100 (MET) Received: (from dhartmei@localhost) by insomnia.benzedrine.cx (8.14.1/8.12.10/Submit) id p2KIwut9005305; Sun, 20 Mar 2011 19:58:56 +0100 (MET) Date: Sun, 20 Mar 2011 19:58:56 +0100 From: Daniel Hartmeier To: Viktor Petersson Message-ID: <20110320185856.GA7703@insomnia.benzedrine.cx> References: <00612801-A0F4-4EDC-9BED-3364A86E4F9C@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00612801-A0F4-4EDC-9BED-3364A86E4F9C@gmail.com> User-Agent: Mutt/1.5.12-2006-07-14 Cc: freebsd-net@freebsd.org Subject: Re: Possible CARP bug? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Mar 2011 18:58:56 -0000 On Fri, Mar 18, 2011 at 04:43:59PM +0100, Viktor Petersson wrote: > Mar 7 14:42:57 nas0 kernel: carp0: MASTER -> BACKUP (more frequent advertisement received) This could mean that the master is receiving its own CARP advertisements back, and, thinking they come from another host, backs off. CARP advertisements are sent through the physical interface to a broadcast MAC address (01:00:5e:00:x:y) and the broadcast IP address 224.0.0.18. A real physical switch will forward that frame to all ports except the one it was received on, i.e. the frame will not be sent back to the sender. You mention a virtual enviroment, so maybe the switch is virtual, too, and behaves differently. You can check by tcpdump'ing on the physical interface of the master. You should see each advertisement once (going out, but tcpdump doesn't indicate the direction). Look at the IP IDs, if you see each ID twice, you're getting the broadcasts back. I think newer versions of CARP (in OpenBSD) contain an explicit check to detect this case (it can be thought of as a form of replay attack), which could be ported. But there might also be a setting in Qemu's virtual switch, that deals with such broadcasts. HTH, Daniel