Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Dec 2005 10:16:05 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Mark Jayson Alvarez <jay2xra@yahoo.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: how to set a route to an AF_LINK type
Message-ID:  <20051202081605.GR20961@ip.net.ua>
In-Reply-To: <20051202072719.76687.qmail@web51604.mail.yahoo.com>
References:  <20051202072719.76687.qmail@web51604.mail.yahoo.com>

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

--TDVcAd+kFgbLxwBe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 01, 2005 at 11:27:19PM -0800, Mark Jayson Alvarez wrote:
> =20
> Hi,
> =20
>  I'm not sure what I did wrong. My carp setup with 2 machines sharing 1=
=20
> virtual ip is working perfect for 3 days now, until today, I got these=20
> messages in /var/log/messages
> =20
>  kernel: carp: incorrect hash
>  arp_rtrequest:bad gateway 10.10.8.146 (!AF_LINK)
> =20
>  googling brought me to this link:
> =20
> http://lists.freebsd.org/pipermail/freebsd-net/2004-January/002608.html
> =20
>  However, It doesn't show how to resolve the problem. After rebooting=20
> the machine, it still doesn't work (when it is supposed to)
>  Netstat -rn gives me:
> =20
>  default            10.10.8.254        UGS         0     1074    xl0
>  10.10.8/24         link#1             UC          0        0    xl0
>  10.10.8.112        00:0e:a6:c9:ac:19  UHLW        1       46    xl0  =20
> 1186
>  10.10.8.254        00:01:02:9a:7f:c3  UHLW        2        1    xl0   =
=20
> 827
>  127.0.0.1          127.0.0.1          UH          0        0    lo0
> =20
>=20
> Is the route type (AF_LINK) configurable? where? How will I know if it is=
 an AF_LINK type?=20
> Rebooting doesn't fix the corrupted routing table either.
>  Any idea how to eliminate the problem?
>=20
It's the gateway's address family that is AF_LINK, not a "route type".
For example, routes for 10.10.8.112 and 10.10.8.254 have gateways of
type AF_LINK (Ethenet addresses).  I don't know about this specific
problem, but adding a route with AF_LINK gateway can be done using a
route(8) command, for example:

# route add -host 1.2.3.4 -link :0.1.2.3.4.5 -ifp lo0

Which doesn't make any sense, and is presented only to demonstrate
the ability to add AF_LINK gateway.  The following command adds an
"ARP route" through em0 which doesn't have a corresponding network,
and is otherwise not possible to do with the arp(8) command:

# route add -host 1.2.3.4 -link :0.1.2.3.4.5 -ifp em0 -iface
add host 1.2.3.4: gateway :0.1.2.3.4.5
# arp -n 1.2.3.4
? (1.2.3.4) at 00:01:02:03:04:05 on em0 permanent [ethernet]


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--TDVcAd+kFgbLxwBe
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDkALFqRfpzJluFF4RAolDAKCFoTk/Ic22HRyHkkh+G1TGwqGpLwCeNZU8
aOSpTL+347I/O4XcuJRJME0=
=UXi4
-----END PGP SIGNATURE-----

--TDVcAd+kFgbLxwBe--



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