Pcornel
Networking · Infrastructure

NTP & PTP

Cheat sheet · https://pcornel.dk/topic.php?topic=140

Back to the Topic

Answer

NTP synchronises device clocks to within milliseconds over a routed network; PTP (IEEE 1588) synchronises to sub-microsecond accuracy using hardware timestamps on every hop, for industrial, broadcast and financial networks.

Remember

NTP: use several sources, authenticate them, and set ntp source. Stratum 16 means unsynchronised. PTP needs supporting hardware on every switch on the path (boundary or transparent clocks); a single non-PTP hop ruins accuracy.

First checks

  • show ntp associations — NTP servers, the selected one (*), offset and reachability.
  • show ntp status — synchronised, stratum, offset.
  • show clock detail — time and its source.
  • show ptp clock / show ptp parent / show ptp port — PTP role, grandmaster and port states (supported platforms).

Commands

show ntp associations
Inspect NTP peers and selection.
show ntp status

Verify in this order

time source reachable → authenticated → client selects the best source → clock synchronised (NTP: ms, PTP: sub-µs with hardware timestamps on every hop) → timestamps consistent across devices

Where it usually breaks

local configuration → reachability/transport → request/negotiation → server or policy decision → response/state installation → client-visible result

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=140

Confirmation

Confirm action

Continue?