resolv.conf getting rewritten at system startup

Erik Trulsson ertr1013 at student.uu.se
Thu Mar 16 22:09:55 UTC 2006


On Thu, Mar 16, 2006 at 05:29:45PM -0400, Duane Whitty wrote:
> Hi all,
> 
> I am running FBSD 6.0-RELEASE
> 
> I use  DHCP to configure my network interface.
> At startup my resolv.conf is overwritten, setting my
> nameserver to the address of the router running DHCP.
> 
> I tried commenting out almost all of the rc.d/resolv
> startup script but to no avail.
> 
> I read the man page for dhcp-options and then proceeded to add
> option domain-name-servers a.b.c.d
> This was also of no help.
> 
> I then remembered something about FBSD 6 no longer using ISC dhcp client.
> 
> I am running BIND 9.3.1 with internal and external views of my namespace 
> set-up so
> it is imperative that I be able to tell hosts on the internal network 
> which name server
> to use.
> 
> If anyone has any ideas I'd appreciate the help.

Read the manpage for dhclient.conf(5) and look at the 'supersede' or
'prepend' directives.

E.g. If you always want to use a nameserver with IP 12.34.56.78
you would put the line

supersede domain-name-servers 12.34.56.78;

in /etc/dhclient.conf


> 
> Thanks in advance,
> 
> Duane
> 
> P.S.
> 
> Is there a man page for the dhcp client FBSD 6 is using
> (what is FBSD 6 using)?

'man dhclient' should work fine.
FBSD 6 uses the OpenBSD dhclient (which I believe derive from an older
version of the ISC one.)

-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-questions mailing list