How a Ntp Server Works

Network Time Protocol (NTP) is one of the Internet'sthe day each timestamp is ephemeral, in other words it
oldest protocols still in use. Invented by Dr David Millsis always greater than the previous timestamp as time
from the University of Delaware it has been utilizednever runs backwards. NTP analyses the timestamp
since 1985. NTP is designed to synchronize the clocksvalues including the frequency of errors and the
on computers and networks across the Internet orstability. A NTP server will maintain an estimate of the
Local Area Networks (LANs).quality of its reference clocks and of itself.
NTP (currently version 4) is actually three things in one;The distance from the reference clock is known as
a software program that runs in the background ofthe stratum levels and they exist to prevent cycles in
Windows or UNIX; a protocol that exchanges timethe NTP. Stratum 0 are devices such as reference
values between servers and clients; and a suite ofclocks connected directly to a computer. Stratum 1 are
algorithms that process the time values to advance orcomputers attached to stratum 0 devices, while
retreat the system clock.Stratum 2 are computers that send NTP requests to
NTP uses an algorithm (Marzullo's algorithm) toStratum 1 servers. NTP can support up to 256 strata.
synchronise time on a network using a time reference.NTP timestamps are in two formats but they relay the
Although networks can be synchronized with internalseconds from a set point in time (known as the prime
clocks or Internet based timing references, it is highlyepoch, set at 00:00 1 January 1900) The NTP algorithm
recommended by Microsoft and others that anthen uses this timestamp to determine the amount to
external timing reference should be used to guaranteeadvance or retreat the system or network clock.
authentication. An absolute timing reference should useThe NTP program (known as a daemon on UNIX and
UTC (Coordinated Universal Time or Temps Universela service on Windows) runs in the system
Coordonné) which supports such features asbackground. NTP refuses to believe the time it is told
leap seconds - added to compensate for the slowinguntil several packet exchanges have taken place, each
of the Earth's rotation.passing a set of tests. Only if the replies from a server
NTP works within the TCP/IP suite and relies on UDP,satisfy the test, known as protocol specifications, the
a less complex form of NTP exists called Simpleserver is considered. It usually takes about five minutes
Network Time Protocol (SNTP) that does not require(five good samples) until a NTP server is accepted as
the storing of information about previousa synchronization source.
communications, needed by NTP. It is used in someA typical GPS time server can provide timing
devices and applications where high accuracy timing isinformation to within a few nanoseconds of UTC as
not as important, it is also included in most Windowslong as there is an antenna situated with a good view
operating systems but more recent versions have theof the sky.
full NTP already installed, which is also free toThere are also a number of national time and
download via the Internet.frequency radio transmissions that can be used to
Synchronisation with NTP is relatively simple, itsynchronise a NTP server. In Britain the signal (called
synchronises time with reference to a reliable clockMSF) is broadcast by the National Physics Laboratory
source such as an atomic clock, although these arein Cumbria which serves as the United Kingdom's
extremely expensive and are generally only to benational time reference, there are also similar systems
found in large-scale physics laboratories, however NTPin Colorado, US (WWVB) and in Frankfurt, Germany
can use either the Global Positioning system (GPS )(DCF-77). These signals provides UTC time to an
network or specialist radio transmission to receiveaccuracy of 100 microseconds, however, the radio
UTC time from these clocks.signal has a finite range and is vulnerable to
NTP uses timestamps to represent the current time ofinterference.