Bluehost.com Web Hosting $6.95

dhclient Does Not Set /etc/resolv.conf

This is a discussion on dhclient Does Not Set /etc/resolv.conf within the Linux Networking forums, part of the Linux Forums category; I'm running Red Hat 9 and my box acquires a DHCP address, but my /etc/resolv.conf is not ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-03-2004
Hank Kingwood
 
Posts: n/a
Default dhclient Does Not Set /etc/resolv.conf

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
  #2 (permalink)  
Old 02-03-2004
johnny bobby bee
 
Posts: n/a
Default Re: dhclient Does Not Set /etc/resolv.conf

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
  #3 (permalink)  
Old 02-03-2004
Hank Kingwood
 
Posts: n/a
Default Re: dhclient Does Not Set /etc/resolv.conf

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
  #4 (permalink)  
Old 02-03-2004
Rich Piotrowski
 
Posts: n/a
Default Re: dhclient Does Not Set /etc/resolv.conf

On Tue, 03 Feb 2004 06:34:39 GMT, Hank Kingwood <hank@bogusaddress.xyz>
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
  #5 (permalink)  
Old 02-03-2004
Hank Kingwood
 
Posts: n/a
Default Re: dhclient Does Not Set /etc/resolv.conf

Rich Piotrowski wrote:
> On Tue, 03 Feb 2004 06:34:39 GMT, Hank Kingwood <hank@bogusaddress.xyz>
> 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 Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 10:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0