Why do computers always know what time it is? How do they agree at the same time? Network Time Protocol (NTP) is responsible for that.

Developed in 1981 by David L. Mills of the University of Delaware, this protocol is mostly used for synchronizing clocks of computer systems over networks with variable latency.

But not only that. There’s more to the Network Time Protocol or NTP for short.

Network Time Protocol TL;DR Takeaway


What is Network Time Protocol (NTP) and How Does It Work?

Network Time Protocol (NTP) is a protocol for synchronizing clocks of computer systems over networks with variable latency.  NTP uses a hierarchical structure of time servers and clients to distribute accurate time information across the network.

NTP consists of four main components:

  1. Reference clocks: These are highly accurate and stable clocks that provide the source of time for NTP. They can be atomic clocks, GPS receivers, radio clocks, or other devices that can generate precise time signals.

  2. Primary servers: These are servers that are directly connected to reference clocks and provide timely information to other servers and clients. They are also called stratum 1 servers, as they are at the top level of the NTP hierarchy.

  3. Secondary servers: These are servers that are synchronized with primary servers or other secondary servers and provide timely information to other servers and clients. They are also called stratum 2, 3, 4, “and so on” servers, depending on their distance from the reference clocks.

  4. Clients: These are devices or programs that request and receive timely information from servers and adjust their clocks accordingly. They can be computers, routers, switches, printers, cameras, etc.

The Network Time Protocol uses a request-response communication pattern between clients and servers. A client sends a request packet to a server, containing its timestamp. 

The server receives the request packet and adds its timestamp. Then sends a response packet back to the client, containing both timestamps. 

The client receives the response packet and adds its timestamp again.

Using these four timestamps, the client can calculate two important values:

  1. Offset: This is the difference between the client’s clock and the server’s clock. The client can use this value to adjust its clock to match the server’s clock.

  1. Delay: This is the round-trip time between the client and the server. The client can use this value to estimate the network latency and accuracy of the synchronization.

The Network Time Protocol uses an algorithm called Marzullo’s algorithm to select the most accurate time server from multiple sources. It can also use an extension mechanism called Autokey to provide authentication and encryption for secure communication.


Network Time Protocol (NTP) 2
Source: Photo by Luke van Zyl on Unsplash

What are the Benefits and Challenges of Network Time Protocol (NTP)?

Network Time Protocol (NTP) has many benefits and challenges for network users and administrators. Some of the benefits are:

Some of the challenges are:


How Will the NTP Evolve in 2023?

Network Time Protocol (NTP) is constantly evolving to meet the changing needs and threats of network time synchronization. Some of the possible trends and developments for NTP in 2023 are:

  1. NTPv5: This is the next version of NTP that is currently under development by the NTP Working Group of the Internet Engineering Task Force (IETF).

    NTPv5 aims to improve the security, performance, and interoperability of NTP. Some of the proposed features of NTPv5 are:
  1. PTP: This is an alternative protocol to NTP that is designed for high-precision time synchronization. PTP stands for Precision Time Protocol and is defined by IEEE 1588 standard.

    PTP can synchronize clocks of computer systems to within a few nanoseconds of UTC, which is suitable for applications such as industrial automation, financial transactions, or scientific experiments.

    PTP uses a master-slave communication pattern between devices and requires dedicated hardware support for accurate timestamping.



  1. TSN: This is an emerging technology that combines time synchronization with network quality-of-service.

    TSN stands for Time-Sensitive Networking and is defined by IEEE 802.1 standards.

    TSN can provide deterministic and low-latency communication for applications such as audio/video streaming, automotive control, or smart grid.

    TSN uses a combination of protocols, such as PTP, IEEE 802.1Qbv, IEEE 802.1Qci, etc., to achieve time synchronization and traffic shaping.