Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.
Operational since 1985, NTP is among the eldest Internet protocols being used. NTP servers were initially created by David L. Mills of the University of Delaware, who still produces and maintains it with a group of volunteers.
NTP Time Server Overview
NTP distributes Coordinated Universal Time (UTC). It is used to synchronize computer clocks over local and wide area networks. NTP servers makes use of a customized version of Marzullo’s algorithm to decide on precise time servers and is made to mitigate the effects of variable network latency. NTP servers can generally maintain time to within tens of milliseconds over the public Internet, and can attain 1 millisecond accuracy in local area networks under suitable circumstances. Asymmetric routes and network congestion may cause blunders of 100 msec if not more. NTP contains warnings of approaching leap second adjustments, but no details about local time zones or daylight saving time is transmitted.
The protocol is commonly identified with regards to client-server, but can just as easily be used in peer-to-peer interactions where both peers deem the other as a prospective source. It makes use of the User Datagram Protocol (UDP) on port number 123. It can also make use of broadcasting or multi-casting, where clients passively listen after a primary round-trip calibrating exchange.
NTP Server Clock Strata
NTP uses a hierarchical, semi-layered system of time sources. Each and every level of this hierarchy is referred to as a “stratum” which is designated a number beginning with zero at the very top. The number corresponds to the distance from the reference clock and is used to stop cyclical dependencies in the hierarchy. Stratum is not invariably an indication of quality or reliability, it is typical to come across stratum 3 time sources which are much better quality than other stratum 2 time sources. This definition of stratum differs from the notion of clock strata utilised in telecommunication systems.
These are devices which include atomic (caesium, rubidium) clocks, GPS clocks or other radio clocks. They produce a very precise pulse per second signal that is linked to a computer. Stratum 0 devices are also referred to as reference clocks.
These are computers whose clocks are synchronized to within a couple of microseconds of the connected Stratum 0 devices. Usually they function as servers for timing requests from Stratum 2 servers. These computers are also generally known as primary time servers.
These are computers that send out NTP requests to Stratum 1 servers. Usually a Stratum 2 computer will reference a number of Stratum 1 servers and use the NTP algorithm to collect the ideal data sample, releasing any Stratum 1 servers that appear to be noticeably wrong. Stratum 2 computers will peer with other Stratum 2 computers to offer more sturdy and robust time for all devices in the peer group. Stratum 2 computers generally function as servers for Stratum 3 NTP requests.
These computers make use of the exact same algorithms for peering and data sampling as Stratum 2, and can on their own function as servers for stratum 4 computers, etc.
While NTP (depending upon what version of NTP protocol is in use) facilitates up to 256 strata, only the first 16 are used and any device at Stratum 16 is regarded as unsynchronized.
NTP server software implementations:
For current day Unix-like systems, the NTP client is executed as a daemon process known as ntpd that operates constantly in user space. Due to sensitivity to timing, nevertheless, it is very important to have the standard NTP clock phase-locked loop implemented in kernel space. All latest versions of Linux, BSD, Mac OS X, Solaris and AIX are implemented in this way.
Simple Network Time Protocol – SNTP
A less complex implementation of NTP, using the same protocol but without needing the storage of state over prolonged amounts of time, this is referred to as the Simple Network Time Protocol (SNTP). It is utilised in some embedded devices and in applications where high precision timing is not needed.
All Microsoft Windows versions since Windows 2000 and Windows XP incorporate the Windows Time Service (“w32time”), which is able to sync the computer clock to an NTP server. The version in Windows 2000 and Windows XP only utilises Simple NTP, and violates a number of aspects of the NTP version 3 standard. Starting with Windows Server 2003 and Windows Vista, a compliant execution of full NTP is included.
NTP provides UTC time. UTC is tied to routine leap seconds to synchronize the timescale to the rotation of the earth. When a leap second is added, improvement of NTP time is suspended for 1 second. Because NTP has no mechanism for keeping in mind the history of leap seconds, leap seconds trigger the whole NTP timescale to shift by 1 second.