Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Network Time Protocol
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== NTP packet header format == {{APHD|start|title=NTP packet header format{{Ref RFC|5905}} (section 7.3)}} <!-- First 32 bits (four 8-bit fields): LI, VN, Mode, Stratum, Poll, Precision --> {{APHD|0 |field1=LI |bits1=2 |field2=VN |bits2=3 |field3=Mode |bits3=3 |field4=Stratum |bits4=8 |field5=Poll |bits5=8 |field6=Precision |bits6=8 }} <!-- Next three 32-bit fields: Root Delay, Root Dispersion, Reference ID --> {{APHD|4 |field1=Root Delay |bits1=32 }} {{APHD|8 |field1=Root Dispersion |bits1=32 }} {{APHD|12 |field1=Reference ID |bits1=32 }} <!-- Each of the next four 64-bit fields: Reference/Origin/Receive/Transmit Timestamps --> {{APHD|16 |field1=Reference Timestamp (64-bits) |bits1=64 }} {{APHD|24 |field1=Origin Timestamp (64-bits) |bits1=64 }} {{APHD|32 |field1=Receive Timestamp (64-bits) |bits1=64 }} {{APHD|40 |field1=Transmit Timestamp (64-bits) |bits1=64 }} <!-- Extension fields (variable length); each extension field is typically a multiple of 32 bits --> {{APHD|48 |field1=Optional: Extension Field(s) (n * 32 bits) |bits1=32 |background1=linen }} <!-- (If a MAC is present) Key Identifier (32 bits) + 128-bit digest --> {{APHD|52 |field1=Optional: Key Identifier (If a MAC is present) |bits1=32 |background1=linen }} {{APHD|56 |field1=Optional: Message Digest (dgst) (If a MAC is present) |bits1=128 |background1=linen }} {{APHD|end}} ;{{APHD|def|name=LI (Leap Indicator)|length=2 bits |text=Warning of leap second insertion or deletion: * 0 = no warning * 1 = last minute has 61 seconds * 2 = last minute has 59 seconds * 3 = unknown (clock unsynchronized)}} ;{{APHD|def|name=VN (Version Number)|length=3 bits |text=NTP version number, typically 4.}} ;{{APHD|def|name=Mode|length=3 bits |text=Association mode: * 0 = reserved * 1 = symmetric active * 2 = symmetric passive * 3 = client * 4 = server * 5 = broadcast * 6 = control * 7 = private}} ;{{APHD|def|name=Stratum|length=8 bits |text=Indicates the distance from the reference clock. * 0 = invalid * 1 = primary server * 2β15 = secondary * 16 = unsynchronized}} ;{{APHD|def|name=Poll|length=8 bits |text=Maximum interval between successive messages, in logβ(seconds). Typical range is 6 to 10.}} ;{{APHD|def|name=Precision|length=8 bits |text=Signed logβ(seconds) of system clock precision (e.g., β18 β 1 microsecond).}} ;{{APHD|def|name=Root Delay|length=32 bits |text=Total round-trip delay to the reference clock, in NTP short format.}} ;{{APHD|def|name=Root Dispersion|length=32 bits |text=Total dispersion to the reference clock, in NTP short format.}} ;{{APHD|def|name=Reference ID|length=32 bits |text=Identifies the specific server or reference clock; interpretation depends on Stratum.}} ;{{APHD|def|name=Reference Timestamp|length=64 bits |text=Time when the system clock was last set or corrected, in NTP timestamp format.}} ;{{APHD|def|name=Origin Timestamp (org)|length=64 bits |text=Time at the client when the request departed, in NTP timestamp format.}} ;{{APHD|def|name=Receive Timestamp (rec)|length=64 bits |text=Time at the server when the request arrived, in NTP timestamp format.}} ;{{APHD|def|name=Transmit Timestamp (xmt)|length=64 bits |text=Time at the server when the response left, in NTP timestamp format.}} ;{{APHD|def|name=Extension Field|length=variable |text=Optional field(s) for NTP extensions (see {{Ref RFC|5905}}, Section 7.5).}} ;{{APHD|def|name=Key Identifier|length=32 bits |text=Unsigned integer designating an MD5 key shared by the client and server.}} ;{{APHD|def|name=Message Digest (MD5)|length=128 bits |text=MD5 hash covering the packet header and extension fields, used for authentication.}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)