中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

NTP: Network Time Protocol

Network Time Protocol (NTP) is a time synchronization system for computer clocks through the Internet network. It provides the mechanisms to synchronize time and coordinate time distribution in a large, diverse internet operating at rates from mundane to light wave. It uses a returnable time design in which a distributed sub network of time servers, operating in a self-organizing, hierarchical master-slave configuration, synchronize logical clocks within the sub network and to national time standards via wire or radio. The servers can also redistribute reference time via local routing algorithms and time daemons.

NTP is designed to produce three products: clock offset, roundtrip delay and dispersion, all of which are relative to a selected reference clock. Clock offset represents the amount to adjust the local clock to bring it into correspondence with the reference clock. Roundtrip delay provides the capability to launch a message to arrive at the reference clock at a specified time. Dispersion represents the maximum error of the local clock relative to the reference clock. Since most host time servers will synchronize via another peer time server, there are two components in each of these three products, those determined by the peer relative to the primary reference source of standard time and those measured by the host relative to the peer. Each of these components are maintained separately in the protocol in order to facilitate error control and management of the subnet itself. They provide not only precision measurements of offset and delay, but also definitive maximum error bounds, so that the user interface can determine not only the time, but the quality of the time as well.

NTP is evolved from the Time Protocol and the ICMP Timestamp message, but is specifically designed to maintain accuracy and robustness, even when used over typical Internet paths involving multiple gateways, highly dispersive delays and unreliable nets. NTP version 3 is the current version, which has superseded the previous versions and widely deployed.

Protocol Structure

2 5 8 16 24 32 bits
LI VN Mode Stratum Poll Precision
Root Delay
Root Dispersion
Reference Identifier
Reference timestamp (64)
Originate Timestamp (64)
Receive Timestamp (64)
Transmit Timestamp (64)
Key Identifier (optional) (32)
Message digest (optional) (128)
  • LI - Leap Indicator warning of impending leap-second to be inserted at the end of the last day of the current month.
  • VN - Version number indicating the version number.
  • Mode - The mode: This field can contain the following values:
    0 Reserved.
    1 Symmetric active.
    3 Client.
    4 Server.
    5 Broadcast.
    6 NTP control message.
  • Stratum - An integer identifying the stratum level of the local clock.
  • Poll - Signed integer indicating the maximum interval between successive messages, in seconds to the nearest power of 2.
  • Precision - Signed integer indicating the precision of the local clock, in seconds to the nearest power of 2.
  • Root Delay: signed fixed-point number indicating the total roundtrip delay to the primary reference source, in seconds with fraction point between bits 15 and 16.
  • Root Dispersion: Unsigned fixed-point number indicating the nominal error relative to the primary reference source, in seconds with fraction point between bits 15 and 16.
  • Reference Identifier: Identifying the particular reference source.
  • Originate Timestamp: This is the time at which the request departed the client for the server, in 64-bit timestamp format.
  • Receive Timestamp: This is the time at which the request arrived at the server, in 64-bit timestamp format.
  • Transmit Timestamp: This is the time at which the reply departed the server for the client, in 64-bit timestamp format.
  • Authenticator (optional): When the NTP authentication scheme is implemented, the Key Identifier and Message Digest fields contain the message authentication code (MAC) information defined.

Related Terms: ICMP, SNTP

Sponsor Source: NTP is defined by IETF (http://www.ietf.org) RFC1305.

Reference: http://www.javvin.com/protocol/rfc1305.pdf: Network Time Protocol (Version 3) Specification, Implementation.

Reply

The content of this field is kept private and will not be shown publicly.
  • Use <!--pagebreak--> to create page breaks.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <!--pagebreak--> <img> <br> <table> <tr> <td> <tbody> <p>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.