A Guide to NTP
Computer Network Time Synchronisation
Network Time Protocol (NTP) is one of the Internet's oldest protocols. In use for over 25 years, NTP is still under development with version 4 currently in progress. Put simply, NTP is a computer protocol that is used to synchronise the clocks of computer systems; usually to an authoritative time reference such as UTC (Coordinated Universal Time or Temps Universel Coordonn') which became the international standard of time after the development of atomic clocks.
Without NTP, time would not be consistent over any two computers, let alone a network of hundreds or thousands of machines Seconds would be lost here and gained there, causing major confusion, as time, in the form of timestamps, is intrinsically important to the function of routers and networks. It provides the only frame of reference between all devices on a network NTP is now everywhere and is an integral part of modern computer networking, as inventor and developer, Dr David Mills from the University of Delaware explains:
"Just about everything today that can be connected to a network wire has support for NTP - print servers, wi-fi access points, routers of every stripe and even battery backup systems. NTP subnets are in space, on the seabed, onboard warships and on every continent, including Antarctica. NTP comes with Windows/XP and NT2000, as well as all flavours of Unix. About 25 million clients implode on the NTP time servers at NIST alone."
The way NTP works is relatively straight forward. NTP timestamps relay the seconds from a set point in time (known as the prime epoch, set at 00:00 1 January 1900) The NTP algorithm (Marzullo's algorithm) then uses this timestamp to determine the amount to advance or retreat the system or network clock. NTP is accurate to within 10 milliseconds over the public Internet (1/100th of a second) and can perform even better over LANs with accuracies of 200 microseconds (1/5000th of a second) under ideal conditions.
The NTP program (known as a daemon on UNIX and a service on Windows) runs in the background and refuses to believe the time it is told until several exchanges have taken place, each passing a set of tests. Only if the replies from a server satisfy these tests or 'protocol specifications', the server is considered. It usually takes about five minutes (five good samples) until a NTP server is accepted as a synchronization source.
All Microsoft Windows versions since 2000 include the Windows Time Service (w32time.exe) which has the ability to synchronise the computer clock using NTP. NTP operates on Windows, UNIX and LINUX and is available freely to download at NTP.org.
NTP time servers work within the TCP/IP suite and rely on UDP (User Datagram Protocol). A less complex form of NTP called Simple Network Time Protocol (SNTP) that does not require the storing of information about previous communications, needed by NTP, is used in some devices and applications where high accuracy timing is not as important and is also included as standard in Windows software (although more recent versions of Microsoft Windows have the full NTP installed and the source code is free and readily available on the Internet).
NTP can synchronise time over the Internet but it should be noted that Microsoft and others recommend that external time references are used rather than Internet based ones as these can't be authenticated.
Specialist time servers are available that synchronise networks to UTC time either over the GPS network or specialist radio transmission. These NTP servers and GPS time servers can provide timing information to within a few nanoseconds of UTC as long as there is an antenna situated with a good view of the sky.