Subject: Re: ntpd What is my best plan of attack?
To: None <netbsd-help@NetBSD.org>
From: Timothy A. Musson <timothy.musson@zin-tech.com>
List: netbsd-help
Date: 07/19/2004 14:07:53
At 10:38 AM 7/16/04 , Stephen Borrill wrote:
>On Tue, 29 Jun 2004, Glen Johnson wrote:
>
>> Dear netbsd-help,
>> I have a small home network with a 486 as my NetBSD box.  I am in the
>> process of making it do more for me.  One of the things I want to do with
>> it is have it run as my time server that all my other computers  
>> synchronize
>> from.  I read through most of the ntpd man page and the ntpdate man
>> page.  I do understand that it is a bad idea to run them both
>> simultaneously.  The man pages do a fine job of describing every possible

Actually, ntpdate won't even do anything when ntpd is up (at least in the
versions I've used).

>> flag or setting available.  What I can't find is something that pulls it
>> all together to tell me what I need to do to have my 486 operate as a  
>> time
>> server and yet when I dial up my ISP then sync to a  real time server, or

I think you're having a hard time finding info because it's pretty much
built-in behavior. Just set up your server to synch to something outside
and it will automatically serve the time to your internal clients that
request it.

>> three.
>> Should I:
>> 1.  Run ntpd when I am not connected to my ISP.

Yes.

>> 2. Disable ntpd before connecting to my ISP.
>> 3. Run ntpdate.
>> 4. R enable ntpd after the update.

No. Well, I guess it might depend on how much of the time you're connected
to the internet. In the FAQ at
http://www.ntp.org/ntpfaq/NTP-s-config.htm#AEN2660 there is a section
called "6.1.3.2. How can I speed up initial Synchronization?" which might
be useful to you. There's even a quote about how those steps are expected
to be used as a replacement for ntpdate.

In any case, after an initial ntpdate at boot-up (or the steps above), NTP
should do a good enough job keeping your server in synch with "real" time,
even if it's not in constant contact with an outside server. However, the
accuracy is dependant on the drift file, and it can take some time (days)
to achieve a good drift file. But, unless your internal clocks are *really*
off, daily updates by your server to a real server should be sufficient.

>You could look at net/chrony in pkgsrc which deals with all this very well  
>and is a lot more lightweight.
>

Another option. Never tried it myself.

-Tim