Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Dec 2005 08:58:07 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Mark Jayson Alvarez <jay2xra@yahoo.com>
Cc:        questions@freebsd.org
Subject:   Re: Fwd: How does carp computes the MAC address of the a certain Virtual IP?
Message-ID:  <4394011F.2090800@infracaninophile.co.uk>
In-Reply-To: <20051205022423.4720.qmail@web51601.mail.yahoo.com>
References:  <20051205022423.4720.qmail@web51601.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Jayson Alvarez wrote:

> How does carp computes the MAC address of the a certain Virtual IP? 
> Perhaps I can set up a route for the virtual IP address manually 
> because the kernel keeps on complaining: "arp_trequest: bad gateway 
> (!AF_LINK). This is weired because my carp setup is working for the 
> past 4 days and it suddenly stopped with the above error.

CARP assigns a special MAC address to the virtual IP:

eg. from one of the HA firewall setups we manage at work:

     00:00:5e:00:01:05

The last byte (05 in this case) is set to the VHID parameter you put on
the ifconfig line to initialise the carpN interface -- eg.

   ifconfig carp0 inet 12.34.56.78 255.255.255.0 12.34.56.255 vhid 5 pass notTellingYou advskew 1
                                                                  ^^^

If you have several pairs of systems on the same network all using carp, you 
need to ensure that they all use distinct vhid values or else chaos will ensue.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       Flat 3
                                                      7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW, UK



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