AAPT Home > Support Information > Network Time Protocol (NTP)

Network Time Protocol (NTP)


Introduction

Networked computers share resources such as files. These shared resources often have time-stamps associated with them so it is important that computers communicating over networks, including the Internet, are synchronised. Imagine the confusion that could be created if an email appeared to arrive before being sent, or if an important file, modified in offices in different countries, had a version with a time-stamp indicating it had been created two hours later than its updated version.

The Network Time Protocol (NTP) is an Internet Standard Recommended Protocol for communicating the Coordinated Universal Time (UTC) from special servers called time servers and synchronising computer clocks on an IP network. (UTC replaced Greenwich Mean Time (GMT) as the international time standard in 1972.)

Time Servers, or time source references, communicate with special time keeping equipment such as Global Positioning System (GPS) receivers, atomic clocks, radios, satellite receivers or modems.

The accuracy of each time server is defined by a number called its stratum. Stratum one servers are those at the top level which communicate directly with a time source such as a GPS or an atomic clock. Each level downwards in the hierarchy is classified as one greater than the preceding level (for example, stratum two, stratum three). Current stratum one servers can provide time within a millisecond's accuracy or better.

This accuracy degrades minusculely as the time message travels through down through the time server strata. The level of degradation varies depending on the time server itself and the network path between the time server and its various clients. In most Internet locations, NTP is accurate to within 1-50 milliseconds. In practicality of course there is no appreciable difference in the service delivered by stratum one, two or three servers.

NTP operates on port 123.


Setting up NTP with AAPT

AAPT operates network time servers in all states.
ACT ntp.can.connect.com.au stratum three
NSW ntp.syd.connect.com.au stratum two
Queensland ntp.bri.connect.com.au stratum three
South Australia ntp.ade.connect.com.au stratum three
Victoria ntp.mel.connect.com.au stratum two
Western Australia ntp.per.connect.com.au stratum three

You should use the NTP server in your state and list at least two of these servers in your configuration. If there is no server in your state, use the one that is closest in terms of network topology. You can use a traceroute to determine this. The time daemons become more accurate with more servers (within some limits) and it also provides some protection against outages.

Please do not refer directly to any stratum one server. If the stratum one servers become overloaded it will degrade time services for everyone. There are very few stratum one servers in the world and those that exist operate with no cost recovery.

Similarly to avoid congestion on AAPT's servers, please refer only one or two of your machines directly to AAPT's NTP servers. If you wish to synchronise a network of machines, set up a couple of your machines to refer to AAPT's time servers thereby creating your own stratum three or four network time server and then set up your other machines to refer to your own time servers.

To set up NTP:

  1. Go to the NTP Home Page at http://www.eecis.udel.edu/~ntp/.
  2. Download the file >xntp3.?.export.tar.Z where ? is the subversion number. 
  3. Uncompress and untar the file.
  4. Read the README files and follow the instructions contained within them.
  5. When you have installed the NTP package, type ntpdate ntp.xxx.connect.com.au (where xxx is your local ntp server) to synchronise your machine's clock with the AAPT NTP server in your state. 

Keeping your machine synchronised with an NTP server

To keep your machine in sync with AAPT's NTP server, configure and run the NTP daemon, >xntpd, which is included in the xntp3.?.export.tar.Z file. The NTP daemon checks the current time according to your system's clock and keeps it synchronised to its NTP server by gradually adjusting ("slewing") the time on the system's clock. This stops the problem of ntpdate time "jumping" forward or backwards. Note that many linux distributions have XNTP built in.


NTP on Windows systems

There are two kinds of NTP software: complete (NTP) and simple (SNTP). Complete NTP provides all the features of NTP. Simple NTP employs a subset of NTP. SNTP uses the standard NTP protocol to get the time from a server, but sets the clock only on the client machine. The client may point to only one server to acquire the time.

Windows 95 and Windows NT

Simple NTP clients available for MS Windows include 4th Dimension (freeware) or the shareware version of Simplified 32 bit NTP (NTSNTP).

Windows for Workgroups

A shareware version of 16-bit SNTP (WINSNTP) is available. To use it you must have a Winsocket compatible TCP/IP version set up, for example Microsoft's TCP/IP32.

NTP on MacOS

An application called NetTime (http://www.magna1.com/Nettime.html) is available for Macintoshes.


For more information

TimeSync (the NTP Home Page at The University of Delaware where NTP was developed)

Med2000 Networking Guide: Chapter 13, Configuring the Network Time Protocol (NTP)

NTP newsgroup: comp.protocols.time.ntp

RFC-1119 Network Time Protocol (version 2) Specification and Implementation 

RFC 1305 Network Time Protocol (version 3) This contains full details on the protocol as well as considerable background material on time.

RFC 1165 Network Time Protocol (NTP) over the OSI Remote Operations Service


[footnote: A time-stamp is a value attached to a file or resource identifying times associated with that resource. UNIX time-stamps identify the number of seconds since midnight January 1, 1970, Greenwich Mean Time in a 32-bit value. DOS maintains a two-part value - a 16-bit value representing the time since the most recent midnight and a 16-bit value indicating the date offset from January 1, 1980.]


Copyright © AAPT Limited