Vol. I · No. 46The protocol sectionSat, 10 Oct 2026
Layer 7 · Time · keeping network clocks aligned

NTP

Network Time Protocol

NTP keeps networked machines closely aligned on time. It measures the round trip to a reference clock and works out the offset, then steers the local clock towards it rather than jumping — because certificates, logs, Kerberos and TOTP all fall apart without it.

NTP works out the offset between two clocks by timing a round trip — then disciplines the local one towards its selected time sources.

Operates at
Layer 7
a tiny UDP exchange
Port
123
UDP
Accuracy
Path-dependent
sub-ms on a fast LAN; often tens of ms remotely
Hierarchy
Strata
0 is the reference clock

How it works

Four timestamps are enough to find the offset
ClientTime server
Request — carrying T1, when it left
T1 = the client’s clock at transmit
The server notes T2 on arrival and T3 as it replies
Reply — carrying T1, T2 and T3
The client records T4 on arrival — four timestamps in hand
Round trip(T4−T1) − (T3−T2)
Offset((T2−T1) + (T3−T4)) / 2
Steer, don’t jump
Small offsets are corrected by slewing the clock; a large offset may require a step

The arithmetic assumes the path is symmetric in each direction — which is why an asymmetric route quietly costs accuracy. Polling several servers lets a client discard the one that disagrees with the rest.

The main points

What NTP does, step by step

1
Stamp and send

The client records when it sent the request; the server records arrival and departure and returns all three.

2
Compute offset and delay

Four timestamps give both the round-trip delay and how far the local clock is out.

3
Filter and select

Several servers are polled; outliers are rejected and the best-agreeing set is combined.

4
Discipline the clock

Small errors are corrected by slewing the clock’s rate; only a large one is stepped outright.

Strata and relatives
Stratum 0 — the atomic clock or GPS itself
Stratum 1 — a server attached directly to one
Stratum 2+ — servers synced to those above
SNTP — the simplified client-only subset
PTP — sub-microsecond, with hardware help
NTS — NTP with authentication, at last

In cybersecurity

Time underpins certificate validity, log correlation, Kerberos and one-time codes — so an attacker who can move your clock can break all of them at once.

Amplification

The old monlist command returned huge replies to tiny spoofed queries — a classic DDoS vector.

Time-shifting attacks

Push a clock forward and expired certificates become valid; push it back and revocation is undone.

Use NTS

Network Time Security authenticates the server, closing the gap plain NTP leaves wide open.

Poll several sources

Multiple independent servers let the client outvote one that has been tampered with.

Restrict your server

Answer queries, but disable remote configuration and status commands entirely.

Kerberos depends on it

Five minutes of skew and domain authentication simply stops working.

Rides in the stack

IPUDPNTP

Deliberately a single small datagram each way — anything heavier would add delay and spoil the measurement.

Works with

SNMPSyslog

See it on Linux

date

Timestamps & strata

The four times
T1client sends
T2server receives
T3server replies
T4client receives
Strata
0reference clock
1directly attached
2 – 15each step down
16unsynchronised