NTP is a computer network protocol which is used to synchronise time on computers across a network. NTP stands for Network Time Protocol. Dr David Mills of the University of Delaware invented it over 25 years ago. He saw a growing need to synchronise time on computers. Now, many distributed computer processes and applications rely on precise system time. Transaction processing, event logging, CCTV and DVR applications all rely on accurate time stamping.
NTP has a hierarchical structure. At the highest level, or stratum, are precise hardware clocks, which can synchronise to highly accurate external time references, such as GPS or national radio time and frequency broadcasts. These hardware clock devices are known as stratum 0 devices. A stratum 1 time server obtains time directly from a hardware clock and is the most accurate reference in the NTP hierarchy. All lower stratum devices obtain time from the stratum above over a network. As the network introduces timing discrepancies, lower stratum devices are a factor less accurate.
A hierarchical structure allows the overhead of providing time to many clients to be shared among many time servers. Not all clients need to obtain time directly from a stratum 1 reference, but can utilise stratum 2 or 3 references. This has obvious advantages in large networks, such as the Internet, to spread the load. However, in practice, on small networks, all clients can obtain time from a single stratum 1 time server.
NTP generally operates on a client-server basis. A network time client periodically requests time from a time server. The time server responds with a packet of information containing a time stamp. The time stamp is then used by the client to synchronise its system time. Complex algorithms are used to calculate the time a packet takes to get to the server and back-again, so as to eliminate or reduce any timing inaccuracies introduced by the network itself.
NTP uses UTC (Universal Time Coordinated) time, which is very similar to GMT time. It knows nothing of local time zones or daylight-saving time. It is a function of the time client to apply an offset to the supplied time to adjust for local time. In this manner, a time server located anywhere in the world can provide synchronisation to a client located anywhere else in the world. It allows clients to utilise different time zone and daylight-saving properties.
The protocol is fault tolerant, its internal algorithms can automatically select the best of a selection of external time sources to synchronise to. Also, multiple references can be peered to minimize any accumulated timing discrepancies. Depending on network traffic and the accuracy of the server, most clients can be synchronised to within a couple of milliseconds of the correct time.
Most modern operating systems support either the Network Time Protocol (NTP) or Simple Network Time Protocol (SNTP) in some form or other. Originally developed for Linux, it has since been ported, in various forms, to UNIX, Netware and Microsoft Windows. SNTP is a simplified form of the protocol; it does not have some of the complex algorithms to maintain high precision time. However, the two protocols are entirely interchangeable – a SNTP client can synchronise to a NTP server.
A number of external time references are available that can be used as a hardware reference clocks for NTP. The most common being GPS. The GPS system is a constellation of 24 orbiting satellites, primarily used for positioning and navigation. However, the GPS system also provides very precise timing information. GPS signals can be received anywhere, provided that an antenna can be located with a good view of the sky. There are also a number of national radio time and frequency broadcasts available: WWVB in the US, MSF in the UK and DCF-77 in Germany. These broadcasts provide an accurate source of time within, and local to, national boundaries.
To summarise, many modern computing applications require accurate time. NTP is a standard means of synchronising the time of computers over a network. It can be utilised by most modern operating systems. The protocol has a number of complex features to provide high precision and fault tolerance. There are a number of highly accurate external reference clocks available nationally and globally.