From owner-freebsd-questions@FreeBSD.ORG Tue Dec 14 17:28:28 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 865DF16A4CE for ; Tue, 14 Dec 2004 17:28:28 +0000 (GMT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C51E43D45 for ; Tue, 14 Dec 2004 17:28:28 +0000 (GMT) (envelope-from infofarmer@mail.ru) Received: from [83.237.13.19] (port=1839 helo=[172.17.0.69]) by mx2.mail.ru with esmtp id 1CeGTK-0000LP-00 for questions@freebsd.org; Tue, 14 Dec 2004 20:28:26 +0300 Message-ID: <41BF22B8.9010802@mail.ru> Date: Tue, 14 Dec 2004 20:28:25 +0300 From: "Andrew P." User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: questions@freebsd.org Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Spam: Not detected Subject: ppp(8) and dhclient(8) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: infofarmer@mail.ru List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 17:28:28 -0000 Hello! 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. 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. I see possible workarounds somewhere around hacking dhclient-script, using multiple default routes with different metrics, or writing some own periodic scripts. Is there an easy way to solve my problem? Best wishes, Andrew P.