ntp_intro(7)ntp_intro(7)NAMEntp_intro - Network Time Protocol (NTP) introductory information
DESCRIPTION
The Tru64 UNIX software supports two time services: Network Time Proto‐
col (NTP) Time Synchronization Protocol (TSP)
Because it can be traced to clocks of high absolute accuracy, NTP pro‐
vides a more accurate time service than TSP. By contrast, TSP synchro‐
nizes time to the average of the network host times. TSP is an accept‐
able time service if your system is not on the Internet and does not
have access to a highly accurate time server; otherwise, NTP is recom‐
mended.
Network Time Protocol
The Network Time Protocol (NTP) provides accurate, dependable, and syn‐
chronized time for hosts on both wide area networks (like the Internet)
and local area networks. In particular, NTP provides synchronization
traceable to clocks of high absolute accuracy, and avoids synchroniza‐
tion to clocks keeping bad time.
Hosts running NTP periodically exchange datagrams querying each other
about their current estimate of the time. Using the round-trip time of
the packet, a host can estimate the one-way delay to the other host.
(The assumption is that the delay is roughly equal in both directions.)
By measuring the one-way delay and examining the timestamps that are
returned with the NTP packet, a host computes the difference between
its clock time and that of the host it queried.
A host queries a remote host several times over a period and feeds the
results from the multiple samples to a digital-filtering algorithm.
The algorithm provides a more accurate estimate of the delay, clock
offset, and clock stability than could be obtained with a single sam‐
ple.
NTP messages also contain information about the accuracy and reliabil‐
ity of the time sources. An NTP host connected directly to a highly
accurate time source, such as a radio receiver tuned to a time code
signal broadcast by a government agency, is called a stratum 1 server.
Every other NTP host adopts a stratum number that is one higher than
the host from which it sets its own time. For example, a host synchro‐
nized to a stratum 1 server becomes a stratum 2 host. Stratum determi‐
nation is done automatically, and the stratum of a host can vary as its
connectivity changes.
A host running NTP combines various information to decide which of the
hosts it queried provides the time it believes to be the most accurate.
This information includes the output of the digital-filtering algorithm
and the stratum numbers of the hosts it queried. By communicating with
several other hosts, an NTP host can usually detect those hosts that
are keeping bad time, and is able to stay synchronized even if some of
the other hosts become unavailable for long periods.
In practice, NTP is able to synchronize clocks to within a few mil‐
liseconds even over wide area networks spanning thousands of miles. To
obtain even greater accuracy, use the NTP_TIME kernel option. See Sys‐
tem Administration for more information.
You can optionally use a high-resolution clock, enabling the time
returned by the clock_gettime routine to be extrapolated between the
clock ticks. The granularity of the time returned will be in microsec‐
onds. To use the high-resolution clock, use the MICRO_TIME kernel
option.
For detailed information on NTP, see Network Time Protocol (Version 3)
(RFC 1305).
Time Synchronization Protocol
The Time Synchronization Protocol (TSP) is the protocol used by the
/usr/sbin/timed daemon. In its simplest application, the TSP servers
on a broadcast network (for example, an Ethernet) periodically broad‐
cast TSP packets. The hosts on the network elect one of the hosts on
the network running TSP as a master. The master then controls the fur‐
ther operation of the protocol until it fails and a new master is
elected. The master collects time values from the other hosts and com‐
putes the average of all the times reported. It then sets its own
clock to this average, and tells the other hosts to synchronize their
clocks with it.
TSP quickly synchronizes all participating hosts. However, because TSP
does not trace time back to sources of known accuracy, it is unable to
correct for systematic errors. If a clock drifts significantly, or if
a mistake is made in setting the time on a participating host, the
average time calculated and distributed by the master can be affected
significantly.
For information on setting up the network time services, refer to Net‐
work Administration: Services.
SEE ALSOCommands:ntp(1), ntpdate(8), ntptrace(8), timedsetup(8), xntpdc(8)
Functions: ctime(3)
Files: ntp.conf(4), ntp.drift(4), ntp.keys(4)
Daemons: timed(8), xntpd(8)
Network Time Protocol (Version 3) (RFC 1305)
Network Administration: Services System Administration
ntp_intro(7)