Subject: Re: No nameservers configured when using DHCP/dhclient
To: Lee W <firstname.lastname@example.org>
From: Steven M. Bellovin <email@example.com>
Date: 05/18/2003 10:26:01
In message <3EC73B70.firstname.lastname@example.org>, Lee W writes:
>>>Firstly, when using DHCP every setting is configured apart from the
>>>nameservers (IPv4 address, gateway, netmask & network address). To the
>>>best of my knowledge I ran though the DHCP-HowTo correctly, I have tried
>>>also with an empty dhclient.conf file, no dhclient.conf file at all, a
>>>blank resolv.conf/no resolv.conf. Nothing I try seems to solve the
>>>problem. I was unable to retrieve any hints from the appropriate man
>>>pages that provided any info.
>> I had a similar problem when installing 1.6.1. The dhcp configuration during
> installation does not set the nameserver, and this has to be set manually.
>> It can be set during installation, or later in resolv.conf.
>> My resolv.conf (an ADSL line):
>> nameserver 10.0.0.1
>I have set it manually which as you say works fine. Unfortunately my
>ISP seems to switch around 5 different DNS servers which means some are
>not always available (down for maintenance I guess). This is why I need
>DHCP on them.
You could always run your own nameserver -- there's a lot to be said
But make sure you have a line like this in your dhclient.conf file:
request subnet-mask, broadcast-address, routers, domain-name, domain-name-servers;
You could even say
to make it abort if it doesn't get any.
--Steve Bellovin, http://www.research.att.com/~smb (me)
http://www.wilyhacker.com (2nd edition of "Firewalls" book)