Network Time Protocol
Network Time Protocol keeps computer clocks aligned by exchanging timestamps with time servers and estimating network delay. It helps systems agree on time despite clock drift and changing network conditions.
itNetworking | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
Network Time Protocol
Computer clocks do not stay correct by themselves. Their oscillators run slightly fast or slow. Temperature, hardware, load, and virtualization can change that error. A small difference becomes clock drift as time passes.
Network Time Protocol, or NTP, keeps system clocks aligned with Coordinated Universal Time, or UTC. It exchanges timestamps between clients and servers. The client estimates its clock offset and the network delay. It then lets a clock-discipline algorithm correct the system clock.
That correction matters far beyond the clock display. Logs from different hosts need a shared timeline. Certificates and authentication tokens have validity windows. Distributed jobs, monitoring, backups, billing, and incident response all depend on credible timestamps.
NTP gives you a disciplined estimate of UTC. It does not make a packet network delay-free. It does not prove that every event happened in timestamp order. It also cannot make an untrusted source truthful.
The mental model
Think of NTP as a continuing control loop:
reference clocks
|
primary time servers
|
secondary servers
|
clients
|
system clocks
measure -> select -> combine -> adjust -> repeat
A reference clock is an external source such as a radio or satellite receiver. A primary server connects directly to a reference clock and operates at stratum 1. A secondary server synchronizes through one or more upstream servers. Its stratum is one greater than the server it follows.
Stratum describes distance in the synchronization hierarchy. It is not a universal quality score. A lower stratum does not guarantee a better result for your client. Network path quality, source stability, and the implementation's measurements still matter.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://www.rfc-editor.org/info/rfc5905
Supports
- NTPv4 purpose, architecture, modes, hierarchy, associations, and UTC synchronization goal
- Primary and secondary servers, reference clocks, stratum levels, and unsynchronized state
- UDP port 123, polling, packet fields, leap indicator, root delay, and root dispersion
- Four-timestamp client-server exchange and the delay and offset formulas
- Filtering, intersection, clustering, source selection, combining, and clock-discipline behavior
- Clock step, slew, frequency correction, drift, jitter, and path-asymmetry limits
- NTP tolerance of packet loss and the timing problems introduced by reliable retransmission
- https://www.rfc-editor.org/info/rfc8633
Supports
- Operational recommendation for at least four independent and diverse time sources
- Source maintenance, monitoring, public-pool use, control-query restrictions, and leaf-client exposure
- Leap-second handling and prohibition on mixing smeared and non-smeared sources
- Risks in unauthenticated NTP, limits of authentication against delay attacks, and rejection of Autokey
- Ingress and egress filtering, implementation updates, rate response, and large-correction safeguards
- Vendor requirement to use public servers only with permission
- https://www.rfc-editor.org/info/rfc8915
Supports
- NTS architecture for NTP client-server modes
- TLS-based key establishment, cookies, keys, and authenticated NTP extension fields
- Server identity, packet authentication, replay prevention, request-response consistency, and non-amplification goals
- NTS limits for delay attacks and the distinction between authenticated identity and correct time
- https://www.iana.org/assignments/ntp-parameters/ntp-parameters.xhtml
Supports
- Current NTP registries for reference identifiers, extension fields, Kiss-o'-Death codes, and defining RFCs
- https://www.ntppool.org/en/
Supports
- NTP Pool as a DNS-distributed cluster of volunteer time servers
- Public service purpose, operating model, and project ownership
- https://www.ntppool.org/en/use.html
Supports
- Pool zone selection, client use, changing server addresses, and vendor guidance
- https://www.ntp.org/documentation/4.2.8-series/ntpq/
Supports
- Learner use of ntpq to inspect peers, associations, status, packet variables, and system variables
- https://github.com/sindresorhus/awesome
Supports
- Discovery of the Awesome Sysadmin list from the canonical Awesome index
- https://github.com/awesome-foss/awesome-sysadmin#time-servers
Supports
- Curated Time Servers category and inclusion of Chrony, NTPsec, and OpenNTPD
- Category descriptions for NTP, PTP, and Roughtime implementations
- https://chrony-project.org/
Supports
- Chrony as an NTP implementation for system-clock synchronization
- Synchronization from NTP servers and reference clocks
- Operation as an NTPv4 server or peer
- https://chrony-project.org/documentation.html
Supports
- Availability of configuration, daemon, command-line monitoring, installation, examples, and FAQ documentation
- https://docs.ntpsec.org/latest/
Supports
- NTPsec as an RFC 5905 implementation derived from NTP Classic
- Client and server use, configuration manuals, monitoring tools, and standards material
- https://docs.ntpsec.org/latest/ntpsec.html
Supports
- NTPsec security-hardening focus and removal of vulnerable or obsolete legacy features
- https://www.openntpd.org/
Supports
- OpenNTPD as an OpenBSD NTP implementation
- Synchronizing the local clock from remote NTP servers
- Serving the local clock to downstream NTP clients
- https://www.openntpd.org/manual.html
Supports
- OpenNTPD manual pages for daemon operation, configuration, and status queries
