Understanding and using the Network Time Protocol (A first try on a non-technical Mini-HOWTO and FAQ on NTP)
Last update: 2006-11-21
About this Document
1.2 Why is this Document named FAQ and HOWTO?
1.3 Where is the source of this document?
1.4 Why can’t I find information about xyz in this FAQ?
1.5 Where should a new Entry be put?
1.6 Why should I contribute?
1.7 How can I contribute?
1.8 I contributed to this FAQ, but my name is not mentioned anywhere. What’s wrong?
1.9 Why are Graphics stored in PNG Format?
How do Computer Clocks work?
3.1 Bits and Registers
3.2 Making Time go on
3.3 Clock Quality
3.3.1 Frequency Error
220.127.116.11 How bad is a Frequency Error of 500 PPM?
18.104.22.168 What is the Frequency Error of a good Clock?
What is NTP?
4.1.1 What is NTP?
4.1.2 What is SNTP?
4.1.3 Why should Time be synchronized?
4.1.4 What are the basic features of NTP?
4.1.5 Which Operating Systems are supported?
4.1.6 How many NTP servers are available in the Internet?
4.1.7 Which version of NTP should I use?
4.1.8 What’s the difference between xntp and ntp?
4.3. Implementations and Platforms
4.3.1 Official Providers
4.3.2 UNIX Systems
4.3.3 Microsoft Windows
How does it work?
5.1 Basic Concepts
5.1.1 Time References
22.214.171.124 What is a reference clock?
126.96.36.199 How will NTP use a reference clock?
188.8.131.52 How will NTP know about Time Sources?
184.108.40.206 What happens if the Reference Time changes?
220.127.116.11 What is a stratum 1 Server?
5.1.2 Time Exchange
18.104.22.168 How is Time synchronized?
22.214.171.124 Which Network Protocols are used by NTP?
126.96.36.199 How is Time encoded in NTP?
188.8.131.52 When are the Servers polled?
184.108.40.206 How accurate will my Clock be?
220.127.116.11 How frequently will the System Clock be updated?
18.104.22.168 How frequently are Correction Values updated?
22.214.171.124 What is the Limit for the Number of Clients?
126.96.36.199 What is the stratum?
188.8.131.52 How are Synchronization Loops avoided?
184.108.40.206 What is the allowed range for minpoll and maxpoll?
220.127.116.11 What is the best polling Interval?
5.1.6 Operating System Clock Interface
18.104.22.168 How will NTP discipline my Clock?
5.2. The Kernel Discipline
5.2.1 Basic Functionality
22.214.171.124 What is special about the Kernel Clock?
126.96.36.199 Does my Operating System have the Kernel Discipline?
188.8.131.52 How can I verify the Kernel Discipline?
5.2.3 PPS Processing
184.108.40.206 What is PPS Processing?
220.127.116.11 How is PPS Processing related to the Kernel Discipline?
18.104.22.168 What does hardpps() do?
5.3. NTP in real Life
5.3.1 What if I write my own SNTP Server?
5.3.2 Why should I have more than one clock?
5.3.3 Does the reference time depend on all configured servers, or is it based on which ever responds first?
5.3.4 What happens during a Leap Second?
5.4.1 What is Encryption used for in NTP?
22.214.171.124 How is Authenticity verified?
126.96.36.199 Where are authenticated Messages used in NTP?
188.8.131.52 How is Performance affected by Encryption?
5.4.2 The Basics of Autokey
184.108.40.206 Authentic and Proventic
220.127.116.11 Secure Group and Trusted Host
18.104.22.168 Identity Schemes
22.214.171.124 Proventic Trail
126.96.36.199 Session Keys
6.1. Basic Configuration
6.1.1 Can’t I just run ntpdate?
6.1.2 Recommended Minimum
188.8.131.52 What is the minimum configuration?
184.108.40.206 Is the minimum configuration a typical one?
220.127.116.11 What is the correct Pseudo IP Address for my reference clock?
18.104.22.168 What is a drift file?
22.214.171.124 Should I use IP addresses or host names?
6.1.3 Running an isolated Network
126.96.36.199 Can I use my system clock as reference clock?
188.8.131.52 Can I avoid manual time adjustments in a network without reference clock?
6.1.4 Recommended Goodies
184.108.40.206 How can I configure the amount of logging information?
220.127.116.11 How can I speed up initial Synchronization?
18.104.22.168 How do I configure remote administration?
22.214.171.124 How do I use authentication keys?
126.96.36.199 What are all the different Keys used for?
188.8.131.52 How do I use autokey?
6.1.5 Miscellaneous Hints
184.108.40.206 What is the preferred etiquette when synchronizing to a public server?
220.127.116.11 Where can I find public Time Servers?
6.2. Advanced Configuration
6.2.1 Server Selection
18.104.22.168 What is the rule of thumb for number of servers to synchronize to?
22.214.171.124 Should the servers be a mix of primary and secondary servers?
126.96.36.199 How should I provide NTP services for a huge network?
188.8.131.52 Why Authentication?
184.108.40.206 How is Authentication applied?
220.127.116.11 How do I create a key?
18.104.22.168 How does Authentication work?
22.214.171.124 Can I add Authentication without restarting ntpd?
126.96.36.199 How do I use Public-Key Authentication (autokey)?
6.2.3 Broadcasting, Multicasting, and Manycasting
188.8.131.52 How do I configure a Broadcast Server?
184.108.40.206 How do I configure a Broadcast Client?
220.127.116.11 Why doesn’t Broadcasting work with LCL?
18.104.22.168 How do I configure Multicast Servers and Clients?
22.214.171.124 What is Manycasting?
6.2.4. PPS Synchronization
126.96.36.199 Which components are required to use PPS synchronization?
188.8.131.52 What changes are required in ntp.conf?
184.108.40.206 How do I verify that everything is working?
220.127.116.11 Special Drivers
18.104.22.168.1 What is a PPS peer?
22.214.171.124.2 How do I use PPS with the Motorola Oncore driver?
126.96.36.199.3 How do I use PPS with the NMEA driver?
188.8.131.52 What is the PPS API?
184.108.40.206 What is the shortest Width for a Pulse connected to the DCD Pin of an RS-232 Interface?
6.2.5 Automatic Configuration
220.127.116.11 How can I define the address of an NTP server in a BOOTP reply?
18.104.22.168 How do I use information about NTP servers given in a BOOTP reply?
6.2.6 Offering Time Service
22.214.171.124 Is there any way to configure ntpd to attach to a specific Interface?
126.96.36.199 Should Access be restricted?
188.8.131.52 What should be done before announcing public NTP service?
6.3. Various Tricks
6.3.1 Mixing Time Protocols
6.3.2 Avoiding Time Steps
6.3.3 Using the Echo Feature in PPS API
6.4.1 The Kernel PLL
184.108.40.206 How many different kernel models and implementations exist?
220.127.116.11 What’s new in each Version?
18.104.22.168 Are the individual kernel models compatible?
22.214.171.124 Is the Linux implementation different?
7.1 What is LCL, the Local Clock?
7.2 GPS Receivers
7.2.1 What should I know about various GPS Receivers?
7.2.2 What are PDOP, TDOP, and GDOP?
7.2.3 What is NMEA?
7.2.4 What is TSIP?
7.3 DCF77 Receivers
7.3.1 What should I know about DCF77 Receivers?
7.3.2 What can make my DCF77 Receiver fail?
7.4 Other Receivers
7.4.1 What can make my MSF Receiver fail?
7.4.2 How can I find a low-cost Receiver for Low-Frequency Transmissions?
7.5.1 Where can I find a reference clock for NTP?
8.1.1 How do I confirm my NTP server is working fine?
8.1.2 How do I use peerstats and loopstats?
8.1.3 How can I see the Time Difference between Client and Server?
8.1.4 What does 257 mean as value for reach?
8.1.5 How do I use statistics files?
8.2. General Issues
8.2.1 Starting, running, querying
126.96.36.199 How can I check that ntpd is up and running?
188.8.131.52 Why does ntpd only run for about 10 to 20 minutes??
8.2.2 Cabling and Interfacing
184.108.40.206 Why does my Serial Interface hang when I connect a PPS Signal to DCD?
220.127.116.11 Why is the PPS API only detecting one Edge?
8.2.3 Exchanging Time
18.104.22.168 Is a remote server providing time?
22.214.171.124 My server is up and running, but it is unusable for clients
126.96.36.199 No time received when using autokey
8.2.5 Time Errors
188.8.131.52 Why does my server change time references quite frequently?
184.108.40.206 My server periodically loses synchronization
220.127.116.11 Why does my system step several times a day?
18.104.22.168 How do I set the correct value for tick?
22.214.171.124 How do I set the precision?
126.96.36.199 ntpd periodically opens a dial-out connection. Can I avoid that?
188.8.131.52 Any more Hints?
8.2.7 Errors and Warnings
184.108.40.206 ntpq: read: connection refused
220.127.116.11 127.0.0.1: timed out, nothing received, Request timed out
18.104.22.168 ntpdate: no server suitable for synchronization found
22.214.171.124 configure: keyword “precision” unknown, line ignored
126.96.36.199 Previous time adjustment didn’t complete
188.8.131.52 sendto: Overlapped I/O operation is in progress.
8.3. Troubleshooting Specific Products
8.3.1 PC Hardware
184.108.40.206 How accurate is the CMOS clock?
220.127.116.11 How can I set the CMOS clock?
18.104.22.168 How can I read or write the CMOS clock?
22.214.171.124 How can SMM affect Interrupt Processing?
126.96.36.199 What does set_rtc_mmss: can’t update from 54 to 5 mean?
188.8.131.52 Why does my Linux system lose several milliseconds every once in a while.
8.3.4 Serial Port
184.108.40.206 Do Multiport Serial Cards cause Trouble?
220.127.116.11 Why does my DCF77 Receiver not get Power from the serial Port?
8.3.5 Oncore Compatibles
18.104.22.168 Will the M12 work with the Oncore driver?
22.214.171.124 Why is the UT+ reporting clk_noreply?
126.96.36.199 What is dosyncdr?
188.8.131.52 What causes occasional 2s Time Steps?
8.3.7 Trimble Clocks
184.108.40.206 Only one Edge of my Trimble Acutime’s PPS Pulse is detected
8.4. Reporting Bugs
8.4.1 When should I report a Problem?
8.4.2 What should I report?
Background and Related Information
9.1.1 What is Mills-speak?
9.1.2 How can I convert a date to NTP format?
9.1.3 How can I convert an NTP Timestamp to UNIX Time?
9.1.4 Where can I find more Information?
9.2.1 Selective Availability revisited
This document tries to explain the most basic features of NTP, and to answer many frequently asked questions. The intention is to help the average user to get a quick start with the official implementation of NTP. Technical issues and mathematics are avoided where possible. Instead the most common questions are tried to be answered, enabling everybody to get a working configuration.
with this copyright notice:
Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Ulrich Windl, et al. (see credits)
The material in this document is covered by the respective contributor’s copyright. © Copyright 1999 - 2005, by the contributors and editors of this document. For details see the list of editors and authors.
All editors and contributors (non-exclusively) grant a perpetual, irrevocable, and royalty free license to distribute this document under the terms of the General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
If you don’t already have the GNU General Public License at hand, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
It is now maintained by Network Time Foundation. Contributions to update the material are most appreciated and contributors will continue to be added to the credits.
This section tries to answer questions about the document itself. This document is intended for beginners as well as advanced users that are looking for advice. However, basic skills in system administration are required to enjoy this tour. True experts on the subject will probably prefer the original documentation that comes with the software, or make corrections where it is wrong.
The impatient may want to go directly to Section 2 where fundamentals of timekeeping are discussed. Section 3 introduces clocks that are implemented using computers. If you are reading sequentially, you should be ready for the section that presents NTP, Section 4.
At that point focus moves from a more theoretical treatment of the subject to practical aspects, starting with Section 5. Then Section 6 moves into configuration of the NTP software. Section 7 will talk about reference clocks.
Real life is talked about in Section 8 where procedures, tips, and tricks for troubleshooting are presented. For the curious, Section 9 provides further information and references. Finally, there is a glossary of terms.
This document tries to answer frequently asked questions (FAQs) that can not (at least virtually) be answered easily from the standard documentation.
In addition to just answering user questions, this document also tries to give a gentle introduction and guidelines to the newcomer. The authors believe that it’s better to use NTP correctly right from the start rather than fixing all the problems after they occur.
“Gentle” means “not too technical” and “not too theoretical”. However, some basic non-trivial understanding of real life is required at several points, so please accept these deviations from the goal.
Unless it simply has not been written yet, there may be other reasons:
The answer to this question is quite delicate! The guidelines are probably these:
In “the good old times” the Internet was a valuable source of information, and people were happy to share their knowledge. These days, however, people think of E-Commerce, how to make money.
This FAQ was written not to make money, but to have a reference to refer to and to provide information to more people. If you have solved some NTP problem that may be of interest to other people, please share your experience.
Contributions are very much appreciated. You can:
Probably the fault of the editor. Maybe he thought you don’t want to be listed, or simply forgot. Section 1.10 shows the names the editor was aware of.
The popular GIF format supported by many browsers relies on a compression algorithm that is patented, and the owner of the patent wants to receive money from everyone making GIF files. PNG (Portable Network Graphics) uses a different algorithm for compression and does not require payment.
If you contributed to this FAQ, and you could not find your name elsewhere, this is where it should be.
This is an alphabetical list of contributors:
Was this page helpful?
Glad to hear it!
Sorry to hear that.