From owner-freebsd-questions Sat Mar 8 23: 5:15 2003 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 51F8D37B40B for ; Sat, 8 Mar 2003 23:05:00 -0800 (PST) Received: from smtp1.knology.net (smtp1.knology.net [24.214.63.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 9CF76441CF for ; Sat, 8 Mar 2003 20:34:30 -0800 (PST) (envelope-from dkelly@HiWAAY.net) Received: (qmail 6134 invoked from network); 9 Mar 2003 04:34:19 -0000 Received: from unknown (HELO user-24-214-34-52.knology.net) (24.214.34.52) by smtp1.knology.net with SMTP; 9 Mar 2003 04:34:19 -0000 From: David Kelly To: FreeBSD-Questions@FreeBSD.org Subject: Re: DHCP Server "learning" name servers since server itself is dhcp'd?? Date: Sat, 8 Mar 2003 22:34:19 -0600 User-Agent: KMail/1.5 References: <20030308102326.G6008-100000@atlas.home> In-Reply-To: <20030308102326.G6008-100000@atlas.home> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200303082234.19615.dkelly@HiWAAY.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Saturday 08 March 2003 12:32 pm, Mikko Työläjärvi wrote: > > It is more elegant in perl, but dhclient-enter-hooks is a > shellscript, so it felt easier to just add it there. /etc/dhclient-enter-hooks needs to be created in any case if you wish to use named else it will write an /etc/resolv.conf containing the values given by the DHCP server. Something like this is all it takes to keep it from changing your resolv.conf: #!/bin/sh make_resolv_conf() { } Naturally, one could expand my null'ed make_resolv_conf() to 1) verify DNS servers have changed, and 2) write them in /etc/namedb/named.conf, then 3) "ndc restart" My ISP has done something in the past year or so that dhclient thinks each and every lease renewal is practically a new lease. /etc/resolv.conf gets (actually, only "attempted" now) written on each renewal. /var/log/messages gets flooded with this: Mar 8 21:14:29 grumpy dhclient: New Network Number: 24.214.34.0 Mar 8 21:14:29 grumpy dhclient: New Broadcast Address: 24.214.34.255 -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message