Directory-based client configuration (was: "Dynamic" dhcp-client configuration using two interfaces? )

Kenneth Porter shiva at sewingwitch.com
Fri Dec 5 07:05:39 UTC 2003


--On Wednesday, December 03, 2003 1:27 PM -0500 Michael Richardson
<mcr at sandelman.ottawa.on.ca> wrote:

> Daniel, you likely should run a local named, and force the /etc/resolv.conf
> to be 127.0.0.1. Applications which read /etc/resolv.conf won't read it again
> if it changes, while named will pay attention to what interfaces are up,
> and use them. You can also edit /etc/named.conf's forwarder's entry if you
> really want, and "rndc reload" it much easier.
> 
> The default route will otherwise be handled by dhclient.

I was bringing up a Fedora system this week and wanted to set it up for DHCP
but with a caching nameserver. A bit of digging around revealed the PEERDNS=no
mechanism to suppress rewriting of resolv.conf.

It struck me that a more general solution would be to do something like other
directory-based configurations, and have dhclient-script iterate through a set
of scripts in a config directory of its own. The scripts would be supplied by
other packages, and dhclient-script would pass each the state and options.
This would allow systems like ntp and named to each provide their own
autoconfigure script, instead of all needing to be shoehorned into the
dhclient hook.

One could then have a script supplied by the caching-nameserver package that
copies the supplied DNS servers into the forwarder entries in named.conf and
copies the supplied domain names into search entries in resolv.conf.

(The issue of DHCP config and the ntp.conf it writes came up on
comp.protocols.time.ntp recently:
<http://groups.google.com/groups?threadm=3a2a0492.0311251801.9c6788%40posting.
google.com>)

(Replies to this should probably go just to the dhcp-hackers list.)


More information about the dhcp-hackers mailing list