Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Mar 2008 14:19:54 -0800
From:      Christopher Cowart <ccowart@rescomp.berkeley.edu>
To:        freebsd-net@freebsd.org
Subject:   Load Balancing with CARP
Message-ID:  <20080306221954.GN30324@hal.rescomp.berkeley.edu>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080306221954.GN30324>