← Lessons

quiz vs the machine

Gold1410

Networking

Network Time Protocol

How machines agree on the time despite network delay.

5 min read · core · beat Gold to climb

Keeping Clocks Honest

NTP (Network Time Protocol) synchronizes computer clocks across a network to within milliseconds. Accurate time matters for logs, certificates, and distributed systems that order events.

Stratum Hierarchy

NTP arranges sources in layers called strata.

  • Stratum 0 is a reference clock such as a GPS or atomic source.
  • Stratum 1 servers connect directly to those references.
  • Each lower stratum syncs from the one above, spreading time outward.

Correcting for Delay

A client records four timestamps as a request leaves and returns. From these NTP computes the round trip delay and the offset between the two clocks, assuming the path is roughly symmetric. Rather than jumping the clock, it usually slews it gradually so time never moves backward.

Key idea

NTP organizes time sources into strata and uses four timestamps to estimate delay and offset, then slews the clock so it stays accurate without jumping backward.

Check yourself

Answer to earn rating on the learn ladder.

1. What is a stratum 1 NTP server?

2. Why does NTP usually slew rather than jump the clock?