Network Time Protocol

The Network Time Protocol ( NTP) is a protocol for synchronizing the clocks of computer systems over packet -based communication networks. NTP uses the connectionless UDP transport protocol. NTP has been specially developed to provide a reliable time stamp in networks with variable packet delay.

In common parlance, refers to both the NTP protocol and the software reference implementation of the same.

Basics

NTP was developed by David L. Mills at the University of Delaware in 1985 and published as RFC 958. Under his leadership, protocol and UNIX implementation are constantly being developed. Currently, the protocol version 4 is current. The UDP port 123 is reserved for NTP.

NTP is implemented in UNIX -like operating systems in the form of the background process (daemon ) ntpd that can adjust both the local system and also provide as the time server for other systems. Windows systems can also without any additional software the exact time via NTP from the Internet relate (Control Panel " Date and Time" / "Internet time " ), and provide after editing an entry in the registry database via NTP.

The UNIX ntpd to synchronize the local clock with the help of external time signals it either directly from a local atomic clock ( cesium clock, Rubidiumuhr etc.) or a local radio receiver (eg DCF77, GPS, LORAN ), or via NTP from a NTP server receives. Thus the local time not only to the cyclic synchronization points coincides precisely with the external signal, the ntpd process not only corrects the phase but also the frequency of the local clock with the help of a software PLL and a software FLL. To more closely to couple the internal timer using a high-precision seconds signal to an external standard time receiver, some UNIX variants (including Linux and FreeBSD) have implemented the above mentioned software PLL in the kernel.

The timestamp in the NTP are 64 bits long. 32 bits encode the number of seconds since January 1, 1900 00:00:00 clock, an additional 32 bits of the seconds fraction. In this way, a period of 232 seconds ( about 136 years) with a resolution of 2-32 seconds ( about 0.23 nanoseconds) can be represented.

NTP uses a hierarchical system of different Strata (plural of stratum ). As a Stratum 0 is defined as the time standard such as an atomic clock or a radio clock (more precisely, the time signal receiver ) (GNSS, DCF77). The directly coupled to it are called Stratum 1 NTP server each additional dependent unit obtained in the name of a higher number ( Stratum 2, Stratum 3 ... ). The NTP software on Stratum 1, Stratum 2, Stratum 3, and so is also the client of the overlying stratum and server of the underlying stratum, if one exists.

Algorithm and accuracy

NTP uses the Marzullo algorithm (developed by Keith Marzullo of the University of San Diego in his dissertation ) and an algorithm to handle Byzantine faults. NTP is usually used with a UTC time scale.

NTP supports leap seconds. By considering the leap seconds in the log it happens that with each leap second (which rarely happen ), a new second scale is used. However, the actual elapsed time is used for a certain time for the scale of the system time and leap seconds are usually only in the representation of time into the game.

NTPv4 can maintain the local time of a system over the public Internet with an accuracy of 10 milliseconds, in local area networks under ideal conditions even accuracies of 200 microseconds and better possible. With a sufficiently stable local clock ( thermostatically controlled quartz oscillator, rubidium oscillator, etc.) can be using the kernel PLL ( see above), the phase error between the reference timer and local clock to reduce a few microseconds up to the order.

SNTP

The Simple Network Time Protocol ( SNTP) is a simplified version of NTP. It is described in RFC 4330.

The configuration of the protocol is identical to that of the NTP. SNTP client can use it to obtain the time by NTP servers. The essential difference is in the algorithms used for time synchronization. While NTP time synchronization is usually done with multiple time servers, with only a SNTP time server is used. SNTP do without the influence of the phase and frequency of the local timer. SNTP can not deliver the same accuracy as NTP therefore. Because of the simpler algorithms SNTP requires less computing resources, but this is negligible due to the currently available computing power.

Older versions of Windows such as Windows 2000 use SNTP to keep the time on your local computer up to date. This is handled by the Windows W32Time service. In Windows XP and Windows Server 2003 Dynamic -Link Library w32time.dll has been revised so that now NTP is used for time synchronization.

Because Microsoft method for time synchronization first introduced with Windows 2000, some software vendors have developed standalone programs for time synchronization under Windows. Modern authentication systems ( such as Kerberos ) that are used in Windows 2000 and later versions, need to increase security timestamp is therefore the result here is a use case for NTP.

The NTP website

In addition to the reference NTP software, which is available for various operating systems on the NTP website, offer a number of manufacturers of finished standalone solutions that can be used as NTP time source in computer networks of all sizes use.

Several thousand NTP servers use a NTP pool formed.

Standards

The standards are defined in the following RFCs:

  • RFC 5905 - NTPv4 protocol and algorithm
  • RFC 5906 - NTPv4 autokey specification
  • RFC 5907 - MIB NTPv4
  • RFC 5908 - NTP Server Option for DHCPv6
  • RFC 4330 - Simple Network Time Protocol (SNTP ) Version 4 for IPv4, IPv6 and OSI
  • RFC 2783 - PPS API ( High-precision time synchronization in Unix kernels )
415150
de