What time server do you use?

Christopher Browne cbbrowne-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Fri May 13 15:21:43 UTC 2011


On Fri, May 13, 2011 at 11:02 AM, James Knott <james.knott-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org> wrote:
> marthter wrote:
>>
>> According to
>>
>> http://www.nrc-cnrc.gc.ca/eng/services/inms/time-services/network-time.html
>>
>>
>>   Note: Starting March 1, 2011, the old *TIME *protocol on port
>>   37(RFC-868) will no longer be offered from the NTP servers below.
>>   However a new time service for the old *TIME *protocol is now
>>   offered from a new server, *time4.nrc.ca*. Users are encouraged to
>>   switch to the NTP protocol described below, for a more accurate time
>>   service.
>
>
> This talk about time servers brings up a question.  NTP supports using
> multiple servers to obtain best accuracy.  Does Linux support this?  I can
> have several NTP servers specified in openSUSE.  I assume the "undisciplined
> local clock", at the bottom of the list, is used when an external server is
> not available.

That's not really a Linux question; that's a question of how you are
configuring and using the NTP implementation that you have installed.
The only "Linux question" is how NTP interacts with the local clock,
which is obviously accessed through the kernel.  Otherwise, NTP is a
userspace service, which is hosted as readily on other operating
systems as it is on Linux, that being a mere recompile of the code
away.

Your assumption is somewhat off; what happens with the "undisciplined
local clock" is that if it appears to be the most accurate, it is
used.

That will tend to take place when lower strata clocks are not
available, but the formula for which clocks are considered "most
authoritative" mix together a number of considerations, where
availability isn't the sole factor.  The notable exception would be
that if the network connection to get to outside servers is slow, that
leads to the outside servers' latency being high, and to them being
deprecated in comparison with clocks (such as the local one) that
haven't got the latency problem.

Determining which clock to treat as the preferred authority *is*
deterministic, but is based on a mixture of factors that are
considered in aggregate, rather than based on strict rules.

The algorithm is described in RFC 5905: <http://www.ietf.org/rfc/rfc5905.txt>

> BTW, I use time.nrc.ca, which is a stratum 2 server, for my firewall time
> and then use the firewall as a stratum 3 server on my network.

My usual NTP configuration is as follows:

-> % cat /etc/ntp.conf
# local clock, dropped to stratum 10, so it's only "authoritative"
under terrible circumstances
server 127.127.1.1
fudge  127.127.1.1 stratum 10
# Peer against all all my local hosts.  Several no longer exist :-)
peer wolfe
peer knuth
peer godel
peer cache
peer dantzig
peer chvatal
peer salesman
peer mybook
peer nslug
peer t43
# Go against 2 entries in the NTP pool
server pool.ntp.org
server pool.ntp.org

In effect, it has 3 layers:
a) The local clock, used if nothing else can be found
b) peer against all local hosts, so that if *any* of them have
authoritative time, this host will accept that
c) Pull from 2 outside authoritative sources

If b) or c) are the authorities, that will be used to "discipline" the
local clock.
-- 
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list