From owner-freebsd-questions@FreeBSD.ORG Tue Mar 1 19:21:31 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 906B116A4CE for ; Tue, 1 Mar 2005 19:21:31 +0000 (GMT) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5610D43D2F for ; Tue, 1 Mar 2005 19:21:31 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 20715 invoked from network); 1 Mar 2005 19:21:31 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 1 Mar 2005 19:21:30 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id CBE914A; Tue, 1 Mar 2005 14:21:29 -0500 (EST) Sender: lowell@be-well.ilk.org To: Mark Edwards References: From: Lowell Gilbert Date: 01 Mar 2005 14:21:29 -0500 In-Reply-To: Message-ID: <44vf8b41fq.fsf@be-well.ilk.org> Lines: 38 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: "'questions@freebsd.org'" Subject: Re: arplookup 192.168.1.254 failed: host is not on local network X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2005 19:21:31 -0000 Mark Edwards writes: > I've just put my server on a new connection that requires DHCP, even > for a fixed IP. Anyway, the DHCP server gives a fixed public internet > IP to my server, but it communicates on 192.168.1.254, which angers > FreeBSD (4.11). I get a lot of the following: > > arplookup 192.168.1.254 failed: host is not on local network > > Which makes sense, because as far as FreeBSD is concerned, interface > ep1 is on the internet not on a LAN. Exactly. > Looking on the net, I found the following suggestion, which does cure > the errors: > > /sbin/route add -net 192.168.1.254 -netmask 255.255.255.0 -interface 1 > > My question is, is that the proper way to deal with this? It's not bad. I would use -host instead of -net and -netmask, and it will fail if the DHCP server ever changes its address, but what you are doing is is working and fairly likely to stay that way. > I have to > issue this statement whenever the dhclient is restarted. I've > currently placed it in my firewall script, but is there a proper or > more elegant way to achieve this? If you want something more elegant, you could specify a script for one of the dhclient-script(8) hooks, and put the route in there. You would be able to refer to the interface and server address by variables which dhclient-script provides... -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/