NTP (Network Time Protocol)

Networking · Last updated · About 2 min read

What NTP Does

The Network Time Protocol (NTP) is a networking protocol used to synchronize the clocks of computers and network devices across an IP network to a common time reference — typically to within milliseconds of Coordinated Universal Time (UTC) on the public internet, and often much tighter (sub-millisecond to microsecond) on a well-engineered local network. Any IP-connected device with an NTP client — servers, routers, switches, workstations, logging appliances, IP-based recorders, dispatch consoles — can use NTP to keep its internal clock aligned with every other device on the network.

How It Works: the Stratum Hierarchy

NTP organizes time sources into a hierarchy of levels called strata, numbered starting at zero for the reference clock at the top:

NTP stratum levels and the four-timestamp exchange Stratum 0 is a GPS or atomic reference clock that is not on the network. Stratum 1 is a server wired to one. Stratum 2 is a site time server or domain controller. Stratum 3 is the gateways, consoles, routers and recorders that need matching logs. Below, one poll between a client and a time server carries four timestamps: t1 sent, t2 received, t3 replied and t4 received. Delay is t4 minus t1 minus the server's own turnaround; offset is the average of the two one-way differences. The stratum hierarchyEach level takes its time from the one above and counts one higherStratum 0 — GPS clock, atomic clockreference clock — not on the networkStratum 1 — server wired to a stratum 0 clockthe most accurate server you can reachStratum 2 — site time server, domain controllerwhat most sites run locallyStratum 3 — gateways, consoles, routers, recordersthe equipment that needs matching logsA device synchronised to a stratum n server runs at stratum n + 1.One poll, four timestampsThe pair of round-trip times separates clock error from network delayClientTime servert1 sentt2 receivedt3 repliedt4 receiveddelay = (t4 − t1) − (t3 − t2)how long the network took, there and backoffset = ((t2 − t1) + (t3 − t4)) / 2how far this clock is from the server's
Because the client measures the round trip itself, NTP can tell a slow network apart from a wrong clock — and correct only the clock.
  • Stratum 0 — the reference clocks themselves: atomic clocks, GPS clocks, and other radio-based precision timing devices. Stratum 0 devices are not attached to the network directly; they feed time to the servers above them.
  • Stratum 1 — "primary" time servers directly connected to a stratum 0 reference clock (e.g., a server with a GPS receiver card), receiving time with minimal delay and forming the most accurate tier of servers actually reachable over a network.
  • Stratum 2 and below — servers and clients that synchronize their clocks from a stratum 1 (or higher-numbered) server over the network. A device synchronized to a stratum n server operates at stratum n + 1; most public NTP servers end users reach are stratum 2 or 3.

To calculate both the offset between a client's clock and the reference and the round-trip network delay, NTP exchanges a set of four timestamps between client and server on each poll. This lets NTP compensate for variable network latency and gradually discipline (adjust) the local clock, rather than simply stepping it, so the whole network converges on a shared, consistent time.

References

See also: CTI product documentation

This article is part of the CTI Products Knowledge Base. Questions about RadioPro or MCN products? Call +1 (513) 595-5900 or email info@ctiproducts.com.

Informational only. This article is general background and is not engineering, safety, legal or regulatory advice. Verify requirements with the equipment manufacturer and the applicable authority before relying on it. Product names and trademarks belong to their respective owners.