Bodet-Time
  • Home
  • Resources
  • Blog
  • What is Network Time Protocol (NTP)?

NTP (Network Time Protocol) is a networking protocol which synchronizes clocks in computers and other electronic devices, either over the internet or local networks. It has been in continual use since its creation in the 1980s by Dr David Mills, a professor at the University of Delaware.

In this age of modern information technology, communication between different computer networks is commonplace, and time synchronization is a vital element. Without it, time-sensitive transactions used in applications such as online banking and shopping couldn’t take place.

Operating in a hierarchy, NTP uses different layers called strata (or stratum for singular), where stratum 0 is the reference clock that generates highly accurate time, such as an atomic clock, GPS or another radio clock. Each following stratum increases its number designation by one, to indicate its distance from that original source. This structure builds in a series of checks and redundancies, allowing your network to continue to operate with highly accurate time for a prolonged period, even in the event of the original time source being lost. For example, multiple stratum 1 servers (also known as primary time servers) work in tandem to agree the most accurate time from the original source, before passing that down to stratum 2 servers. Stratum 2 servers often query the time from multiple stratum 1 servers before accepting it, conferring with each other before sending the agreed time on to stratum 3 servers. This pattern continues all the way down to the level where individual devices requiring synchronized time sit. There is a limit in this hierarchy : stratum 15. Stratum 16 servers are devices that are unsynchronized.

Marzullo’s algorithm, a component of NTP, enables the use of time standards such as UTC (Universal Coordinated Time) when synchronizing time (clocks) across a network. Taking into account the changing speed of the Earth’s rotation via adjustments called ‘leap seconds’, UTC is the most commonly used time standard. It is mandatory in certain industries such as banking and financial trading, to ensure perfect time synchronization across multiple networks.

The accuracy of NTP varies slightly depending on whether it’s being used across the internet or a local area network (LAN). It can be accurate to within 10 milliseconds through an online connection, but within 200 microseconds over a private local network.

Running in the background of your computer, NTP utilises built-in checks to ensure a source of time is genuine. Once a potential time server has been detected, several data exchanges must take place, each passing a set of tests. Only then will it be considered a viable source and the server’s time signal accepted. The time given by the server will then be used to synchronize the clock.

Where demands for accuracy and reliability are not as strict, a simpler version of NTP called SNTP (Simple Network Time Protocol), can be utilised. SNTP doesn’t employ the same advanced algorithms to maintain highly accurate time as NTP, and neither is it able to monitor multiple time references to choose the most stable. Should time need to be adjusted, whereas NTP attempts to make seamless corrections by smoothing them out over a longer period, SNTP often changes it in one single step. This can result in timestamped events happening out of order.

Using NTP to synchronize time across devices on your network is a fairly easy process. The best practice recommendations for network time synchronization are to use dedicated NTP time servers that offer your business a complete package, ensuring not only security, but far greater accuracy and reliability.

 

Share the article