resolv.conf, dhcp and upgrade to 4.8-STABLE

Daniel Bye dan at slightlystrange.org
Thu Apr 10 01:59:10 PDT 2003


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at 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 / \


More information about the freebsd-questions mailing list