Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 2003 09:59:02 +0100
From:      Daniel Bye <dan@slightlystrange.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: resolv.conf, dhcp and upgrade to 4.8-STABLE
Message-ID:  <20030410085901.GA5192@catflap.home.slightlystrange.org>
In-Reply-To: <200304100914.43380.freebsd.nospam@mekanix.dk>
References:  <200304100914.43380.freebsd.nospam@mekanix.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 10, 2003 at 09:14:43AM +0200, Bjarne Wichmann Petersen wrote:
> Hi!
> 
> I've just upgrade from 4.8-PRE to 4.8-STABLE and prior to this I could log on 
> to the network through dhcp and resolv.conf would be untouched, which I need 
> it to be since I run a dns-cache. So "nameserver 127.0.0.1" is all that is 
> needed in resolv.conf.
> 
> But since my upgrade yesterday, resolv.conf get's overwriten with my ISP's 
> dns-servers. What have changed and how do I get it back to the old behavior?

The upgrade probably replaced your /etc/dhclient.conf.  All you need  to do
is add a "prepend" statement, like this:

interface "xl0" {   <-- change xl0 for the name of your DHCP interface!
    prepend-domain-nameservers 127.0.0.1;
    [other directives...]
}

This works well for me.  

You could also use "supersede" to make dhclient ignore the values returned
from the server.  However, in the event your cache fails, you will be left
without any name resolution service, which is why I tend to favour prepend.

HTH

Dan

> 
> Bjarne
> -- 
> Homepage: http://www.mekanix.dk
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

-- 
Daniel Bye

PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc
PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC
                                                                     _
                                              ASCII ribbon campaign ( )
                                         - against HTML, vCards and  X
                                - proprietary attachments in e-mail / \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030410085901.GA5192>