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