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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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? |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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! |