Networking Forums

Networking Forums > Computer Networking > Linux Networking > dhclient Does Not Set /etc/resolv.conf

Reply
Thread Tools Display Modes

dhclient Does Not Set /etc/resolv.conf

 
 
Hank Kingwood
Guest
Posts: n/a

 
      02-03-2004, 05:34 AM
I'm running Red Hat 9 and my box acquires a DHCP address, but my
/etc/resolv.conf is not created/updated... I've checked the man page
for /etc/dhclient.conf settings, but I don't think I got it right. This
is what I have in /etc/dhclient.conf:

interface "eth0" {
# I put the following two lines in to see if they would be entered
# into /etc/resolv.conf. They aren't .
supersede domain-name "test.com";
supersede domain-name-servers 192.168.255.1;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
# Is the following line needed?
# script "/sbin/dhclient-script";
}

Any ideas on how to get /etc/resolv.conf to get the name servers?

 
Reply With Quote
 
 
 
 
johnny bobby bee
Guest
Posts: n/a

 
      02-03-2004, 05:58 AM
Hank Kingwood typed:

> Any ideas on how to get /etc/resolv.conf to get the name servers?


are you, by chance, starting/stopping network services _after_ you changed
this?

are you running the 'dhclient' command?
what are you doing to try to get your changes noticed by /etc/resolv.conf?

--
- Linux: the choice of a GNU generation
- free; as in free speech and free beer

remove '.eh' to email

 
Reply With Quote
 
Hank Kingwood
Guest
Posts: n/a

 
      02-03-2004, 02:41 PM
johnny bobby bee wrote:
> Hank Kingwood typed:
>
>>Any ideas on how to get /etc/resolv.conf to get the name servers?

>
> are you, by chance, starting/stopping network services _after_ you changed
> this?


No. As root I run "dhclient eth0", I get an IP address, but
/etc/resolv.conf does not get updated... Just for grins I did "touch
/etc/resolv.conf;dhclient" and /etc/resolv.conf remains at zero bytes...

> are you running the 'dhclient' command?


Yes.

> what are you doing to try to get your changes noticed by /etc/resolv.conf?


I thought running "dhclient" with no /etc/dhclient.conf would update
/etc/resolv.conf, but that didn't work on my system. Then I created
/etc/dhclient.conf and I'm still not getting any resolv.conf update...

Googling returned previous bugs in dhclient. I'm running
dhclient-3.0pl2-6.16. So, I thought I could get either the code or RPM
from http://www.isc.org/, but I can't find "dhclient". DHCP is there,
ftp://ftp.isc.org/isc/dhcp/dhcp-3.0.1rc12.tar.gz.

Is dhclient included in dhcp-3.0.1rc12.tar.gz?

Any recommendations on either compiling dhcp-3.0.1rc12.tar.gz? Anyone
know where I can find the RPM for this? I can't find it at rpmfind.net...

Thanks.

 
Reply With Quote
 
Rich Piotrowski
Guest
Posts: n/a

 
      02-03-2004, 03:21 PM
On Tue, 03 Feb 2004 06:34:39 GMT, Hank Kingwood <(E-Mail Removed)>
wrote:

>I'm running Red Hat 9 and my box acquires a DHCP address, but my
>/etc/resolv.conf is not created/updated... I've checked the man page
>for /etc/dhclient.conf settings, but I don't think I got it right. This
>is what I have in /etc/dhclient.conf:
>
>interface "eth0" {
># I put the following two lines in to see if they would be entered
># into /etc/resolv.conf. They aren't .
> supersede domain-name "test.com";
> supersede domain-name-servers 192.168.255.1;
> request subnet-mask, broadcast-address, time-offset, routers,
> domain-name, domain-name-servers, host-name;
> require subnet-mask, domain-name-servers;
># Is the following line needed?
># script "/sbin/dhclient-script";
>}
>
>Any ideas on how to get /etc/resolv.conf to get the name servers?


Actually, in most cases you do not need an /etc/dhclient.conf.

Check your /etc/sysconfig/network-scripts/ifcfg-eth(x) and see if you
have "PEERDNS=yes".


--
"Now are you talking about what it is you know
Or just repeating what it was you heard."
Grace Slick
To E-mail use: rpiotro(at)wi(dot)rr(dot)com
 
Reply With Quote
 
Hank Kingwood
Guest
Posts: n/a

 
      02-03-2004, 05:02 PM
Rich Piotrowski wrote:
> On Tue, 03 Feb 2004 06:34:39 GMT, Hank Kingwood <(E-Mail Removed)>
> wrote:
>
>>I'm running Red Hat 9 and my box acquires a DHCP address, but my
>>/etc/resolv.conf is not created/updated... I've checked the man page

....

>>Any ideas on how to get /etc/resolv.conf to get the name servers?

>
> Actually, in most cases you do not need an /etc/dhclient.conf.
>
> Check your /etc/sysconfig/network-scripts/ifcfg-eth(x) and see if you
> have "PEERDNS=yes".


Ahhh. That was it! I had "PEERDNS=no". Much thanks!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpd.conf, resolv.conf and the search directive Andy Richardson Linux Networking 4 07-13-2005 08:23 AM
Overwriting /etc/resolv.conf Bit Twister Linux Networking 9 04-18-2005 04:18 PM
ipv6 and resolv.conf Hans Fugal Linux Networking 0 05-18-2004 04:02 PM
resolv.conf Stephen Speicher Linux Networking 5 12-10-2003 09:00 AM
NIS, DNS and resolv.conf ncrfgs Linux Networking 2 10-02-2003 05:09 PM



1 2 3 4 5 6 7 8 9 10 11