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

dhclient.conf: prepend domain-name-servers doesn't influence resolv.conf



Hi all,

I've set up dnsmasq in order to:

- cache my DNS queries.
- use nameservers of my choice (instead of my ISP's)

That part is working fine.

I can manually set /etc/resolv.conf to:

	nameserver 127.0.0.1

And I find dnsmasq handles DNS queries for me.
Now, I want to make this permanent.

I'm having trouble configuring /etc/dhcp3/dhclient.conf.
According to various docs, if I include the line:

	prepend domain-name-servers 127.0.0.1

I am expecting that a lease renewal should put this
line in resolv.conf:

	nameserver 127.0.0.1

I was expecting something like:

	domain hawaiiantel.net
	search hawaiiantel.net
	nameserver 127.0.0.1
	nameserver 192.168.0.1  # router's address

But after /etc/init.d/networking restart I get the same
resolv.conf as usual:

	domain hawaiiantel.net
	search hawaiiantel.net
	nameserver 192.168.0.1

If this much would work, I would further like to add to dhclient.conf:

	do-forward-updates false

To get something like:

	domain hawaiiantel.net
	search hawaiiantel.net
	nameserver 127.0.0.1

To be honest, I don't understand how the 'domain' and 'search'
fields affect my system's behavior.

Can anyone comment on why dhclient.conf doesn't influence
the resolv.conf after a networking restart?

Kind regards,

Joel

-- 
Joel Roth


Reply to: