Visual RFC.
ALL RFCs / RFC 5905
Read the RFC ↗

RFC 5905 / START HERE

NTPv4, before the details

NTP: Network Time Protocol

NTP helps computers estimate the correct time by exchanging timestamped messages with other clocks. This RFC describes NTP version 4.

The idea in one picture

  1. A device checks another clock

  2. NTP estimates delay and offset

  3. The local clock is adjusted

A simplified picture of the idea; the chapters explain the actual mechanisms.

Why it exists

Computer clocks drift, and network messages take time to travel. NTP estimates clock differences while accounting for that uncertainty.

A familiar example

A laptop periodically compares its clock with time servers so timestamps stay useful across devices.

Helpful background

You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.

What you’ll learn next

Begin with chapter one, or choose a topic.

  1. A hierarchy of clocksPrimary time servers connect to reference sources. Secondary servers and clients build a synchronization hierarchy.
  2. Modes & associationsNTP supports client/server, symmetric peer, and broadcast arrangements, with association state appropriate to each.
  3. Four timestampsTwo local timestamps and two remote timestamps let a client separate server processing time from network travel.
  4. Offset & round-trip delayThe timing exchange estimates how far the server clock is ahead and how much time the packets spent traveling.
  5. Packets & sanity checksPacket fields describe mode, version, stratum, quality, and timestamps. The peer process rejects unusable or mismatched data.
  6. Filter noisy samplesEach peer has a recent sample history. Delay ordering and uncertainty tracking reduce the influence of network jitter.
  7. Select, cluster, combineThe system process compares candidate time intervals, removes inconsistent sources, and combines survivors.
  8. Discipline & poll controlA controlled loop adjusts both phase and frequency, while polling adapts measurement frequency to clock conditions.
  9. Eras, leap indicators & KoDThe wire timestamp has limited range. Leap indicators and special stratum-zero packets carry additional state.
  10. Authentication & later updatesPacket authentication and careful peer handling protect different parts of the exchange. Later RFCs update the original security choices.
Start with chapter one →

This introduction explains RFC 5905 (2010). Read the original RFC ↗