protocols · 5 min read

What is NTP? Network Time Protocol explained

What is NTP? Network Time Protocol synchronises clocks across a network down to milliseconds. How does it work, and why do modern networks need it?

Choose your reading level
NTP keeps all clocks on a network showing the same time. Every computer, server, camera or clock has its own little clock that slowly runs fast or slow. NTP regularly asks a reliable time source "what time is it?" and corrects its own clock accordingly.

Why this matters, even if you do nothing with time: log files from different devices can only be compared if their time agrees, security certificates expire at a precise moment, and much regulation in finance, broadcast and healthcare requires a demonstrably correct time.

Over an ordinary network NTP achieves an accuracy of a few milliseconds. If you need it sharper still, there is a stricter protocol, PTP.

Network Time Protocol (NTP) is the protocol that keeps thousands of devices on a network on the same time, accurate to a few milliseconds. Without NTP, every server, switch, clock or camera runs its own internal clock that drifts, sometimes seconds per day. For logging, transaction ordering, video sync and compliance that is unusable.

What does NTP do, in one sentence?

NTP is like a postcard that every clock in your network sends out asking: "what time is it on your side?". The server replies with a timestamp. The clock compares it to its own time, calculates the difference plus the network transit delay, and corrects itself.

Why do you need NTP, even if you don't think about time?

  • Audit trails line up: log files from different systems can only be compared once their timestamps are aligned.
  • Security: TLS certificates expire at a precise moment. Clocks that are out of sync reject or trust certificates incorrectly.
  • Compliance: regulation in finance (MiFID II requires 100 microseconds), broadcast (frame-accurate sync) and e-health requires demonstrable time synchronisation.
  • Distributed systems: databases, microservices, message queues, anything that relies on "happened before" relations needs clocks that agree.

How does it actually work?

NTP uses a hierarchy of strata:

  • Stratum 0: the source, an atomic clock, a GPS receiver, or GNSS. Not directly attached to the network.
  • Stratum 1: an NTP server that synchronises directly with a stratum 0 source (a Masterclock NTP100-GNSS, for example).
  • Stratum 2-15: servers and clients that synchronise to a stratum 1 (or higher-numbered) server. The further from the source, the less accurate.
A client sends a request packet with its own time. The server replies with four timestamps: receive, transmit, and the client-time info. From those the client calculates the offset (difference between clocks) and the roundtrip delay (network latency).

NTP vs PTP

NTP achieves millisecond accuracy (and on a LAN sometimes tens of microseconds). For sub-microsecond accuracy you need PTP (Precision Time Protocol, IEEE 1588). See our article NTP vs PTP for the comparison.

How does NTP-implementation work via Daylight?

As authorised Masterclock distributor, we have supplied NTP servers and NTP-driven clocks since 2014 to broadcasters, data centres, banks, hospitals and industrial customers. Which configuration you need depends on scale, environment and compliance requirements. Get in touch and we will give you independent advice.

Sources

From theory to practice: browse the NTP and PTP time servers in the Masterclock range from Daylight.

NTP (RFC 5905, version 4) synchronises clocks through a hierarchy of stratum levels, from the physical source (stratum 0) to clients (stratum 15; 16 means unsynchronised). Each exchange uses four timestamps (T1 client send, T2 server receive, T3 server send, T4 client receive) to compute the offset ((T2−T1)+(T3−T4))/2 and the round-trip delay (T4−T1)−(T3−T2). The assumption is a symmetric path; path asymmetry is the biggest error source over a WAN.

NTPv4 statistically filters multiple samples (clock filter, selection, clustering, combining) and steers the system clock via a discipline loop with a combined PLL/FLL, rather than letting the time jump. Over a LAN with symmetric paths, tens of microseconds are achievable; over the internet usually a few milliseconds.

For sub-microsecond requirements NTP falls short because software timestamping dominates the jitter; then PTP (IEEE 1588) with hardware timestamping and network support via boundary and transparent clocks is needed. Security is handled through symmetric keys or the newer NTS (Network Time Security, RFC 8915).

Standard: IETF RFC 5905 (NTPv4).

Need tailored advice?

Daylight bv has been the authorised Masterclock distributor since 2014. For advice on your specific situation, we are reachable 24/7.

Contact Daylight

What are you looking for?