[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to either configure or disable dhclient?



On Fri, Oct 16, 2009 at 12:20 AM, Paul Zimmerman <aiwanar@yahoo.com> wrote:

> I've got an install of Debian 5 (Lenny) on which I am trying to use dns-caching when connecting to an ISP with ppp. I can install either dnsmasq or the dnscache-run package with no problems. As long as the first nameserver entry in resolv.conf is 127.0.0.1 either one works fine. The problem is getting that first entry to be what it needs to be without manual editing.

> The program dhclient will not recognize its config files. First I tried the 'prepend' command: prepend domain-name-servers 127.0.0.1; in dhclient.conf and that had no effect. Then I tried the supersede command:  supersede domain-name-servers 127.0.0.1; and that had no effect either. dhclient just kept rewriting the resolv.conf with nothing but the auto-provided name servers. Several different re-arrangements of the commands have been tried, including putting everything in brackets as if it were a programming function. All with no effect on dhclient behavior.

> I have copied dhclient.conf from /etc/dhcp3 to /etc in hopes it would see the file. No change. Then named it to dhclient-ppp0.conf in the hope that using the interface name as suggested on a page I found would fix it. And tried copying that to /etc also. Still no change. Then I started tinkering with the dhclient-script in /sbin and even editing this script has no effect. Moving the script out of the directory had no effect. In other words, these config files are irelevant to the actual functioning of dhclient.

> So, I'd really like to know: Where are the real config files for dhclient? Or where is the real program that does dynamic ip addresses when you make a connection if that has been obsoleted?

I use "prepend" without a hitch. Are you sure that you do not have
another package that is overriding dhclient?

You could check by changing the "request" line in
/etc/dhcp3/dhclient.conf not to request "domain-name-servers",
deleting /etc/resolv.conf, and running "ifdown; ifup" or restarting NM
(if you use NM) or ...


Reply to: