From owner-freebsd-hackers Thu Jul 26 23:47:20 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.121.85]) by hub.freebsd.org (Postfix) with ESMTP id D2B8B37B407; Thu, 26 Jul 2001 23:47:09 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.245.136.132.Dial1.SanJose1.Level3.net [209.245.136.132]) by gull.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id XAA23954; Thu, 26 Jul 2001 23:46:27 -0700 (PDT) Message-ID: <3B610E69.74C105AB@mindspring.com> Date: Thu, 26 Jul 2001 23:47:05 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Peter Wemm Cc: Julian Elischer , "Eugene L. Vorokov" , Soren Kristensen , freebsd-hackers@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: Why two cards on the same segment... References: <20010726204052.7D4BB38CC@overcee.netplex.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Wemm wrote: > Terry Lambert wrote: > [..] > > > At a guess, he's attempting to implement VRRP, which requires > > that the virtual interface have a differen MAC address, > > Dont guess, ask. He said he needed it for testing. Personally, I need it for VRRP, and to compete with NT, which tests file server configurations with 4 cards with interrupts vectored, one each, to each of 4 CPUs, and tends to kick both Linux and FreeBSD's butts. > > and FreeBSD fails to support programming of MAC addresses, > > Damn, then I must be imagining the fact that I change MAC addresses > with 'ifconfig ether' on a regular basis. (see: SIOCSIFLLADDR) Look at the plural there: Intel Gigabit cards support 16 programmable MAC addresses, while the Tigon II supports 4, and the Tigon II supports one. Read RFC 2338: VRRP requires that each VID ends up with a MAC address in the VRRP address space, so that you can do transparent takeover, should one of your routers fail. Using the host MAC address is actually broken: it will fail to do the right thing on things like Alpine L2 switches: you end up needing to go all the way to L3 or L4 switching before you get correct behaviour again. The problem with this, of course, is that most L3/L4 switches have a limited depth ARP cache, and also have a limited number of addresses (sometimes only one) which they are able to cache on the switch to identify the card on the client side of the port. To resolve this, you pretty much need to implement virtual interfaces, one per programmable MAC. If you look at the Linux VRRPd project, you;ll see that they punted: they program the multicast address to the real MAC address on the card, and then they reprogram the original MAC to be the VRRP MAC. This lets them continue to receive any packets destined for the original MAC address, but it means that any packets they transmit go out the VID MAC address, which is technically wrong. FreeBSD doesn't even allow a single additional MAC address to be programmed: the code that does the SIOCSIFLLADDR handling when the card "init" is called (which incidently reloads the firmware on the Tigon II cards, and sends them into "watchdog timeout, resetting" hell) _ONLY_ permits reprogramming of the main MAC address, and not any of the auxillaries, for cards that support the idea -- or the multicast, for cards that can't support it. So the Linux VRRPd code won't run on FreeBSD (it's a hack), and true VRRP won't run on FreeBSD, since FreeBSD doesn't support the idea of multiple interfaces for a single card (sa_zero, as used in ip_divert, could probably do the trick to provide virtual interfaces for FreeBSD, to do the right thing). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message