From owner-freebsd-net@FreeBSD.ORG Fri Dec 2 08:18:44 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CB1316A41F for ; Fri, 2 Dec 2005 08:18:44 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E51BD43D46 for ; Fri, 2 Dec 2005 08:18:43 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jB28Igv0004050; Fri, 2 Dec 2005 10:18:42 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 71213-01-10; Fri, 2 Dec 2005 10:18:40 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jB28G39l003803 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Dec 2005 10:16:03 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id jB28G51Q007023; Fri, 2 Dec 2005 10:16:05 +0200 (EET) (envelope-from ru) Date: Fri, 2 Dec 2005 10:16:05 +0200 From: Ruslan Ermilov To: Mark Jayson Alvarez Message-ID: <20051202081605.GR20961@ip.net.ua> References: <20051202072719.76687.qmail@web51604.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TDVcAd+kFgbLxwBe" Content-Disposition: inline In-Reply-To: <20051202072719.76687.qmail@web51604.mail.yahoo.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: freebsd-net@freebsd.org Subject: Re: how to set a route to an AF_LINK type 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: Fri, 02 Dec 2005 08:18:44 -0000 --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--