[ntp:hackers] use of DHCP to assign Time Servers....

Ted Lemon mellon at fugue.com
Mon Sep 4 23:20:33 UTC 2006


todd glassey wrote:
> Here as an example of what I am talking about NOT DOING is a script from
> RH8;

So if I understand you correctly, the main problem with the RH8 script
is that it's static, not dynamic; that is, the file gets written all the
time, but the ntp server is never told to reload it.   And you propose
to fix this by having the ntp server periodically poll the contents of
the dhclient.leases file?   Personally, I'd rather tweak the script to
make the ntp daemon reload its configuration, or if you want to go
completely in the direction you're descrining, just tell the ntp server
to reread the dhclient.leases file.   Then you don't get a rewritten
ntp.conf file, which seems like a reasonable thing to want to avoid.

FYI, no commercial O.S. uses the ISC DHCP client, other than the
commercial linuxes.   So e.g. this solution won't work on Solaris,
HP-UX, Tru64 or Mac OS X.   :'(

> Also  -
> http://support.ntp.org/pipermail/questions/2003-November/001617.html This
> has been brought up before...

The solution that they propose there is a good one.   If ntp.conf could
simply include a file like /var/run/dhcp3/ntp.conf which is written by
the dhcp client script, then I think you'd have the functionality you're
asking for.

> & By the way - the NTP Server itself might want to serve DHCP Leases for its
> NTP Clients on the local subnet.

This wouldn't work, because the DHCP protocol really isn't designed to
collect data from multiple masters.   So your NTP/DHCP server would have
to be the sole DHCP server on the network in order to be effective, and
then I think you'd have a problem.   In order to do what you propose,
you'd probably want to use SLP or DNS to configure the DHCP server, and
it's not clear to me that it's worth it.   If you're building a router
box, a prebuilt configuration is going to do what you want; if you're
just plugging boxes into the network, the NTP server automatically
updating the DHCP server is as likely to produce a bad configuration as
a good one, so again what you really want is a management layer *above*
DHCP and NTP that is used to deploy services like this.



More information about the hackers mailing list