From owner-freebsd-questions@FreeBSD.ORG Tue Dec 14 17:54:22 2004 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 5CDEA16A4CE for ; Tue, 14 Dec 2004 17:54:22 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCA2143D55 for ; Tue, 14 Dec 2004 17:54:21 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] (pool-68-160-207-47.ny325.east.verizon.net [68.160.207.47]) by pi.codefab.com (8.12.11/8.12.11) with ESMTP id iBEHsH8A076575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Dec 2004 12:54:20 -0500 (EST) Message-ID: <41BF28CD.2030703@mac.com> Date: Tue, 14 Dec 2004 12:54:21 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: infofarmer@mail.ru References: <41BF22B8.9010802@mail.ru> In-Reply-To: <41BF22B8.9010802@mail.ru> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: questions@freebsd.org Subject: Re: ppp(8) and dhclient(8) 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, 14 Dec 2004 17:54:22 -0000 Andrew P. wrote: > I have a FreeBSD-4.10 host in my network. It's interface is > DHCP-configured with a local ip-address, a dns server and a default > route. The network is not connected to Internet, so the dns server > resolves only local names and the default router only routes local > packets. The host sometimes connects to internet via PPPoE. It receives > new dns server and default route via IPCP. > > The problem is that the new pair of dns/route seems to conflict with the > old one. > > DNS. I put enable dns and resolv writable in ppp.conf, ppp updates > resolv.conf, but dhclient rewrites it in some seconds, leaving only > local dns server in it. You want to change the make_resolv_conf() function in /sbin/dhclient-script. > ROUTER. Default route is configured at startup by dhclient. "add default > HISADDR" in ppp.conf will result in error and will not change the route. > So we can type "add! default HISADDR" or delete the route first with > "delete default". But when ppp disconnects there's no more default route > and local packets do not get routed. You should describe your local network topology using a static route rather than a default route, so that you can add and delete a default route via ppp without breaking anything. Add something like this to /etc/rc.conf: static_routes="local" route_local="-net 192.168.2.0/24 192.168.1.1" ...assuming your local network has both a 192.168.1.x and a 192.168.2.y subnets, and 192.168.1.1 is a gateway which can get to both networks. -- -Chuck