Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jun 2009 18:25:16 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        Frank Behrens <frank@ilse.behrens.de>, freebsd-net@FreeBSD.org, roberto@FreeBSD.org, Edwin Groothuis <edwin@FreeBSD.org>
Subject:   Re: NTP - default /etc/ntp.conf
Message-ID:  <20090606174642.I16690@delplex.bde.org>
In-Reply-To: <4A297BB4.80002@FreeBSD.org>
References:  <200906051424.n55EOIrM012619@post.behrens.de> <4A297BB4.80002@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 Jun 2009, Doug Barton wrote:

> Frank Behrens wrote:
>> Edwin Groothuis <edwin@freebsd.org> wrote on 5 Jun 2009 22:44:
>>> After pondering at conf/58595, I came with this text.
>>>
>>> The ntpd is not enabled by default, so the fact that the servers
>>> are commented out should not be an issue.
>>> ...
>>> +# server pool.ntp.org
>>> +# server pool.ntp.org
>>> +# server pool.ntp.org
>>
>> Isn't it better to use different entries?
>> server 0.pool.ntp.org
>> server 1.pool.ntp.org
>> server 2.pool.ntp.org
>>
>> To be sure that the IP addresses are different.
>> See
>> http://www.pool.ntp.org/en/use.html
>
> I agree with this suggestion, as well as the others about adding the
> default restrictions and the fallback local clock.

I use 1 hard-coded server (= a local server for all machines except
1) (plus fallback to the local clock for all machines) and have never
had any problems using only 1 (except if the server is not up at boot
time then ntpdate (which is configured separately anyway) fails and
ntpd -x takes too long to sync so I sync manually.  too long:= more
than 30 seconds, and I use -x since any slew except ones done at boot
time by ntpdate is considered an error, and I use ntpdate instead of
ntpd -g[q] since ntpdate works perfectly while at least old versions
of ntpd -q are very broken).

> Bruce is right
> about the ntp.drift file name, however we already have existing stuff
> that mentions ntpd.drift, and since it's specified on the command line
> in rc.conf the problems of what it says in the code are bypassed.

This is a bug in rc.conf.

The drift file name is also extensively documented to be ntp.drift (in
/etc even) in ntpd's man page: from "man ntpd | col -bx":

%      -f driftfile
%              Specify the name and path of the frequency file, default
                                                                 ^^^^^^^
%              /etc/ntp.drift.  This is the same operation as the driftfile
                ^^^^ ^^^^^^^^^
%              driftfile configuration command.

No, the default is not in /etc and is not named ntp.drift (even if the
above is ntpd's default when a driftfile is configured without specifying
a pathname to it (is this possible?) this is confusing.

%      outside the acceptable range, ntpd enters the same state as when the
%      ntp.drift file is not present.  The intent of this behavior is to quickly
        ^^^^^^^^^

No need for a pathname here.

%    Frequency Discipline
%      The ntpd behavior at startup depends on whether the frequency file, usu-
%      ally ntp.drift, exists.  This file contains the latest estimate of clock
        ^^^^ ^^^^^^^^^

"usually" instead of "default" is fine.

% FILES
%      /etc/ntp.conf   the default name of the configuration file
%      /etc/ntp.drift  the default name of the drift file
         ^^^ ^^^^^^^^^  ^^^ ^^^^^^^

As above.

/var/db/ntpd.drift is not documented anywhere in $(find /usr/share/man)
of course.

> ...
> One more thing, it was said some time ago that due to a quirk in how
> ntpd works on our system that adding the following to the server line
> makes it work more efficiently:
>
> server foo iburst maxpoll 9
>
> If someone smarter than me could confirm that it would be great. :)

I use iburst maxpoll 6 and used to use a different maxpoll and complicated
settings when I had a dialup internet connection (was 120 ms ping
latency; now 8; 0.150 ms to the local server).  These settings probably
don't matter with fast connections.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090606174642.I16690>