Concepts / Addresses and clocks

Addresses and clocks

NTP

Also called network time protocol, SNTP, stratum, clock, time sync, chrony, falseticker, clock skew

Keeping clocks right by asking other clocks, in a hierarchy of strata from a reference clock down.

Four timestamps give the offset and the delay
Four timestamps give the offset and the delay

The client cannot just copy the server's time, because the reply took time to arrive. Two stamps from each clock let it work out the round-trip delay and take it out of the offset.

NTP (Network Time Protocol) keeps a computer's clock right by asking other clocks. A client sends a UDP packet to port 123 and, from four timestamps, computes its offset from the server and the round-trip delay. A server with a reference clock is stratum 1, a server following it stratum 2. A client asks several servers and outvotes a falseticker. A wrong clock breaks TLS certificates, one-time codes and Kerberos.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab