Use it to choose and configure time sources, or when synchronisation fails.
NTP (Network Time Protocol)
NTP (Network Time Protocol, UDP 123) synchronises clocks to time servers organised in strata. Linux clients usually use chrony or systemd-timesyncd.
1. Which client runs? systemctl status chronyd chrony systemd-timesyncd.
2. Sources configured: grep -E '^(server|pool)' /etc/chrony.conf /etc/chrony/chrony.conf.
3. chronyc sources -v — reachable (Reach 377)?
4. Unreachable → UDP 123 blocked? tcpdump -n port 123.
5. chronyc tracking — synchronised, small offset.
client queries sources on UDP 123 → measures offset and delay → selects the best → adjusts the clock gradually
For Time & NTP → NTP, continue with the first unproven Topic check: Identify active NTP implementation and authoritative config; enumerate configured sources/pools and their resolved addresses. If that boundary is healthy, advance to the adjacent check: Inspect source reachability, selection state, stratum, offset, delay, jitter, leap and kernel synchronization indicators across multiple samples. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
NTP config → DNS/network reachability → peer measurements → source selection → offset/frequency discipline → kernel system clock → consuming workload
Healthy evidence: acceptable sources are reachable and selected, measurements are stable, kernel synchronization is valid and clock error remains within the workload's tolerance.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Identify active NTP implementation and authoritative config; enumerate configured sources/pools and their resolved addresses.
- Inspect source reachability, selection state, stratum, offset, delay, jitter, leap and kernel synchronization indicators across multiple samples.
- Check firewall/routing/DNS plus asymmetric delay or VM clock issues when sources are reachable but never selected/stable.
- After a minimal correction, observe convergence/discipline long enough for requirements and verify the original authentication/scheduling/log-correlation workload.
Verification chain. NTP config → DNS/network reachability → peer measurements → source selection → offset/frequency discipline → kernel system clock → consuming workload
Step 3 Commands Verify boundary
chronyc sources
ntpq -p # if ntpd
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: sources resolve but remain unreachable, all peers are rejected, offset oscillates, large asymmetry/VM clock conflict exists, or daemon reports sources while kernel remains unsynchronized.
Step 5 Common mistakes Narrow the fault
- Only one NTP source.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Use at least three or four sources (or a pool) so a bad one can be outvoted. Allow UDP 123 outbound. Internal servers should sync from a few local NTP servers that sync externally.
timedatectl— time, time zone and sync statuschronyc tracking— offset and source (chrony)chronyc sources -v— time sources and reachabilitydate -u— UTC time
ReferenceWhat it is1 section · depth on demand
Core model
Identify the actual NTP daemon before interpreting configuration. Separate configured servers/pools from resolved/usable peers, selected synchronization source and current kernel discipline. Inspect reach, offset, delay, jitter, stratum and leap state over time; one successful UDP exchange is not equivalent to a synchronized clock.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
NTP is confirmed only when an acceptable source is selected and the clock is demonstrably disciplined within workload requirements over time; configured peers or packet exchange alone are insufficient.
chrony owns chronyd/chronyc specifics; Time & NTP owns host-level clock outcome; Networking owns packet reachability.
In depth
NTP: strata, polling and source selection
The Network Time Protocol keeps clocks synchronised over the network. RFC 5905 defines NTPv4:
- Port: NTP runs over UDP port 123.
- Strata: stratum 1 servers have a reference clock (GPS, atomic), and strata 2–15 synchronise from servers above them. Stratum 16 means unsynchronised, and stratum 0 marks a "kiss-o'-death" control packet.
- Polling: intervals range from 16 seconds (poll exponent 4) to about 36 hours (17).
- Selection: clients compare several servers, discard "falsetickers", cluster the best "truechimers" and combine them.
- Kiss codes: a server can answer DENY or RSTR (stop using it) or RATE (poll less often).
Strata in practice
| Stratum | Example |
|---|---|
| 1 | A GPS-connected appliance, national time services |
| 2 | Public pool servers, ISP time servers |
| 3 | Internal servers synchronised from stratum 2 |
| 4+ | Clients of the internal servers |
Designing time distribution
| Practice | Reason |
|---|---|
| At least 3–4 sources per client | Falsetickers can be detected and voted out |
| Two or more internal NTP servers | Clients aren't dependent on the Internet |
| Internal servers sync from several external sources | A single bad source can't move the whole network |
| Allow UDP 123 only where needed | Avoid acting as an open NTP server (amplification) |
| NTS (Network Time Security) where available | Authenticated time |
Why two servers are worse than three
With two sources that disagree, a client can't tell which is right. With three or more, the majority identifies the outlier. That's the purpose of the RFC's selection algorithm.
host$ chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* ntp1.example.net 2 6 377 34 +112us[ +140us] +/- 8211us
^+ ntp2.example.net 2 6 377 35 -301us[ -273us] +/- 9012us
^+ 192.0.2.123 1 7 377 98 +498us[ +527us] +/- 14ms
^x 198.51.100.40 2 6 377 33 +2.1s[ +2.1s] +/- 11ms
host$ sudo tcpdump -ni eth0 -c 2 udp port 123
host$ ss -ulnp | grep ':123'
Reading the sources
Three sources agree within half a millisecond. The fourth is 2.1 seconds off and is marked x, a falseticker, so it's ignored. With only that source and one other, the client couldn't have known which one to trust. Reach 377 (octal) means the last eight polls all received an answer.
Documented example, not captured output.
How it works at runtime
NTP is part of Time & NTP → NTP. NTP is the network time synchronization protocol used to estimate offset and delay between clocks and discipline a client toward selected time sources while accounting for hierarchy, reachability and clock quality.
NTP/chrony disciplines the system clock from selected sources using offset, delay, jitter, reachability and clock-quality information.
Topic-specific state model. NTP is the network time synchronization protocol used to estimate offset and delay between clocks and discipline a client toward selected time sources while accounting for hierarchy, reachability and clock quality.
Interpretation rule. - NTP server configured ≠ resolved, reachable or selected for synchronization.
- UDP/123 reachable ≠ the peer is acceptable or the local clock is synchronized.
- One low offset sample ≠ stable clock discipline; reach history, jitter and frequency correction matter.
- Stratum number alone ≠ source quality or trustworthiness.
Quick reference
NTP concepts: stratum (distance from a reference clock), offset (difference to server), delay (round-trip), jitter, poll interval. Use at least four sources so a faulty one can be outvoted, or internal stratum-1/GPS servers plus public pools.
chronyc sources -v
chronyc sourcestats
ntpdate -q pool.ntp.org 2>/dev/null || chronyd -Q 'server pool.ntp.org iburst'
NTP uses UDP 123; NTS (Network Time Security, TCP 4460 for key exchange) authenticates time servers and is supported by chrony 4+.
Limits and how it fails
Primary failure point. NTP is confirmed only when an acceptable source is selected and the clock is demonstrably disciplined within workload requirements over time; configured peers or packet exchange alone are insufficient.
Model. A running NTP daemon can be unsynchronized, and a low stratum number does not guarantee a good local measurement.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Configure NTP servers/pools and access policy through the active implementation, and avoid running competing time daemons.
Distribution/platform context. NTP owns protocol/source-selection concepts independent of implementation. chrony owns chronyd/chronyc specifics; Time & NTP owns host-level clock outcome; Networking owns packet reachability.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Time & NTP → NTP. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://chrony-project.org/documentation.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
NTP operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for NTP.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | NTP is the network time synchronization protocol used to estimate offset and delay between clocks and discipline a client toward selected time sources while accounting for hierarchy, reachability and clock quality. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact symptom + clock/trigger time → identify authoritative scheduler or time daemon → read back effective configuration/runtime state → reproduce or observe the expected event/source measurement → correlate identity/environment/offset/status with logs → change one demonstrated cause → read back stable state → repeat original scheduled or time-sensitive workload + regression check. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | NTP config → DNS/network reachability → peer measurements → source selection → offset/frequency discipline → kernel system clock → consuming workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | NTP is proven only when an acceptable source is selected and the clock is demonstrably disciplined within workload requirements over time; configured peers or packet exchange alone are insufficient. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux scheduling/time evidence can establish this proof path: NTP config → DNS/network reachability → peer measurements → source selection → offset/frequency discipline → kernel system clock → consuming workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host, clock/timezone, scheduler or time-daemon instance, identity/environment, source, trigger/measurement interval or workload scope. NTP is proven only when an acceptable source is selected and the clock is demonstrably disciplined within workload requirements over time; configured peers or packet exchange alone are insufficient. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven scheduling/time boundary: preserve the original timing and execution/source context, capture the adjacent scheduler/process or clock/source state, change only the demonstrated cause, then repeat the original scheduled or time-sensitive workload and regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
NTP · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | NTP |
|---|---|
| Topic path | Time & NTP → NTP |
| Runtime state | NTP is the network time synchronization protocol used to estimate offset and delay between clocks and discipline a client toward selected time sources while accounting for hierarchy, reachability and clock quality. |
| Fast checks | - Identify active NTP implementation and authoritative config; enumerate configured sources/pools and their resolved addresses. - Inspect source reachability, selection state, stratum, offset, delay, jitter, leap and kernel synchronization indicators across multiple samples. - Check firewall/routing/DNS plus asymmetric delay or VM clock issues when sources are reachable but never selected/stable. - After a minimal correction, observe convergence/discipline long enough for requirements and verify the original authentication/scheduling/log-correlation workload. |
| Verification chain | NTP config → DNS/network reachability → peer measurements → source selection → offset/frequency discipline → kernel system clock → consuming workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | NTP is proven only when an acceptable source is selected and the clock is demonstrably disciplined within workload requirements over time; configured peers or packet exchange alone are insufficient. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |