Author: Zongze Chen
Network Time Protocol (NTP)
The Network Time Protocol is a standard for delivering and synchronizing time from an authoritative source to multiple computers. The protocol can be used locally within an organization or publicly around the globe. The NTP includes a cluster of servers that are wired through the ethernet, from which NTP clients can fetch time.
The NTP servers are organized into a hierarchy called strata, which refers to the server’s distance from the authoritative time source in the network system. For example, in a global NTP network, atomic clocks are a common stratum 0 time source. Stratum 1 are the devices that can directly get time from the atomic clocks through GPS. Stratum 2 are servers that get time from stratum 1 devices, and so forth. NTP supports up to 15 strata. With each stratum going up, the latency and error in time also increase. NTP is only a protocol, and each organization can define and establish their own NTP network.
To synchronize time from an NTP server, the client must also speak NTP, which defines the data structure used to exchange time.
Precision Time Protocol (PTP)
PTP is also a protocol for time synchronization across a network. While NTP, invented in 1985 can provide synchronization with errors within milliseconds, some financial and scientific applications might require synchronization within billionth or even trillionth seconds. In 2002, PTP was created to privide even more precise synchronization.
The major difference between PTP and NTP is that PTP servers use hardware timestamps to avoid software latencies, for example, a dedicated precise oscillator that is disciplined to GPS. When two computers synchronize time across a network, they must calculate the latency between sending and receiving to offset the time error. The calculation is done based on the timestamp of send and receive. However, the timestamp produced by the computer program is prone to latency in the operating system itself. Therefore, to get a more precise timestamp, PTP introduces hardware timestamps to bypass the software latencies.
PTP servers are usually dedicated machines for time synchronization due to hardware requirements, which provides an extra layer of accuracy and reliability. PTP servers can also output NTP results and provide synchronization to NTP servers.
Global Positioning System Time (GPST)
GPST refers to the time synchronization system used to communicate with atomic clocks in satellites. The system is used in mostly three ways: to synchronize Coordinated Universal Time (UTC) with devices on Earth, send time to GPS devices to calculate geographic coordinates, and synchronize between atomic clocks. In an NTP system, stratum 1 devices will get time from GPST directly with antennas. However, the time in the satellite’s atomic clocks is not directly synced with UTC. Earth’s rotation is a bit slower than the atomic clocks, and therefore, around once every 1.5 years, the Earth’s rotation becomes 1 second slower than the UTC. People have to inject a leap second into UTC now and then to offset the Earth’s rotation speed. However, the leap seconds are not injected into GPST. The GPST does not slow down with UTC, and it is up to the specific receivers of GPST to decide how to use that time.
References
- GNSS System Times – TUALCOM (2023). Available at: https://www.tualcom.com/gnss-system-times/ (Accessed: 25 January 2025).
- Guide to GPS/GNSS Clock Synchronization – Safran – Navigation & Timing (no date). Available at: https://safran-navigation-timing.com/guide-to-gps-gnss-clock-synchronization/ (Accessed: 25 January 2025).
- How NTP Works (no date) NTP: Network Time Protocol. Available at: https://www.ntp.org/documentation/4.2.8-series/warp/ (Accessed: 25 January 2025).
- Network Timing Technology: NTP vs. PTP | Masterclock Industry Knowledge (no date). Available at: https://www.masterclock.com/network-timing-technology-ntp-vs-ptp.html (Accessed: 25 January 2025).
- pool.ntp.org: the internet cluster of ntp servers (no date). Available at: https://www.ntppool.org/en/ (Accessed: 25 January 2025).
- What’s a Leap Second? (no date). Available at: https://www.timeanddate.com/time/leapseconds.html (Accessed: 25 January 2025).