]> CyberLeo.Net >> Repos - FreeBSD/releng/10.3.git/blob - contrib/ntp/ntpd/ntp.conf.man.in
Fix multiple vulnerabilities in ntp. [SA-18:02.ntp]
[FreeBSD/releng/10.3.git] / contrib / ntp / ntpd / ntp.conf.man.in
1 .de1 NOP
2 .  it 1 an-trap
3 .  if \\n[.$] \,\\$*\/
4 ..
5 .ie t \
6 .ds B-Font [CB]
7 .ds I-Font [CI]
8 .ds R-Font [CR]
9 .el \
10 .ds B-Font B
11 .ds I-Font I
12 .ds R-Font R
13 .TH ntp.conf 5 "27 Feb 2018" "4.2.8p11" "File Formats"
14 .\"
15 .\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-LkaqTP/ag-XkaiSP)
16 .\"
17 .\" It has been AutoGen-ed February 27, 2018 at 05:14:22 PM by AutoGen 5.18.5
18 .\" From the definitions ntp.conf.def
19 .\" and the template file agman-cmd.tpl
20 .SH NAME
21 \f\*[B-Font]ntp.conf\fP
22 \- Network Time Protocol (NTP) daemon configuration file format
23 .SH SYNOPSIS
24 \f\*[B-Font]ntp.conf\fP
25 [\f\*[B-Font]\-\-option-name\f[]]
26 [\f\*[B-Font]\-\-option-name\f[] \f\*[I-Font]value\f[]]
27 .sp \n(Ppu
28 .ne 2
29
30 All arguments must be options.
31 .sp \n(Ppu
32 .ne 2
33
34 .SH DESCRIPTION
35 The
36 \f\*[B-Font]ntp.conf\fP
37 configuration file is read at initial startup by the
38 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
39 daemon in order to specify the synchronization sources,
40 modes and other related information.
41 Usually, it is installed in the
42 \fI/etc\f[]
43 directory,
44 but could be installed elsewhere
45 (see the daemon's
46 \f\*[B-Font]\-c\f[]
47 command line option).
48 .sp \n(Ppu
49 .ne 2
50
51 The file format is similar to other
52 UNIX
53 configuration files.
54 Comments begin with a
55 \[oq]#\[cq]
56 character and extend to the end of the line;
57 blank lines are ignored.
58 Configuration commands consist of an initial keyword
59 followed by a list of arguments,
60 some of which may be optional, separated by whitespace.
61 Commands may not be continued over multiple lines.
62 Arguments may be host names,
63 host addresses written in numeric, dotted-quad form,
64 integers, floating point numbers (when specifying times in seconds)
65 and text strings.
66 .sp \n(Ppu
67 .ne 2
68
69 The rest of this page describes the configuration and control options.
70 The
71 "Notes on Configuring NTP and Setting up an NTP Subnet"
72 page
73 (available as part of the HTML documentation
74 provided in
75 \fI/usr/share/doc/ntp\f[])
76 contains an extended discussion of these options.
77 In addition to the discussion of general
78 \fIConfiguration\f[] \fIOptions\f[],
79 there are sections describing the following supported functionality
80 and the options used to control it:
81 .IP \fB\(bu\fP 2
82 \fIAuthentication\f[] \fISupport\f[]
83 .IP \fB\(bu\fP 2
84 \fIMonitoring\f[] \fISupport\f[]
85 .IP \fB\(bu\fP 2
86 \fIAccess\f[] \fIControl\f[] \fISupport\f[]
87 .IP \fB\(bu\fP 2
88 \fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
89 .IP \fB\(bu\fP 2
90 \fIReference\f[] \fIClock\f[] \fISupport\f[]
91 .IP \fB\(bu\fP 2
92 \fIMiscellaneous\f[] \fIOptions\f[]
93 .PP
94 .sp \n(Ppu
95 .ne 2
96
97 Following these is a section describing
98 \fIMiscellaneous\f[] \fIOptions\f[].
99 While there is a rich set of options available,
100 the only required option is one or more
101 \f\*[B-Font]pool\f[],
102 \f\*[B-Font]server\f[],
103 \f\*[B-Font]peer\f[],
104 \f\*[B-Font]broadcast\f[]
105 or
106 \f\*[B-Font]manycastclient\f[]
107 commands.
108 .SH Configuration Support
109 Following is a description of the configuration commands in
110 NTPv4.
111 These commands have the same basic functions as in NTPv3 and
112 in some cases new functions and new arguments.
113 There are two
114 classes of commands, configuration commands that configure a
115 persistent association with a remote server or peer or reference
116 clock, and auxiliary commands that specify environmental variables
117 that control various related operations.
118 .SS Configuration Commands
119 The various modes are determined by the command keyword and the
120 type of the required IP address.
121 Addresses are classed by type as
122 (s) a remote server or peer (IPv4 class A, B and C), (b) the
123 broadcast address of a local interface, (m) a multicast address (IPv4
124 class D), or (r) a reference clock address (127.127.x.x).
125 Note that
126 only those options applicable to each command are listed below.
127 Use
128 of options not listed may not be caught as an error, but may result
129 in some weird and even destructive behavior.
130 .sp \n(Ppu
131 .ne 2
132
133 If the Basic Socket Interface Extensions for IPv6 (RFC-2553)
134 is detected, support for the IPv6 address family is generated
135 in addition to the default support of the IPv4 address family.
136 In a few cases, including the
137 \f\*[B-Font]reslist\f[]
138 billboard generated
139 by
140 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
141 or
142 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[],
143 IPv6 addresses are automatically generated.
144 IPv6 addresses can be identified by the presence of colons
145 \*[Lq]\&:\*[Rq]
146 in the address field.
147 IPv6 addresses can be used almost everywhere where
148 IPv4 addresses can be used,
149 with the exception of reference clock addresses,
150 which are always IPv4.
151 .sp \n(Ppu
152 .ne 2
153
154 Note that in contexts where a host name is expected, a
155 \f\*[B-Font]\-4\f[]
156 qualifier preceding
157 the host name forces DNS resolution to the IPv4 namespace,
158 while a
159 \f\*[B-Font]\-6\f[]
160 qualifier forces DNS resolution to the IPv6 namespace.
161 See IPv6 references for the
162 equivalent classes for that address family.
163 .TP 7
164 .NOP \f\*[B-Font]pool\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]]
165 .TP 7
166 .NOP \f\*[B-Font]server\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]burst\f[]] [\f\*[B-Font]iburst\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]]
167 .TP 7
168 .NOP \f\*[B-Font]peer\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]true\f[]] [\f\*[B-Font]xleave\f[]]
169 .TP 7
170 .NOP \f\*[B-Font]broadcast\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]] [\f\*[B-Font]xleave\f[]]
171 .TP 7
172 .NOP \f\*[B-Font]manycastclient\f[] \f\*[I-Font]address\f[] [\f\*[B-Font]key\f[] \f\*[I-Font]key\f[] \f\*[I-Font]\&|\f[] \f\*[B-Font]autokey\f[]] [\f\*[B-Font]version\f[] \f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]] [\f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]]
173 .PP
174 .sp \n(Ppu
175 .ne 2
176
177 These five commands specify the time server name or address to
178 be used and the mode in which to operate.
179 The
180 \f\*[I-Font]address\f[]
181 can be
182 either a DNS name or an IP address in dotted-quad notation.
183 Additional information on association behavior can be found in the
184 "Association Management"
185 page
186 (available as part of the HTML documentation
187 provided in
188 \fI/usr/share/doc/ntp\f[]).
189 .TP 7
190 .NOP \f\*[B-Font]pool\f[]
191 For type s addresses, this command mobilizes a persistent
192 client mode association with a number of remote servers.
193 In this mode the local clock can synchronized to the
194 remote server, but the remote server can never be synchronized to
195 the local clock.
196 .TP 7
197 .NOP \f\*[B-Font]server\f[]
198 For type s and r addresses, this command mobilizes a persistent
199 client mode association with the specified remote server or local
200 radio clock.
201 In this mode the local clock can synchronized to the
202 remote server, but the remote server can never be synchronized to
203 the local clock.
204 This command should
205 \fInot\f[]
206 be used for type
207 b or m addresses.
208 .TP 7
209 .NOP \f\*[B-Font]peer\f[]
210 For type s addresses (only), this command mobilizes a
211 persistent symmetric-active mode association with the specified
212 remote peer.
213 In this mode the local clock can be synchronized to
214 the remote peer or the remote peer can be synchronized to the local
215 clock.
216 This is useful in a network of servers where, depending on
217 various failure scenarios, either the local or remote peer may be
218 the better source of time.
219 This command should NOT be used for type
220 b, m or r addresses.
221 .TP 7
222 .NOP \f\*[B-Font]broadcast\f[]
223 For type b and m addresses (only), this
224 command mobilizes a persistent broadcast mode association.
225 Multiple
226 commands can be used to specify multiple local broadcast interfaces
227 (subnets) and/or multiple multicast groups.
228 Note that local
229 broadcast messages go only to the interface associated with the
230 subnet specified, but multicast messages go to all interfaces.
231 In broadcast mode the local server sends periodic broadcast
232 messages to a client population at the
233 \f\*[I-Font]address\f[]
234 specified, which is usually the broadcast address on (one of) the
235 local network(s) or a multicast address assigned to NTP.
236 The IANA
237 has assigned the multicast group address IPv4 224.0.1.1 and
238 IPv6 ff05::101 (site local) exclusively to
239 NTP, but other nonconflicting addresses can be used to contain the
240 messages within administrative boundaries.
241 Ordinarily, this
242 specification applies only to the local server operating as a
243 sender; for operation as a broadcast client, see the
244 \f\*[B-Font]broadcastclient\f[]
245 or
246 \f\*[B-Font]multicastclient\f[]
247 commands
248 below.
249 .TP 7
250 .NOP \f\*[B-Font]manycastclient\f[]
251 For type m addresses (only), this command mobilizes a
252 manycast client mode association for the multicast address
253 specified.
254 In this case a specific address must be supplied which
255 matches the address used on the
256 \f\*[B-Font]manycastserver\f[]
257 command for
258 the designated manycast servers.
259 The NTP multicast address
260 224.0.1.1 assigned by the IANA should NOT be used, unless specific
261 means are taken to avoid spraying large areas of the Internet with
262 these messages and causing a possibly massive implosion of replies
263 at the sender.
264 The
265 \f\*[B-Font]manycastserver\f[]
266 command specifies that the local server
267 is to operate in client mode with the remote servers that are
268 discovered as the result of broadcast/multicast messages.
269 The
270 client broadcasts a request message to the group address associated
271 with the specified
272 \f\*[I-Font]address\f[]
273 and specifically enabled
274 servers respond to these messages.
275 The client selects the servers
276 providing the best time and continues as with the
277 \f\*[B-Font]server\f[]
278 command.
279 The remaining servers are discarded as if never
280 heard.
281 .PP
282 .sp \n(Ppu
283 .ne 2
284
285 Options:
286 .TP 7
287 .NOP \f\*[B-Font]autokey\f[]
288 All packets sent to and received from the server or peer are to
289 include authentication fields encrypted using the autokey scheme
290 described in
291 \fIAuthentication\f[] \fIOptions\f[].
292 .TP 7
293 .NOP \f\*[B-Font]burst\f[]
294 when the server is reachable, send a burst of eight packets
295 instead of the usual one.
296 The packet spacing is normally 2 s;
297 however, the spacing between the first and second packets
298 can be changed with the
299 \f\*[B-Font]calldelay\f[]
300 command to allow
301 additional time for a modem or ISDN call to complete.
302 This is designed to improve timekeeping quality
303 with the
304 \f\*[B-Font]server\f[]
305 command and s addresses.
306 .TP 7
307 .NOP \f\*[B-Font]iburst\f[]
308 When the server is unreachable, send a burst of eight packets
309 instead of the usual one.
310 The packet spacing is normally 2 s;
311 however, the spacing between the first two packets can be
312 changed with the
313 \f\*[B-Font]calldelay\f[]
314 command to allow
315 additional time for a modem or ISDN call to complete.
316 This is designed to speed the initial synchronization
317 acquisition with the
318 \f\*[B-Font]server\f[]
319 command and s addresses and when
320 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
321 is started with the
322 \f\*[B-Font]\-q\f[]
323 option.
324 .TP 7
325 .NOP \f\*[B-Font]key\f[] \f\*[I-Font]key\f[]
326 All packets sent to and received from the server or peer are to
327 include authentication fields encrypted using the specified
328 \f\*[I-Font]key\f[]
329 identifier with values from 1 to 65534, inclusive.
330 The
331 default is to include no encryption field.
332 .TP 7
333 .NOP \f\*[B-Font]minpoll\f[] \f\*[I-Font]minpoll\f[]
334 .TP 7
335 .NOP \f\*[B-Font]maxpoll\f[] \f\*[I-Font]maxpoll\f[]
336 These options specify the minimum and maximum poll intervals
337 for NTP messages, as a power of 2 in seconds
338 The maximum poll
339 interval defaults to 10 (1,024 s), but can be increased by the
340 \f\*[B-Font]maxpoll\f[]
341 option to an upper limit of 17 (36.4 h).
342 The
343 minimum poll interval defaults to 6 (64 s), but can be decreased by
344 the
345 \f\*[B-Font]minpoll\f[]
346 option to a lower limit of 4 (16 s).
347 .TP 7
348 .NOP \f\*[B-Font]noselect\f[]
349 Marks the server as unused, except for display purposes.
350 The server is discarded by the selection algroithm.
351 .TP 7
352 .NOP \f\*[B-Font]preempt\f[]
353 Says the association can be preempted.
354 .TP 7
355 .NOP \f\*[B-Font]true\f[]
356 Marks the server as a truechimer.
357 Use this option only for testing.
358 .TP 7
359 .NOP \f\*[B-Font]prefer\f[]
360 Marks the server as preferred.
361 All other things being equal,
362 this host will be chosen for synchronization among a set of
363 correctly operating hosts.
364 See the
365 "Mitigation Rules and the prefer Keyword"
366 page
367 (available as part of the HTML documentation
368 provided in
369 \fI/usr/share/doc/ntp\f[])
370 for further information.
371 .TP 7
372 .NOP \f\*[B-Font]true\f[]
373 Forces the association to always survive the selection and clustering algorithms.
374 This option should almost certainly
375 \fIonly\f[]
376 be used while testing an association.
377 .TP 7
378 .NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]ttl\f[]
379 This option is used only with broadcast server and manycast
380 client modes.
381 It specifies the time-to-live
382 \f\*[I-Font]ttl\f[]
383 to
384 use on broadcast server and multicast server and the maximum
385 \f\*[I-Font]ttl\f[]
386 for the expanding ring search with manycast
387 client packets.
388 Selection of the proper value, which defaults to
389 127, is something of a black art and should be coordinated with the
390 network administrator.
391 .TP 7
392 .NOP \f\*[B-Font]version\f[] \f\*[I-Font]version\f[]
393 Specifies the version number to be used for outgoing NTP
394 packets.
395 Versions 1-4 are the choices, with version 4 the
396 default.
397 .TP 7
398 .NOP \f\*[B-Font]xleave\f[]
399 Valid in
400 \f\*[B-Font]peer\f[]
401 and
402 \f\*[B-Font]broadcast\f[]
403 modes only, this flag enables interleave mode.
404 .PP
405 .SS Auxiliary Commands
406 .TP 7
407 .NOP \f\*[B-Font]broadcastclient\f[]
408 This command enables reception of broadcast server messages to
409 any local interface (type b) address.
410 Upon receiving a message for
411 the first time, the broadcast client measures the nominal server
412 propagation delay using a brief client/server exchange with the
413 server, then enters the broadcast client mode, in which it
414 synchronizes to succeeding broadcast messages.
415 Note that, in order
416 to avoid accidental or malicious disruption in this mode, both the
417 server and client should operate using symmetric-key or public-key
418 authentication as described in
419 \fIAuthentication\f[] \fIOptions\f[].
420 .TP 7
421 .NOP \f\*[B-Font]manycastserver\f[] \f\*[I-Font]address\f[] \f\*[I-Font]...\f[]
422 This command enables reception of manycast client messages to
423 the multicast group address(es) (type m) specified.
424 At least one
425 address is required, but the NTP multicast address 224.0.1.1
426 assigned by the IANA should NOT be used, unless specific means are
427 taken to limit the span of the reply and avoid a possibly massive
428 implosion at the original sender.
429 Note that, in order to avoid
430 accidental or malicious disruption in this mode, both the server
431 and client should operate using symmetric-key or public-key
432 authentication as described in
433 \fIAuthentication\f[] \fIOptions\f[].
434 .TP 7
435 .NOP \f\*[B-Font]multicastclient\f[] \f\*[I-Font]address\f[] \f\*[I-Font]...\f[]
436 This command enables reception of multicast server messages to
437 the multicast group address(es) (type m) specified.
438 Upon receiving
439 a message for the first time, the multicast client measures the
440 nominal server propagation delay using a brief client/server
441 exchange with the server, then enters the broadcast client mode, in
442 which it synchronizes to succeeding multicast messages.
443 Note that,
444 in order to avoid accidental or malicious disruption in this mode,
445 both the server and client should operate using symmetric-key or
446 public-key authentication as described in
447 \fIAuthentication\f[] \fIOptions\f[].
448 .TP 7
449 .NOP \f\*[B-Font]mdnstries\f[] \f\*[I-Font]number\f[]
450 If we are participating in mDNS,
451 after we have synched for the first time
452 we attempt to register with the mDNS system.
453 If that registration attempt fails,
454 we try again at one minute intervals for up to
455 \f\*[B-Font]mdnstries\f[]
456 times.
457 After all,
458 \f\*[B-Font]ntpd\f[]
459 may be starting before mDNS.
460 The default value for
461 \f\*[B-Font]mdnstries\f[]
462 is 5.
463 .PP
464 .SH Authentication Support
465 Authentication support allows the NTP client to verify that the
466 server is in fact known and trusted and not an intruder intending
467 accidentally or on purpose to masquerade as that server.
468 The NTPv3
469 specification RFC-1305 defines a scheme which provides
470 cryptographic authentication of received NTP packets.
471 Originally,
472 this was done using the Data Encryption Standard (DES) algorithm
473 operating in Cipher Block Chaining (CBC) mode, commonly called
474 DES-CBC.
475 Subsequently, this was replaced by the RSA Message Digest
476 5 (MD5) algorithm using a private key, commonly called keyed-MD5.
477 Either algorithm computes a message digest, or one-way hash, which
478 can be used to verify the server has the correct private key and
479 key identifier.
480 .sp \n(Ppu
481 .ne 2
482
483 NTPv4 retains the NTPv3 scheme, properly described as symmetric key
484 cryptography and, in addition, provides a new Autokey scheme
485 based on public key cryptography.
486 Public key cryptography is generally considered more secure
487 than symmetric key cryptography, since the security is based
488 on a private value which is generated by each server and
489 never revealed.
490 With Autokey all key distribution and
491 management functions involve only public values, which
492 considerably simplifies key distribution and storage.
493 Public key management is based on X.509 certificates,
494 which can be provided by commercial services or
495 produced by utility programs in the OpenSSL software library
496 or the NTPv4 distribution.
497 .sp \n(Ppu
498 .ne 2
499
500 While the algorithms for symmetric key cryptography are
501 included in the NTPv4 distribution, public key cryptography
502 requires the OpenSSL software library to be installed
503 before building the NTP distribution.
504 Directions for doing that
505 are on the Building and Installing the Distribution page.
506 .sp \n(Ppu
507 .ne 2
508
509 Authentication is configured separately for each association
510 using the
511 \f\*[B-Font]key\f[]
512 or
513 \f\*[B-Font]autokey\f[]
514 subcommand on the
515 \f\*[B-Font]peer\f[],
516 \f\*[B-Font]server\f[],
517 \f\*[B-Font]broadcast\f[]
518 and
519 \f\*[B-Font]manycastclient\f[]
520 configuration commands as described in
521 \fIConfiguration\f[] \fIOptions\f[]
522 page.
523 The authentication
524 options described below specify the locations of the key files,
525 if other than default, which symmetric keys are trusted
526 and the interval between various operations, if other than default.
527 .sp \n(Ppu
528 .ne 2
529
530 Authentication is always enabled,
531 although ineffective if not configured as
532 described below.
533 If a NTP packet arrives
534 including a message authentication
535 code (MAC), it is accepted only if it
536 passes all cryptographic checks.
537 The
538 checks require correct key ID, key value
539 and message digest.
540 If the packet has
541 been modified in any way or replayed
542 by an intruder, it will fail one or more
543 of these checks and be discarded.
544 Furthermore, the Autokey scheme requires a
545 preliminary protocol exchange to obtain
546 the server certificate, verify its
547 credentials and initialize the protocol
548 .sp \n(Ppu
549 .ne 2
550
551 The
552 \f\*[B-Font]auth\f[]
553 flag controls whether new associations or
554 remote configuration commands require cryptographic authentication.
555 This flag can be set or reset by the
556 \f\*[B-Font]enable\f[]
557 and
558 \f\*[B-Font]disable\f[]
559 commands and also by remote
560 configuration commands sent by a
561 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
562 program running on
563 another machine.
564 If this flag is enabled, which is the default
565 case, new broadcast client and symmetric passive associations and
566 remote configuration commands must be cryptographically
567 authenticated using either symmetric key or public key cryptography.
568 If this
569 flag is disabled, these operations are effective
570 even if not cryptographic
571 authenticated.
572 It should be understood
573 that operating with the
574 \f\*[B-Font]auth\f[]
575 flag disabled invites a significant vulnerability
576 where a rogue hacker can
577 masquerade as a falseticker and seriously
578 disrupt system timekeeping.
579 It is
580 important to note that this flag has no purpose
581 other than to allow or disallow
582 a new association in response to new broadcast
583 and symmetric active messages
584 and remote configuration commands and, in particular,
585 the flag has no effect on
586 the authentication process itself.
587 .sp \n(Ppu
588 .ne 2
589
590 An attractive alternative where multicast support is available
591 is manycast mode, in which clients periodically troll
592 for servers as described in the
593 \fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
594 page.
595 Either symmetric key or public key
596 cryptographic authentication can be used in this mode.
597 The principle advantage
598 of manycast mode is that potential servers need not be
599 configured in advance,
600 since the client finds them during regular operation,
601 and the configuration
602 files for all clients can be identical.
603 .sp \n(Ppu
604 .ne 2
605
606 The security model and protocol schemes for
607 both symmetric key and public key
608 cryptography are summarized below;
609 further details are in the briefings, papers
610 and reports at the NTP project page linked from
611 \f[C]http://www.ntp.org/\f[].
612 .SS Symmetric-Key Cryptography
613 The original RFC-1305 specification allows any one of possibly
614 65,534 keys, each distinguished by a 32-bit key identifier, to
615 authenticate an association.
616 The servers and clients involved must
617 agree on the key and key identifier to
618 authenticate NTP packets.
619 Keys and
620 related information are specified in a key
621 file, usually called
622 \fIntp.keys\f[],
623 which must be distributed and stored using
624 secure means beyond the scope of the NTP protocol itself.
625 Besides the keys used
626 for ordinary NTP associations,
627 additional keys can be used as passwords for the
628 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
629 and
630 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
631 utility programs.
632 .sp \n(Ppu
633 .ne 2
634
635 When
636 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
637 is first started, it reads the key file specified in the
638 \f\*[B-Font]keys\f[]
639 configuration command and installs the keys
640 in the key cache.
641 However,
642 individual keys must be activated with the
643 \f\*[B-Font]trusted\f[]
644 command before use.
645 This
646 allows, for instance, the installation of possibly
647 several batches of keys and
648 then activating or deactivating each batch
649 remotely using
650 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[].
651 This also provides a revocation capability that can be used
652 if a key becomes compromised.
653 The
654 \f\*[B-Font]requestkey\f[]
655 command selects the key used as the password for the
656 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
657 utility, while the
658 \f\*[B-Font]controlkey\f[]
659 command selects the key used as the password for the
660 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
661 utility.
662 .SS Public Key Cryptography
663 NTPv4 supports the original NTPv3 symmetric key scheme
664 described in RFC-1305 and in addition the Autokey protocol,
665 which is based on public key cryptography.
666 The Autokey Version 2 protocol described on the Autokey Protocol
667 page verifies packet integrity using MD5 message digests
668 and verifies the source with digital signatures and any of several
669 digest/signature schemes.
670 Optional identity schemes described on the Identity Schemes
671 page and based on cryptographic challenge/response algorithms
672 are also available.
673 Using all of these schemes provides strong security against
674 replay with or without modification, spoofing, masquerade
675 and most forms of clogging attacks.
676 .\" .Pp
677 .\" The cryptographic means necessary for all Autokey operations
678 .\" is provided by the OpenSSL software library.
679 .\" This library is available from http://www.openssl.org/
680 .\" and can be installed using the procedures outlined
681 .\" in the Building and Installing the Distribution page.
682 .\" Once installed,
683 .\" the configure and build
684 .\" process automatically detects the library and links
685 .\" the library routines required.
686 .sp \n(Ppu
687 .ne 2
688
689 The Autokey protocol has several modes of operation
690 corresponding to the various NTP modes supported.
691 Most modes use a special cookie which can be
692 computed independently by the client and server,
693 but encrypted in transmission.
694 All modes use in addition a variant of the S-KEY scheme,
695 in which a pseudo-random key list is generated and used
696 in reverse order.
697 These schemes are described along with an executive summary,
698 current status, briefing slides and reading list on the
699 \fIAutonomous\f[] \fIAuthentication\f[]
700 page.
701 .sp \n(Ppu
702 .ne 2
703
704 The specific cryptographic environment used by Autokey servers
705 and clients is determined by a set of files
706 and soft links generated by the
707 \fCntp-keygen\f[]\fR(1ntpkeygenmdoc)\f[]
708 program.
709 This includes a required host key file,
710 required certificate file and optional sign key file,
711 leapsecond file and identity scheme files.
712 The
713 digest/signature scheme is specified in the X.509 certificate
714 along with the matching sign key.
715 There are several schemes
716 available in the OpenSSL software library, each identified
717 by a specific string such as
718 \f\*[B-Font]md5WithRSAEncryption\f[],
719 which stands for the MD5 message digest with RSA
720 encryption scheme.
721 The current NTP distribution supports
722 all the schemes in the OpenSSL library, including
723 those based on RSA and DSA digital signatures.
724 .sp \n(Ppu
725 .ne 2
726
727 NTP secure groups can be used to define cryptographic compartments
728 and security hierarchies.
729 It is important that every host
730 in the group be able to construct a certificate trail to one
731 or more trusted hosts in the same group.
732 Each group
733 host runs the Autokey protocol to obtain the certificates
734 for all hosts along the trail to one or more trusted hosts.
735 This requires the configuration file in all hosts to be
736 engineered so that, even under anticipated failure conditions,
737 the NTP subnet will form such that every group host can find
738 a trail to at least one trusted host.
739 .SS Naming and Addressing
740 It is important to note that Autokey does not use DNS to
741 resolve addresses, since DNS can't be completely trusted
742 until the name servers have synchronized clocks.
743 The cryptographic name used by Autokey to bind the host identity
744 credentials and cryptographic values must be independent
745 of interface, network and any other naming convention.
746 The name appears in the host certificate in either or both
747 the subject and issuer fields, so protection against
748 DNS compromise is essential.
749 .sp \n(Ppu
750 .ne 2
751
752 By convention, the name of an Autokey host is the name returned
753 by the Unix
754 \fCgethostname\f[]\fR(2)\f[]
755 system call or equivalent in other systems.
756 By the system design
757 model, there are no provisions to allow alternate names or aliases.
758 However, this is not to say that DNS aliases, different names
759 for each interface, etc., are constrained in any way.
760 .sp \n(Ppu
761 .ne 2
762
763 It is also important to note that Autokey verifies authenticity
764 using the host name, network address and public keys,
765 all of which are bound together by the protocol specifically
766 to deflect masquerade attacks.
767 For this reason Autokey
768 includes the source and destination IP addresses in message digest
769 computations and so the same addresses must be available
770 at both the server and client.
771 For this reason operation
772 with network address translation schemes is not possible.
773 This reflects the intended robust security model where government
774 and corporate NTP servers are operated outside firewall perimeters.
775 .SS Operation
776 A specific combination of authentication scheme (none,
777 symmetric key, public key) and identity scheme is called
778 a cryptotype, although not all combinations are compatible.
779 There may be management configurations where the clients,
780 servers and peers may not all support the same cryptotypes.
781 A secure NTPv4 subnet can be configured in many ways while
782 keeping in mind the principles explained above and
783 in this section.
784 Note however that some cryptotype
785 combinations may successfully interoperate with each other,
786 but may not represent good security practice.
787 .sp \n(Ppu
788 .ne 2
789
790 The cryptotype of an association is determined at the time
791 of mobilization, either at configuration time or some time
792 later when a message of appropriate cryptotype arrives.
793 When mobilized by a
794 \f\*[B-Font]server\f[]
795 or
796 \f\*[B-Font]peer\f[]
797 configuration command and no
798 \f\*[B-Font]key\f[]
799 or
800 \f\*[B-Font]autokey\f[]
801 subcommands are present, the association is not
802 authenticated; if the
803 \f\*[B-Font]key\f[]
804 subcommand is present, the association is authenticated
805 using the symmetric key ID specified; if the
806 \f\*[B-Font]autokey\f[]
807 subcommand is present, the association is authenticated
808 using Autokey.
809 .sp \n(Ppu
810 .ne 2
811
812 When multiple identity schemes are supported in the Autokey
813 protocol, the first message exchange determines which one is used.
814 The client request message contains bits corresponding
815 to which schemes it has available.
816 The server response message
817 contains bits corresponding to which schemes it has available.
818 Both server and client match the received bits with their own
819 and select a common scheme.
820 .sp \n(Ppu
821 .ne 2
822
823 Following the principle that time is a public value,
824 a server responds to any client packet that matches
825 its cryptotype capabilities.
826 Thus, a server receiving
827 an unauthenticated packet will respond with an unauthenticated
828 packet, while the same server receiving a packet of a cryptotype
829 it supports will respond with packets of that cryptotype.
830 However, unconfigured broadcast or manycast client
831 associations or symmetric passive associations will not be
832 mobilized unless the server supports a cryptotype compatible
833 with the first packet received.
834 By default, unauthenticated associations will not be mobilized
835 unless overridden in a decidedly dangerous way.
836 .sp \n(Ppu
837 .ne 2
838
839 Some examples may help to reduce confusion.
840 Client Alice has no specific cryptotype selected.
841 Server Bob has both a symmetric key file and minimal Autokey files.
842 Alice's unauthenticated messages arrive at Bob, who replies with
843 unauthenticated messages.
844 Cathy has a copy of Bob's symmetric
845 key file and has selected key ID 4 in messages to Bob.
846 Bob verifies the message with his key ID 4.
847 If it's the
848 same key and the message is verified, Bob sends Cathy a reply
849 authenticated with that key.
850 If verification fails,
851 Bob sends Cathy a thing called a crypto-NAK, which tells her
852 something broke.
853 She can see the evidence using the
854 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
855 program.
856 .sp \n(Ppu
857 .ne 2
858
859 Denise has rolled her own host key and certificate.
860 She also uses one of the identity schemes as Bob.
861 She sends the first Autokey message to Bob and they
862 both dance the protocol authentication and identity steps.
863 If all comes out okay, Denise and Bob continue as described above.
864 .sp \n(Ppu
865 .ne 2
866
867 It should be clear from the above that Bob can support
868 all the girls at the same time, as long as he has compatible
869 authentication and identity credentials.
870 Now, Bob can act just like the girls in his own choice of servers;
871 he can run multiple configured associations with multiple different
872 servers (or the same server, although that might not be useful).
873 But, wise security policy might preclude some cryptotype
874 combinations; for instance, running an identity scheme
875 with one server and no authentication with another might not be wise.
876 .SS Key Management
877 The cryptographic values used by the Autokey protocol are
878 incorporated as a set of files generated by the
879 \fCntp-keygen\f[]\fR(1ntpkeygenmdoc)\f[]
880 utility program, including symmetric key, host key and
881 public certificate files, as well as sign key, identity parameters
882 and leapseconds files.
883 Alternatively, host and sign keys and
884 certificate files can be generated by the OpenSSL utilities
885 and certificates can be imported from public certificate
886 authorities.
887 Note that symmetric keys are necessary for the
888 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
889 and
890 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
891 utility programs.
892 The remaining files are necessary only for the
893 Autokey protocol.
894 .sp \n(Ppu
895 .ne 2
896
897 Certificates imported from OpenSSL or public certificate
898 authorities have certian limitations.
899 The certificate should be in ASN.1 syntax, X.509 Version 3
900 format and encoded in PEM, which is the same format
901 used by OpenSSL.
902 The overall length of the certificate encoded
903 in ASN.1 must not exceed 1024 bytes.
904 The subject distinguished
905 name field (CN) is the fully qualified name of the host
906 on which it is used; the remaining subject fields are ignored.
907 The certificate extension fields must not contain either
908 a subject key identifier or a issuer key identifier field;
909 however, an extended key usage field for a trusted host must
910 contain the value
911 \f\*[B-Font]trustRoot\f[];.
912 Other extension fields are ignored.
913 .SS Authentication Commands
914 .TP 7
915 .NOP \f\*[B-Font]autokey\f[] [\f\*[I-Font]logsec\f[]]
916 Specifies the interval between regenerations of the session key
917 list used with the Autokey protocol.
918 Note that the size of the key
919 list for each association depends on this interval and the current
920 poll interval.
921 The default value is 12 (4096 s or about 1.1 hours).
922 For poll intervals above the specified interval, a session key list
923 with a single entry will be regenerated for every message
924 sent.
925 .TP 7
926 .NOP \f\*[B-Font]controlkey\f[] \f\*[I-Font]key\f[]
927 Specifies the key identifier to use with the
928 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
929 utility, which uses the standard
930 protocol defined in RFC-1305.
931 The
932 \f\*[I-Font]key\f[]
933 argument is
934 the key identifier for a trusted key, where the value can be in the
935 range 1 to 65,534, inclusive.
936 .TP 7
937 .NOP \f\*[B-Font]crypto\f[] [\f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]host\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gq\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]] [\f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]]
938 This command requires the OpenSSL library.
939 It activates public key
940 cryptography, selects the message digest and signature
941 encryption scheme and loads the required private and public
942 values described above.
943 If one or more files are left unspecified,
944 the default names are used as described above.
945 Unless the complete path and name of the file are specified, the
946 location of a file is relative to the keys directory specified
947 in the
948 \f\*[B-Font]keysdir\f[]
949 command or default
950 \fI/usr/local/etc\f[].
951 Following are the subcommands:
952 .RS
953 .TP 7
954 .NOP \f\*[B-Font]cert\f[] \f\*[I-Font]file\f[]
955 Specifies the location of the required host public certificate file.
956 This overrides the link
957 \fIntpkey_cert_\f[]\f\*[I-Font]hostname\f[]
958 in the keys directory.
959 .TP 7
960 .NOP \f\*[B-Font]gqpar\f[] \f\*[I-Font]file\f[]
961 Specifies the location of the optional GQ parameters file.
962 This
963 overrides the link
964 \fIntpkey_gq_\f[]\f\*[I-Font]hostname\f[]
965 in the keys directory.
966 .TP 7
967 .NOP \f\*[B-Font]host\f[] \f\*[I-Font]file\f[]
968 Specifies the location of the required host key file.
969 This overrides
970 the link
971 \fIntpkey_key_\f[]\f\*[I-Font]hostname\f[]
972 in the keys directory.
973 .TP 7
974 .NOP \f\*[B-Font]iffpar\f[] \f\*[I-Font]file\f[]
975 Specifies the location of the optional IFF parameters file.
976 This overrides the link
977 \fIntpkey_iff_\f[]\f\*[I-Font]hostname\f[]
978 in the keys directory.
979 .TP 7
980 .NOP \f\*[B-Font]leap\f[] \f\*[I-Font]file\f[]
981 Specifies the location of the optional leapsecond file.
982 This overrides the link
983 \fIntpkey_leap\f[]
984 in the keys directory.
985 .TP 7
986 .NOP \f\*[B-Font]mvpar\f[] \f\*[I-Font]file\f[]
987 Specifies the location of the optional MV parameters file.
988 This overrides the link
989 \fIntpkey_mv_\f[]\f\*[I-Font]hostname\f[]
990 in the keys directory.
991 .TP 7
992 .NOP \f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]
993 Specifies the password to decrypt files containing private keys and
994 identity parameters.
995 This is required only if these files have been
996 encrypted.
997 .TP 7
998 .NOP \f\*[B-Font]randfile\f[] \f\*[I-Font]file\f[]
999 Specifies the location of the random seed file used by the OpenSSL
1000 library.
1001 The defaults are described in the main text above.
1002 .TP 7
1003 .NOP \f\*[B-Font]sign\f[] \f\*[I-Font]file\f[]
1004 Specifies the location of the optional sign key file.
1005 This overrides
1006 the link
1007 \fIntpkey_sign_\f[]\f\*[I-Font]hostname\f[]
1008 in the keys directory.
1009 If this file is
1010 not found, the host key is also the sign key.
1011 .RE
1012 .TP 7
1013 .NOP \f\*[B-Font]keys\f[] \f\*[I-Font]keyfile\f[]
1014 Specifies the complete path and location of the MD5 key file
1015 containing the keys and key identifiers used by
1016 \fCntpd\f[]\fR(@NTPD_MS@)\f[],
1017 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1018 and
1019 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1020 when operating with symmetric key cryptography.
1021 This is the same operation as the
1022 \f\*[B-Font]\-k\f[]
1023 command line option.
1024 .TP 7
1025 .NOP \f\*[B-Font]keysdir\f[] \f\*[I-Font]path\f[]
1026 This command specifies the default directory path for
1027 cryptographic keys, parameters and certificates.
1028 The default is
1029 \fI/usr/local/etc/\f[].
1030 .TP 7
1031 .NOP \f\*[B-Font]requestkey\f[] \f\*[I-Font]key\f[]
1032 Specifies the key identifier to use with the
1033 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1034 utility program, which uses a
1035 proprietary protocol specific to this implementation of
1036 \fCntpd\f[]\fR(@NTPD_MS@)\f[].
1037 The
1038 \f\*[I-Font]key\f[]
1039 argument is a key identifier
1040 for the trusted key, where the value can be in the range 1 to
1041 65,534, inclusive.
1042 .TP 7
1043 .NOP \f\*[B-Font]revoke\f[] \f\*[I-Font]logsec\f[]
1044 Specifies the interval between re-randomization of certain
1045 cryptographic values used by the Autokey scheme, as a power of 2 in
1046 seconds.
1047 These values need to be updated frequently in order to
1048 deflect brute-force attacks on the algorithms of the scheme;
1049 however, updating some values is a relatively expensive operation.
1050 The default interval is 16 (65,536 s or about 18 hours).
1051 For poll
1052 intervals above the specified interval, the values will be updated
1053 for every message sent.
1054 .TP 7
1055 .NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]key\f[] \f\*[I-Font]...\f[]
1056 Specifies the key identifiers which are trusted for the
1057 purposes of authenticating peers with symmetric key cryptography,
1058 as well as keys used by the
1059 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1060 and
1061 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1062 programs.
1063 The authentication procedures require that both the local
1064 and remote servers share the same key and key identifier for this
1065 purpose, although different keys can be used with different
1066 servers.
1067 The
1068 \f\*[I-Font]key\f[]
1069 arguments are 32-bit unsigned
1070 integers with values from 1 to 65,534.
1071 .PP
1072 .SS Error Codes
1073 The following error codes are reported via the NTP control
1074 and monitoring protocol trap mechanism.
1075 .TP 7
1076 .NOP 101
1077 (bad field format or length)
1078 The packet has invalid version, length or format.
1079 .TP 7
1080 .NOP 102
1081 (bad timestamp)
1082 The packet timestamp is the same or older than the most recent received.
1083 This could be due to a replay or a server clock time step.
1084 .TP 7
1085 .NOP 103
1086 (bad filestamp)
1087 The packet filestamp is the same or older than the most recent received.
1088 This could be due to a replay or a key file generation error.
1089 .TP 7
1090 .NOP 104
1091 (bad or missing public key)
1092 The public key is missing, has incorrect format or is an unsupported type.
1093 .TP 7
1094 .NOP 105
1095 (unsupported digest type)
1096 The server requires an unsupported digest/signature scheme.
1097 .TP 7
1098 .NOP 106
1099 (mismatched digest types)
1100 Not used.
1101 .TP 7
1102 .NOP 107
1103 (bad signature length)
1104 The signature length does not match the current public key.
1105 .TP 7
1106 .NOP 108
1107 (signature not verified)
1108 The message fails the signature check.
1109 It could be bogus or signed by a
1110 different private key.
1111 .TP 7
1112 .NOP 109
1113 (certificate not verified)
1114 The certificate is invalid or signed with the wrong key.
1115 .TP 7
1116 .NOP 110
1117 (certificate not verified)
1118 The certificate is not yet valid or has expired or the signature could not
1119 be verified.
1120 .TP 7
1121 .NOP 111
1122 (bad or missing cookie)
1123 The cookie is missing, corrupted or bogus.
1124 .TP 7
1125 .NOP 112
1126 (bad or missing leapseconds table)
1127 The leapseconds table is missing, corrupted or bogus.
1128 .TP 7
1129 .NOP 113
1130 (bad or missing certificate)
1131 The certificate is missing, corrupted or bogus.
1132 .TP 7
1133 .NOP 114
1134 (bad or missing identity)
1135 The identity key is missing, corrupt or bogus.
1136 .PP
1137 .SH Monitoring Support
1138 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
1139 includes a comprehensive monitoring facility suitable
1140 for continuous, long term recording of server and client
1141 timekeeping performance.
1142 See the
1143 \f\*[B-Font]statistics\f[]
1144 command below
1145 for a listing and example of each type of statistics currently
1146 supported.
1147 Statistic files are managed using file generation sets
1148 and scripts in the
1149 \fI./scripts\f[]
1150 directory of the source code distribution.
1151 Using
1152 these facilities and
1153 UNIX
1154 \fCcron\f[]\fR(8)\f[]
1155 jobs, the data can be
1156 automatically summarized and archived for retrospective analysis.
1157 .SS Monitoring Commands
1158 .TP 7
1159 .NOP \f\*[B-Font]statistics\f[] \f\*[I-Font]name\f[] \f\*[I-Font]...\f[]
1160 Enables writing of statistics records.
1161 Currently, eight kinds of
1162 \f\*[I-Font]name\f[]
1163 statistics are supported.
1164 .RS
1165 .TP 7
1166 .NOP \f\*[B-Font]clockstats\f[]
1167 Enables recording of clock driver statistics information.
1168 Each update
1169 received from a clock driver appends a line of the following form to
1170 the file generation set named
1171 \f\*[B-Font]clockstats\f[]:
1172 .br
1173 .in +4
1174 .nf
1175 49213 525.624 127.127.4.1 93 226 00:08:29.606 D
1176 .in -4
1177 .fi
1178 .sp \n(Ppu
1179 .ne 2
1180
1181 The first two fields show the date (Modified Julian Day) and time
1182 (seconds and fraction past UTC midnight).
1183 The next field shows the
1184 clock address in dotted-quad notation.
1185 The final field shows the last
1186 timecode received from the clock in decoded ASCII format, where
1187 meaningful.
1188 In some clock drivers a good deal of additional information
1189 can be gathered and displayed as well.
1190 See information specific to each
1191 clock for further details.
1192 .TP 7
1193 .NOP \f\*[B-Font]cryptostats\f[]
1194 This option requires the OpenSSL cryptographic software library.
1195 It
1196 enables recording of cryptographic public key protocol information.
1197 Each message received by the protocol module appends a line of the
1198 following form to the file generation set named
1199 \f\*[B-Font]cryptostats\f[]:
1200 .br
1201 .in +4
1202 .nf
1203 49213 525.624 127.127.4.1 message
1204 .in -4
1205 .fi
1206 .sp \n(Ppu
1207 .ne 2
1208
1209 The first two fields show the date (Modified Julian Day) and time
1210 (seconds and fraction past UTC midnight).
1211 The next field shows the peer
1212 address in dotted-quad notation, The final message field includes the
1213 message type and certain ancillary information.
1214 See the
1215 \fIAuthentication\f[] \fIOptions\f[]
1216 section for further information.
1217 .TP 7
1218 .NOP \f\*[B-Font]loopstats\f[]
1219 Enables recording of loop filter statistics information.
1220 Each
1221 update of the local clock outputs a line of the following form to
1222 the file generation set named
1223 \f\*[B-Font]loopstats\f[]:
1224 .br
1225 .in +4
1226 .nf
1227 50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
1228 .in -4
1229 .fi
1230 .sp \n(Ppu
1231 .ne 2
1232
1233 The first two fields show the date (Modified Julian Day) and
1234 time (seconds and fraction past UTC midnight).
1235 The next five fields
1236 show time offset (seconds), frequency offset (parts per million \-
1237 PPM), RMS jitter (seconds), Allan deviation (PPM) and clock
1238 discipline time constant.
1239 .TP 7
1240 .NOP \f\*[B-Font]peerstats\f[]
1241 Enables recording of peer statistics information.
1242 This includes
1243 statistics records of all peers of a NTP server and of special
1244 signals, where present and configured.
1245 Each valid update appends a
1246 line of the following form to the current element of a file
1247 generation set named
1248 \f\*[B-Font]peerstats\f[]:
1249 .br
1250 .in +4
1251 .nf
1252 48773 10847.650 127.127.4.1 9714 \-0.001605376 0.000000000 0.001424877 0.000958674
1253 .in -4
1254 .fi
1255 .sp \n(Ppu
1256 .ne 2
1257
1258 The first two fields show the date (Modified Julian Day) and
1259 time (seconds and fraction past UTC midnight).
1260 The next two fields
1261 show the peer address in dotted-quad notation and status,
1262 respectively.
1263 The status field is encoded in hex in the format
1264 described in Appendix A of the NTP specification RFC 1305.
1265 The final four fields show the offset,
1266 delay, dispersion and RMS jitter, all in seconds.
1267 .TP 7
1268 .NOP \f\*[B-Font]rawstats\f[]
1269 Enables recording of raw-timestamp statistics information.
1270 This
1271 includes statistics records of all peers of a NTP server and of
1272 special signals, where present and configured.
1273 Each NTP message
1274 received from a peer or clock driver appends a line of the
1275 following form to the file generation set named
1276 \f\*[B-Font]rawstats\f[]:
1277 .br
1278 .in +4
1279 .nf
1280 50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
1281 .in -4
1282 .fi
1283 .sp \n(Ppu
1284 .ne 2
1285
1286 The first two fields show the date (Modified Julian Day) and
1287 time (seconds and fraction past UTC midnight).
1288 The next two fields
1289 show the remote peer or clock address followed by the local address
1290 in dotted-quad notation.
1291 The final four fields show the originate,
1292 receive, transmit and final NTP timestamps in order.
1293 The timestamp
1294 values are as received and before processing by the various data
1295 smoothing and mitigation algorithms.
1296 .TP 7
1297 .NOP \f\*[B-Font]sysstats\f[]
1298 Enables recording of ntpd statistics counters on a periodic basis.
1299 Each
1300 hour a line of the following form is appended to the file generation
1301 set named
1302 \f\*[B-Font]sysstats\f[]:
1303 .br
1304 .in +4
1305 .nf
1306 50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
1307 .in -4
1308 .fi
1309 .sp \n(Ppu
1310 .ne 2
1311
1312 The first two fields show the date (Modified Julian Day) and time
1313 (seconds and fraction past UTC midnight).
1314 The remaining ten fields show
1315 the statistics counter values accumulated since the last generated
1316 line.
1317 .RS
1318 .TP 7
1319 .NOP Time since restart \f\*[B-Font]36000\f[]
1320 Time in hours since the system was last rebooted.
1321 .TP 7
1322 .NOP Packets received \f\*[B-Font]81965\f[]
1323 Total number of packets received.
1324 .TP 7
1325 .NOP Packets processed \f\*[B-Font]0\f[]
1326 Number of packets received in response to previous packets sent
1327 .TP 7
1328 .NOP Current version \f\*[B-Font]9546\f[]
1329 Number of packets matching the current NTP version.
1330 .TP 7
1331 .NOP Previous version \f\*[B-Font]56\f[]
1332 Number of packets matching the previous NTP version.
1333 .TP 7
1334 .NOP Bad version \f\*[B-Font]71793\f[]
1335 Number of packets matching neither NTP version.
1336 .TP 7
1337 .NOP Access denied \f\*[B-Font]512\f[]
1338 Number of packets denied access for any reason.
1339 .TP 7
1340 .NOP Bad length or format \f\*[B-Font]540\f[]
1341 Number of packets with invalid length, format or port number.
1342 .TP 7
1343 .NOP Bad authentication \f\*[B-Font]10\f[]
1344 Number of packets not verified as authentic.
1345 .TP 7
1346 .NOP Rate exceeded \f\*[B-Font]147\f[]
1347 Number of packets discarded due to rate limitation.
1348 .RE
1349 .TP 7
1350 .NOP \f\*[B-Font]statsdir\f[] \f\*[I-Font]directory_path\f[]
1351 Indicates the full path of a directory where statistics files
1352 should be created (see below).
1353 This keyword allows
1354 the (otherwise constant)
1355 \f\*[B-Font]filegen\f[]
1356 filename prefix to be modified for file generation sets, which
1357 is useful for handling statistics logs.
1358 .TP 7
1359 .NOP \f\*[B-Font]filegen\f[] \f\*[I-Font]name\f[] [\f\*[B-Font]file\f[] \f\*[I-Font]filename\f[]] [\f\*[B-Font]type\f[] \f\*[I-Font]typename\f[]] [\f\*[B-Font]link\f[] | \f\*[B-Font]nolink\f[]] [\f\*[B-Font]enable\f[] | \f\*[B-Font]disable\f[]]
1360 Configures setting of generation file set name.
1361 Generation
1362 file sets provide a means for handling files that are
1363 continuously growing during the lifetime of a server.
1364 Server statistics are a typical example for such files.
1365 Generation file sets provide access to a set of files used
1366 to store the actual data.
1367 At any time at most one element
1368 of the set is being written to.
1369 The type given specifies
1370 when and how data will be directed to a new element of the set.
1371 This way, information stored in elements of a file set
1372 that are currently unused are available for administrational
1373 operations without the risk of disturbing the operation of ntpd.
1374 (Most important: they can be removed to free space for new data
1375 produced.)
1376 .sp \n(Ppu
1377 .ne 2
1378
1379 Note that this command can be sent from the
1380 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1381 program running at a remote location.
1382 .RS
1383 .TP 7
1384 .NOP \f\*[B-Font]name\f[]
1385 This is the type of the statistics records, as shown in the
1386 \f\*[B-Font]statistics\f[]
1387 command.
1388 .TP 7
1389 .NOP \f\*[B-Font]file\f[] \f\*[I-Font]filename\f[]
1390 This is the file name for the statistics records.
1391 Filenames of set
1392 members are built from three concatenated elements
1393 \f\*[B-Font]prefix\f[],
1394 \f\*[B-Font]filename\f[]
1395 and
1396 \f\*[B-Font]suffix\f[]:
1397 .RS
1398 .TP 7
1399 .NOP \f\*[B-Font]prefix\f[]
1400 This is a constant filename path.
1401 It is not subject to
1402 modifications via the
1403 \f\*[I-Font]filegen\f[]
1404 option.
1405 It is defined by the
1406 server, usually specified as a compile-time constant.
1407 It may,
1408 however, be configurable for individual file generation sets
1409 via other commands.
1410 For example, the prefix used with
1411 \f\*[I-Font]loopstats\f[]
1412 and
1413 \f\*[I-Font]peerstats\f[]
1414 generation can be configured using the
1415 \f\*[I-Font]statsdir\f[]
1416 option explained above.
1417 .TP 7
1418 .NOP \f\*[B-Font]filename\f[]
1419 This string is directly concatenated to the prefix mentioned
1420 above (no intervening
1421 \[oq]/\[cq]).
1422 This can be modified using
1423 the file argument to the
1424 \f\*[I-Font]filegen\f[]
1425 statement.
1426 No
1427 \fI..\f[]
1428 elements are
1429 allowed in this component to prevent filenames referring to
1430 parts outside the filesystem hierarchy denoted by
1431 \f\*[I-Font]prefix\f[].
1432 .TP 7
1433 .NOP \f\*[B-Font]suffix\f[]
1434 This part is reflects individual elements of a file set.
1435 It is
1436 generated according to the type of a file set.
1437 .RE
1438 .TP 7
1439 .NOP \f\*[B-Font]type\f[] \f\*[I-Font]typename\f[]
1440 A file generation set is characterized by its type.
1441 The following
1442 types are supported:
1443 .RS
1444 .TP 7
1445 .NOP \f\*[B-Font]none\f[]
1446 The file set is actually a single plain file.
1447 .TP 7
1448 .NOP \f\*[B-Font]pid\f[]
1449 One element of file set is used per incarnation of a ntpd
1450 server.
1451 This type does not perform any changes to file set
1452 members during runtime, however it provides an easy way of
1453 separating files belonging to different
1454 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
1455 server incarnations.
1456 The set member filename is built by appending a
1457 \[oq]\&.\[cq]
1458 to concatenated
1459 \f\*[I-Font]prefix\f[]
1460 and
1461 \f\*[I-Font]filename\f[]
1462 strings, and
1463 appending the decimal representation of the process ID of the
1464 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
1465 server process.
1466 .TP 7
1467 .NOP \f\*[B-Font]day\f[]
1468 One file generation set element is created per day.
1469 A day is
1470 defined as the period between 00:00 and 24:00 UTC.
1471 The file set
1472 member suffix consists of a
1473 \[oq]\&.\[cq]
1474 and a day specification in
1475 the form
1476 \f\*[B-Font]YYYYMMdd\f[].
1477 \f\*[B-Font]YYYY\f[]
1478 is a 4-digit year number (e.g., 1992).
1479 \f\*[B-Font]MM\f[]
1480 is a two digit month number.
1481 \f\*[B-Font]dd\f[]
1482 is a two digit day number.
1483 Thus, all information written at 10 December 1992 would end up
1484 in a file named
1485 \f\*[I-Font]prefix\f[]
1486 \f\*[I-Font]filename\f[].19921210.
1487 .TP 7
1488 .NOP \f\*[B-Font]week\f[]
1489 Any file set member contains data related to a certain week of
1490 a year.
1491 The term week is defined by computing day-of-year
1492 modulo 7.
1493 Elements of such a file generation set are
1494 distinguished by appending the following suffix to the file set
1495 filename base: A dot, a 4-digit year number, the letter
1496 \f\*[B-Font]W\f[],
1497 and a 2-digit week number.
1498 For example, information from January,
1499 10th 1992 would end up in a file with suffix
1500 .NOP. \f\*[I-Font]1992W1\f[].
1501 .TP 7
1502 .NOP \f\*[B-Font]month\f[]
1503 One generation file set element is generated per month.
1504 The
1505 file name suffix consists of a dot, a 4-digit year number, and
1506 a 2-digit month.
1507 .TP 7
1508 .NOP \f\*[B-Font]year\f[]
1509 One generation file element is generated per year.
1510 The filename
1511 suffix consists of a dot and a 4 digit year number.
1512 .TP 7
1513 .NOP \f\*[B-Font]age\f[]
1514 This type of file generation sets changes to a new element of
1515 the file set every 24 hours of server operation.
1516 The filename
1517 suffix consists of a dot, the letter
1518 \f\*[B-Font]a\f[],
1519 and an 8-digit number.
1520 This number is taken to be the number of seconds the server is
1521 running at the start of the corresponding 24-hour period.
1522 Information is only written to a file generation by specifying
1523 \f\*[B-Font]enable\f[];
1524 output is prevented by specifying
1525 \f\*[B-Font]disable\f[].
1526 .RE
1527 .TP 7
1528 .NOP \f\*[B-Font]link\f[] | \f\*[B-Font]nolink\f[]
1529 It is convenient to be able to access the current element of a file
1530 generation set by a fixed name.
1531 This feature is enabled by
1532 specifying
1533 \f\*[B-Font]link\f[]
1534 and disabled using
1535 \f\*[B-Font]nolink\f[].
1536 If link is specified, a
1537 hard link from the current file set element to a file without
1538 suffix is created.
1539 When there is already a file with this name and
1540 the number of links of this file is one, it is renamed appending a
1541 dot, the letter
1542 \f\*[B-Font]C\f[],
1543 and the pid of the
1544 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
1545 server process.
1546 When the
1547 number of links is greater than one, the file is unlinked.
1548 This
1549 allows the current file to be accessed by a constant name.
1550 .TP 7
1551 .NOP \f\*[B-Font]enable\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]disable\f[]
1552 Enables or disables the recording function.
1553 .RE
1554 .RE
1555 .PP
1556 .SH Access Control Support
1557 The
1558 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
1559 daemon implements a general purpose address/mask based restriction
1560 list.
1561 The list contains address/match entries sorted first
1562 by increasing address values and and then by increasing mask values.
1563 A match occurs when the bitwise AND of the mask and the packet
1564 source address is equal to the bitwise AND of the mask and
1565 address in the list.
1566 The list is searched in order with the
1567 last match found defining the restriction flags associated
1568 with the entry.
1569 Additional information and examples can be found in the
1570 "Notes on Configuring NTP and Setting up a NTP Subnet"
1571 page
1572 (available as part of the HTML documentation
1573 provided in
1574 \fI/usr/share/doc/ntp\f[]).
1575 .sp \n(Ppu
1576 .ne 2
1577
1578 The restriction facility was implemented in conformance
1579 with the access policies for the original NSFnet backbone
1580 time servers.
1581 Later the facility was expanded to deflect
1582 cryptographic and clogging attacks.
1583 While this facility may
1584 be useful for keeping unwanted or broken or malicious clients
1585 from congesting innocent servers, it should not be considered
1586 an alternative to the NTP authentication facilities.
1587 Source address based restrictions are easily circumvented
1588 by a determined cracker.
1589 .sp \n(Ppu
1590 .ne 2
1591
1592 Clients can be denied service because they are explicitly
1593 included in the restrict list created by the
1594 \f\*[B-Font]restrict\f[]
1595 command
1596 or implicitly as the result of cryptographic or rate limit
1597 violations.
1598 Cryptographic violations include certificate
1599 or identity verification failure; rate limit violations generally
1600 result from defective NTP implementations that send packets
1601 at abusive rates.
1602 Some violations cause denied service
1603 only for the offending packet, others cause denied service
1604 for a timed period and others cause the denied service for
1605 an indefinite period.
1606 When a client or network is denied access
1607 for an indefinite period, the only way at present to remove
1608 the restrictions is by restarting the server.
1609 .SS The Kiss-of-Death Packet
1610 Ordinarily, packets denied service are simply dropped with no
1611 further action except incrementing statistics counters.
1612 Sometimes a
1613 more proactive response is needed, such as a server message that
1614 explicitly requests the client to stop sending and leave a message
1615 for the system operator.
1616 A special packet format has been created
1617 for this purpose called the "kiss-of-death" (KoD) packet.
1618 KoD packets have the leap bits set unsynchronized and stratum set
1619 to zero and the reference identifier field set to a four-byte
1620 ASCII code.
1621 If the
1622 \f\*[B-Font]noserve\f[]
1623 or
1624 \f\*[B-Font]notrust\f[]
1625 flag of the matching restrict list entry is set,
1626 the code is "DENY"; if the
1627 \f\*[B-Font]limited\f[]
1628 flag is set and the rate limit
1629 is exceeded, the code is "RATE".
1630 Finally, if a cryptographic violation occurs, the code is "CRYP".
1631 .sp \n(Ppu
1632 .ne 2
1633
1634 A client receiving a KoD performs a set of sanity checks to
1635 minimize security exposure, then updates the stratum and
1636 reference identifier peer variables, sets the access
1637 denied (TEST4) bit in the peer flash variable and sends
1638 a message to the log.
1639 As long as the TEST4 bit is set,
1640 the client will send no further packets to the server.
1641 The only way at present to recover from this condition is
1642 to restart the protocol at both the client and server.
1643 This
1644 happens automatically at the client when the association times out.
1645 It will happen at the server only if the server operator cooperates.
1646 .SS Access Control Commands
1647 .TP 7
1648 .NOP \f\*[B-Font]discard\f[] [\f\*[B-Font]average\f[] \f\*[I-Font]avg\f[]] [\f\*[B-Font]minimum\f[] \f\*[I-Font]min\f[]] [\f\*[B-Font]monitor\f[] \f\*[I-Font]prob\f[]]
1649 Set the parameters of the
1650 \f\*[B-Font]limited\f[]
1651 facility which protects the server from
1652 client abuse.
1653 The
1654 \f\*[B-Font]average\f[]
1655 subcommand specifies the minimum average packet
1656 spacing, while the
1657 \f\*[B-Font]minimum\f[]
1658 subcommand specifies the minimum packet spacing.
1659 Packets that violate these minima are discarded
1660 and a kiss-o'-death packet returned if enabled.
1661 The default
1662 minimum average and minimum are 5 and 2, respectively.
1663 The
1664 \f\*[B-Font]monitor\f[]
1665 subcommand specifies the probability of discard
1666 for packets that overflow the rate-control window.
1667 .TP 7
1668 .NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
1669 The
1670 \f\*[I-Font]address\f[]
1671 argument expressed in
1672 dotted-quad form is the address of a host or network.
1673 Alternatively, the
1674 \f\*[I-Font]address\f[]
1675 argument can be a valid host DNS name.
1676 The
1677 \f\*[I-Font]mask\f[]
1678 argument expressed in dotted-quad form defaults to
1679 \f\*[B-Font]255.255.255.255\f[],
1680 meaning that the
1681 \f\*[I-Font]address\f[]
1682 is treated as the address of an individual host.
1683 A default entry (address
1684 \f\*[B-Font]0.0.0.0\f[],
1685 mask
1686 \f\*[B-Font]0.0.0.0\f[])
1687 is always included and is always the first entry in the list.
1688 Note that text string
1689 \f\*[B-Font]default\f[],
1690 with no mask option, may
1691 be used to indicate the default entry.
1692 The
1693 \f\*[B-Font]ippeerlimit\f[]
1694 directive limits the number of peer requests for each IP to
1695 \f\*[I-Font]int\f[],
1696 where a value of \-1 means "unlimited", the current default.
1697 A value of 0 means "none".
1698 There would usually be at most 1 peering request per IP,
1699 but if the remote peering requests are behind a proxy
1700 there could well be more than 1 per IP.
1701 In the current implementation,
1702 \f\*[B-Font]flag\f[]
1703 always
1704 restricts access, i.e., an entry with no flags indicates that free
1705 access to the server is to be given.
1706 The flags are not orthogonal,
1707 in that more restrictive flags will often make less restrictive
1708 ones redundant.
1709 The flags can generally be classed into two
1710 categories, those which restrict time service and those which
1711 restrict informational queries and attempts to do run-time
1712 reconfiguration of the server.
1713 One or more of the following flags
1714 may be specified:
1715 .RS
1716 .TP 7
1717 .NOP \f\*[B-Font]ignore\f[]
1718 Deny packets of all kinds, including
1719 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1720 and
1721 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1722 queries.
1723 .TP 7
1724 .NOP \f\*[B-Font]kod\f[]
1725 If this flag is set when an access violation occurs, a kiss-o'-death
1726 (KoD) packet is sent.
1727 KoD packets are rate limited to no more than one
1728 per second.
1729 If another KoD packet occurs within one second after the
1730 last one, the packet is dropped.
1731 .TP 7
1732 .NOP \f\*[B-Font]limited\f[]
1733 Deny service if the packet spacing violates the lower limits specified
1734 in the
1735 \f\*[B-Font]discard\f[]
1736 command.
1737 A history of clients is kept using the
1738 monitoring capability of
1739 \fCntpd\f[]\fR(@NTPD_MS@)\f[].
1740 Thus, monitoring is always active as
1741 long as there is a restriction entry with the
1742 \f\*[B-Font]limited\f[]
1743 flag.
1744 .TP 7
1745 .NOP \f\*[B-Font]lowpriotrap\f[]
1746 Declare traps set by matching hosts to be low priority.
1747 The
1748 number of traps a server can maintain is limited (the current limit
1749 is 3).
1750 Traps are usually assigned on a first come, first served
1751 basis, with later trap requestors being denied service.
1752 This flag
1753 modifies the assignment algorithm by allowing low priority traps to
1754 be overridden by later requests for normal priority traps.
1755 .TP 7
1756 .NOP \f\*[B-Font]noepeer\f[]
1757 Deny ephemeral peer requests,
1758 even if they come from an authenticated source.
1759 Note that the ability to use a symmetric key for authentication may be restricted to
1760 one or more IPs or subnets via the third field of the
1761 \fIntp.keys\f[]
1762 file.
1763 This restriction is not enabled by default,
1764 to maintain backward compatability.
1765 Expect
1766 \f\*[B-Font]noepeer\f[]
1767 to become the default in ntp-4.4.
1768 .TP 7
1769 .NOP \f\*[B-Font]nomodify\f[]
1770 Deny
1771 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1772 and
1773 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1774 queries which attempt to modify the state of the
1775 server (i.e., run time reconfiguration).
1776 Queries which return
1777 information are permitted.
1778 .TP 7
1779 .NOP \f\*[B-Font]noquery\f[]
1780 Deny
1781 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1782 and
1783 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1784 queries.
1785 Time service is not affected.
1786 .TP 7
1787 .NOP \f\*[B-Font]nopeer\f[]
1788 Deny unauthenticated packets which would result in mobilizing a new association.
1789 This includes
1790 broadcast and symmetric active packets
1791 when a configured association does not exist.
1792 It also includes
1793 \f\*[B-Font]pool\f[]
1794 associations, so if you want to use servers from a 
1795 \f\*[B-Font]pool\f[]
1796 directive and also want to use
1797 \f\*[B-Font]nopeer\f[]
1798 by default, you'll want a
1799 \f\*[B-Font]restrict source ...\f[]
1800 line as well that does
1801 \fInot\f[]
1802 include the
1803 \f\*[B-Font]nopeer\f[]
1804 directive.
1805 .TP 7
1806 .NOP \f\*[B-Font]noserve\f[]
1807 Deny all packets except
1808 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1809 and
1810 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1811 queries.
1812 .TP 7
1813 .NOP \f\*[B-Font]notrap\f[]
1814 Decline to provide mode 6 control message trap service to matching
1815 hosts.
1816 The trap service is a subsystem of the
1817 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1818 control message
1819 protocol which is intended for use by remote event logging programs.
1820 .TP 7
1821 .NOP \f\*[B-Font]notrust\f[]
1822 Deny service unless the packet is cryptographically authenticated.
1823 .TP 7
1824 .NOP \f\*[B-Font]ntpport\f[]
1825 This is actually a match algorithm modifier, rather than a
1826 restriction flag.
1827 Its presence causes the restriction entry to be
1828 matched only if the source port in the packet is the standard NTP
1829 UDP port (123).
1830 Both
1831 \f\*[B-Font]ntpport\f[]
1832 and
1833 \f\*[B-Font]non-ntpport\f[]
1834 may
1835 be specified.
1836 The
1837 \f\*[B-Font]ntpport\f[]
1838 is considered more specific and
1839 is sorted later in the list.
1840 .TP 7
1841 .NOP \f\*[B-Font]version\f[]
1842 Deny packets that do not match the current NTP version.
1843 .RE
1844 .sp \n(Ppu
1845 .ne 2
1846
1847 Default restriction list entries with the flags ignore, interface,
1848 ntpport, for each of the local host's interface addresses are
1849 inserted into the table at startup to prevent the server
1850 from attempting to synchronize to its own time.
1851 A default entry is also always present, though if it is
1852 otherwise unconfigured; no flags are associated
1853 with the default entry (i.e., everything besides your own
1854 NTP server is unrestricted).
1855 .PP
1856 .SH Automatic NTP Configuration Options
1857 .SS Manycasting
1858 Manycasting is a automatic discovery and configuration paradigm
1859 new to NTPv4.
1860 It is intended as a means for a multicast client
1861 to troll the nearby network neighborhood to find cooperating
1862 manycast servers, validate them using cryptographic means
1863 and evaluate their time values with respect to other servers
1864 that might be lurking in the vicinity.
1865 The intended result is that each manycast client mobilizes
1866 client associations with some number of the "best"
1867 of the nearby manycast servers, yet automatically reconfigures
1868 to sustain this number of servers should one or another fail.
1869 .sp \n(Ppu
1870 .ne 2
1871
1872 Note that the manycasting paradigm does not coincide
1873 with the anycast paradigm described in RFC-1546,
1874 which is designed to find a single server from a clique
1875 of servers providing the same service.
1876 The manycast paradigm is designed to find a plurality
1877 of redundant servers satisfying defined optimality criteria.
1878 .sp \n(Ppu
1879 .ne 2
1880
1881 Manycasting can be used with either symmetric key
1882 or public key cryptography.
1883 The public key infrastructure (PKI)
1884 offers the best protection against compromised keys
1885 and is generally considered stronger, at least with relatively
1886 large key sizes.
1887 It is implemented using the Autokey protocol and
1888 the OpenSSL cryptographic library available from
1889 \f[C]http://www.openssl.org/\f[].
1890 The library can also be used with other NTPv4 modes
1891 as well and is highly recommended, especially for broadcast modes.
1892 .sp \n(Ppu
1893 .ne 2
1894
1895 A persistent manycast client association is configured
1896 using the
1897 \f\*[B-Font]manycastclient\f[]
1898 command, which is similar to the
1899 \f\*[B-Font]server\f[]
1900 command but with a multicast (IPv4 class
1901 \f\*[B-Font]D\f[]
1902 or IPv6 prefix
1903 \f\*[B-Font]FF\f[])
1904 group address.
1905 The IANA has designated IPv4 address 224.1.1.1
1906 and IPv6 address FF05::101 (site local) for NTP.
1907 When more servers are needed, it broadcasts manycast
1908 client messages to this address at the minimum feasible rate
1909 and minimum feasible time-to-live (TTL) hops, depending
1910 on how many servers have already been found.
1911 There can be as many manycast client associations
1912 as different group address, each one serving as a template
1913 for a future ephemeral unicast client/server association.
1914 .sp \n(Ppu
1915 .ne 2
1916
1917 Manycast servers configured with the
1918 \f\*[B-Font]manycastserver\f[]
1919 command listen on the specified group address for manycast
1920 client messages.
1921 Note the distinction between manycast client,
1922 which actively broadcasts messages, and manycast server,
1923 which passively responds to them.
1924 If a manycast server is
1925 in scope of the current TTL and is itself synchronized
1926 to a valid source and operating at a stratum level equal
1927 to or lower than the manycast client, it replies to the
1928 manycast client message with an ordinary unicast server message.
1929 .sp \n(Ppu
1930 .ne 2
1931
1932 The manycast client receiving this message mobilizes
1933 an ephemeral client/server association according to the
1934 matching manycast client template, but only if cryptographically
1935 authenticated and the server stratum is less than or equal
1936 to the client stratum.
1937 Authentication is explicitly required
1938 and either symmetric key or public key (Autokey) can be used.
1939 Then, the client polls the server at its unicast address
1940 in burst mode in order to reliably set the host clock
1941 and validate the source.
1942 This normally results
1943 in a volley of eight client/server at 2-s intervals
1944 during which both the synchronization and cryptographic
1945 protocols run concurrently.
1946 Following the volley,
1947 the client runs the NTP intersection and clustering
1948 algorithms, which act to discard all but the "best"
1949 associations according to stratum and synchronization
1950 distance.
1951 The surviving associations then continue
1952 in ordinary client/server mode.
1953 .sp \n(Ppu
1954 .ne 2
1955
1956 The manycast client polling strategy is designed to reduce
1957 as much as possible the volume of manycast client messages
1958 and the effects of implosion due to near-simultaneous
1959 arrival of manycast server messages.
1960 The strategy is determined by the
1961 \f\*[B-Font]manycastclient\f[],
1962 \f\*[B-Font]tos\f[]
1963 and
1964 \f\*[B-Font]ttl\f[]
1965 configuration commands.
1966 The manycast poll interval is
1967 normally eight times the system poll interval,
1968 which starts out at the
1969 \f\*[B-Font]minpoll\f[]
1970 value specified in the
1971 \f\*[B-Font]manycastclient\f[],
1972 command and, under normal circumstances, increments to the
1973 \f\*[B-Font]maxpolll\f[]
1974 value specified in this command.
1975 Initially, the TTL is
1976 set at the minimum hops specified by the
1977 \f\*[B-Font]ttl\f[]
1978 command.
1979 At each retransmission the TTL is increased until reaching
1980 the maximum hops specified by this command or a sufficient
1981 number client associations have been found.
1982 Further retransmissions use the same TTL.
1983 .sp \n(Ppu
1984 .ne 2
1985
1986 The quality and reliability of the suite of associations
1987 discovered by the manycast client is determined by the NTP
1988 mitigation algorithms and the
1989 \f\*[B-Font]minclock\f[]
1990 and
1991 \f\*[B-Font]minsane\f[]
1992 values specified in the
1993 \f\*[B-Font]tos\f[]
1994 configuration command.
1995 At least
1996 \f\*[B-Font]minsane\f[]
1997 candidate servers must be available and the mitigation
1998 algorithms produce at least
1999 \f\*[B-Font]minclock\f[]
2000 survivors in order to synchronize the clock.
2001 Byzantine agreement principles require at least four
2002 candidates in order to correctly discard a single falseticker.
2003 For legacy purposes,
2004 \f\*[B-Font]minsane\f[]
2005 defaults to 1 and
2006 \f\*[B-Font]minclock\f[]
2007 defaults to 3.
2008 For manycast service
2009 \f\*[B-Font]minsane\f[]
2010 should be explicitly set to 4, assuming at least that
2011 number of servers are available.
2012 .sp \n(Ppu
2013 .ne 2
2014
2015 If at least
2016 \f\*[B-Font]minclock\f[]
2017 servers are found, the manycast poll interval is immediately
2018 set to eight times
2019 \f\*[B-Font]maxpoll\f[].
2020 If less than
2021 \f\*[B-Font]minclock\f[]
2022 servers are found when the TTL has reached the maximum hops,
2023 the manycast poll interval is doubled.
2024 For each transmission
2025 after that, the poll interval is doubled again until
2026 reaching the maximum of eight times
2027 \f\*[B-Font]maxpoll\f[].
2028 Further transmissions use the same poll interval and
2029 TTL values.
2030 Note that while all this is going on,
2031 each client/server association found is operating normally
2032 it the system poll interval.
2033 .sp \n(Ppu
2034 .ne 2
2035
2036 Administratively scoped multicast boundaries are normally
2037 specified by the network router configuration and,
2038 in the case of IPv6, the link/site scope prefix.
2039 By default, the increment for TTL hops is 32 starting
2040 from 31; however, the
2041 \f\*[B-Font]ttl\f[]
2042 configuration command can be
2043 used to modify the values to match the scope rules.
2044 .sp \n(Ppu
2045 .ne 2
2046
2047 It is often useful to narrow the range of acceptable
2048 servers which can be found by manycast client associations.
2049 Because manycast servers respond only when the client
2050 stratum is equal to or greater than the server stratum,
2051 primary (stratum 1) servers fill find only primary servers
2052 in TTL range, which is probably the most common objective.
2053 However, unless configured otherwise, all manycast clients
2054 in TTL range will eventually find all primary servers
2055 in TTL range, which is probably not the most common
2056 objective in large networks.
2057 The
2058 \f\*[B-Font]tos\f[]
2059 command can be used to modify this behavior.
2060 Servers with stratum below
2061 \f\*[B-Font]floor\f[]
2062 or above
2063 \f\*[B-Font]ceiling\f[]
2064 specified in the
2065 \f\*[B-Font]tos\f[]
2066 command are strongly discouraged during the selection
2067 process; however, these servers may be temporally
2068 accepted if the number of servers within TTL range is
2069 less than
2070 \f\*[B-Font]minclock\f[].
2071 .sp \n(Ppu
2072 .ne 2
2073
2074 The above actions occur for each manycast client message,
2075 which repeats at the designated poll interval.
2076 However, once the ephemeral client association is mobilized,
2077 subsequent manycast server replies are discarded,
2078 since that would result in a duplicate association.
2079 If during a poll interval the number of client associations
2080 falls below
2081 \f\*[B-Font]minclock\f[],
2082 all manycast client prototype associations are reset
2083 to the initial poll interval and TTL hops and operation
2084 resumes from the beginning.
2085 It is important to avoid
2086 frequent manycast client messages, since each one requires
2087 all manycast servers in TTL range to respond.
2088 The result could well be an implosion, either minor or major,
2089 depending on the number of servers in range.
2090 The recommended value for
2091 \f\*[B-Font]maxpoll\f[]
2092 is 12 (4,096 s).
2093 .sp \n(Ppu
2094 .ne 2
2095
2096 It is possible and frequently useful to configure a host
2097 as both manycast client and manycast server.
2098 A number of hosts configured this way and sharing a common
2099 group address will automatically organize themselves
2100 in an optimum configuration based on stratum and
2101 synchronization distance.
2102 For example, consider an NTP
2103 subnet of two primary servers and a hundred or more
2104 dependent clients.
2105 With two exceptions, all servers
2106 and clients have identical configuration files including both
2107 \f\*[B-Font]multicastclient\f[]
2108 and
2109 \f\*[B-Font]multicastserver\f[]
2110 commands using, for instance, multicast group address
2111 239.1.1.1.
2112 The only exception is that each primary server
2113 configuration file must include commands for the primary
2114 reference source such as a GPS receiver.
2115 .sp \n(Ppu
2116 .ne 2
2117
2118 The remaining configuration files for all secondary
2119 servers and clients have the same contents, except for the
2120 \f\*[B-Font]tos\f[]
2121 command, which is specific for each stratum level.
2122 For stratum 1 and stratum 2 servers, that command is
2123 not necessary.
2124 For stratum 3 and above servers the
2125 \f\*[B-Font]floor\f[]
2126 value is set to the intended stratum number.
2127 Thus, all stratum 3 configuration files are identical,
2128 all stratum 4 files are identical and so forth.
2129 .sp \n(Ppu
2130 .ne 2
2131
2132 Once operations have stabilized in this scenario,
2133 the primary servers will find the primary reference source
2134 and each other, since they both operate at the same
2135 stratum (1), but not with any secondary server or client,
2136 since these operate at a higher stratum.
2137 The secondary
2138 servers will find the servers at the same stratum level.
2139 If one of the primary servers loses its GPS receiver,
2140 it will continue to operate as a client and other clients
2141 will time out the corresponding association and
2142 re-associate accordingly.
2143 .sp \n(Ppu
2144 .ne 2
2145
2146 Some administrators prefer to avoid running
2147 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2148 continuously and run either
2149 \fCsntp\f[]\fR(@SNTP_MS@)\f[]
2150 or
2151 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2152 \f\*[B-Font]\-q\f[]
2153 as a cron job.
2154 In either case the servers must be
2155 configured in advance and the program fails if none are
2156 available when the cron job runs.
2157 A really slick
2158 application of manycast is with
2159 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2160 \f\*[B-Font]\-q\f[].
2161 The program wakes up, scans the local landscape looking
2162 for the usual suspects, selects the best from among
2163 the rascals, sets the clock and then departs.
2164 Servers do not have to be configured in advance and
2165 all clients throughout the network can have the same
2166 configuration file.
2167 .SS Manycast Interactions with Autokey
2168 Each time a manycast client sends a client mode packet
2169 to a multicast group address, all manycast servers
2170 in scope generate a reply including the host name
2171 and status word.
2172 The manycast clients then run
2173 the Autokey protocol, which collects and verifies
2174 all certificates involved.
2175 Following the burst interval
2176 all but three survivors are cast off,
2177 but the certificates remain in the local cache.
2178 It often happens that several complete signing trails
2179 from the client to the primary servers are collected in this way.
2180 .sp \n(Ppu
2181 .ne 2
2182
2183 About once an hour or less often if the poll interval
2184 exceeds this, the client regenerates the Autokey key list.
2185 This is in general transparent in client/server mode.
2186 However, about once per day the server private value
2187 used to generate cookies is refreshed along with all
2188 manycast client associations.
2189 In this case all
2190 cryptographic values including certificates is refreshed.
2191 If a new certificate has been generated since
2192 the last refresh epoch, it will automatically revoke
2193 all prior certificates that happen to be in the
2194 certificate cache.
2195 At the same time, the manycast
2196 scheme starts all over from the beginning and
2197 the expanding ring shrinks to the minimum and increments
2198 from there while collecting all servers in scope.
2199 .SS Broadcast Options
2200 .TP 7
2201 .NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]bcpollbstep\f[] \f\*[I-Font]gate\f[]]
2202 This command provides a way to delay,
2203 by the specified number of broadcast poll intervals,
2204 believing backward time steps from a broadcast server.
2205 Broadcast time networks are expected to be trusted.
2206 In the event a broadcast server's time is stepped backwards,
2207 there is clear benefit to having the clients notice this change
2208 as soon as possible.
2209 Attacks such as replay attacks can happen, however,
2210 and even though there are a number of protections built in to
2211 broadcast mode, attempts to perform a replay attack are possible.
2212 This value defaults to 0, but can be changed
2213 to any number of poll intervals between 0 and 4.
2214 .PP
2215 .SS Manycast Options
2216 .TP 7
2217 .NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[] | \f\*[B-Font]cohort\f[] { \f\*[B-Font]0\f[] | \f\*[B-Font]1\f[] } | \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[] | \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[] | \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]]
2218 This command affects the clock selection and clustering
2219 algorithms.
2220 It can be used to select the quality and
2221 quantity of peers used to synchronize the system clock
2222 and is most useful in manycast mode.
2223 The variables operate
2224 as follows:
2225 .RS
2226 .TP 7
2227 .NOP \f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[]
2228 Peers with strata above
2229 \f\*[B-Font]ceiling\f[]
2230 will be discarded if there are at least
2231 \f\*[B-Font]minclock\f[]
2232 peers remaining.
2233 This value defaults to 15, but can be changed
2234 to any number from 1 to 15.
2235 .TP 7
2236 .NOP \f\*[B-Font]cohort\f[] {0 | 1 }
2237 This is a binary flag which enables (0) or disables (1)
2238 manycast server replies to manycast clients with the same
2239 stratum level.
2240 This is useful to reduce implosions where
2241 large numbers of clients with the same stratum level
2242 are present.
2243 The default is to enable these replies.
2244 .TP 7
2245 .NOP \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[]
2246 Peers with strata below
2247 \f\*[B-Font]floor\f[]
2248 will be discarded if there are at least
2249 \f\*[B-Font]minclock\f[]
2250 peers remaining.
2251 This value defaults to 1, but can be changed
2252 to any number from 1 to 15.
2253 .TP 7
2254 .NOP \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[]
2255 The clustering algorithm repeatedly casts out outlier
2256 associations until no more than
2257 \f\*[B-Font]minclock\f[]
2258 associations remain.
2259 This value defaults to 3,
2260 but can be changed to any number from 1 to the number of
2261 configured sources.
2262 .TP 7
2263 .NOP \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]
2264 This is the minimum number of candidates available
2265 to the clock selection algorithm in order to produce
2266 one or more truechimers for the clustering algorithm.
2267 If fewer than this number are available, the clock is
2268 undisciplined and allowed to run free.
2269 The default is 1
2270 for legacy purposes.
2271 However, according to principles of
2272 Byzantine agreement,
2273 \f\*[B-Font]minsane\f[]
2274 should be at least 4 in order to detect and discard
2275 a single falseticker.
2276 .RE
2277 .TP 7
2278 .NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
2279 This command specifies a list of TTL values in increasing
2280 order, up to 8 values can be specified.
2281 In manycast mode these values are used in turn
2282 in an expanding-ring search.
2283 The default is eight
2284 multiples of 32 starting at 31.
2285 .PP
2286 .SH Reference Clock Support
2287 The NTP Version 4 daemon supports some three dozen different radio,
2288 satellite and modem reference clocks plus a special pseudo-clock
2289 used for backup or when no other clock source is available.
2290 Detailed descriptions of individual device drivers and options can
2291 be found in the
2292 "Reference Clock Drivers"
2293 page
2294 (available as part of the HTML documentation
2295 provided in
2296 \fI/usr/share/doc/ntp\f[]).
2297 Additional information can be found in the pages linked
2298 there, including the
2299 "Debugging Hints for Reference Clock Drivers"
2300 and
2301 "How To Write a Reference Clock Driver"
2302 pages
2303 (available as part of the HTML documentation
2304 provided in
2305 \fI/usr/share/doc/ntp\f[]).
2306 In addition, support for a PPS
2307 signal is available as described in the
2308 "Pulse-per-second (PPS) Signal Interfacing"
2309 page
2310 (available as part of the HTML documentation
2311 provided in
2312 \fI/usr/share/doc/ntp\f[]).
2313 Many
2314 drivers support special line discipline/streams modules which can
2315 significantly improve the accuracy using the driver.
2316 These are
2317 described in the
2318 "Line Disciplines and Streams Drivers"
2319 page
2320 (available as part of the HTML documentation
2321 provided in
2322 \fI/usr/share/doc/ntp\f[]).
2323 .sp \n(Ppu
2324 .ne 2
2325
2326 A reference clock will generally (though not always) be a radio
2327 timecode receiver which is synchronized to a source of standard
2328 time such as the services offered by the NRC in Canada and NIST and
2329 USNO in the US.
2330 The interface between the computer and the timecode
2331 receiver is device dependent, but is usually a serial port.
2332 A
2333 device driver specific to each reference clock must be selected and
2334 compiled in the distribution; however, most common radio, satellite
2335 and modem clocks are included by default.
2336 Note that an attempt to
2337 configure a reference clock when the driver has not been compiled
2338 or the hardware port has not been appropriately configured results
2339 in a scalding remark to the system log file, but is otherwise non
2340 hazardous.
2341 .sp \n(Ppu
2342 .ne 2
2343
2344 For the purposes of configuration,
2345 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2346 treats
2347 reference clocks in a manner analogous to normal NTP peers as much
2348 as possible.
2349 Reference clocks are identified by a syntactically
2350 correct but invalid IP address, in order to distinguish them from
2351 normal NTP peers.
2352 Reference clock addresses are of the form
2353 \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[],
2354 where
2355 \f\*[I-Font]t\f[]
2356 is an integer
2357 denoting the clock type and
2358 \f\*[I-Font]u\f[]
2359 indicates the unit
2360 number in the range 0-3.
2361 While it may seem overkill, it is in fact
2362 sometimes useful to configure multiple reference clocks of the same
2363 type, in which case the unit numbers must be unique.
2364 .sp \n(Ppu
2365 .ne 2
2366
2367 The
2368 \f\*[B-Font]server\f[]
2369 command is used to configure a reference
2370 clock, where the
2371 \f\*[I-Font]address\f[]
2372 argument in that command
2373 is the clock address.
2374 The
2375 \f\*[B-Font]key\f[],
2376 \f\*[B-Font]version\f[]
2377 and
2378 \f\*[B-Font]ttl\f[]
2379 options are not used for reference clock support.
2380 The
2381 \f\*[B-Font]mode\f[]
2382 option is added for reference clock support, as
2383 described below.
2384 The
2385 \f\*[B-Font]prefer\f[]
2386 option can be useful to
2387 persuade the server to cherish a reference clock with somewhat more
2388 enthusiasm than other reference clocks or peers.
2389 Further
2390 information on this option can be found in the
2391 "Mitigation Rules and the prefer Keyword"
2392 (available as part of the HTML documentation
2393 provided in
2394 \fI/usr/share/doc/ntp\f[])
2395 page.
2396 The
2397 \f\*[B-Font]minpoll\f[]
2398 and
2399 \f\*[B-Font]maxpoll\f[]
2400 options have
2401 meaning only for selected clock drivers.
2402 See the individual clock
2403 driver document pages for additional information.
2404 .sp \n(Ppu
2405 .ne 2
2406
2407 The
2408 \f\*[B-Font]fudge\f[]
2409 command is used to provide additional
2410 information for individual clock drivers and normally follows
2411 immediately after the
2412 \f\*[B-Font]server\f[]
2413 command.
2414 The
2415 \f\*[I-Font]address\f[]
2416 argument specifies the clock address.
2417 The
2418 \f\*[B-Font]refid\f[]
2419 and
2420 \f\*[B-Font]stratum\f[]
2421 options can be used to
2422 override the defaults for the device.
2423 There are two optional
2424 device-dependent time offsets and four flags that can be included
2425 in the
2426 \f\*[B-Font]fudge\f[]
2427 command as well.
2428 .sp \n(Ppu
2429 .ne 2
2430
2431 The stratum number of a reference clock is by default zero.
2432 Since the
2433 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2434 daemon adds one to the stratum of each
2435 peer, a primary server ordinarily displays an external stratum of
2436 one.
2437 In order to provide engineered backups, it is often useful to
2438 specify the reference clock stratum as greater than zero.
2439 The
2440 \f\*[B-Font]stratum\f[]
2441 option is used for this purpose.
2442 Also, in cases
2443 involving both a reference clock and a pulse-per-second (PPS)
2444 discipline signal, it is useful to specify the reference clock
2445 identifier as other than the default, depending on the driver.
2446 The
2447 \f\*[B-Font]refid\f[]
2448 option is used for this purpose.
2449 Except where noted,
2450 these options apply to all clock drivers.
2451 .SS Reference Clock Commands
2452 .TP 7
2453 .NOP \f\*[B-Font]server\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]]
2454 This command can be used to configure reference clocks in
2455 special ways.
2456 The options are interpreted as follows:
2457 .RS
2458 .TP 7
2459 .NOP \f\*[B-Font]prefer\f[]
2460 Marks the reference clock as preferred.
2461 All other things being
2462 equal, this host will be chosen for synchronization among a set of
2463 correctly operating hosts.
2464 See the
2465 "Mitigation Rules and the prefer Keyword"
2466 page
2467 (available as part of the HTML documentation
2468 provided in
2469 \fI/usr/share/doc/ntp\f[])
2470 for further information.
2471 .TP 7
2472 .NOP \f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]
2473 Specifies a mode number which is interpreted in a
2474 device-specific fashion.
2475 For instance, it selects a dialing
2476 protocol in the ACTS driver and a device subtype in the
2477 parse
2478 drivers.
2479 .TP 7
2480 .NOP \f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]
2481 .TP 7
2482 .NOP \f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]
2483 These options specify the minimum and maximum polling interval
2484 for reference clock messages, as a power of 2 in seconds
2485 For
2486 most directly connected reference clocks, both
2487 \f\*[B-Font]minpoll\f[]
2488 and
2489 \f\*[B-Font]maxpoll\f[]
2490 default to 6 (64 s).
2491 For modem reference clocks,
2492 \f\*[B-Font]minpoll\f[]
2493 defaults to 10 (17.1 m) and
2494 \f\*[B-Font]maxpoll\f[]
2495 defaults to 14 (4.5 h).
2496 The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
2497 .RE
2498 .TP 7
2499 .NOP \f\*[B-Font]fudge\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]time1\f[] \f\*[I-Font]sec\f[]] [\f\*[B-Font]time2\f[] \f\*[I-Font]sec\f[]] [\f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]refid\f[] \f\*[I-Font]string\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]flag1\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag2\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag3\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]] [\f\*[B-Font]flag4\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]]
2500 This command can be used to configure reference clocks in
2501 special ways.
2502 It must immediately follow the
2503 \f\*[B-Font]server\f[]
2504 command which configures the driver.
2505 Note that the same capability
2506 is possible at run time using the
2507 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
2508 program.
2509 The options are interpreted as
2510 follows:
2511 .RS
2512 .TP 7
2513 .NOP \f\*[B-Font]time1\f[] \f\*[I-Font]sec\f[]
2514 Specifies a constant to be added to the time offset produced by
2515 the driver, a fixed-point decimal number in seconds.
2516 This is used
2517 as a calibration constant to adjust the nominal time offset of a
2518 particular clock to agree with an external standard, such as a
2519 precision PPS signal.
2520 It also provides a way to correct a
2521 systematic error or bias due to serial port or operating system
2522 latencies, different cable lengths or receiver internal delay.
2523 The
2524 specified offset is in addition to the propagation delay provided
2525 by other means, such as internal DIPswitches.
2526 Where a calibration
2527 for an individual system and driver is available, an approximate
2528 correction is noted in the driver documentation pages.
2529 Note: in order to facilitate calibration when more than one
2530 radio clock or PPS signal is supported, a special calibration
2531 feature is available.
2532 It takes the form of an argument to the
2533 \f\*[B-Font]enable\f[]
2534 command described in
2535 \fIMiscellaneous\f[] \fIOptions\f[]
2536 page and operates as described in the
2537 "Reference Clock Drivers"
2538 page
2539 (available as part of the HTML documentation
2540 provided in
2541 \fI/usr/share/doc/ntp\f[]).
2542 .TP 7
2543 .NOP \f\*[B-Font]time2\f[] \f\*[I-Font]secs\f[]
2544 Specifies a fixed-point decimal number in seconds, which is
2545 interpreted in a driver-dependent way.
2546 See the descriptions of
2547 specific drivers in the
2548 "Reference Clock Drivers"
2549 page
2550 (available as part of the HTML documentation
2551 provided in
2552 \fI/usr/share/doc/ntp\f[] \fI).\f[]
2553 .TP 7
2554 .NOP \f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]
2555 Specifies the stratum number assigned to the driver, an integer
2556 between 0 and 15.
2557 This number overrides the default stratum number
2558 ordinarily assigned by the driver itself, usually zero.
2559 .TP 7
2560 .NOP \f\*[B-Font]refid\f[] \f\*[I-Font]string\f[]
2561 Specifies an ASCII string of from one to four characters which
2562 defines the reference identifier used by the driver.
2563 This string
2564 overrides the default identifier ordinarily assigned by the driver
2565 itself.
2566 .TP 7
2567 .NOP \f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]
2568 Specifies a mode number which is interpreted in a
2569 device-specific fashion.
2570 For instance, it selects a dialing
2571 protocol in the ACTS driver and a device subtype in the
2572 parse
2573 drivers.
2574 .TP 7
2575 .NOP \f\*[B-Font]flag1\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
2576 .TP 7
2577 .NOP \f\*[B-Font]flag2\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
2578 .TP 7
2579 .NOP \f\*[B-Font]flag3\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
2580 .TP 7
2581 .NOP \f\*[B-Font]flag4\f[] \f\*[B-Font]0\f[] \f\*[B-Font]\&|\f[] \f\*[B-Font]1\f[]
2582 These four flags are used for customizing the clock driver.
2583 The
2584 interpretation of these values, and whether they are used at all,
2585 is a function of the particular clock driver.
2586 However, by
2587 convention
2588 \f\*[B-Font]flag4\f[]
2589 is used to enable recording monitoring
2590 data to the
2591 \f\*[B-Font]clockstats\f[]
2592 file configured with the
2593 \f\*[B-Font]filegen\f[]
2594 command.
2595 Further information on the
2596 \f\*[B-Font]filegen\f[]
2597 command can be found in
2598 \fIMonitoring\f[] \fIOptions\f[].
2599 .RE
2600 .PP
2601 .SH Miscellaneous Options
2602 .TP 7
2603 .NOP \f\*[B-Font]broadcastdelay\f[] \f\*[I-Font]seconds\f[]
2604 The broadcast and multicast modes require a special calibration
2605 to determine the network delay between the local and remote
2606 servers.
2607 Ordinarily, this is done automatically by the initial
2608 protocol exchanges between the client and server.
2609 In some cases,
2610 the calibration procedure may fail due to network or server access
2611 controls, for example.
2612 This command specifies the default delay to
2613 be used under these circumstances.
2614 Typically (for Ethernet), a
2615 number between 0.003 and 0.007 seconds is appropriate.
2616 The default
2617 when this command is not used is 0.004 seconds.
2618 .TP 7
2619 .NOP \f\*[B-Font]calldelay\f[] \f\*[I-Font]delay\f[]
2620 This option controls the delay in seconds between the first and second
2621 packets sent in burst or iburst mode to allow additional time for a modem
2622 or ISDN call to complete.
2623 .TP 7
2624 .NOP \f\*[B-Font]driftfile\f[] \f\*[I-Font]driftfile\f[]
2625 This command specifies the complete path and name of the file used to
2626 record the frequency of the local clock oscillator.
2627 This is the same
2628 operation as the
2629 \f\*[B-Font]\-f\f[]
2630 command line option.
2631 If the file exists, it is read at
2632 startup in order to set the initial frequency and then updated once per
2633 hour with the current frequency computed by the daemon.
2634 If the file name is
2635 specified, but the file itself does not exist, the starts with an initial
2636 frequency of zero and creates the file when writing it for the first time.
2637 If this command is not given, the daemon will always start with an initial
2638 frequency of zero.
2639 .sp \n(Ppu
2640 .ne 2
2641
2642 The file format consists of a single line containing a single
2643 floating point number, which records the frequency offset measured
2644 in parts-per-million (PPM).
2645 The file is updated by first writing
2646 the current drift value into a temporary file and then renaming
2647 this file to replace the old version.
2648 This implies that
2649 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2650 must have write permission for the directory the
2651 drift file is located in, and that file system links, symbolic or
2652 otherwise, should be avoided.
2653 .TP 7
2654 .NOP \f\*[B-Font]dscp\f[] \f\*[I-Font]value\f[]
2655 This option specifies the Differentiated Services Control Point (DSCP) value,
2656 a 6-bit code.
2657 The default value is 46, signifying Expedited Forwarding.
2658 .TP 7
2659 .NOP \f\*[B-Font]enable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]mode7\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]stats\f[] | \f\*[B-Font]peer_clear_digest_early\f[] | \f\*[B-Font]unpeer_crypto_early\f[] | \f\*[B-Font]unpeer_crypto_nak_early\f[] | \f\*[B-Font]unpeer_digest_early\f[]]
2660 .TP 7
2661 .NOP \f\*[B-Font]disable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]mode7\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]stats\f[] | \f\*[B-Font]peer_clear_digest_early\f[] | \f\*[B-Font]unpeer_crypto_early\f[] | \f\*[B-Font]unpeer_crypto_nak_early\f[] | \f\*[B-Font]unpeer_digest_early\f[]]
2662 Provides a way to enable or disable various server options.
2663 Flags not mentioned are unaffected.
2664 Note that all of these flags
2665 can be controlled remotely using the
2666 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
2667 utility program.
2668 .RS
2669 .TP 7
2670 .NOP \f\*[B-Font]auth\f[]
2671 Enables the server to synchronize with unconfigured peers only if the
2672 peer has been correctly authenticated using either public key or
2673 private key cryptography.
2674 The default for this flag is
2675 \f\*[B-Font]enable\f[].
2676 .TP 7
2677 .NOP \f\*[B-Font]bclient\f[]
2678 Enables the server to listen for a message from a broadcast or
2679 multicast server, as in the
2680 \f\*[B-Font]multicastclient\f[]
2681 command with default
2682 address.
2683 The default for this flag is
2684 \f\*[B-Font]disable\f[].
2685 .TP 7
2686 .NOP \f\*[B-Font]calibrate\f[]
2687 Enables the calibrate feature for reference clocks.
2688 The default for
2689 this flag is
2690 \f\*[B-Font]disable\f[].
2691 .TP 7
2692 .NOP \f\*[B-Font]kernel\f[]
2693 Enables the kernel time discipline, if available.
2694 The default for this
2695 flag is
2696 \f\*[B-Font]enable\f[]
2697 if support is available, otherwise
2698 \f\*[B-Font]disable\f[].
2699 .TP 7
2700 .NOP \f\*[B-Font]mode7\f[]
2701 Enables processing of NTP mode 7 implementation-specific requests
2702 which are used by the deprecated
2703 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
2704 program.
2705 The default for this flag is disable.
2706 This flag is excluded from runtime configuration using
2707 \fCntpq\f[]\fR(@NTPQ_MS@)\f[].
2708 The
2709 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
2710 program provides the same capabilities as
2711 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
2712 using standard mode 6 requests.
2713 .TP 7
2714 .NOP \f\*[B-Font]monitor\f[]
2715 Enables the monitoring facility.
2716 See the
2717 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
2718 program
2719 and the
2720 \f\*[B-Font]monlist\f[]
2721 command or further information.
2722 The
2723 default for this flag is
2724 \f\*[B-Font]enable\f[].
2725 .TP 7
2726 .NOP \f\*[B-Font]ntp\f[]
2727 Enables time and frequency discipline.
2728 In effect, this switch opens and
2729 closes the feedback loop, which is useful for testing.
2730 The default for
2731 this flag is
2732 \f\*[B-Font]enable\f[].
2733 .TP 7
2734 .NOP \f\*[B-Font]peer_clear_digest_early\f[]
2735 By default, if
2736 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2737 is using autokey and it
2738 receives a crypto-NAK packet that
2739 passes the duplicate packet and origin timestamp checks
2740 the peer variables are immediately cleared.
2741 While this is generally a feature
2742 as it allows for quick recovery if a server key has changed,
2743 a properly forged and appropriately delivered crypto-NAK packet
2744 can be used in a DoS attack.
2745 If you have active noticable problems with this type of DoS attack
2746 then you should consider
2747 disabling this option.
2748 You can check your
2749 \f\*[B-Font]peerstats\f[]
2750 file for evidence of any of these attacks.
2751 The
2752 default for this flag is
2753 \f\*[B-Font]enable\f[].
2754 .TP 7
2755 .NOP \f\*[B-Font]stats\f[]
2756 Enables the statistics facility.
2757 See the
2758 \fIMonitoring\f[] \fIOptions\f[]
2759 section for further information.
2760 The default for this flag is
2761 \f\*[B-Font]disable\f[].
2762 .TP 7
2763 .NOP \f\*[B-Font]unpeer_crypto_early\f[]
2764 By default, if
2765 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2766 receives an autokey packet that fails TEST9,
2767 a crypto failure,
2768 the association is immediately cleared.
2769 This is almost certainly a feature,
2770 but if, in spite of the current recommendation of not using autokey,
2771 you are
2772 .B still
2773 using autokey
2774 .B and
2775 you are seeing this sort of DoS attack
2776 disabling this flag will delay
2777 tearing down the association until the reachability counter
2778 becomes zero.
2779 You can check your
2780 \f\*[B-Font]peerstats\f[]
2781 file for evidence of any of these attacks.
2782 The
2783 default for this flag is
2784 \f\*[B-Font]enable\f[].
2785 .TP 7
2786 .NOP \f\*[B-Font]unpeer_crypto_nak_early\f[]
2787 By default, if
2788 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2789 receives a crypto-NAK packet that
2790 passes the duplicate packet and origin timestamp checks
2791 the association is immediately cleared.
2792 While this is generally a feature
2793 as it allows for quick recovery if a server key has changed,
2794 a properly forged and appropriately delivered crypto-NAK packet
2795 can be used in a DoS attack.
2796 If you have active noticable problems with this type of DoS attack
2797 then you should consider
2798 disabling this option.
2799 You can check your
2800 \f\*[B-Font]peerstats\f[]
2801 file for evidence of any of these attacks.
2802 The
2803 default for this flag is
2804 \f\*[B-Font]enable\f[].
2805 .TP 7
2806 .NOP \f\*[B-Font]unpeer_digest_early\f[]
2807 By default, if
2808 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2809 receives what should be an authenticated packet
2810 that passes other packet sanity checks but
2811 contains an invalid digest
2812 the association is immediately cleared.
2813 While this is generally a feature
2814 as it allows for quick recovery,
2815 if this type of packet is carefully forged and sent
2816 during an appropriate window it can be used for a DoS attack.
2817 If you have active noticable problems with this type of DoS attack
2818 then you should consider
2819 disabling this option.
2820 You can check your
2821 \f\*[B-Font]peerstats\f[]
2822 file for evidence of any of these attacks.
2823 The
2824 default for this flag is
2825 \f\*[B-Font]enable\f[].
2826 .RE
2827 .TP 7
2828 .NOP \f\*[B-Font]includefile\f[] \f\*[I-Font]includefile\f[]
2829 This command allows additional configuration commands
2830 to be included from a separate file.
2831 Include files may
2832 be nested to a depth of five; upon reaching the end of any
2833 include file, command processing resumes in the previous
2834 configuration file.
2835 This option is useful for sites that run
2836 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2837 on multiple hosts, with (mostly) common options (e.g., a
2838 restriction list).
2839 .TP 7
2840 .NOP \f\*[B-Font]interface\f[] [\f\*[B-Font]listen\f[] | \f\*[B-Font]ignore\f[] | \f\*[B-Font]drop\f[]] [\f\*[B-Font]all\f[] | \f\*[B-Font]ipv4\f[] | \f\*[B-Font]ipv6\f[] | \f\*[B-Font]wildcard\f[] \f\*[I-Font]name\f[] | \f\*[I-Font]address\f[] [\f\*[B-Font]/\f[] \f\*[I-Font]prefixlen\f[]]]
2841 The
2842 \f\*[B-Font]interface\f[]
2843 directive controls which network addresses
2844 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2845 opens, and whether input is dropped without processing.
2846 The first parameter determines the action for addresses
2847 which match the second parameter.
2848 The second parameter specifies a class of addresses,
2849 or a specific interface name,
2850 or an address.
2851 In the address case,
2852 \f\*[I-Font]prefixlen\f[]
2853 determines how many bits must match for this rule to apply.
2854 \f\*[B-Font]ignore\f[]
2855 prevents opening matching addresses,
2856 \f\*[B-Font]drop\f[]
2857 causes
2858 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2859 to open the address and drop all received packets without examination.
2860 Multiple
2861 \f\*[B-Font]interface\f[]
2862 directives can be used.
2863 The last rule which matches a particular address determines the action for it.
2864 \f\*[B-Font]interface\f[]
2865 directives are disabled if any
2866 \f\*[B-Font]\-I\f[],
2867 \f\*[B-Font]\-\-interface\f[],
2868 \f\*[B-Font]\-L\f[],
2869 or
2870 \f\*[B-Font]\-\-novirtualips\f[]
2871 command-line options are specified in the configuration file,
2872 all available network addresses are opened.
2873 The
2874 \f\*[B-Font]nic\f[]
2875 directive is an alias for
2876 \f\*[B-Font]interface\f[].
2877 .TP 7
2878 .NOP \f\*[B-Font]leapfile\f[] \f\*[I-Font]leapfile\f[]
2879 This command loads the IERS leapseconds file and initializes the
2880 leapsecond values for the next leapsecond event, leapfile expiration
2881 time, and TAI offset.
2882 The file can be obtained directly from the IERS at
2883 \f[C]https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[]
2884 or
2885 \f[C]ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[].
2886 The
2887 \f\*[B-Font]leapfile\f[]
2888 is scanned when
2889 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2890 processes the
2891 \f\*[B-Font]leapfile\f[] \f\*[B-Font]directive\f[] \f\*[B-Font]or\f[] \f\*[B-Font]when\f[]
2892 \f\*[B-Font]ntpd\f[] \f\*[B-Font]detects\f[] \f\*[B-Font]that\f[] \f\*[B-Font]the\f[]
2893 \f\*[I-Font]leapfile\f[]
2894 has changed.
2895 \f\*[B-Font]ntpd\f[]
2896 checks once a day to see if the
2897 \f\*[I-Font]leapfile\f[]
2898 has changed.
2899 The
2900 \fCupdate-leap\f[]\fR(1update_leapmdoc)\f[]
2901 script can be run to see if the
2902 \f\*[I-Font]leapfile\f[]
2903 should be updated.
2904 .TP 7
2905 .NOP \f\*[B-Font]leapsmearinterval\f[] \f\*[I-Font]seconds\f[]
2906 This EXPERIMENTAL option is only available if
2907 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2908 was built with the
2909 \f\*[B-Font]\--enable-leap-smear\f[]
2910 option to the
2911 \f\*[B-Font]configure\f[]
2912 script.
2913 It specifies the interval over which a leap second correction will be applied.
2914 Recommended values for this option are between
2915 7200 (2 hours) and 86400 (24 hours).
2916 .Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
2917 See http://bugs.ntp.org/2855 for more information.
2918 .TP 7
2919 .NOP \f\*[B-Font]logconfig\f[] \f\*[I-Font]configkeyword\f[]
2920 This command controls the amount and type of output written to
2921 the system
2922 \fCsyslog\f[]\fR(3)\f[]
2923 facility or the alternate
2924 \f\*[B-Font]logfile\f[]
2925 log file.
2926 By default, all output is turned on.
2927 All
2928 \f\*[I-Font]configkeyword\f[]
2929 keywords can be prefixed with
2930 \[oq]=\[cq],
2931 \[oq]+\[cq]
2932 and
2933 \[oq]\-\[cq],
2934 where
2935 \[oq]=\[cq]
2936 sets the
2937 \fCsyslog\f[]\fR(3)\f[]
2938 priority mask,
2939 \[oq]+\[cq]
2940 adds and
2941 \[oq]\-\[cq]
2942 removes
2943 messages.
2944 \fCsyslog\f[]\fR(3)\f[]
2945 messages can be controlled in four
2946 classes
2947 (\f\*[B-Font]clock\f[], \f\*[B-Font]peer\f[], \f\*[B-Font]sys\f[] and \f\*[B-Font]sync\f[]).
2948 Within these classes four types of messages can be
2949 controlled: informational messages
2950 (\f\*[B-Font]info\f[]),
2951 event messages
2952 (\f\*[B-Font]events\f[]),
2953 statistics messages
2954 (\f\*[B-Font]statistics\f[])
2955 and
2956 status messages
2957 (\f\*[B-Font]status\f[]).
2958 .sp \n(Ppu
2959 .ne 2
2960
2961 Configuration keywords are formed by concatenating the message class with
2962 the event class.
2963 The
2964 \f\*[B-Font]all\f[]
2965 prefix can be used instead of a message class.
2966 A
2967 message class may also be followed by the
2968 \f\*[B-Font]all\f[]
2969 keyword to enable/disable all
2970 messages of the respective message class.
2971 Thus, a minimal log configuration
2972 could look like this:
2973 .br
2974 .in +4
2975 .nf
2976 logconfig =syncstatus +sysevents
2977 .in -4
2978 .fi
2979 .sp \n(Ppu
2980 .ne 2
2981
2982 This would just list the synchronizations state of
2983 \fCntpd\f[]\fR(@NTPD_MS@)\f[]
2984 and the major system events.
2985 For a simple reference server, the
2986 following minimum message configuration could be useful:
2987 .br
2988 .in +4
2989 .nf
2990 logconfig =syncall +clockall
2991 .in -4
2992 .fi
2993 .sp \n(Ppu
2994 .ne 2
2995
2996 This configuration will list all clock information and
2997 synchronization information.
2998 All other events and messages about
2999 peers, system events and so on is suppressed.
3000 .TP 7
3001 .NOP \f\*[B-Font]logfile\f[] \f\*[I-Font]logfile\f[]
3002 This command specifies the location of an alternate log file to
3003 be used instead of the default system
3004 \fCsyslog\f[]\fR(3)\f[]
3005 facility.
3006 This is the same operation as the
3007 \f\*[B-Font]\-l\f[]
3008 command line option.
3009 .TP 7
3010 .NOP \f\*[B-Font]mru\f[] [\f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[] | \f\*[B-Font]initialloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]]
3011 Controls size limite of the monitoring facility's Most Recently Used
3012 (MRU) list
3013 of client addresses, which is also used by the
3014 rate control facility.
3015 .RS
3016 .TP 7
3017 .NOP \f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[]
3018 .TP 7
3019 .NOP \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[]
3020 Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
3021 The acutal limit will be up to
3022 \f\*[B-Font]incalloc\f[]
3023 entries or
3024 \f\*[B-Font]incmem\f[]
3025 kilobytes larger.
3026 As with all of the
3027 \f\*[B-Font]mru\f[]
3028 options offered in units of entries or kilobytes, if both
3029 \f\*[B-Font]maxdepth\f[]
3030 and
3031 \f\*[B-Font]maxmem\f[] \f\*[B-Font]are\f[] \f\*[B-Font]used,\f[] \f\*[B-Font]the\f[] \f\*[B-Font]last\f[] \f\*[B-Font]one\f[] \f\*[B-Font]used\f[] \f\*[B-Font]controls.\f[]
3032 The default is 1024 kilobytes.
3033 .TP 7
3034 .NOP \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[]
3035 Lower limit on the MRU list size.
3036 When the MRU list has fewer than
3037 \f\*[B-Font]mindepth\f[]
3038 entries, existing entries are never removed to make room for newer ones,
3039 regardless of their age.
3040 The default is 600 entries.
3041 .TP 7
3042 .NOP \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[]
3043 Once the MRU list has
3044 \f\*[B-Font]mindepth\f[]
3045 entries and an additional client is to ba added to the list,
3046 if the oldest entry was updated more than
3047 \f\*[B-Font]maxage\f[]
3048 seconds ago, that entry is removed and its storage is reused.
3049 If the oldest entry was updated more recently the MRU list is grown,
3050 subject to 
3051 \f\*[B-Font]maxdepth\f[] \f\*[B-Font]/\f[] \f\*[B-Font]moxmem\f[].
3052 The default is 64 seconds.
3053 .TP 7
3054 .NOP \f\*[B-Font]initalloc\f[] \f\*[I-Font]count\f[]
3055 .TP 7
3056 .NOP \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[]
3057 Initial memory allocation at the time the monitoringfacility is first enabled,
3058 in terms of the number of entries or kilobytes.
3059 The default is 4 kilobytes.
3060 .TP 7
3061 .NOP \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[]
3062 .TP 7
3063 .NOP \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]
3064 Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
3065 The default is 4 kilobytes.
3066 .RE
3067 .TP 7
3068 .NOP \f\*[B-Font]nonvolatile\f[] \f\*[I-Font]threshold\f[]
3069 Specify the
3070 \f\*[I-Font]threshold\f[]
3071 delta in seconds before an hourly change to the
3072 \f\*[B-Font]driftfile\f[]
3073 (frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
3074 The frequency file is inspected each hour.
3075 If the difference between the current frequency and the last value written
3076 exceeds the threshold, the file is written and the
3077 \f\*[B-Font]threshold\f[]
3078 becomes the new threshold value.
3079 If the threshold is not exceeeded, it is reduced by half.
3080 This is intended to reduce the number of file writes 
3081 for embedded systems with nonvolatile memory.
3082 .TP 7
3083 .NOP \f\*[B-Font]phone\f[] \f\*[I-Font]dial\f[] \f\*[I-Font]...\f[]
3084 This command is used in conjunction with
3085 the ACTS modem driver (type 18)
3086 or the JJY driver (type 40, mode 100 \- 180).
3087 For the ACTS modem driver (type 18), the arguments consist of
3088 a maximum of 10 telephone numbers used to dial USNO, NIST, or European
3089 time service.
3090 For the JJY driver (type 40 mode 100 \- 180), the argument is 
3091 one telephone number used to dial the telephone JJY service.
3092 The Hayes command ATDT is normally prepended to the number.
3093 The number can contain other modem control codes as well.
3094 .TP 7
3095 .NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
3096 Reset one or more groups of counters maintained by
3097 \f\*[B-Font]ntpd\f[]
3098 and exposed by
3099 \f\*[B-Font]ntpq\f[]
3100 and
3101 \f\*[B-Font]ntpdc\f[].
3102 .TP 7
3103 .NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
3104 .RS
3105 .TP 7
3106 .NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
3107 Specify the number of megabytes of memory that should be
3108 allocated and locked.
3109 Probably only available under Linux, this option may be useful
3110 when dropping root (the
3111 \f\*[B-Font]\-i\f[]
3112 option).
3113 The default is 32 megabytes on non-Linux machines, and \-1 under Linux.
3114 -1 means "do not lock the process into memory".
3115 0 means "lock whatever memory the process wants into memory".
3116 .TP 7
3117 .NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
3118 Specifies the maximum size of the process stack on systems with the
3119 \fBmlockall\f[]\fR()\f[]
3120 function.
3121 Defaults to 50 4k pages (200 4k pages in OpenBSD).
3122 .TP 7
3123 .NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
3124 Specifies the maximum number of file descriptors ntpd may have open at once.
3125 Defaults to the system default.
3126 .RE
3127 .TP 7
3128 .NOP \f\*[B-Font]saveconfigdir\f[] \f\*[I-Font]directory_path\f[]
3129 Specify the directory in which to write configuration snapshots
3130 requested with
3131 .Cm ntpq 's
3132 \f\*[B-Font]saveconfig\f[]
3133 command.
3134 If
3135 \f\*[B-Font]saveconfigdir\f[]
3136 does not appear in the configuration file,
3137 \f\*[B-Font]saveconfig\f[]
3138 requests are rejected by
3139 \f\*[B-Font]ntpd\f[].
3140 .TP 7
3141 .NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
3142 Write the current configuration, including any runtime
3143 modifications given with
3144 \f\*[B-Font]:config\f[]
3145 or
3146 \f\*[B-Font]config-from-file\f[]
3147 to the
3148 \f\*[B-Font]ntpd\f[]
3149 host's
3150 \f\*[I-Font]filename\f[]
3151 in the
3152 \f\*[B-Font]saveconfigdir\f[].
3153 This command will be rejected unless the
3154 \f\*[B-Font]saveconfigdir\f[]
3155 directive appears in
3156 .Cm ntpd 's
3157 configuration file.
3158 \f\*[I-Font]filename\f[]
3159 can use
3160 \fCstrftime\f[]\fR(3)\f[]
3161 format directives to substitute the current date and time,
3162 for example,
3163 \f\*[B-Font]saveconfig\ ntp-%Y%m%d-%H%M%S.conf\f[].
3164 The filename used is stored in the system variable
3165 \f\*[B-Font]savedconfig\f[].
3166 Authentication is required.
3167 .TP 7
3168 .NOP \f\*[B-Font]setvar\f[] \f\*[I-Font]variable\f[] [\f\*[B-Font]default\f[]]
3169 This command adds an additional system variable.
3170 These
3171 variables can be used to distribute additional information such as
3172 the access policy.
3173 If the variable of the form
3174 \fIname\f[]\fI=\f[]\f\*[I-Font]value\f[]
3175 is followed by the
3176 \f\*[B-Font]default\f[]
3177 keyword, the
3178 variable will be listed as part of the default system variables
3179 (\fCntpq\f[]\fR(@NTPQ_MS@)\f[] \f\*[B-Font]rv\f[] command)).
3180 These additional variables serve
3181 informational purposes only.
3182 They are not related to the protocol
3183 other that they can be listed.
3184 The known protocol variables will
3185 always override any variables defined via the
3186 \f\*[B-Font]setvar\f[]
3187 mechanism.
3188 There are three special variables that contain the names
3189 of all variable of the same group.
3190 The
3191 \fIsys_var_list\f[]
3192 holds
3193 the names of all system variables.
3194 The
3195 \fIpeer_var_list\f[]
3196 holds
3197 the names of all peer variables and the
3198 \fIclock_var_list\f[]
3199 holds the names of the reference clock variables.
3200 .TP 7
3201 .NOP \f\*[B-Font]sysinfo\f[]
3202 Display operational summary.
3203 .TP 7
3204 .NOP \f\*[B-Font]sysstats\f[]
3205 Show statistics counters maintained in the protocol module.
3206 .TP 7
3207 .NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
3208 This command can be used to alter several system variables in
3209 very exceptional circumstances.
3210 It should occur in the
3211 configuration file before any other configuration options.
3212 The
3213 default values of these variables have been carefully optimized for
3214 a wide range of network speeds and reliability expectations.
3215 In
3216 general, they interact in intricate ways that are hard to predict
3217 and some combinations can result in some very nasty behavior.
3218 Very
3219 rarely is it necessary to change the default values; but, some
3220 folks cannot resist twisting the knobs anyway and this command is
3221 for them.
3222 Emphasis added: twisters are on their own and can expect
3223 no help from the support group.
3224 .sp \n(Ppu
3225 .ne 2
3226
3227 The variables operate as follows:
3228 .RS
3229 .TP 7
3230 .NOP \f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[]
3231 The argument becomes the new value for the minimum Allan
3232 intercept, which is a parameter of the PLL/FLL clock discipline
3233 algorithm.
3234 The value in log2 seconds defaults to 7 (1024 s), which is also the lower
3235 limit.
3236 .TP 7
3237 .NOP \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[]
3238 The argument becomes the new value for the dispersion increase rate,
3239 normally .000015 s/s.
3240 .TP 7
3241 .NOP \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[]
3242 The argument becomes the initial value of the frequency offset in
3243 parts-per-million.
3244 This overrides the value in the frequency file, if
3245 present, and avoids the initial training state if it is not.
3246 .TP 7
3247 .NOP \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[]
3248 The argument becomes the new value for the experimental
3249 huff-n'-puff filter span, which determines the most recent interval
3250 the algorithm will search for a minimum delay.
3251 The lower limit is
3252 900 s (15 m), but a more reasonable value is 7200 (2 hours).
3253 There
3254 is no default, since the filter is not enabled unless this command
3255 is given.
3256 .TP 7
3257 .NOP \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[]
3258 The argument is the panic threshold, normally 1000 s.
3259 If set to zero,
3260 the panic sanity check is disabled and a clock offset of any value will
3261 be accepted.
3262 .TP 7
3263 .NOP \f\*[B-Font]step\f[] \f\*[I-Font]step\f[]
3264 The argument is the step threshold, which by default is 0.128 s.
3265 It can
3266 be set to any positive number in seconds.
3267 If set to zero, step
3268 adjustments will never occur.
3269 Note: The kernel time discipline is
3270 disabled if the step threshold is set to zero or greater than the
3271 default.
3272 .TP 7
3273 .NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
3274 The argument is the step threshold for the backward direction,
3275 which by default is 0.128 s.
3276 It can
3277 be set to any positive number in seconds.
3278 If both the forward and backward step thresholds are set to zero, step
3279 adjustments will never occur.
3280 Note: The kernel time discipline is
3281 disabled if
3282 each direction of step threshold are either
3283 set to zero or greater than .5 second.
3284 .TP 7
3285 .NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
3286 As for stepback, but for the forward direction.
3287 .TP 7
3288 .NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
3289 The argument is the stepout timeout, which by default is 900 s.
3290 It can
3291 be set to any positive number in seconds.
3292 If set to zero, the stepout
3293 pulses will not be suppressed.
3294 .RE
3295 .TP 7
3296 .NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\ name\f[] \f\*[I-Font]=\f[] \f\*[I-Font]value\f[] \f\*[I-Font][,...]\f[]
3297 Write (create or update) the specified variables.
3298 If the
3299 \f\*[B-Font]assocID\f[]
3300 is zero, the variablea re from the
3301 system variables
3302 name space, otherwise they are from the
3303 peer variables
3304 name space.
3305 The
3306 \f\*[B-Font]assocID\f[]
3307 is required, as the same name can occur in both name spaces.
3308 .TP 7
3309 .NOP \f\*[B-Font]trap\f[] \f\*[I-Font]host_address\f[] [\f\*[B-Font]port\f[] \f\*[I-Font]port_number\f[]] [\f\*[B-Font]interface\f[] \f\*[I-Font]interface_address\f[]]
3310 This command configures a trap receiver at the given host
3311 address and port number for sending messages with the specified
3312 local interface address.
3313 If the port number is unspecified, a value
3314 of 18447 is used.
3315 If the interface address is not specified, the
3316 message is sent with a source address of the local interface the
3317 message is sent through.
3318 Note that on a multihomed host the
3319 interface used may vary from time to time with routing changes.
3320 .TP 7
3321 .NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
3322 This command specifies a list of TTL values in increasing order.
3323 Up to 8 values can be specified.
3324 In
3325 \f\*[B-Font]manycast\f[]
3326 mode these values are used in-turn in an expanding-ring search.
3327 The default is eight multiples of 32 starting at 31.
3328 .sp \n(Ppu
3329 .ne 2
3330
3331 The trap receiver will generally log event messages and other
3332 information from the server in a log file.
3333 While such monitor
3334 programs may also request their own trap dynamically, configuring a
3335 trap receiver will ensure that no messages are lost when the server
3336 is started.
3337 .TP 7
3338 .NOP \f\*[B-Font]hop\f[] \f\*[I-Font]...\f[]
3339 This command specifies a list of TTL values in increasing order, up to 8
3340 values can be specified.
3341 In manycast mode these values are used in turn in
3342 an expanding-ring search.
3343 The default is eight multiples of 32 starting at
3344 31.
3345 .PP
3346 .SH "OPTIONS"
3347 .TP
3348 .NOP \f\*[B-Font]\-\-help\f[]
3349 Display usage information and exit.
3350 .TP
3351 .NOP \f\*[B-Font]\-\-more-help\f[]
3352 Pass the extended usage information through a pager.
3353 .TP
3354 .NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
3355 Output version of program and exit.  The default mode is `v', a simple
3356 version.  The `c' mode will print copyright information and `n' will
3357 print the full copyright notice.
3358 .PP
3359 .SH "OPTION PRESETS"
3360 Any option that is not marked as \fInot presettable\fP may be preset
3361 by loading values from environment variables named:
3362 .nf
3363   \fBNTP_CONF_<option-name>\fP or \fBNTP_CONF\fP
3364 .fi
3365 .ad
3366 .SH "ENVIRONMENT"
3367 See \fBOPTION PRESETS\fP for configuration environment variables.
3368 .SH FILES
3369 .TP 15
3370 .NOP \fI/etc/ntp.conf\f[]
3371 the default name of the configuration file
3372 .br
3373 .ns
3374 .TP 15
3375 .NOP \fIntp.keys\f[]
3376 private MD5 keys
3377 .br
3378 .ns
3379 .TP 15
3380 .NOP \fIntpkey\f[]
3381 RSA private key
3382 .br
3383 .ns
3384 .TP 15
3385 .NOP \fIntpkey_\f[]\f\*[I-Font]host\f[]
3386 RSA public key
3387 .br
3388 .ns
3389 .TP 15
3390 .NOP \fIntp_dh\f[]
3391 Diffie-Hellman agreement parameters
3392 .PP
3393 .SH "EXIT STATUS"
3394 One of the following exit values will be returned:
3395 .TP
3396 .NOP 0 " (EXIT_SUCCESS)"
3397 Successful program execution.
3398 .TP
3399 .NOP 1 " (EXIT_FAILURE)"
3400 The operation failed or the command syntax was not valid.
3401 .TP
3402 .NOP 70 " (EX_SOFTWARE)"
3403 libopts had an internal operational error.  Please report
3404 it to autogen-users@lists.sourceforge.net.  Thank you.
3405 .PP
3406 .SH "SEE ALSO"
3407 \fCntpd\f[]\fR(@NTPD_MS@)\f[],
3408 \fCntpdc\f[]\fR(@NTPDC_MS@)\f[],
3409 \fCntpq\f[]\fR(@NTPQ_MS@)\f[]
3410 .sp \n(Ppu
3411 .ne 2
3412
3413 In addition to the manual pages provided,
3414 comprehensive documentation is available on the world wide web
3415 at
3416 \f[C]http://www.ntp.org/\f[].
3417 A snapshot of this documentation is available in HTML format in
3418 \fI/usr/share/doc/ntp\f[].
3419 David L. Mills,
3420 \fINetwork Time Protocol (Version 4)\fR,
3421 RFC5905
3422 .PP
3423
3424 .SH "AUTHORS"
3425 The University of Delaware and Network Time Foundation
3426 .SH "COPYRIGHT"
3427 Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
3428 This program is released under the terms of the NTP license, <http://ntp.org/license>.
3429 .SH BUGS
3430 The syntax checking is not picky; some combinations of
3431 ridiculous and even hilarious options and modes may not be
3432 detected.
3433 .sp \n(Ppu
3434 .ne 2
3435
3436 The
3437 \fIntpkey_\f[]\f\*[I-Font]host\f[]
3438 files are really digital
3439 certificates.
3440 These should be obtained via secure directory
3441 services when they become universally available.
3442 .sp \n(Ppu
3443 .ne 2
3444
3445 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
3446 .SH NOTES
3447 This document was derived from FreeBSD.
3448 .sp \n(Ppu
3449 .ne 2
3450
3451 This manual page was \fIAutoGen\fP-erated from the \fBntp.conf\fP
3452 option definitions.