Protocol Overview
There is no provision for peer discovery, acquisition, or authentication in NTP. Data integrity is provided by the IP and UDP checksums. No reachability, circuit-management, duplicate-detection or retransmission facilities are provided or necessary. The service can operate in a symmetric mode, in which servers and clients are indistinguishable yet maintain a small amount of state information, or in an unsymmetric mode in which servers need maintain no client state other than that contained in the client request. Moreover, only a single NTP message format is necessary, which simplifies implementation and can be used in a variety of solicited or unsolicited polling mechanisms.
In what may be the most common (unsymmetric) mode a client sends an NTP message to one or more servers and processes the replies as received. The server interchanges addresses and ports, fills in or overwrites certain fields in the message, recalculates the checksum and returns it immediately. Information included in the NTP message allows each client/server peer to determine the timekeeping characteristics of its other peers, including the expected accuracies of their clocks. Using this information each peer is able to select the best time from possibly several other clocks, update the local clock and estimate its accuracy.
It should be recognized that clock synchronization requires by its nature long periods and multiple comparisons in order to maintain accurate timekeeping. While only a few comparisons are usually adequate to maintain local time to within a second, primarily to protect against broken hardware or synchronization failure, periods of hours or days and tens or hundreds of comparisons are required to maintain local time to within a few tens of milliseconds. Fortunately, the frequency of comparisons can be quite small and almost always non-intrusive to normal network operations.