NTP: Accurate Network Time Synchronisation

Jun 19
08:02

2008

Richard N Williams

Richard N Williams

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

This article explores the importance of accurate network timing and explains NTP.

mediaimage

All PC’s and networking devices use clocks to maintain an internal system time. These clocks,NTP: Accurate Network Time Synchronisation Articles called Real Time Clock chips (RTC) provide time and date information. The chips are battery backed so that even during power outages, they can maintain time. However, personal computers are not designed to be perfect clocks, their design has been optimized for mass production and low-cost rather than maintaining accurate time.

These internal clocks are prone to drift and although for many application this is can be quite adequate, often machines need to work together on a network and if the computers drift at different rates the computers will become out of sync with each other and problems can arise particularly with time sensitive transactions.

A time server uses the Network Time Protocol (NTP) which was developed over 20 years ago. It uses an algorithm (Marzullo’s algorithm) to synchronise time on a network. NTP (version 4) can maintain time over the public Internet to within 10 milliseconds (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.

NTP uses a single time reference and synchronises all machines on the network to that time. This time reference can be either relative (a computer’s internal clock or the time on a wrist-watch perhaps) or absolute such as a UTC (Universal Coordinated Time) clock source like an atomic clock that is as accurate as is humanely possible.

Atomic clocks are the most absolute time-keeping devices. They work on the principle that the atom, caesium-133, has an exact number of cycles of radiation every second (9,192,631,770). This has proved so accurate the International System of Units (SI) has now defined the second as the duration of 9,192,631,770 cycles of radiation of the caesium-133 atom.

However, atomic clocks are extremely expensive and are generally only to be found in large-scale physics laboratories. However, NTP can synchronise networks to an atomic clock by using either the Global Positioning system (GPS) network or specialist radio transmission.

The most widely used is the GPS system which consists of a number of satellites providing accurate positioning and location information. Each GPS satellite can only do this by utilising an atomic clock which in turn can be can be used as a timing reference.

A typical GPS time server 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.

There are also a number of national time and frequency radio transmissions that can be used to synchronise a NTP server. In Britain the signal (called MSF) is broadcast by the National.

Physics Laboratory in Cumbria which serves as the United Kingdom's national time reference, there are also similar systems in Colorado, US (WWVB) and in Frankfurt, Germany (DCF-77). These signals provides UTC time to an accuracy of 100 microseconds, however, the radio signal has a finite range and is vulnerable to interference.

All Microsoft Windows versions since 2000 include the Windows Time Service (w32time.exe) which has the ability to synchronise the computer clock to an NTP server.