NTP Release 4.2.8P3
Total Page:16
File Type:pdf, Size:1020Kb
NTP Release 4.2.8p3 September 07, 2015 CONTENTS 1 The Network Time Protocol (NTP) Distribution1 1.1 The Handbook..............................................1 1.2 Building and Installing NTP.......................................2 1.3 Resolving Problems...........................................2 1.4 Further Information...........................................2 2 Build and Install 3 2.1 Quick Start................................................3 2.2 Building and Installing the Distribution.................................4 2.3 Build Options...............................................5 2.4 Debugging Reference Clock Drivers...................................5 2.5 NTP Debugging Techniques.......................................6 2.6 Hints and Kinks............................................. 10 2.7 NTP Bug Reporting Procedures..................................... 10 3 Program Manual Pages 11 3.1 ntpd - Network Time Protocol (NTP) Daemon............................. 11 3.2 ntpq - standard NTP query program.................................. 14 3.3 ntpdc - special NTP query program.................................. 22 3.4 ntpdate - set the date and time via NTP................................ 28 3.5 ntp-wait - waits until ntpd is in synchronized state......................... 30 3.6 sntp - Simple Network Time Protocol (SNTP) Client......................... 30 3.7 ntptrace - trace a chain of NTP servers back to the primary source................. 33 3.8 tickadj - set time-related kernel variables.............................. 33 3.9 ntptime - read and set kernel time variables............................. 35 3.10 ntp-keygen - generate public and private keys............................ 35 3.11 ntpdsim - Network Time Protocol (NTP) simulator.......................... 40 3.12 ntpdsim - Network Time Protocol (NTP) Simulator......................... 41 4 Handbook Pages 45 4.1 NTP Version 4 Release Notes...................................... 45 4.2 Command Index............................................. 48 4.3 Access Control Support......................................... 50 4.4 Association Management........................................ 50 4.5 Authentication Support.......................................... 53 4.6 Performance Metrics........................................... 55 4.7 Rate Management and the Kiss-o’-Death Packet............................ 58 4.8 Reference Clock Support......................................... 60 5 Client and Server Configuration 63 5.1 Automatic Server Discovery Schemes.................................. 63 i 5.2 Server Commands and Options..................................... 66 5.3 Access Control Commands and Options................................. 69 5.4 Authentication Commands and Options................................. 71 5.5 Reference Clock Commands and Options................................ 72 5.6 Miscellaneous Commands and Options................................. 73 5.7 Monitoring Commands and Options................................... 78 6 Reference Clock Support 83 6.1 External Clock Discipline and the Local Clock Driver......................... 83 6.2 How to Write a Reference Clock Driver................................. 84 6.3 NTP PARSE clock data formats..................................... 87 6.4 How to build new PARSE clocks.................................... 93 7 Reference Clock Audio Drivers 97 7.1 Reference Clock Audio Drivers..................................... 97 7.2 IRIG Audio Decoder........................................... 99 7.3 Radio CHU Audio Demodulator/Decoder................................ 102 7.4 Radio WWV/H Audio Demodulator/Decoder.............................. 106 8 Miscellaneous Pages 115 8.1 Configuration File Definition (Advanced)................................ 115 8.2 Event Messages and Status Words.................................... 119 8.3 Kernel Model for Precision Timekeeping................................ 124 8.4 ntpd System Log Messages....................................... 124 8.5 PPSAPI Interface for Precision Time Signals.............................. 127 8.6 Pulse-Per-Second (PPS) Signal Interfacing............................... 128 8.7 Historical Notes on NTP Upgrades................................... 130 8.8 Copyright Notice............................................. 134 9 Special Topics 139 9.1 How NTP Works............................................. 139 9.2 Mitigation Rules and the prefer Keyword.............................. 141 9.3 Autokey Public-Key Authentication................................... 144 9.4 Orphan Mode............................................... 151 9.5 NTP Interleaved Modes......................................... 153 9.6 The Huff-n’-Puff Filter.......................................... 153 9.7 Clock Filter Algorithm.......................................... 154 9.8 Clock Select Algorithm......................................... 157 9.9 Clock Cluster Algorithm......................................... 158 9.10 Mitigation Rules and the prefer Keyword.............................. 160 9.11 Clock Discipline Algorithm....................................... 163 9.12 Poll Process............................................... 166 9.13 Clock State Machine........................................... 166 9.14 Leap Second Processing......................................... 168 10 Reference Clock Drivers 171 10.1 Undisciplined Local Clock........................................ 171 10.2 PSTI/Traconex 1020 WWV/WWVH Receiver............................. 172 10.3 Spectracom WWVB/GPS Receivers................................... 173 10.4 TrueTime GPS/GOES/OMEGA/WWV Receivers............................ 175 10.5 IRIG Audio Decoder........................................... 177 10.6 Radio CHU Audio Demodulator/Decoder................................ 180 10.7 Generic Reference Driver........................................ 184 10.8 Magnavox MX4200 GPS Receiver................................... 192 10.9 Austron 2200A/2201A GPS Receivers................................. 193 ii 10.10 Arbiter 1088A/B GPS Receiver..................................... 194 10.11 KSI/Odetics TPRO/S IRIG Interface................................... 196 10.12 bc635VME/bc350VXI Time and Frequency Processor......................... 197 10.13 NIST/USNO/PTB Modem Time Services................................ 198 10.14 Heath WWV/WWVH Receiver..................................... 200 10.15 Generic NMEA GPS Receiver...................................... 201 10.16 PPS Clock Discipline.......................................... 205 10.17 Hewlett Packard 58503A GPS Receiver and HP Z3801A........................ 207 10.18 Arcron MSF Receiver.......................................... 208 10.19 Shared Memory Driver.......................................... 213 10.20 Trimble Palisade and Thunderbolt Receivers.............................. 217 10.21 Motorola Oncore GPS receiver..................................... 228 10.22 Rockwell Jupiter GPS receiver...................................... 230 10.23 Chrono-log K-series WWVB receiver.................................. 231 10.24 Dumb Clock............................................... 231 10.25 Ultralink Clock.............................................. 232 10.26 Conrad parallel port radio clock..................................... 234 10.27 Radio WWV/H Audio Demodulator/Decoder.............................. 235 10.28 Forum Graphic GPS Dating station................................... 242 10.29 hopf Serial Line Receivers (6021 and kompatible)........................... 243 10.30 hopf PCI-Bus Receiver (6039 GPS/DCF77)............................... 245 10.31 JJY Receivers.............................................. 246 10.32 Zyfer GPStarplus Receiver........................................ 251 10.33 RIPE NCC interface for Trimble Palisade................................ 252 10.34 NeoClock4X - DCF77 / TDF serial line receiver............................ 254 10.35 Spectracom TSYNC PCI......................................... 255 10.36 GPSD NG client driver.......................................... 255 10.37 MX4200 Receiver Data Format..................................... 260 10.38 Motorola ONCORE - The Shared Memory Interface.......................... 267 10.39 European Automated Computer Time Services............................. 271 Index 273 iii iv CHAPTER ONE THE NETWORK TIME PROTOCOL (NTP) DISTRIBUTION Note: The NTP Version 4 software contained in this distribution is available without charge under the conditions set forth in the Copyright Notice. Important: It is very important that readers understand that the NTP document collection began 25 years ago and remains today a work in progress. It has evolved as new features were invented and old features retired. It has been widely copied, cached and morphed to other formats, including man pages, with varying loss of fidelity. However, these HTML pages are the ONLY authoritative and definitive reference. Readers should always use the collection that comes with the distribution they use. A copy of the online collection at www.ntp.org is normally included in the most recent snapshot, but might not agree with an earlier snapshot or release version. This distribution is an implementation of RFC 5905 “Network Time Protocol Version 4: Protocol and Algorithms Specification”. NTP is widely used to synchronize a computer to Internet time servers or other sources, such as a radio or satellite receiver or telephone modem service. It can also be used as a server for dependent