From owner-freebsd-net@FreeBSD.ORG Wed Mar 26 07:11:46 2003 Return-Path: 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 323A237B404 for ; Wed, 26 Mar 2003 07:11:46 -0800 (PST) Received: from almso2.proxy.att.com (almso2.att.com [192.128.166.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 363B443F75 for ; Wed, 26 Mar 2003 07:11:45 -0800 (PST) (envelope-from jwb@homer.att.com) Received: from ulysses.homer.att.com ([135.205.193.8])h2QFBWWx022032; Wed, 26 Mar 2003 10:11:33 -0500 (EST) Received: from akiva.homer.att.com (akiva.homer.att.com [135.205.212.39]) by ulysses.homer.att.com (8.9.3/8.9.3) with ESMTP id KAA05923; Wed, 26 Mar 2003 10:11:31 -0500 (EST) Received: from akiva.homer.att.com (localhost [127.0.0.1]) by akiva.homer.att.com (8.11.6+Sun/8.9.3) with ESMTP id h2QFBVl28331; Wed, 26 Mar 2003 10:11:31 -0500 (EST) Message-Id: <200303261511.h2QFBVl28331@akiva.homer.att.com> X-Mailer: exmh version 2.6.2 03/12/2003 with nmh-1.0.4 To: freebsd-net@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Mar 2003 10:11:31 -0500 From: "J. W. Ballantine" X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: arantius@yahoo.com Subject: Solution: route pointing to a gateway that's not on net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 15:11:49 -0000 My situation is: 1) Local LAN 10.0.0.0/8 2) gateway assigned by dhcp on that LAN: 10.x.y.a 3) Host X on the LAN has assigned 209.122.66.XXX IP address by ISP DCHP. After much patience and advice from Guido van Rooij on how this can be made to work. The first step was to manually set-up the network via: ifconfig xl0 with that ip address route add -net 10.0.0.0 -iface NIC_device route add default 10.x.y.a After this was shown to work, the last step was to have dhclient do the setup. This was done by: Add the following line to /etc/dhclient.conf script "/etc/dhclient-script"; Note that this is the only line in my /etc/dhclient.conf Copy over /sbin/dhclient-script to /etc. Edit the /etc/dhclient-script. Look for this line: route add $new_ip_address 127.1 >/dev/null 2>&1 and put the following line after it: route add -net 10.0.0.0 -iface xl0 This happens a couple of times. After the following line: route delete $old_ip_address 127.1 >/dev/null 2>&1 Also add: route delete -net 10.0.0.0 -iface xl0 Again, this happens in a couple of places. Then reboot the system and everything should work. Again much thanks to the information, patience and assistance of Guido van Rooij. Jim Ballantine