Overview#Network Time Protocol (NTP) functions as part of the UDP protocol suite, which is part of the Internet Protocol Suite defined in RFC 5905
Therefore, a computer using Network Time Protocol must have the Internet Protocol Suitee loaded. Any computers on your network with Internet access can get time from Network Time Protocol servers on the Internet.
Network Time Protocol introduces the concept of a stratum. A stratum-1 server has an attached accurate time piece such as a radio clock or an atomic clock. A stratum-2 server gets time from a stratum-1 server, and so on.
You can use the xntpd Network Time Protocol (NTP) daemon to synchronize time on Linux and Solaris. xntpd is an operating system daemon that sets and maintains the system time-of-day in synchronism with Internet standard time servers.
For more information on running xntpd on Solaris system, see http://docs.sun.com/?p=/doc/806-0625/6j9vfim2v&a=view#xntpd-1m-indx-2.
The NTP daemon is configured by the /etc/inet/ntp.conf configuration file.
For information on running ntpd on Linux systems, see ntpd - Network Time Protocol (NTP) Daemon.
Test ntp configuration#
ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== LOCAL(0) LOCAL(0) 10 l 44 64 377 0.000 0.000 0.004 +lolly.dreamcomm 18.104.22.168 3 u 10 1024 377 128.561 4.816 0.387 *chime6.surfnet. .PPS. 1 u 84 1024 377 129.592 4.424 0.150 +www.dynam.ac 22.214.171.124 3 u 38 1024 377 243.739 -22.077 0.246
Issues with NTP#We have used ntp for a long time and have always had issues of one sort or another as ntp appears to be intolerant of network issues and fails to perform retries. Here is an excerpt of a typical NTP log file showing ntp giving up on the ntp server due to a temporary network outage:
21 Mar 07:59:57 ntpd: getaddrinfo: "time.willeke.com" invalid host address, ignored 21 Mar 08:00:19 ntpd: host name not found: time.willeke.com 21 Mar 08:00:19 ntpd: couldn't resolve `time.willeke.com', giving up on it
NTP will, by default then revert to the local clock and NEVER retry the server again. There is a similar issue even if the ntp server is hard coded with an IP address but the ntp server(s) are not reachable for any number of network issues.
There is some documentation of these issues being bugs in the ntp.org buglist:Some information on why is Why is Time Important Important?
We have had much better success using SNTP.
Verifying Time Synchronization eDirectory#To verify that time is synchronized in the tree, run DSRepair from a server in the Tree that has at least Read/Write rights to the Tree object.
1. Run the following command: