From owner-freebsd-net@FreeBSD.ORG Thu Mar 6 22:19:54 2008 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 A34901065675 for ; Thu, 6 Mar 2008 22:19:54 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: from hal.rescomp.berkeley.edu (hal.Rescomp.Berkeley.EDU [169.229.70.150]) by mx1.freebsd.org (Postfix) with ESMTP id 9041B8FC14 for ; Thu, 6 Mar 2008 22:19:54 +0000 (UTC) (envelope-from ccowart@rescomp.berkeley.edu) Received: by hal.rescomp.berkeley.edu (Postfix, from userid 1225) id 200F43C046F; Thu, 6 Mar 2008 14:19:54 -0800 (PST) Date: Thu, 6 Mar 2008 14:19:54 -0800 From: Christopher Cowart To: freebsd-net@freebsd.org Message-ID: <20080306221954.GN30324@hal.rescomp.berkeley.edu> Mail-Followup-To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PZYVFYZbFYjzBslI" Content-Disposition: inline Organization: RSSP-IT, UC Berkeley User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Load Balancing with CARP 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: Thu, 06 Mar 2008 22:19:54 -0000 --PZYVFYZbFYjzBslI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I followed the instructions in carp(4) and set up a load balancing and failover configuration on vlan interfaces -- it's working fine (as long as I don't `ifconfig carp25 destroy'...). In order to really make use of this functionality, I need a user land method of figuring out whether a MAC address is coming to the local host as the primary or secondary. In other words, let's say I have two clients: IP MAC =2E10 :0a =2E11 :0b And two VHIDs for the virtual router interface (IP .1): VHID MAC 1 :01 2 :02 Router 1 has VHID 1 primary, VHID 2 backup. Router 2 has VHID 2 primary, VHID 1 backup.=20 How can I find out which VHID the sending MAC address hashes to?=20 For example: | which_vhid :0a | 1 | which_vhid :0b | 2 After poking around, the only thing I can figure is reproduce the hash function from the source code myself. I really don't want to do that if there's another way. Thanks, --=20 Chris Cowart Network Technical Lead Network & Infrastructure Services, RSSP-IT UC Berkeley --PZYVFYZbFYjzBslI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iQIVAwUBR9BuCSPHEDszU3zYAQIiLRAAn7xPbHP4Mj9NssOHGQbtdmR6j76voNYo TiMsFR7ir0DSv42M/EqR8ngBjRz1TrZCHtdHgaR2/+MDhMfMLarueGoBqIhFuphp SSMybH9jl2klntdHfcALQp36OzfBpNFu5iEv5jvby5j03BtVQyWXoEaQEfBaci6+ txCrbOCe35j1vUbeNZ5r6lHRy+vnEFblMQ0wmidkAgIy5T/7UJKCb7NW8l+mM20H ormAkjXqWX/JxDNrW7sDRUGpgYaokQ2g8hKX3e2CI3GxV+MOOWQTcplz8k9kd2lr 7dm4mB+2ZSJrTCn3fRwaz9EakW49GYmJFeDZWCB8/Hj3IN/BHi/6UuUPVC5denT9 +KUljhCMo1P0OVjJmG7RbddRon9jTwQV3LJ9+2DoqJ7HsL5ZYMbLxLvS5i0Zf/ek qH5SbHZtsyM8xjxPmrikM4RMI3j29hhN8L3zqVynanamBvRBGPf6vcswJ01a8iv8 Mgpf1sm0Vs/7tZsGyooXylX5Idg4UOC+e256XIkdd//TXI4iwbb2eulG1ywbMgNN y9O7m848ddnlSh0CC17hZ8Xv+b29AVKtPVZGrI+Eo529Y2uG6MdZq9PSo//FdOAM 1EJ482u5i6pZy2QZNCGGG0ywYKKJLwo422IjQbNpYza+jmZfBX1LjhlsLbzQakIz fFkLFtehldE= =Kfhl -----END PGP SIGNATURE----- --PZYVFYZbFYjzBslI--