Application Layer Protocol · UDP Port 123
🕐

NTP Protocol

Network Time Protocol — synchronizes clocks across computer networks to within a few milliseconds of Coordinated Universal Time (UTC). Designed by David L. Mills, NTP is one of the oldest internet protocols still in active use.

123
UDP Port
±1 ms
LAN Accuracy
NTPv4
Current Version
16
Stratum Levels
📦
NTP Header Fields Click any field to expand its description and see bit-level details
NTP Packet Structure (48 bytes)
↙ Click a field row to inspect it
Row 1 — Bits 0–31
LI
2 bits Leap Indicator
📋 VN
3 bits Version Number
🔀 Mode
3 bits Mode
🏗️ Stratum
8 bits Stratum Level
Row 2 — Bits 32–63
🔁 Poll
8 bits Poll Interval
🎯 Precision
8 bits Clock Precision
📡 Root Delay
16 bits 32-bit total
Row 3 — Bits 64–95 (32 bits)
📊 Root Dispersion
Max error relative to primary reference 32 bits
Row 4 — Bits 96–127 (32 bits)
🔖 Reference ID
Reference clock identifier (ASCII or IP) 32 bits
Row 5–6 — Bits 128–191 (64 bits)
🕓 Reference Timestamp
When the system clock was last set or corrected 64 bits
Row 7–8 — Bits 192–255 (64 bits)
🚀 Originate Timestamp
Time request left the client (T1) 64 bits
Row 9–10 — Bits 256–319 (64 bits)
📥 Receive Timestamp
Time request arrived at the server (T2) 64 bits
Row 11–12 — Bits 320–383 (64 bits)
📤 Transmit Timestamp
Time reply left the server (T3) 64 bits

Values / Example
🔄
NTP Clock Synchronization How a client calculates offset and delay using four timestamps
💻
NTP Client
1
Request (T1 = Originate Timestamp)
Response (T2=Receive, T3=Transmit)
2
3
T4 = Client records arrival time
Offset = ((T2−T1)+(T3−T4)) / 2
4
5
Client adjusts local clock by offset
🛰️
NTP Server
(Stratum 1/2)
Client → Server
Server → Client / Calculation
🏗️
NTP Stratum Levels The hierarchy that determines clock accuracy and trust
0
Reference Clock (Stratum 0)
Highly accurate timekeeping devices — atomic clocks, GPS receivers, radio clocks. Not directly accessible on the network.
1
Primary Time Server (Stratum 1)
Directly connected to a Stratum 0 device. Highest accuracy NTP servers; the root of the time hierarchy.
2
Secondary Server (Stratum 2)
Synchronizes with Stratum 1 servers. These are the most commonly used public NTP servers (e.g., pool.ntp.org).
3
Tertiary Server (Stratum 3)
Syncs with Stratum 2. Common in enterprise networks as local time servers for end devices.
15
Maximum Stratum (15)
Highest valid stratum. Indicates increasing distance from the reference clock and lower accuracy.
16
Unsynchronized (Stratum 16)
A stratum of 16 means the server is unsynchronized and its time should not be trusted.
⚖️
NTP vs SNTP vs PTP Comparing time synchronization protocols
Feature 🕐 NTP ⚡ SNTP 🎯 PTP (IEEE 1588)
Full Name Network Time Protocol Simple NTP Precision Time Protocol
Accuracy ±1–50 ms (LAN) ±100 ms typical Sub-microsecond
Protocol UDP Port 123 UDP Port 123 UDP / Ethernet (hardware)
Complexity Moderate Low / Simple High
Use Case General network time sync Embedded / IoT devices Financial, telecom, industrial
Authentication Symmetric key / NTS None typically Optional
DDoS Risk Monlist amplification Lower risk Not typically
Stratum Hierarchy Full (0–15) Subset Master/Slave model
🧠
Knowledge Check Quiz Test your understanding of NTP and time synchronization
NTP Protocol Quiz
Score: 0 / 0