Content-type: text/html Man page of ntp_intro

ntp_intro

Section: Environments, Tables, and Troff Macros (7)
Index Return to Main Contents
 

NAME

ntp_intro - Network Time Protocol (NTP) introductory information  

DESCRIPTION

The Tru64 UNIX software supports two time services: Network Time Protocol (NTP) Time Synchronization Protocol (TSP)

Because it can be traced to clocks of high absolute accuracy, NTP provides a more accurate time service than TSP. By contrast, TSP synchronizes time to the average of the network host times. TSP is an acceptable time service if your system is not on the Internet and does not have access to a highly accurate time server; otherwise, NTP is recommended.  

Network Time Protocol

The Network Time Protocol (NTP) provides accurate, dependable, and synchronized 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 synchronization 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 sample.

NTP messages also contain information about the accuracy and reliability 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 synchronized to a stratum 1 server becomes a stratum 2 host. Stratum determination 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 milliseconds even over wide area networks spanning thousands of miles. To obtain even greater accuracy, use the NTP_TIME kernel option. See System 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 microseconds. 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 daemon. In its simplest application, the TSP servers on a broadcast network (for example, an Ethernet) periodically broadcast 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 further operation of the protocol until it fails and a new master is elected. The master collects time values from the other hosts and computes 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 Network Administration.  

RELATED INFORMATION

Commands: ntp(1), ntpdate(8), ntpsetup(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

System Administration delim off


 

Index

NAME
DESCRIPTION
Network Time Protocol
Time Synchronization Protocol
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:18 GMT, October 02, 2010