1290001Sglebius@node ntp.conf Notes
2290001Sglebius@section Notes about ntp.conf
3290001Sglebius@pindex ntp.conf
4290001Sglebius@cindex Network Time Protocol (NTP) daemon configuration file format
5290001Sglebius@ignore
6290001Sglebius#
7290001Sglebius# EDIT THIS FILE WITH CAUTION  (invoke-ntp.conf.texi)
8290001Sglebius#
9310419Sdelphij# It has been AutoGen-ed  November 21, 2016 at 08:01:55 AM by AutoGen 5.18.5
10290001Sglebius# From the definitions    ntp.conf.def
11290001Sglebius# and the template file   agtexi-file.tpl
12290001Sglebius@end ignore
13290001Sglebius
14290001Sglebius
15290001Sglebius
16290001SglebiusThe
17290001Sglebius@code{ntp.conf}
18290001Sglebiusconfiguration file is read at initial startup by the
19290001Sglebius@code{ntpd(1ntpdmdoc)}
20290001Sglebiusdaemon in order to specify the synchronization sources,
21290001Sglebiusmodes and other related information.
22290001SglebiusUsually, it is installed in the
23290001Sglebius@file{/etc}
24290001Sglebiusdirectory,
25290001Sglebiusbut could be installed elsewhere
26290001Sglebius(see the daemon's
27290001Sglebius@code{-c}
28290001Sglebiuscommand line option).
29290001Sglebius
30290001SglebiusThe file format is similar to other
31290001Sglebius@sc{unix}
32290001Sglebiusconfiguration files.
33290001SglebiusComments begin with a
34290001Sglebius@quoteleft{}#@quoteright{}
35290001Sglebiuscharacter and extend to the end of the line;
36290001Sglebiusblank lines are ignored.
37290001SglebiusConfiguration commands consist of an initial keyword
38290001Sglebiusfollowed by a list of arguments,
39290001Sglebiussome of which may be optional, separated by whitespace.
40290001SglebiusCommands may not be continued over multiple lines.
41290001SglebiusArguments may be host names,
42290001Sglebiushost addresses written in numeric, dotted-quad form,
43290001Sglebiusintegers, floating point numbers (when specifying times in seconds)
44290001Sglebiusand text strings.
45290001Sglebius
46290001SglebiusThe rest of this page describes the configuration and control options.
47290001SglebiusThe
48290001Sglebius"Notes on Configuring NTP and Setting up an NTP Subnet"
49290001Sglebiuspage
50290001Sglebius(available as part of the HTML documentation
51290001Sglebiusprovided in
52290001Sglebius@file{/usr/share/doc/ntp})
53290001Sglebiuscontains an extended discussion of these options.
54290001SglebiusIn addition to the discussion of general
55290001Sglebius@ref{Configuration Options},
56290001Sglebiusthere are sections describing the following supported functionality
57290001Sglebiusand the options used to control it:
58290001Sglebius@itemize @bullet
59290001Sglebius@item 
60290001Sglebius@ref{Authentication Support}
61290001Sglebius@item 
62290001Sglebius@ref{Monitoring Support}
63290001Sglebius@item 
64290001Sglebius@ref{Access Control Support}
65290001Sglebius@item 
66290001Sglebius@ref{Automatic NTP Configuration Options}
67290001Sglebius@item 
68290001Sglebius@ref{Reference Clock Support}
69290001Sglebius@item 
70290001Sglebius@ref{Miscellaneous Options}
71290001Sglebius@end itemize
72290001Sglebius
73290001SglebiusFollowing these is a section describing
74290001Sglebius@ref{Miscellaneous Options}.
75290001SglebiusWhile there is a rich set of options available,
76290001Sglebiusthe only required option is one or more
77290001Sglebius@code{pool},
78290001Sglebius@code{server},
79290001Sglebius@code{peer},
80290001Sglebius@code{broadcast}
81290001Sglebiusor
82290001Sglebius@code{manycastclient}
83290001Sglebiuscommands.
84290001Sglebius@node Configuration Support
85290001Sglebius@subsection Configuration Support
86290001SglebiusFollowing is a description of the configuration commands in
87290001SglebiusNTPv4.
88290001SglebiusThese commands have the same basic functions as in NTPv3 and
89290001Sglebiusin some cases new functions and new arguments.
90290001SglebiusThere are two
91290001Sglebiusclasses of commands, configuration commands that configure a
92290001Sglebiuspersistent association with a remote server or peer or reference
93290001Sglebiusclock, and auxiliary commands that specify environmental variables
94290001Sglebiusthat control various related operations.
95290001Sglebius@subsubsection Configuration Commands
96290001SglebiusThe various modes are determined by the command keyword and the
97290001Sglebiustype of the required IP address.
98290001SglebiusAddresses are classed by type as
99290001Sglebius(s) a remote server or peer (IPv4 class A, B and C), (b) the
100290001Sglebiusbroadcast address of a local interface, (m) a multicast address (IPv4
101290001Sglebiusclass D), or (r) a reference clock address (127.127.x.x).
102290001SglebiusNote that
103290001Sglebiusonly those options applicable to each command are listed below.
104290001SglebiusUse
105290001Sglebiusof options not listed may not be caught as an error, but may result
106290001Sglebiusin some weird and even destructive behavior.
107290001Sglebius
108290001SglebiusIf the Basic Socket Interface Extensions for IPv6 (RFC-2553)
109290001Sglebiusis detected, support for the IPv6 address family is generated
110290001Sglebiusin addition to the default support of the IPv4 address family.
111298770SdelphijIn a few cases, including the
112298770Sdelphij@code{reslist}
113298770Sdelphijbillboard generated
114298770Sdelphijby
115298770Sdelphij@code{ntpq(1ntpqmdoc)}
116298770Sdelphijor
117298770Sdelphij@code{ntpdc(1ntpdcmdoc)},
118298770SdelphijIPv6 addresses are automatically generated.
119290001SglebiusIPv6 addresses can be identified by the presence of colons
120290001Sglebius@quotedblleft{}:@quotedblright{}
121290001Sglebiusin the address field.
122290001SglebiusIPv6 addresses can be used almost everywhere where
123290001SglebiusIPv4 addresses can be used,
124290001Sglebiuswith the exception of reference clock addresses,
125290001Sglebiuswhich are always IPv4.
126290001Sglebius
127290001SglebiusNote that in contexts where a host name is expected, a
128290001Sglebius@code{-4}
129290001Sglebiusqualifier preceding
130290001Sglebiusthe host name forces DNS resolution to the IPv4 namespace,
131290001Sglebiuswhile a
132290001Sglebius@code{-6}
133290001Sglebiusqualifier forces DNS resolution to the IPv6 namespace.
134290001SglebiusSee IPv6 references for the
135290001Sglebiusequivalent classes for that address family.
136290001Sglebius@table @asis
137290001Sglebius@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}]}
138298770Sdelphij@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}]}
139298770Sdelphij@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}]}
140298770Sdelphij@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}]}
141290001Sglebius@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}]}
142290001Sglebius@end table
143290001Sglebius
144290001SglebiusThese five commands specify the time server name or address to
145290001Sglebiusbe used and the mode in which to operate.
146290001SglebiusThe
147290001Sglebius@kbd{address}
148290001Sglebiuscan be
149290001Sglebiuseither a DNS name or an IP address in dotted-quad notation.
150290001SglebiusAdditional information on association behavior can be found in the
151290001Sglebius"Association Management"
152290001Sglebiuspage
153290001Sglebius(available as part of the HTML documentation
154290001Sglebiusprovided in
155290001Sglebius@file{/usr/share/doc/ntp}).
156290001Sglebius@table @asis
157290001Sglebius@item @code{pool}
158290001SglebiusFor type s addresses, this command mobilizes a persistent
159290001Sglebiusclient mode association with a number of remote servers.
160290001SglebiusIn this mode the local clock can synchronized to the
161290001Sglebiusremote server, but the remote server can never be synchronized to
162290001Sglebiusthe local clock.
163290001Sglebius@item @code{server}
164290001SglebiusFor type s and r addresses, this command mobilizes a persistent
165290001Sglebiusclient mode association with the specified remote server or local
166290001Sglebiusradio clock.
167290001SglebiusIn this mode the local clock can synchronized to the
168290001Sglebiusremote server, but the remote server can never be synchronized to
169290001Sglebiusthe local clock.
170290001SglebiusThis command should
171290001Sglebius@emph{not}
172290001Sglebiusbe used for type
173290001Sglebiusb or m addresses.
174290001Sglebius@item @code{peer}
175290001SglebiusFor type s addresses (only), this command mobilizes a
176290001Sglebiuspersistent symmetric-active mode association with the specified
177290001Sglebiusremote peer.
178290001SglebiusIn this mode the local clock can be synchronized to
179290001Sglebiusthe remote peer or the remote peer can be synchronized to the local
180290001Sglebiusclock.
181290001SglebiusThis is useful in a network of servers where, depending on
182290001Sglebiusvarious failure scenarios, either the local or remote peer may be
183290001Sglebiusthe better source of time.
184290001SglebiusThis command should NOT be used for type
185290001Sglebiusb, m or r addresses.
186290001Sglebius@item @code{broadcast}
187290001SglebiusFor type b and m addresses (only), this
188290001Sglebiuscommand mobilizes a persistent broadcast mode association.
189290001SglebiusMultiple
190290001Sglebiuscommands can be used to specify multiple local broadcast interfaces
191290001Sglebius(subnets) and/or multiple multicast groups.
192290001SglebiusNote that local
193290001Sglebiusbroadcast messages go only to the interface associated with the
194290001Sglebiussubnet specified, but multicast messages go to all interfaces.
195290001SglebiusIn broadcast mode the local server sends periodic broadcast
196290001Sglebiusmessages to a client population at the
197290001Sglebius@kbd{address}
198290001Sglebiusspecified, which is usually the broadcast address on (one of) the
199290001Sglebiuslocal network(s) or a multicast address assigned to NTP.
200290001SglebiusThe IANA
201290001Sglebiushas assigned the multicast group address IPv4 224.0.1.1 and
202290001SglebiusIPv6 ff05::101 (site local) exclusively to
203290001SglebiusNTP, but other nonconflicting addresses can be used to contain the
204290001Sglebiusmessages within administrative boundaries.
205290001SglebiusOrdinarily, this
206290001Sglebiusspecification applies only to the local server operating as a
207290001Sglebiussender; for operation as a broadcast client, see the
208290001Sglebius@code{broadcastclient}
209290001Sglebiusor
210290001Sglebius@code{multicastclient}
211290001Sglebiuscommands
212290001Sglebiusbelow.
213290001Sglebius@item @code{manycastclient}
214290001SglebiusFor type m addresses (only), this command mobilizes a
215290001Sglebiusmanycast client mode association for the multicast address
216290001Sglebiusspecified.
217290001SglebiusIn this case a specific address must be supplied which
218290001Sglebiusmatches the address used on the
219290001Sglebius@code{manycastserver}
220290001Sglebiuscommand for
221290001Sglebiusthe designated manycast servers.
222290001SglebiusThe NTP multicast address
223290001Sglebius224.0.1.1 assigned by the IANA should NOT be used, unless specific
224290001Sglebiusmeans are taken to avoid spraying large areas of the Internet with
225290001Sglebiusthese messages and causing a possibly massive implosion of replies
226290001Sglebiusat the sender.
227290001SglebiusThe
228290001Sglebius@code{manycastserver}
229290001Sglebiuscommand specifies that the local server
230290001Sglebiusis to operate in client mode with the remote servers that are
231290001Sglebiusdiscovered as the result of broadcast/multicast messages.
232290001SglebiusThe
233290001Sglebiusclient broadcasts a request message to the group address associated
234290001Sglebiuswith the specified
235290001Sglebius@kbd{address}
236290001Sglebiusand specifically enabled
237290001Sglebiusservers respond to these messages.
238290001SglebiusThe client selects the servers
239290001Sglebiusproviding the best time and continues as with the
240290001Sglebius@code{server}
241290001Sglebiuscommand.
242290001SglebiusThe remaining servers are discarded as if never
243290001Sglebiusheard.
244290001Sglebius@end table
245290001Sglebius
246290001SglebiusOptions:
247290001Sglebius@table @asis
248290001Sglebius@item @code{autokey}
249290001SglebiusAll packets sent to and received from the server or peer are to
250290001Sglebiusinclude authentication fields encrypted using the autokey scheme
251290001Sglebiusdescribed in
252290001Sglebius@ref{Authentication Options}.
253290001Sglebius@item @code{burst}
254290001Sglebiuswhen the server is reachable, send a burst of eight packets
255290001Sglebiusinstead of the usual one.
256290001SglebiusThe packet spacing is normally 2 s;
257290001Sglebiushowever, the spacing between the first and second packets
258298770Sdelphijcan be changed with the
259298770Sdelphij@code{calldelay}
260298770Sdelphijcommand to allow
261290001Sglebiusadditional time for a modem or ISDN call to complete.
262290001SglebiusThis is designed to improve timekeeping quality
263290001Sglebiuswith the
264290001Sglebius@code{server}
265290001Sglebiuscommand and s addresses.
266290001Sglebius@item @code{iburst}
267290001SglebiusWhen the server is unreachable, send a burst of eight packets
268290001Sglebiusinstead of the usual one.
269290001SglebiusThe packet spacing is normally 2 s;
270290001Sglebiushowever, the spacing between the first two packets can be
271298770Sdelphijchanged with the
272298770Sdelphij@code{calldelay}
273298770Sdelphijcommand to allow
274290001Sglebiusadditional time for a modem or ISDN call to complete.
275290001SglebiusThis is designed to speed the initial synchronization
276290001Sglebiusacquisition with the
277290001Sglebius@code{server}
278290001Sglebiuscommand and s addresses and when
279290001Sglebius@code{ntpd(1ntpdmdoc)}
280290001Sglebiusis started with the
281290001Sglebius@code{-q}
282290001Sglebiusoption.
283290001Sglebius@item @code{key} @kbd{key}
284290001SglebiusAll packets sent to and received from the server or peer are to
285290001Sglebiusinclude authentication fields encrypted using the specified
286290001Sglebius@kbd{key}
287290001Sglebiusidentifier with values from 1 to 65534, inclusive.
288290001SglebiusThe
289290001Sglebiusdefault is to include no encryption field.
290290001Sglebius@item @code{minpoll} @kbd{minpoll}
291290001Sglebius@item @code{maxpoll} @kbd{maxpoll}
292290001SglebiusThese options specify the minimum and maximum poll intervals
293290001Sglebiusfor NTP messages, as a power of 2 in seconds
294290001SglebiusThe maximum poll
295290001Sglebiusinterval defaults to 10 (1,024 s), but can be increased by the
296290001Sglebius@code{maxpoll}
297290001Sglebiusoption to an upper limit of 17 (36.4 h).
298290001SglebiusThe
299290001Sglebiusminimum poll interval defaults to 6 (64 s), but can be decreased by
300290001Sglebiusthe
301290001Sglebius@code{minpoll}
302290001Sglebiusoption to a lower limit of 4 (16 s).
303290001Sglebius@item @code{noselect}
304290001SglebiusMarks the server as unused, except for display purposes.
305290001SglebiusThe server is discarded by the selection algroithm.
306298770Sdelphij@item @code{preempt}
307298770SdelphijSays the association can be preempted.
308298770Sdelphij@item @code{true}
309298770SdelphijMarks the server as a truechimer.
310298770SdelphijUse this option only for testing.
311290001Sglebius@item @code{prefer}
312290001SglebiusMarks the server as preferred.
313290001SglebiusAll other things being equal,
314290001Sglebiusthis host will be chosen for synchronization among a set of
315290001Sglebiuscorrectly operating hosts.
316290001SglebiusSee the
317290001Sglebius"Mitigation Rules and the prefer Keyword"
318290001Sglebiuspage
319290001Sglebius(available as part of the HTML documentation
320290001Sglebiusprovided in
321290001Sglebius@file{/usr/share/doc/ntp})
322290001Sglebiusfor further information.
323298770Sdelphij@item @code{true}
324298770SdelphijForces the association to always survive the selection and clustering algorithms.
325298770SdelphijThis option should almost certainly
326298770Sdelphij@emph{only}
327298770Sdelphijbe used while testing an association.
328290001Sglebius@item @code{ttl} @kbd{ttl}
329290001SglebiusThis option is used only with broadcast server and manycast
330290001Sglebiusclient modes.
331290001SglebiusIt specifies the time-to-live
332290001Sglebius@kbd{ttl}
333290001Sglebiusto
334290001Sglebiususe on broadcast server and multicast server and the maximum
335290001Sglebius@kbd{ttl}
336290001Sglebiusfor the expanding ring search with manycast
337290001Sglebiusclient packets.
338290001SglebiusSelection of the proper value, which defaults to
339290001Sglebius127, is something of a black art and should be coordinated with the
340290001Sglebiusnetwork administrator.
341290001Sglebius@item @code{version} @kbd{version}
342290001SglebiusSpecifies the version number to be used for outgoing NTP
343290001Sglebiuspackets.
344290001SglebiusVersions 1-4 are the choices, with version 4 the
345290001Sglebiusdefault.
346298770Sdelphij@item @code{xleave}
347298770SdelphijValid in
348298770Sdelphij@code{peer}
349298770Sdelphijand
350298770Sdelphij@code{broadcast}
351298770Sdelphijmodes only, this flag enables interleave mode.
352290001Sglebius@end table
353290001Sglebius@subsubsection Auxiliary Commands
354290001Sglebius@table @asis
355290001Sglebius@item @code{broadcastclient}
356290001SglebiusThis command enables reception of broadcast server messages to
357290001Sglebiusany local interface (type b) address.
358290001SglebiusUpon receiving a message for
359290001Sglebiusthe first time, the broadcast client measures the nominal server
360290001Sglebiuspropagation delay using a brief client/server exchange with the
361290001Sglebiusserver, then enters the broadcast client mode, in which it
362290001Sglebiussynchronizes to succeeding broadcast messages.
363290001SglebiusNote that, in order
364290001Sglebiusto avoid accidental or malicious disruption in this mode, both the
365290001Sglebiusserver and client should operate using symmetric-key or public-key
366290001Sglebiusauthentication as described in
367290001Sglebius@ref{Authentication Options}.
368290001Sglebius@item @code{manycastserver} @kbd{address} @kbd{...}
369290001SglebiusThis command enables reception of manycast client messages to
370290001Sglebiusthe multicast group address(es) (type m) specified.
371290001SglebiusAt least one
372290001Sglebiusaddress is required, but the NTP multicast address 224.0.1.1
373290001Sglebiusassigned by the IANA should NOT be used, unless specific means are
374290001Sglebiustaken to limit the span of the reply and avoid a possibly massive
375290001Sglebiusimplosion at the original sender.
376290001SglebiusNote that, in order to avoid
377290001Sglebiusaccidental or malicious disruption in this mode, both the server
378290001Sglebiusand client should operate using symmetric-key or public-key
379290001Sglebiusauthentication as described in
380290001Sglebius@ref{Authentication Options}.
381290001Sglebius@item @code{multicastclient} @kbd{address} @kbd{...}
382290001SglebiusThis command enables reception of multicast server messages to
383290001Sglebiusthe multicast group address(es) (type m) specified.
384290001SglebiusUpon receiving
385290001Sglebiusa message for the first time, the multicast client measures the
386290001Sglebiusnominal server propagation delay using a brief client/server
387290001Sglebiusexchange with the server, then enters the broadcast client mode, in
388290001Sglebiuswhich it synchronizes to succeeding multicast messages.
389290001SglebiusNote that,
390290001Sglebiusin order to avoid accidental or malicious disruption in this mode,
391290001Sglebiusboth the server and client should operate using symmetric-key or
392290001Sglebiuspublic-key authentication as described in
393290001Sglebius@ref{Authentication Options}.
394290001Sglebius@item @code{mdnstries} @kbd{number}
395290001SglebiusIf we are participating in mDNS,
396290001Sglebiusafter we have synched for the first time
397290001Sglebiuswe attempt to register with the mDNS system.
398290001SglebiusIf that registration attempt fails,
399290001Sglebiuswe try again at one minute intervals for up to
400290001Sglebius@code{mdnstries}
401290001Sglebiustimes.
402290001SglebiusAfter all,
403290001Sglebius@code{ntpd}
404290001Sglebiusmay be starting before mDNS.
405290001SglebiusThe default value for
406290001Sglebius@code{mdnstries}
407290001Sglebiusis 5.
408290001Sglebius@end table
409290001Sglebius@node Authentication Support
410290001Sglebius@subsection Authentication Support
411290001SglebiusAuthentication support allows the NTP client to verify that the
412290001Sglebiusserver is in fact known and trusted and not an intruder intending
413290001Sglebiusaccidentally or on purpose to masquerade as that server.
414290001SglebiusThe NTPv3
415290001Sglebiusspecification RFC-1305 defines a scheme which provides
416290001Sglebiuscryptographic authentication of received NTP packets.
417290001SglebiusOriginally,
418290001Sglebiusthis was done using the Data Encryption Standard (DES) algorithm
419290001Sglebiusoperating in Cipher Block Chaining (CBC) mode, commonly called
420290001SglebiusDES-CBC.
421290001SglebiusSubsequently, this was replaced by the RSA Message Digest
422290001Sglebius5 (MD5) algorithm using a private key, commonly called keyed-MD5.
423290001SglebiusEither algorithm computes a message digest, or one-way hash, which
424290001Sglebiuscan be used to verify the server has the correct private key and
425290001Sglebiuskey identifier.
426290001Sglebius
427290001SglebiusNTPv4 retains the NTPv3 scheme, properly described as symmetric key
428290001Sglebiuscryptography and, in addition, provides a new Autokey scheme
429290001Sglebiusbased on public key cryptography.
430290001SglebiusPublic key cryptography is generally considered more secure
431290001Sglebiusthan symmetric key cryptography, since the security is based
432290001Sglebiuson a private value which is generated by each server and
433290001Sglebiusnever revealed.
434290001SglebiusWith Autokey all key distribution and
435290001Sglebiusmanagement functions involve only public values, which
436290001Sglebiusconsiderably simplifies key distribution and storage.
437290001SglebiusPublic key management is based on X.509 certificates,
438290001Sglebiuswhich can be provided by commercial services or
439290001Sglebiusproduced by utility programs in the OpenSSL software library
440290001Sglebiusor the NTPv4 distribution.
441290001Sglebius
442290001SglebiusWhile the algorithms for symmetric key cryptography are
443290001Sglebiusincluded in the NTPv4 distribution, public key cryptography
444290001Sglebiusrequires the OpenSSL software library to be installed
445290001Sglebiusbefore building the NTP distribution.
446290001SglebiusDirections for doing that
447290001Sglebiusare on the Building and Installing the Distribution page.
448290001Sglebius
449290001SglebiusAuthentication is configured separately for each association
450290001Sglebiususing the
451290001Sglebius@code{key}
452290001Sglebiusor
453290001Sglebius@code{autokey}
454290001Sglebiussubcommand on the
455290001Sglebius@code{peer},
456290001Sglebius@code{server},
457290001Sglebius@code{broadcast}
458290001Sglebiusand
459290001Sglebius@code{manycastclient}
460290001Sglebiusconfiguration commands as described in
461290001Sglebius@ref{Configuration Options}
462290001Sglebiuspage.
463290001SglebiusThe authentication
464290001Sglebiusoptions described below specify the locations of the key files,
465290001Sglebiusif other than default, which symmetric keys are trusted
466290001Sglebiusand the interval between various operations, if other than default.
467290001Sglebius
468290001SglebiusAuthentication is always enabled,
469290001Sglebiusalthough ineffective if not configured as
470290001Sglebiusdescribed below.
471290001SglebiusIf a NTP packet arrives
472290001Sglebiusincluding a message authentication
473290001Sglebiuscode (MAC), it is accepted only if it
474290001Sglebiuspasses all cryptographic checks.
475290001SglebiusThe
476290001Sglebiuschecks require correct key ID, key value
477290001Sglebiusand message digest.
478290001SglebiusIf the packet has
479290001Sglebiusbeen modified in any way or replayed
480290001Sglebiusby an intruder, it will fail one or more
481290001Sglebiusof these checks and be discarded.
482290001SglebiusFurthermore, the Autokey scheme requires a
483290001Sglebiuspreliminary protocol exchange to obtain
484290001Sglebiusthe server certificate, verify its
485290001Sglebiuscredentials and initialize the protocol
486290001Sglebius
487290001SglebiusThe
488290001Sglebius@code{auth}
489290001Sglebiusflag controls whether new associations or
490290001Sglebiusremote configuration commands require cryptographic authentication.
491290001SglebiusThis flag can be set or reset by the
492290001Sglebius@code{enable}
493290001Sglebiusand
494290001Sglebius@code{disable}
495290001Sglebiuscommands and also by remote
496290001Sglebiusconfiguration commands sent by a
497290001Sglebius@code{ntpdc(1ntpdcmdoc)}
498298770Sdelphijprogram running on
499290001Sglebiusanother machine.
500290001SglebiusIf this flag is enabled, which is the default
501290001Sglebiuscase, new broadcast client and symmetric passive associations and
502290001Sglebiusremote configuration commands must be cryptographically
503290001Sglebiusauthenticated using either symmetric key or public key cryptography.
504290001SglebiusIf this
505290001Sglebiusflag is disabled, these operations are effective
506290001Sglebiuseven if not cryptographic
507290001Sglebiusauthenticated.
508290001SglebiusIt should be understood
509290001Sglebiusthat operating with the
510290001Sglebius@code{auth}
511290001Sglebiusflag disabled invites a significant vulnerability
512290001Sglebiuswhere a rogue hacker can
513290001Sglebiusmasquerade as a falseticker and seriously
514290001Sglebiusdisrupt system timekeeping.
515290001SglebiusIt is
516290001Sglebiusimportant to note that this flag has no purpose
517290001Sglebiusother than to allow or disallow
518290001Sglebiusa new association in response to new broadcast
519290001Sglebiusand symmetric active messages
520290001Sglebiusand remote configuration commands and, in particular,
521290001Sglebiusthe flag has no effect on
522290001Sglebiusthe authentication process itself.
523290001Sglebius
524290001SglebiusAn attractive alternative where multicast support is available
525290001Sglebiusis manycast mode, in which clients periodically troll
526290001Sglebiusfor servers as described in the
527290001Sglebius@ref{Automatic NTP Configuration Options}
528290001Sglebiuspage.
529290001SglebiusEither symmetric key or public key
530290001Sglebiuscryptographic authentication can be used in this mode.
531290001SglebiusThe principle advantage
532290001Sglebiusof manycast mode is that potential servers need not be
533290001Sglebiusconfigured in advance,
534290001Sglebiussince the client finds them during regular operation,
535290001Sglebiusand the configuration
536290001Sglebiusfiles for all clients can be identical.
537290001Sglebius
538290001SglebiusThe security model and protocol schemes for
539290001Sglebiusboth symmetric key and public key
540290001Sglebiuscryptography are summarized below;
541290001Sglebiusfurther details are in the briefings, papers
542290001Sglebiusand reports at the NTP project page linked from
543290001Sglebius@code{http://www.ntp.org/}.
544290001Sglebius@subsubsection Symmetric-Key Cryptography
545290001SglebiusThe original RFC-1305 specification allows any one of possibly
546290001Sglebius65,534 keys, each distinguished by a 32-bit key identifier, to
547290001Sglebiusauthenticate an association.
548290001SglebiusThe servers and clients involved must
549290001Sglebiusagree on the key and key identifier to
550290001Sglebiusauthenticate NTP packets.
551290001SglebiusKeys and
552290001Sglebiusrelated information are specified in a key
553290001Sglebiusfile, usually called
554290001Sglebius@file{ntp.keys},
555290001Sglebiuswhich must be distributed and stored using
556290001Sglebiussecure means beyond the scope of the NTP protocol itself.
557290001SglebiusBesides the keys used
558290001Sglebiusfor ordinary NTP associations,
559290001Sglebiusadditional keys can be used as passwords for the
560290001Sglebius@code{ntpq(1ntpqmdoc)}
561290001Sglebiusand
562290001Sglebius@code{ntpdc(1ntpdcmdoc)}
563290001Sglebiusutility programs.
564290001Sglebius
565290001SglebiusWhen
566290001Sglebius@code{ntpd(1ntpdmdoc)}
567290001Sglebiusis first started, it reads the key file specified in the
568290001Sglebius@code{keys}
569290001Sglebiusconfiguration command and installs the keys
570290001Sglebiusin the key cache.
571290001SglebiusHowever,
572290001Sglebiusindividual keys must be activated with the
573290001Sglebius@code{trusted}
574290001Sglebiuscommand before use.
575290001SglebiusThis
576290001Sglebiusallows, for instance, the installation of possibly
577290001Sglebiusseveral batches of keys and
578290001Sglebiusthen activating or deactivating each batch
579290001Sglebiusremotely using
580290001Sglebius@code{ntpdc(1ntpdcmdoc)}.
581290001SglebiusThis also provides a revocation capability that can be used
582290001Sglebiusif a key becomes compromised.
583290001SglebiusThe
584290001Sglebius@code{requestkey}
585290001Sglebiuscommand selects the key used as the password for the
586290001Sglebius@code{ntpdc(1ntpdcmdoc)}
587290001Sglebiusutility, while the
588290001Sglebius@code{controlkey}
589290001Sglebiuscommand selects the key used as the password for the
590290001Sglebius@code{ntpq(1ntpqmdoc)}
591290001Sglebiusutility.
592290001Sglebius@subsubsection Public Key Cryptography
593290001SglebiusNTPv4 supports the original NTPv3 symmetric key scheme
594290001Sglebiusdescribed in RFC-1305 and in addition the Autokey protocol,
595290001Sglebiuswhich is based on public key cryptography.
596290001SglebiusThe Autokey Version 2 protocol described on the Autokey Protocol
597290001Sglebiuspage verifies packet integrity using MD5 message digests
598290001Sglebiusand verifies the source with digital signatures and any of several
599290001Sglebiusdigest/signature schemes.
600290001SglebiusOptional identity schemes described on the Identity Schemes
601290001Sglebiuspage and based on cryptographic challenge/response algorithms
602290001Sglebiusare also available.
603290001SglebiusUsing all of these schemes provides strong security against
604290001Sglebiusreplay with or without modification, spoofing, masquerade
605290001Sglebiusand most forms of clogging attacks.
606290001Sglebius
607290001SglebiusThe Autokey protocol has several modes of operation
608290001Sglebiuscorresponding to the various NTP modes supported.
609290001SglebiusMost modes use a special cookie which can be
610290001Sglebiuscomputed independently by the client and server,
611290001Sglebiusbut encrypted in transmission.
612290001SglebiusAll modes use in addition a variant of the S-KEY scheme,
613290001Sglebiusin which a pseudo-random key list is generated and used
614290001Sglebiusin reverse order.
615290001SglebiusThese schemes are described along with an executive summary,
616290001Sglebiuscurrent status, briefing slides and reading list on the
617290001Sglebius@ref{Autonomous Authentication}
618290001Sglebiuspage.
619290001Sglebius
620290001SglebiusThe specific cryptographic environment used by Autokey servers
621290001Sglebiusand clients is determined by a set of files
622290001Sglebiusand soft links generated by the
623290001Sglebius@code{ntp-keygen(1ntpkeygenmdoc)}
624290001Sglebiusprogram.
625290001SglebiusThis includes a required host key file,
626290001Sglebiusrequired certificate file and optional sign key file,
627290001Sglebiusleapsecond file and identity scheme files.
628290001SglebiusThe
629290001Sglebiusdigest/signature scheme is specified in the X.509 certificate
630290001Sglebiusalong with the matching sign key.
631290001SglebiusThere are several schemes
632290001Sglebiusavailable in the OpenSSL software library, each identified
633290001Sglebiusby a specific string such as
634290001Sglebius@code{md5WithRSAEncryption},
635290001Sglebiuswhich stands for the MD5 message digest with RSA
636290001Sglebiusencryption scheme.
637290001SglebiusThe current NTP distribution supports
638290001Sglebiusall the schemes in the OpenSSL library, including
639290001Sglebiusthose based on RSA and DSA digital signatures.
640290001Sglebius
641290001SglebiusNTP secure groups can be used to define cryptographic compartments
642290001Sglebiusand security hierarchies.
643290001SglebiusIt is important that every host
644290001Sglebiusin the group be able to construct a certificate trail to one
645290001Sglebiusor more trusted hosts in the same group.
646290001SglebiusEach group
647290001Sglebiushost runs the Autokey protocol to obtain the certificates
648290001Sglebiusfor all hosts along the trail to one or more trusted hosts.
649290001SglebiusThis requires the configuration file in all hosts to be
650290001Sglebiusengineered so that, even under anticipated failure conditions,
651290001Sglebiusthe NTP subnet will form such that every group host can find
652290001Sglebiusa trail to at least one trusted host.
653290001Sglebius@subsubsection Naming and Addressing
654290001SglebiusIt is important to note that Autokey does not use DNS to
655290001Sglebiusresolve addresses, since DNS can't be completely trusted
656290001Sglebiusuntil the name servers have synchronized clocks.
657290001SglebiusThe cryptographic name used by Autokey to bind the host identity
658290001Sglebiuscredentials and cryptographic values must be independent
659290001Sglebiusof interface, network and any other naming convention.
660290001SglebiusThe name appears in the host certificate in either or both
661290001Sglebiusthe subject and issuer fields, so protection against
662290001SglebiusDNS compromise is essential.
663290001Sglebius
664290001SglebiusBy convention, the name of an Autokey host is the name returned
665290001Sglebiusby the Unix
666290001Sglebius@code{gethostname(2)}
667290001Sglebiussystem call or equivalent in other systems.
668290001SglebiusBy the system design
669290001Sglebiusmodel, there are no provisions to allow alternate names or aliases.
670290001SglebiusHowever, this is not to say that DNS aliases, different names
671290001Sglebiusfor each interface, etc., are constrained in any way.
672290001Sglebius
673290001SglebiusIt is also important to note that Autokey verifies authenticity
674290001Sglebiususing the host name, network address and public keys,
675290001Sglebiusall of which are bound together by the protocol specifically
676290001Sglebiusto deflect masquerade attacks.
677290001SglebiusFor this reason Autokey
678298770Sdelphijincludes the source and destination IP addresses in message digest
679290001Sglebiuscomputations and so the same addresses must be available
680290001Sglebiusat both the server and client.
681290001SglebiusFor this reason operation
682290001Sglebiuswith network address translation schemes is not possible.
683290001SglebiusThis reflects the intended robust security model where government
684290001Sglebiusand corporate NTP servers are operated outside firewall perimeters.
685290001Sglebius@subsubsection Operation
686290001SglebiusA specific combination of authentication scheme (none,
687290001Sglebiussymmetric key, public key) and identity scheme is called
688290001Sglebiusa cryptotype, although not all combinations are compatible.
689290001SglebiusThere may be management configurations where the clients,
690290001Sglebiusservers and peers may not all support the same cryptotypes.
691290001SglebiusA secure NTPv4 subnet can be configured in many ways while
692290001Sglebiuskeeping in mind the principles explained above and
693290001Sglebiusin this section.
694290001SglebiusNote however that some cryptotype
695290001Sglebiuscombinations may successfully interoperate with each other,
696290001Sglebiusbut may not represent good security practice.
697290001Sglebius
698290001SglebiusThe cryptotype of an association is determined at the time
699290001Sglebiusof mobilization, either at configuration time or some time
700290001Sglebiuslater when a message of appropriate cryptotype arrives.
701290001SglebiusWhen mobilized by a
702290001Sglebius@code{server}
703290001Sglebiusor
704290001Sglebius@code{peer}
705290001Sglebiusconfiguration command and no
706290001Sglebius@code{key}
707290001Sglebiusor
708290001Sglebius@code{autokey}
709290001Sglebiussubcommands are present, the association is not
710290001Sglebiusauthenticated; if the
711290001Sglebius@code{key}
712290001Sglebiussubcommand is present, the association is authenticated
713290001Sglebiususing the symmetric key ID specified; if the
714290001Sglebius@code{autokey}
715290001Sglebiussubcommand is present, the association is authenticated
716290001Sglebiususing Autokey.
717290001Sglebius
718290001SglebiusWhen multiple identity schemes are supported in the Autokey
719290001Sglebiusprotocol, the first message exchange determines which one is used.
720290001SglebiusThe client request message contains bits corresponding
721290001Sglebiusto which schemes it has available.
722290001SglebiusThe server response message
723290001Sglebiuscontains bits corresponding to which schemes it has available.
724290001SglebiusBoth server and client match the received bits with their own
725290001Sglebiusand select a common scheme.
726290001Sglebius
727290001SglebiusFollowing the principle that time is a public value,
728290001Sglebiusa server responds to any client packet that matches
729290001Sglebiusits cryptotype capabilities.
730290001SglebiusThus, a server receiving
731290001Sglebiusan unauthenticated packet will respond with an unauthenticated
732290001Sglebiuspacket, while the same server receiving a packet of a cryptotype
733290001Sglebiusit supports will respond with packets of that cryptotype.
734290001SglebiusHowever, unconfigured broadcast or manycast client
735290001Sglebiusassociations or symmetric passive associations will not be
736290001Sglebiusmobilized unless the server supports a cryptotype compatible
737290001Sglebiuswith the first packet received.
738290001SglebiusBy default, unauthenticated associations will not be mobilized
739290001Sglebiusunless overridden in a decidedly dangerous way.
740290001Sglebius
741290001SglebiusSome examples may help to reduce confusion.
742290001SglebiusClient Alice has no specific cryptotype selected.
743290001SglebiusServer Bob has both a symmetric key file and minimal Autokey files.
744290001SglebiusAlice's unauthenticated messages arrive at Bob, who replies with
745290001Sglebiusunauthenticated messages.
746290001SglebiusCathy has a copy of Bob's symmetric
747290001Sglebiuskey file and has selected key ID 4 in messages to Bob.
748290001SglebiusBob verifies the message with his key ID 4.
749290001SglebiusIf it's the
750290001Sglebiussame key and the message is verified, Bob sends Cathy a reply
751290001Sglebiusauthenticated with that key.
752290001SglebiusIf verification fails,
753290001SglebiusBob sends Cathy a thing called a crypto-NAK, which tells her
754290001Sglebiussomething broke.
755290001SglebiusShe can see the evidence using the
756290001Sglebius@code{ntpq(1ntpqmdoc)}
757290001Sglebiusprogram.
758290001Sglebius
759290001SglebiusDenise has rolled her own host key and certificate.
760290001SglebiusShe also uses one of the identity schemes as Bob.
761290001SglebiusShe sends the first Autokey message to Bob and they
762290001Sglebiusboth dance the protocol authentication and identity steps.
763290001SglebiusIf all comes out okay, Denise and Bob continue as described above.
764290001Sglebius
765290001SglebiusIt should be clear from the above that Bob can support
766290001Sglebiusall the girls at the same time, as long as he has compatible
767290001Sglebiusauthentication and identity credentials.
768290001SglebiusNow, Bob can act just like the girls in his own choice of servers;
769290001Sglebiushe can run multiple configured associations with multiple different
770290001Sglebiusservers (or the same server, although that might not be useful).
771290001SglebiusBut, wise security policy might preclude some cryptotype
772290001Sglebiuscombinations; for instance, running an identity scheme
773290001Sglebiuswith one server and no authentication with another might not be wise.
774290001Sglebius@subsubsection Key Management
775290001SglebiusThe cryptographic values used by the Autokey protocol are
776290001Sglebiusincorporated as a set of files generated by the
777290001Sglebius@code{ntp-keygen(1ntpkeygenmdoc)}
778290001Sglebiusutility program, including symmetric key, host key and
779290001Sglebiuspublic certificate files, as well as sign key, identity parameters
780290001Sglebiusand leapseconds files.
781290001SglebiusAlternatively, host and sign keys and
782290001Sglebiuscertificate files can be generated by the OpenSSL utilities
783290001Sglebiusand certificates can be imported from public certificate
784290001Sglebiusauthorities.
785290001SglebiusNote that symmetric keys are necessary for the
786290001Sglebius@code{ntpq(1ntpqmdoc)}
787290001Sglebiusand
788290001Sglebius@code{ntpdc(1ntpdcmdoc)}
789290001Sglebiusutility programs.
790290001SglebiusThe remaining files are necessary only for the
791290001SglebiusAutokey protocol.
792290001Sglebius
793290001SglebiusCertificates imported from OpenSSL or public certificate
794290001Sglebiusauthorities have certian limitations.
795290001SglebiusThe certificate should be in ASN.1 syntax, X.509 Version 3
796290001Sglebiusformat and encoded in PEM, which is the same format
797290001Sglebiusused by OpenSSL.
798290001SglebiusThe overall length of the certificate encoded
799290001Sglebiusin ASN.1 must not exceed 1024 bytes.
800290001SglebiusThe subject distinguished
801290001Sglebiusname field (CN) is the fully qualified name of the host
802290001Sglebiuson which it is used; the remaining subject fields are ignored.
803290001SglebiusThe certificate extension fields must not contain either
804290001Sglebiusa subject key identifier or a issuer key identifier field;
805290001Sglebiushowever, an extended key usage field for a trusted host must
806290001Sglebiuscontain the value
807290001Sglebius@code{trustRoot};.
808290001SglebiusOther extension fields are ignored.
809290001Sglebius@subsubsection Authentication Commands
810290001Sglebius@table @asis
811290001Sglebius@item @code{autokey} @code{[@kbd{logsec}]}
812290001SglebiusSpecifies the interval between regenerations of the session key
813290001Sglebiuslist used with the Autokey protocol.
814290001SglebiusNote that the size of the key
815290001Sglebiuslist for each association depends on this interval and the current
816290001Sglebiuspoll interval.
817290001SglebiusThe default value is 12 (4096 s or about 1.1 hours).
818290001SglebiusFor poll intervals above the specified interval, a session key list
819290001Sglebiuswith a single entry will be regenerated for every message
820290001Sglebiussent.
821290001Sglebius@item @code{controlkey} @kbd{key}
822290001SglebiusSpecifies the key identifier to use with the
823290001Sglebius@code{ntpq(1ntpqmdoc)}
824290001Sglebiusutility, which uses the standard
825290001Sglebiusprotocol defined in RFC-1305.
826290001SglebiusThe
827290001Sglebius@kbd{key}
828290001Sglebiusargument is
829290001Sglebiusthe key identifier for a trusted key, where the value can be in the
830290001Sglebiusrange 1 to 65,534, inclusive.
831290001Sglebius@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}]}
832290001SglebiusThis command requires the OpenSSL library.
833290001SglebiusIt activates public key
834290001Sglebiuscryptography, selects the message digest and signature
835290001Sglebiusencryption scheme and loads the required private and public
836290001Sglebiusvalues described above.
837290001SglebiusIf one or more files are left unspecified,
838290001Sglebiusthe default names are used as described above.
839290001SglebiusUnless the complete path and name of the file are specified, the
840290001Sglebiuslocation of a file is relative to the keys directory specified
841290001Sglebiusin the
842290001Sglebius@code{keysdir}
843290001Sglebiuscommand or default
844290001Sglebius@file{/usr/local/etc}.
845290001SglebiusFollowing are the subcommands:
846290001Sglebius@table @asis
847290001Sglebius@item @code{cert} @kbd{file}
848290001SglebiusSpecifies the location of the required host public certificate file.
849290001SglebiusThis overrides the link
850290001Sglebius@file{ntpkey_cert_}@kbd{hostname}
851290001Sglebiusin the keys directory.
852290001Sglebius@item @code{gqpar} @kbd{file}
853290001SglebiusSpecifies the location of the optional GQ parameters file.
854290001SglebiusThis
855290001Sglebiusoverrides the link
856290001Sglebius@file{ntpkey_gq_}@kbd{hostname}
857290001Sglebiusin the keys directory.
858290001Sglebius@item @code{host} @kbd{file}
859290001SglebiusSpecifies the location of the required host key file.
860290001SglebiusThis overrides
861290001Sglebiusthe link
862290001Sglebius@file{ntpkey_key_}@kbd{hostname}
863290001Sglebiusin the keys directory.
864290001Sglebius@item @code{iffpar} @kbd{file}
865298770SdelphijSpecifies the location of the optional IFF parameters file.
866298770SdelphijThis overrides the link
867290001Sglebius@file{ntpkey_iff_}@kbd{hostname}
868290001Sglebiusin the keys directory.
869290001Sglebius@item @code{leap} @kbd{file}
870290001SglebiusSpecifies the location of the optional leapsecond file.
871290001SglebiusThis overrides the link
872290001Sglebius@file{ntpkey_leap}
873290001Sglebiusin the keys directory.
874290001Sglebius@item @code{mvpar} @kbd{file}
875290001SglebiusSpecifies the location of the optional MV parameters file.
876298770SdelphijThis overrides the link
877290001Sglebius@file{ntpkey_mv_}@kbd{hostname}
878290001Sglebiusin the keys directory.
879290001Sglebius@item @code{pw} @kbd{password}
880290001SglebiusSpecifies the password to decrypt files containing private keys and
881290001Sglebiusidentity parameters.
882290001SglebiusThis is required only if these files have been
883290001Sglebiusencrypted.
884290001Sglebius@item @code{randfile} @kbd{file}
885290001SglebiusSpecifies the location of the random seed file used by the OpenSSL
886290001Sglebiuslibrary.
887290001SglebiusThe defaults are described in the main text above.
888290001Sglebius@item @code{sign} @kbd{file}
889290001SglebiusSpecifies the location of the optional sign key file.
890290001SglebiusThis overrides
891290001Sglebiusthe link
892290001Sglebius@file{ntpkey_sign_}@kbd{hostname}
893290001Sglebiusin the keys directory.
894290001SglebiusIf this file is
895290001Sglebiusnot found, the host key is also the sign key.
896290001Sglebius@end table
897290001Sglebius@item @code{keys} @kbd{keyfile}
898290001SglebiusSpecifies the complete path and location of the MD5 key file
899290001Sglebiuscontaining the keys and key identifiers used by
900290001Sglebius@code{ntpd(1ntpdmdoc)},
901290001Sglebius@code{ntpq(1ntpqmdoc)}
902290001Sglebiusand
903290001Sglebius@code{ntpdc(1ntpdcmdoc)}
904290001Sglebiuswhen operating with symmetric key cryptography.
905290001SglebiusThis is the same operation as the
906290001Sglebius@code{-k}
907290001Sglebiuscommand line option.
908290001Sglebius@item @code{keysdir} @kbd{path}
909290001SglebiusThis command specifies the default directory path for
910290001Sglebiuscryptographic keys, parameters and certificates.
911290001SglebiusThe default is
912290001Sglebius@file{/usr/local/etc/}.
913290001Sglebius@item @code{requestkey} @kbd{key}
914290001SglebiusSpecifies the key identifier to use with the
915290001Sglebius@code{ntpdc(1ntpdcmdoc)}
916290001Sglebiusutility program, which uses a
917290001Sglebiusproprietary protocol specific to this implementation of
918290001Sglebius@code{ntpd(1ntpdmdoc)}.
919290001SglebiusThe
920290001Sglebius@kbd{key}
921290001Sglebiusargument is a key identifier
922290001Sglebiusfor the trusted key, where the value can be in the range 1 to
923290001Sglebius65,534, inclusive.
924290001Sglebius@item @code{revoke} @kbd{logsec}
925290001SglebiusSpecifies the interval between re-randomization of certain
926290001Sglebiuscryptographic values used by the Autokey scheme, as a power of 2 in
927290001Sglebiusseconds.
928290001SglebiusThese values need to be updated frequently in order to
929290001Sglebiusdeflect brute-force attacks on the algorithms of the scheme;
930290001Sglebiushowever, updating some values is a relatively expensive operation.
931290001SglebiusThe default interval is 16 (65,536 s or about 18 hours).
932290001SglebiusFor poll
933290001Sglebiusintervals above the specified interval, the values will be updated
934290001Sglebiusfor every message sent.
935290001Sglebius@item @code{trustedkey} @kbd{key} @kbd{...}
936290001SglebiusSpecifies the key identifiers which are trusted for the
937290001Sglebiuspurposes of authenticating peers with symmetric key cryptography,
938290001Sglebiusas well as keys used by the
939290001Sglebius@code{ntpq(1ntpqmdoc)}
940290001Sglebiusand
941290001Sglebius@code{ntpdc(1ntpdcmdoc)}
942290001Sglebiusprograms.
943290001SglebiusThe authentication procedures require that both the local
944290001Sglebiusand remote servers share the same key and key identifier for this
945290001Sglebiuspurpose, although different keys can be used with different
946290001Sglebiusservers.
947290001SglebiusThe
948290001Sglebius@kbd{key}
949290001Sglebiusarguments are 32-bit unsigned
950290001Sglebiusintegers with values from 1 to 65,534.
951290001Sglebius@end table
952290001Sglebius@subsubsection Error Codes
953290001SglebiusThe following error codes are reported via the NTP control
954290001Sglebiusand monitoring protocol trap mechanism.
955290001Sglebius@table @asis
956290001Sglebius@item 101
957290001Sglebius(bad field format or length)
958290001SglebiusThe packet has invalid version, length or format.
959290001Sglebius@item 102
960290001Sglebius(bad timestamp)
961290001SglebiusThe packet timestamp is the same or older than the most recent received.
962290001SglebiusThis could be due to a replay or a server clock time step.
963290001Sglebius@item 103
964290001Sglebius(bad filestamp)
965290001SglebiusThe packet filestamp is the same or older than the most recent received.
966290001SglebiusThis could be due to a replay or a key file generation error.
967290001Sglebius@item 104
968290001Sglebius(bad or missing public key)
969290001SglebiusThe public key is missing, has incorrect format or is an unsupported type.
970290001Sglebius@item 105
971290001Sglebius(unsupported digest type)
972290001SglebiusThe server requires an unsupported digest/signature scheme.
973290001Sglebius@item 106
974290001Sglebius(mismatched digest types)
975290001SglebiusNot used.
976290001Sglebius@item 107
977290001Sglebius(bad signature length)
978290001SglebiusThe signature length does not match the current public key.
979290001Sglebius@item 108
980290001Sglebius(signature not verified)
981290001SglebiusThe message fails the signature check.
982290001SglebiusIt could be bogus or signed by a
983290001Sglebiusdifferent private key.
984290001Sglebius@item 109
985290001Sglebius(certificate not verified)
986290001SglebiusThe certificate is invalid or signed with the wrong key.
987290001Sglebius@item 110
988290001Sglebius(certificate not verified)
989290001SglebiusThe certificate is not yet valid or has expired or the signature could not
990290001Sglebiusbe verified.
991290001Sglebius@item 111
992290001Sglebius(bad or missing cookie)
993290001SglebiusThe cookie is missing, corrupted or bogus.
994290001Sglebius@item 112
995290001Sglebius(bad or missing leapseconds table)
996290001SglebiusThe leapseconds table is missing, corrupted or bogus.
997290001Sglebius@item 113
998290001Sglebius(bad or missing certificate)
999290001SglebiusThe certificate is missing, corrupted or bogus.
1000290001Sglebius@item 114
1001290001Sglebius(bad or missing identity)
1002290001SglebiusThe identity key is missing, corrupt or bogus.
1003290001Sglebius@end table
1004290001Sglebius@node Monitoring Support
1005290001Sglebius@subsection Monitoring Support
1006290001Sglebius@code{ntpd(1ntpdmdoc)}
1007290001Sglebiusincludes a comprehensive monitoring facility suitable
1008290001Sglebiusfor continuous, long term recording of server and client
1009290001Sglebiustimekeeping performance.
1010290001SglebiusSee the
1011290001Sglebius@code{statistics}
1012290001Sglebiuscommand below
1013290001Sglebiusfor a listing and example of each type of statistics currently
1014290001Sglebiussupported.
1015290001SglebiusStatistic files are managed using file generation sets
1016290001Sglebiusand scripts in the
1017290001Sglebius@file{./scripts}
1018298770Sdelphijdirectory of the source code distribution.
1019290001SglebiusUsing
1020290001Sglebiusthese facilities and
1021290001Sglebius@sc{unix}
1022290001Sglebius@code{cron(8)}
1023290001Sglebiusjobs, the data can be
1024290001Sglebiusautomatically summarized and archived for retrospective analysis.
1025290001Sglebius@subsubsection Monitoring Commands
1026290001Sglebius@table @asis
1027290001Sglebius@item @code{statistics} @kbd{name} @kbd{...}
1028290001SglebiusEnables writing of statistics records.
1029290001SglebiusCurrently, eight kinds of
1030290001Sglebius@kbd{name}
1031290001Sglebiusstatistics are supported.
1032290001Sglebius@table @asis
1033290001Sglebius@item @code{clockstats}
1034290001SglebiusEnables recording of clock driver statistics information.
1035290001SglebiusEach update
1036290001Sglebiusreceived from a clock driver appends a line of the following form to
1037290001Sglebiusthe file generation set named
1038290001Sglebius@code{clockstats}:
1039290001Sglebius@verbatim
1040290001Sglebius49213 525.624 127.127.4.1 93 226 00:08:29.606 D
1041290001Sglebius@end verbatim
1042290001Sglebius
1043290001SglebiusThe first two fields show the date (Modified Julian Day) and time
1044290001Sglebius(seconds and fraction past UTC midnight).
1045290001SglebiusThe next field shows the
1046290001Sglebiusclock address in dotted-quad notation.
1047290001SglebiusThe final field shows the last
1048290001Sglebiustimecode received from the clock in decoded ASCII format, where
1049290001Sglebiusmeaningful.
1050290001SglebiusIn some clock drivers a good deal of additional information
1051290001Sglebiuscan be gathered and displayed as well.
1052290001SglebiusSee information specific to each
1053290001Sglebiusclock for further details.
1054290001Sglebius@item @code{cryptostats}
1055290001SglebiusThis option requires the OpenSSL cryptographic software library.
1056290001SglebiusIt
1057290001Sglebiusenables recording of cryptographic public key protocol information.
1058290001SglebiusEach message received by the protocol module appends a line of the
1059290001Sglebiusfollowing form to the file generation set named
1060290001Sglebius@code{cryptostats}:
1061290001Sglebius@verbatim
1062290001Sglebius49213 525.624 127.127.4.1 message
1063290001Sglebius@end verbatim
1064290001Sglebius
1065290001SglebiusThe first two fields show the date (Modified Julian Day) and time
1066290001Sglebius(seconds and fraction past UTC midnight).
1067290001SglebiusThe next field shows the peer
1068290001Sglebiusaddress in dotted-quad notation, The final message field includes the
1069290001Sglebiusmessage type and certain ancillary information.
1070290001SglebiusSee the
1071290001Sglebius@ref{Authentication Options}
1072290001Sglebiussection for further information.
1073290001Sglebius@item @code{loopstats}
1074290001SglebiusEnables recording of loop filter statistics information.
1075290001SglebiusEach
1076290001Sglebiusupdate of the local clock outputs a line of the following form to
1077290001Sglebiusthe file generation set named
1078290001Sglebius@code{loopstats}:
1079290001Sglebius@verbatim
1080290001Sglebius50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
1081290001Sglebius@end verbatim
1082290001Sglebius
1083290001SglebiusThe first two fields show the date (Modified Julian Day) and
1084290001Sglebiustime (seconds and fraction past UTC midnight).
1085290001SglebiusThe next five fields
1086290001Sglebiusshow time offset (seconds), frequency offset (parts per million -
1087290001SglebiusPPM), RMS jitter (seconds), Allan deviation (PPM) and clock
1088290001Sglebiusdiscipline time constant.
1089290001Sglebius@item @code{peerstats}
1090290001SglebiusEnables recording of peer statistics information.
1091290001SglebiusThis includes
1092290001Sglebiusstatistics records of all peers of a NTP server and of special
1093290001Sglebiussignals, where present and configured.
1094290001SglebiusEach valid update appends a
1095290001Sglebiusline of the following form to the current element of a file
1096290001Sglebiusgeneration set named
1097290001Sglebius@code{peerstats}:
1098290001Sglebius@verbatim
1099290001Sglebius48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
1100290001Sglebius@end verbatim
1101290001Sglebius
1102290001SglebiusThe first two fields show the date (Modified Julian Day) and
1103290001Sglebiustime (seconds and fraction past UTC midnight).
1104290001SglebiusThe next two fields
1105290001Sglebiusshow the peer address in dotted-quad notation and status,
1106290001Sglebiusrespectively.
1107290001SglebiusThe status field is encoded in hex in the format
1108290001Sglebiusdescribed in Appendix A of the NTP specification RFC 1305.
1109290001SglebiusThe final four fields show the offset,
1110290001Sglebiusdelay, dispersion and RMS jitter, all in seconds.
1111290001Sglebius@item @code{rawstats}
1112290001SglebiusEnables recording of raw-timestamp statistics information.
1113290001SglebiusThis
1114290001Sglebiusincludes statistics records of all peers of a NTP server and of
1115290001Sglebiusspecial signals, where present and configured.
1116290001SglebiusEach NTP message
1117290001Sglebiusreceived from a peer or clock driver appends a line of the
1118290001Sglebiusfollowing form to the file generation set named
1119290001Sglebius@code{rawstats}:
1120290001Sglebius@verbatim
1121290001Sglebius50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
1122290001Sglebius@end verbatim
1123290001Sglebius
1124290001SglebiusThe first two fields show the date (Modified Julian Day) and
1125290001Sglebiustime (seconds and fraction past UTC midnight).
1126290001SglebiusThe next two fields
1127290001Sglebiusshow the remote peer or clock address followed by the local address
1128290001Sglebiusin dotted-quad notation.
1129290001SglebiusThe final four fields show the originate,
1130290001Sglebiusreceive, transmit and final NTP timestamps in order.
1131290001SglebiusThe timestamp
1132290001Sglebiusvalues are as received and before processing by the various data
1133290001Sglebiussmoothing and mitigation algorithms.
1134290001Sglebius@item @code{sysstats}
1135290001SglebiusEnables recording of ntpd statistics counters on a periodic basis.
1136290001SglebiusEach
1137290001Sglebiushour a line of the following form is appended to the file generation
1138290001Sglebiusset named
1139290001Sglebius@code{sysstats}:
1140290001Sglebius@verbatim
1141290001Sglebius50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
1142290001Sglebius@end verbatim
1143290001Sglebius
1144290001SglebiusThe first two fields show the date (Modified Julian Day) and time
1145290001Sglebius(seconds and fraction past UTC midnight).
1146290001SglebiusThe remaining ten fields show
1147290001Sglebiusthe statistics counter values accumulated since the last generated
1148290001Sglebiusline.
1149290001Sglebius@table @asis
1150290001Sglebius@item Time since restart @code{36000}
1151290001SglebiusTime in hours since the system was last rebooted.
1152290001Sglebius@item Packets received @code{81965}
1153290001SglebiusTotal number of packets received.
1154290001Sglebius@item Packets processed @code{0}
1155290001SglebiusNumber of packets received in response to previous packets sent
1156290001Sglebius@item Current version @code{9546}
1157290001SglebiusNumber of packets matching the current NTP version.
1158290001Sglebius@item Previous version @code{56}
1159290001SglebiusNumber of packets matching the previous NTP version.
1160290001Sglebius@item Bad version @code{71793}
1161290001SglebiusNumber of packets matching neither NTP version.
1162290001Sglebius@item Access denied @code{512}
1163290001SglebiusNumber of packets denied access for any reason.
1164290001Sglebius@item Bad length or format @code{540}
1165290001SglebiusNumber of packets with invalid length, format or port number.
1166290001Sglebius@item Bad authentication @code{10}
1167290001SglebiusNumber of packets not verified as authentic.
1168290001Sglebius@item Rate exceeded @code{147}
1169290001SglebiusNumber of packets discarded due to rate limitation.
1170290001Sglebius@end table
1171290001Sglebius@item @code{statsdir} @kbd{directory_path}
1172290001SglebiusIndicates the full path of a directory where statistics files
1173290001Sglebiusshould be created (see below).
1174290001SglebiusThis keyword allows
1175290001Sglebiusthe (otherwise constant)
1176290001Sglebius@code{filegen}
1177290001Sglebiusfilename prefix to be modified for file generation sets, which
1178290001Sglebiusis useful for handling statistics logs.
1179290001Sglebius@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}]}
1180290001SglebiusConfigures setting of generation file set name.
1181290001SglebiusGeneration
1182290001Sglebiusfile sets provide a means for handling files that are
1183290001Sglebiuscontinuously growing during the lifetime of a server.
1184290001SglebiusServer statistics are a typical example for such files.
1185290001SglebiusGeneration file sets provide access to a set of files used
1186290001Sglebiusto store the actual data.
1187290001SglebiusAt any time at most one element
1188290001Sglebiusof the set is being written to.
1189290001SglebiusThe type given specifies
1190290001Sglebiuswhen and how data will be directed to a new element of the set.
1191290001SglebiusThis way, information stored in elements of a file set
1192290001Sglebiusthat are currently unused are available for administrational
1193290001Sglebiusoperations without the risk of disturbing the operation of ntpd.
1194290001Sglebius(Most important: they can be removed to free space for new data
1195290001Sglebiusproduced.)
1196290001Sglebius
1197290001SglebiusNote that this command can be sent from the
1198290001Sglebius@code{ntpdc(1ntpdcmdoc)}
1199290001Sglebiusprogram running at a remote location.
1200290001Sglebius@table @asis
1201290001Sglebius@item @code{name}
1202290001SglebiusThis is the type of the statistics records, as shown in the
1203290001Sglebius@code{statistics}
1204290001Sglebiuscommand.
1205290001Sglebius@item @code{file} @kbd{filename}
1206290001SglebiusThis is the file name for the statistics records.
1207290001SglebiusFilenames of set
1208290001Sglebiusmembers are built from three concatenated elements
1209290001Sglebius@code{prefix},
1210290001Sglebius@code{filename}
1211290001Sglebiusand
1212290001Sglebius@code{suffix}:
1213290001Sglebius@table @asis
1214290001Sglebius@item @code{prefix}
1215290001SglebiusThis is a constant filename path.
1216290001SglebiusIt is not subject to
1217290001Sglebiusmodifications via the
1218290001Sglebius@kbd{filegen}
1219290001Sglebiusoption.
1220290001SglebiusIt is defined by the
1221290001Sglebiusserver, usually specified as a compile-time constant.
1222290001SglebiusIt may,
1223290001Sglebiushowever, be configurable for individual file generation sets
1224290001Sglebiusvia other commands.
1225290001SglebiusFor example, the prefix used with
1226290001Sglebius@kbd{loopstats}
1227290001Sglebiusand
1228290001Sglebius@kbd{peerstats}
1229290001Sglebiusgeneration can be configured using the
1230290001Sglebius@kbd{statsdir}
1231290001Sglebiusoption explained above.
1232290001Sglebius@item @code{filename}
1233290001SglebiusThis string is directly concatenated to the prefix mentioned
1234290001Sglebiusabove (no intervening
1235290001Sglebius@quoteleft{}/@quoteright{}).
1236290001SglebiusThis can be modified using
1237290001Sglebiusthe file argument to the
1238290001Sglebius@kbd{filegen}
1239290001Sglebiusstatement.
1240290001SglebiusNo
1241290001Sglebius@file{..}
1242290001Sglebiuselements are
1243290001Sglebiusallowed in this component to prevent filenames referring to
1244290001Sglebiusparts outside the filesystem hierarchy denoted by
1245290001Sglebius@kbd{prefix}.
1246290001Sglebius@item @code{suffix}
1247290001SglebiusThis part is reflects individual elements of a file set.
1248290001SglebiusIt is
1249290001Sglebiusgenerated according to the type of a file set.
1250290001Sglebius@end table
1251290001Sglebius@item @code{type} @kbd{typename}
1252290001SglebiusA file generation set is characterized by its type.
1253290001SglebiusThe following
1254290001Sglebiustypes are supported:
1255290001Sglebius@table @asis
1256290001Sglebius@item @code{none}
1257290001SglebiusThe file set is actually a single plain file.
1258290001Sglebius@item @code{pid}
1259290001SglebiusOne element of file set is used per incarnation of a ntpd
1260290001Sglebiusserver.
1261290001SglebiusThis type does not perform any changes to file set
1262290001Sglebiusmembers during runtime, however it provides an easy way of
1263290001Sglebiusseparating files belonging to different
1264290001Sglebius@code{ntpd(1ntpdmdoc)}
1265290001Sglebiusserver incarnations.
1266290001SglebiusThe set member filename is built by appending a
1267290001Sglebius@quoteleft{}.@quoteright{}
1268290001Sglebiusto concatenated
1269290001Sglebius@kbd{prefix}
1270290001Sglebiusand
1271290001Sglebius@kbd{filename}
1272290001Sglebiusstrings, and
1273290001Sglebiusappending the decimal representation of the process ID of the
1274290001Sglebius@code{ntpd(1ntpdmdoc)}
1275290001Sglebiusserver process.
1276290001Sglebius@item @code{day}
1277290001SglebiusOne file generation set element is created per day.
1278290001SglebiusA day is
1279290001Sglebiusdefined as the period between 00:00 and 24:00 UTC.
1280290001SglebiusThe file set
1281290001Sglebiusmember suffix consists of a
1282290001Sglebius@quoteleft{}.@quoteright{}
1283290001Sglebiusand a day specification in
1284290001Sglebiusthe form
1285290001Sglebius@code{YYYYMMdd}.
1286290001Sglebius@code{YYYY}
1287290001Sglebiusis a 4-digit year number (e.g., 1992).
1288290001Sglebius@code{MM}
1289290001Sglebiusis a two digit month number.
1290290001Sglebius@code{dd}
1291290001Sglebiusis a two digit day number.
1292290001SglebiusThus, all information written at 10 December 1992 would end up
1293290001Sglebiusin a file named
1294290001Sglebius@kbd{prefix}
1295290001Sglebius@kbd{filename}.19921210.
1296290001Sglebius@item @code{week}
1297290001SglebiusAny file set member contains data related to a certain week of
1298290001Sglebiusa year.
1299290001SglebiusThe term week is defined by computing day-of-year
1300290001Sglebiusmodulo 7.
1301290001SglebiusElements of such a file generation set are
1302290001Sglebiusdistinguished by appending the following suffix to the file set
1303290001Sglebiusfilename base: A dot, a 4-digit year number, the letter
1304290001Sglebius@code{W},
1305290001Sglebiusand a 2-digit week number.
1306290001SglebiusFor example, information from January,
1307290001Sglebius10th 1992 would end up in a file with suffix
1308290001Sglebius.No . Ns Ar 1992W1 .
1309290001Sglebius@item @code{month}
1310290001SglebiusOne generation file set element is generated per month.
1311290001SglebiusThe
1312290001Sglebiusfile name suffix consists of a dot, a 4-digit year number, and
1313290001Sglebiusa 2-digit month.
1314290001Sglebius@item @code{year}
1315290001SglebiusOne generation file element is generated per year.
1316290001SglebiusThe filename
1317290001Sglebiussuffix consists of a dot and a 4 digit year number.
1318290001Sglebius@item @code{age}
1319290001SglebiusThis type of file generation sets changes to a new element of
1320290001Sglebiusthe file set every 24 hours of server operation.
1321290001SglebiusThe filename
1322290001Sglebiussuffix consists of a dot, the letter
1323290001Sglebius@code{a},
1324290001Sglebiusand an 8-digit number.
1325290001SglebiusThis number is taken to be the number of seconds the server is
1326290001Sglebiusrunning at the start of the corresponding 24-hour period.
1327290001SglebiusInformation is only written to a file generation by specifying
1328290001Sglebius@code{enable};
1329290001Sglebiusoutput is prevented by specifying
1330290001Sglebius@code{disable}.
1331290001Sglebius@end table
1332290001Sglebius@item @code{link} | @code{nolink}
1333290001SglebiusIt is convenient to be able to access the current element of a file
1334290001Sglebiusgeneration set by a fixed name.
1335290001SglebiusThis feature is enabled by
1336290001Sglebiusspecifying
1337290001Sglebius@code{link}
1338290001Sglebiusand disabled using
1339290001Sglebius@code{nolink}.
1340290001SglebiusIf link is specified, a
1341290001Sglebiushard link from the current file set element to a file without
1342290001Sglebiussuffix is created.
1343290001SglebiusWhen there is already a file with this name and
1344290001Sglebiusthe number of links of this file is one, it is renamed appending a
1345290001Sglebiusdot, the letter
1346290001Sglebius@code{C},
1347298770Sdelphijand the pid of the
1348298770Sdelphij@code{ntpd(1ntpdmdoc)}
1349298770Sdelphijserver process.
1350290001SglebiusWhen the
1351290001Sglebiusnumber of links is greater than one, the file is unlinked.
1352290001SglebiusThis
1353290001Sglebiusallows the current file to be accessed by a constant name.
1354290001Sglebius@item @code{enable} @code{|} @code{disable}
1355290001SglebiusEnables or disables the recording function.
1356290001Sglebius@end table
1357290001Sglebius@end table
1358290001Sglebius@end table
1359290001Sglebius@node Access Control Support
1360290001Sglebius@subsection Access Control Support
1361290001SglebiusThe
1362290001Sglebius@code{ntpd(1ntpdmdoc)}
1363290001Sglebiusdaemon implements a general purpose address/mask based restriction
1364290001Sglebiuslist.
1365290001SglebiusThe list contains address/match entries sorted first
1366290001Sglebiusby increasing address values and and then by increasing mask values.
1367290001SglebiusA match occurs when the bitwise AND of the mask and the packet
1368290001Sglebiussource address is equal to the bitwise AND of the mask and
1369290001Sglebiusaddress in the list.
1370290001SglebiusThe list is searched in order with the
1371290001Sglebiuslast match found defining the restriction flags associated
1372290001Sglebiuswith the entry.
1373290001SglebiusAdditional information and examples can be found in the
1374290001Sglebius"Notes on Configuring NTP and Setting up a NTP Subnet"
1375290001Sglebiuspage
1376290001Sglebius(available as part of the HTML documentation
1377290001Sglebiusprovided in
1378290001Sglebius@file{/usr/share/doc/ntp}).
1379290001Sglebius
1380290001SglebiusThe restriction facility was implemented in conformance
1381290001Sglebiuswith the access policies for the original NSFnet backbone
1382290001Sglebiustime servers.
1383290001SglebiusLater the facility was expanded to deflect
1384290001Sglebiuscryptographic and clogging attacks.
1385290001SglebiusWhile this facility may
1386290001Sglebiusbe useful for keeping unwanted or broken or malicious clients
1387290001Sglebiusfrom congesting innocent servers, it should not be considered
1388290001Sglebiusan alternative to the NTP authentication facilities.
1389290001SglebiusSource address based restrictions are easily circumvented
1390290001Sglebiusby a determined cracker.
1391290001Sglebius
1392290001SglebiusClients can be denied service because they are explicitly
1393298770Sdelphijincluded in the restrict list created by the
1394298770Sdelphij@code{restrict}
1395298770Sdelphijcommand
1396290001Sglebiusor implicitly as the result of cryptographic or rate limit
1397290001Sglebiusviolations.
1398290001SglebiusCryptographic violations include certificate
1399290001Sglebiusor identity verification failure; rate limit violations generally
1400290001Sglebiusresult from defective NTP implementations that send packets
1401290001Sglebiusat abusive rates.
1402290001SglebiusSome violations cause denied service
1403290001Sglebiusonly for the offending packet, others cause denied service
1404290001Sglebiusfor a timed period and others cause the denied service for
1405298770Sdelphijan indefinite period.
1406290001SglebiusWhen a client or network is denied access
1407298770Sdelphijfor an indefinite period, the only way at present to remove
1408290001Sglebiusthe restrictions is by restarting the server.
1409290001Sglebius@subsubsection The Kiss-of-Death Packet
1410290001SglebiusOrdinarily, packets denied service are simply dropped with no
1411290001Sglebiusfurther action except incrementing statistics counters.
1412290001SglebiusSometimes a
1413290001Sglebiusmore proactive response is needed, such as a server message that
1414290001Sglebiusexplicitly requests the client to stop sending and leave a message
1415290001Sglebiusfor the system operator.
1416290001SglebiusA special packet format has been created
1417290001Sglebiusfor this purpose called the "kiss-of-death" (KoD) packet.
1418290001SglebiusKoD packets have the leap bits set unsynchronized and stratum set
1419290001Sglebiusto zero and the reference identifier field set to a four-byte
1420290001SglebiusASCII code.
1421290001SglebiusIf the
1422290001Sglebius@code{noserve}
1423290001Sglebiusor
1424290001Sglebius@code{notrust}
1425290001Sglebiusflag of the matching restrict list entry is set,
1426290001Sglebiusthe code is "DENY"; if the
1427290001Sglebius@code{limited}
1428290001Sglebiusflag is set and the rate limit
1429290001Sglebiusis exceeded, the code is "RATE".
1430290001SglebiusFinally, if a cryptographic violation occurs, the code is "CRYP".
1431290001Sglebius
1432290001SglebiusA client receiving a KoD performs a set of sanity checks to
1433290001Sglebiusminimize security exposure, then updates the stratum and
1434290001Sglebiusreference identifier peer variables, sets the access
1435290001Sglebiusdenied (TEST4) bit in the peer flash variable and sends
1436290001Sglebiusa message to the log.
1437290001SglebiusAs long as the TEST4 bit is set,
1438290001Sglebiusthe client will send no further packets to the server.
1439290001SglebiusThe only way at present to recover from this condition is
1440290001Sglebiusto restart the protocol at both the client and server.
1441290001SglebiusThis
1442290001Sglebiushappens automatically at the client when the association times out.
1443290001SglebiusIt will happen at the server only if the server operator cooperates.
1444290001Sglebius@subsubsection Access Control Commands
1445290001Sglebius@table @asis
1446290001Sglebius@item @code{discard} @code{[@code{average} @kbd{avg}]} @code{[@code{minimum} @kbd{min}]} @code{[@code{monitor} @kbd{prob}]}
1447290001SglebiusSet the parameters of the
1448290001Sglebius@code{limited}
1449290001Sglebiusfacility which protects the server from
1450290001Sglebiusclient abuse.
1451290001SglebiusThe
1452290001Sglebius@code{average}
1453290001Sglebiussubcommand specifies the minimum average packet
1454290001Sglebiusspacing, while the
1455290001Sglebius@code{minimum}
1456290001Sglebiussubcommand specifies the minimum packet spacing.
1457290001SglebiusPackets that violate these minima are discarded
1458290001Sglebiusand a kiss-o'-death packet returned if enabled.
1459290001SglebiusThe default
1460290001Sglebiusminimum average and minimum are 5 and 2, respectively.
1461298770SdelphijThe
1462298770Sdelphij@code{monitor}
1463298770Sdelphijsubcommand specifies the probability of discard
1464290001Sglebiusfor packets that overflow the rate-control window.
1465290001Sglebius@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@kbd{flag} @kbd{...}]}
1466290001SglebiusThe
1467290001Sglebius@kbd{address}
1468290001Sglebiusargument expressed in
1469290001Sglebiusdotted-quad form is the address of a host or network.
1470290001SglebiusAlternatively, the
1471290001Sglebius@kbd{address}
1472290001Sglebiusargument can be a valid host DNS name.
1473290001SglebiusThe
1474290001Sglebius@kbd{mask}
1475290001Sglebiusargument expressed in dotted-quad form defaults to
1476290001Sglebius@code{255.255.255.255},
1477290001Sglebiusmeaning that the
1478290001Sglebius@kbd{address}
1479290001Sglebiusis treated as the address of an individual host.
1480290001SglebiusA default entry (address
1481290001Sglebius@code{0.0.0.0},
1482290001Sglebiusmask
1483290001Sglebius@code{0.0.0.0})
1484290001Sglebiusis always included and is always the first entry in the list.
1485290001SglebiusNote that text string
1486290001Sglebius@code{default},
1487290001Sglebiuswith no mask option, may
1488290001Sglebiusbe used to indicate the default entry.
1489290001SglebiusIn the current implementation,
1490290001Sglebius@code{flag}
1491290001Sglebiusalways
1492290001Sglebiusrestricts access, i.e., an entry with no flags indicates that free
1493290001Sglebiusaccess to the server is to be given.
1494290001SglebiusThe flags are not orthogonal,
1495290001Sglebiusin that more restrictive flags will often make less restrictive
1496290001Sglebiusones redundant.
1497290001SglebiusThe flags can generally be classed into two
1498290001Sglebiuscategories, those which restrict time service and those which
1499290001Sglebiusrestrict informational queries and attempts to do run-time
1500290001Sglebiusreconfiguration of the server.
1501290001SglebiusOne or more of the following flags
1502290001Sglebiusmay be specified:
1503290001Sglebius@table @asis
1504290001Sglebius@item @code{ignore}
1505290001SglebiusDeny packets of all kinds, including
1506290001Sglebius@code{ntpq(1ntpqmdoc)}
1507290001Sglebiusand
1508290001Sglebius@code{ntpdc(1ntpdcmdoc)}
1509290001Sglebiusqueries.
1510290001Sglebius@item @code{kod}
1511290001SglebiusIf this flag is set when an access violation occurs, a kiss-o'-death
1512290001Sglebius(KoD) packet is sent.
1513290001SglebiusKoD packets are rate limited to no more than one
1514290001Sglebiusper second.
1515290001SglebiusIf another KoD packet occurs within one second after the
1516290001Sglebiuslast one, the packet is dropped.
1517290001Sglebius@item @code{limited}
1518290001SglebiusDeny service if the packet spacing violates the lower limits specified
1519298770Sdelphijin the
1520298770Sdelphij@code{discard}
1521298770Sdelphijcommand.
1522290001SglebiusA history of clients is kept using the
1523290001Sglebiusmonitoring capability of
1524290001Sglebius@code{ntpd(1ntpdmdoc)}.
1525290001SglebiusThus, monitoring is always active as
1526290001Sglebiuslong as there is a restriction entry with the
1527290001Sglebius@code{limited}
1528290001Sglebiusflag.
1529290001Sglebius@item @code{lowpriotrap}
1530290001SglebiusDeclare traps set by matching hosts to be low priority.
1531290001SglebiusThe
1532290001Sglebiusnumber of traps a server can maintain is limited (the current limit
1533290001Sglebiusis 3).
1534290001SglebiusTraps are usually assigned on a first come, first served
1535290001Sglebiusbasis, with later trap requestors being denied service.
1536290001SglebiusThis flag
1537290001Sglebiusmodifies the assignment algorithm by allowing low priority traps to
1538290001Sglebiusbe overridden by later requests for normal priority traps.
1539290001Sglebius@item @code{nomodify}
1540290001SglebiusDeny
1541290001Sglebius@code{ntpq(1ntpqmdoc)}
1542290001Sglebiusand
1543290001Sglebius@code{ntpdc(1ntpdcmdoc)}
1544290001Sglebiusqueries which attempt to modify the state of the
1545290001Sglebiusserver (i.e., run time reconfiguration).
1546290001SglebiusQueries which return
1547290001Sglebiusinformation are permitted.
1548290001Sglebius@item @code{noquery}
1549290001SglebiusDeny
1550290001Sglebius@code{ntpq(1ntpqmdoc)}
1551290001Sglebiusand
1552290001Sglebius@code{ntpdc(1ntpdcmdoc)}
1553290001Sglebiusqueries.
1554290001SglebiusTime service is not affected.
1555290001Sglebius@item @code{nopeer}
1556290001SglebiusDeny packets which would result in mobilizing a new association.
1557290001SglebiusThis
1558290001Sglebiusincludes broadcast and symmetric active packets when a configured
1559290001Sglebiusassociation does not exist.
1560290001SglebiusIt also includes
1561290001Sglebius@code{pool}
1562290001Sglebiusassociations, so if you want to use servers from a 
1563290001Sglebius@code{pool}
1564290001Sglebiusdirective and also want to use
1565290001Sglebius@code{nopeer}
1566290001Sglebiusby default, you'll want a
1567290001Sglebius@code{restrict source ...} @code{line} @code{as} @code{well} @code{that} @code{does}
1568290001Sglebius@item not
1569290001Sglebiusinclude the
1570290001Sglebius@code{nopeer}
1571290001Sglebiusdirective.
1572290001Sglebius@item @code{noserve}
1573290001SglebiusDeny all packets except
1574290001Sglebius@code{ntpq(1ntpqmdoc)}
1575290001Sglebiusand
1576290001Sglebius@code{ntpdc(1ntpdcmdoc)}
1577290001Sglebiusqueries.
1578290001Sglebius@item @code{notrap}
1579290001SglebiusDecline to provide mode 6 control message trap service to matching
1580290001Sglebiushosts.
1581298770SdelphijThe trap service is a subsystem of the
1582298770Sdelphij@code{ntpq(1ntpqmdoc)}
1583298770Sdelphijcontrol message
1584290001Sglebiusprotocol which is intended for use by remote event logging programs.
1585290001Sglebius@item @code{notrust}
1586290001SglebiusDeny service unless the packet is cryptographically authenticated.
1587290001Sglebius@item @code{ntpport}
1588290001SglebiusThis is actually a match algorithm modifier, rather than a
1589290001Sglebiusrestriction flag.
1590290001SglebiusIts presence causes the restriction entry to be
1591290001Sglebiusmatched only if the source port in the packet is the standard NTP
1592290001SglebiusUDP port (123).
1593290001SglebiusBoth
1594290001Sglebius@code{ntpport}
1595290001Sglebiusand
1596290001Sglebius@code{non-ntpport}
1597290001Sglebiusmay
1598290001Sglebiusbe specified.
1599290001SglebiusThe
1600290001Sglebius@code{ntpport}
1601290001Sglebiusis considered more specific and
1602290001Sglebiusis sorted later in the list.
1603290001Sglebius@item @code{version}
1604290001SglebiusDeny packets that do not match the current NTP version.
1605290001Sglebius@end table
1606290001Sglebius
1607290001SglebiusDefault restriction list entries with the flags ignore, interface,
1608290001Sglebiusntpport, for each of the local host's interface addresses are
1609290001Sglebiusinserted into the table at startup to prevent the server
1610290001Sglebiusfrom attempting to synchronize to its own time.
1611290001SglebiusA default entry is also always present, though if it is
1612290001Sglebiusotherwise unconfigured; no flags are associated
1613290001Sglebiuswith the default entry (i.e., everything besides your own
1614290001SglebiusNTP server is unrestricted).
1615290001Sglebius@end table
1616290001Sglebius@node Automatic NTP Configuration Options
1617290001Sglebius@subsection Automatic NTP Configuration Options
1618290001Sglebius@subsubsection Manycasting
1619290001SglebiusManycasting is a automatic discovery and configuration paradigm
1620290001Sglebiusnew to NTPv4.
1621290001SglebiusIt is intended as a means for a multicast client
1622290001Sglebiusto troll the nearby network neighborhood to find cooperating
1623290001Sglebiusmanycast servers, validate them using cryptographic means
1624290001Sglebiusand evaluate their time values with respect to other servers
1625290001Sglebiusthat might be lurking in the vicinity.
1626290001SglebiusThe intended result is that each manycast client mobilizes
1627290001Sglebiusclient associations with some number of the "best"
1628290001Sglebiusof the nearby manycast servers, yet automatically reconfigures
1629290001Sglebiusto sustain this number of servers should one or another fail.
1630290001Sglebius
1631290001SglebiusNote that the manycasting paradigm does not coincide
1632290001Sglebiuswith the anycast paradigm described in RFC-1546,
1633290001Sglebiuswhich is designed to find a single server from a clique
1634290001Sglebiusof servers providing the same service.
1635290001SglebiusThe manycast paradigm is designed to find a plurality
1636290001Sglebiusof redundant servers satisfying defined optimality criteria.
1637290001Sglebius
1638290001SglebiusManycasting can be used with either symmetric key
1639290001Sglebiusor public key cryptography.
1640290001SglebiusThe public key infrastructure (PKI)
1641290001Sglebiusoffers the best protection against compromised keys
1642290001Sglebiusand is generally considered stronger, at least with relatively
1643290001Sglebiuslarge key sizes.
1644290001SglebiusIt is implemented using the Autokey protocol and
1645290001Sglebiusthe OpenSSL cryptographic library available from
1646290001Sglebius@code{http://www.openssl.org/}.
1647290001SglebiusThe library can also be used with other NTPv4 modes
1648290001Sglebiusas well and is highly recommended, especially for broadcast modes.
1649290001Sglebius
1650290001SglebiusA persistent manycast client association is configured
1651298770Sdelphijusing the
1652298770Sdelphij@code{manycastclient}
1653298770Sdelphijcommand, which is similar to the
1654298770Sdelphij@code{server}
1655298770Sdelphijcommand but with a multicast (IPv4 class
1656290001Sglebius@code{D}
1657290001Sglebiusor IPv6 prefix
1658290001Sglebius@code{FF})
1659290001Sglebiusgroup address.
1660290001SglebiusThe IANA has designated IPv4 address 224.1.1.1
1661290001Sglebiusand IPv6 address FF05::101 (site local) for NTP.
1662290001SglebiusWhen more servers are needed, it broadcasts manycast
1663290001Sglebiusclient messages to this address at the minimum feasible rate
1664290001Sglebiusand minimum feasible time-to-live (TTL) hops, depending
1665290001Sglebiuson how many servers have already been found.
1666290001SglebiusThere can be as many manycast client associations
1667290001Sglebiusas different group address, each one serving as a template
1668290001Sglebiusfor a future ephemeral unicast client/server association.
1669290001Sglebius
1670290001SglebiusManycast servers configured with the
1671290001Sglebius@code{manycastserver}
1672290001Sglebiuscommand listen on the specified group address for manycast
1673290001Sglebiusclient messages.
1674290001SglebiusNote the distinction between manycast client,
1675290001Sglebiuswhich actively broadcasts messages, and manycast server,
1676290001Sglebiuswhich passively responds to them.
1677290001SglebiusIf a manycast server is
1678290001Sglebiusin scope of the current TTL and is itself synchronized
1679290001Sglebiusto a valid source and operating at a stratum level equal
1680290001Sglebiusto or lower than the manycast client, it replies to the
1681290001Sglebiusmanycast client message with an ordinary unicast server message.
1682290001Sglebius
1683290001SglebiusThe manycast client receiving this message mobilizes
1684290001Sglebiusan ephemeral client/server association according to the
1685290001Sglebiusmatching manycast client template, but only if cryptographically
1686290001Sglebiusauthenticated and the server stratum is less than or equal
1687290001Sglebiusto the client stratum.
1688290001SglebiusAuthentication is explicitly required
1689290001Sglebiusand either symmetric key or public key (Autokey) can be used.
1690290001SglebiusThen, the client polls the server at its unicast address
1691290001Sglebiusin burst mode in order to reliably set the host clock
1692290001Sglebiusand validate the source.
1693290001SglebiusThis normally results
1694290001Sglebiusin a volley of eight client/server at 2-s intervals
1695290001Sglebiusduring which both the synchronization and cryptographic
1696290001Sglebiusprotocols run concurrently.
1697290001SglebiusFollowing the volley,
1698290001Sglebiusthe client runs the NTP intersection and clustering
1699290001Sglebiusalgorithms, which act to discard all but the "best"
1700290001Sglebiusassociations according to stratum and synchronization
1701290001Sglebiusdistance.
1702290001SglebiusThe surviving associations then continue
1703290001Sglebiusin ordinary client/server mode.
1704290001Sglebius
1705290001SglebiusThe manycast client polling strategy is designed to reduce
1706290001Sglebiusas much as possible the volume of manycast client messages
1707290001Sglebiusand the effects of implosion due to near-simultaneous
1708290001Sglebiusarrival of manycast server messages.
1709290001SglebiusThe strategy is determined by the
1710290001Sglebius@code{manycastclient},
1711290001Sglebius@code{tos}
1712290001Sglebiusand
1713290001Sglebius@code{ttl}
1714290001Sglebiusconfiguration commands.
1715290001SglebiusThe manycast poll interval is
1716290001Sglebiusnormally eight times the system poll interval,
1717290001Sglebiuswhich starts out at the
1718290001Sglebius@code{minpoll}
1719290001Sglebiusvalue specified in the
1720290001Sglebius@code{manycastclient},
1721290001Sglebiuscommand and, under normal circumstances, increments to the
1722290001Sglebius@code{maxpolll}
1723290001Sglebiusvalue specified in this command.
1724290001SglebiusInitially, the TTL is
1725298770Sdelphijset at the minimum hops specified by the
1726298770Sdelphij@code{ttl}
1727298770Sdelphijcommand.
1728290001SglebiusAt each retransmission the TTL is increased until reaching
1729290001Sglebiusthe maximum hops specified by this command or a sufficient
1730290001Sglebiusnumber client associations have been found.
1731290001SglebiusFurther retransmissions use the same TTL.
1732290001Sglebius
1733290001SglebiusThe quality and reliability of the suite of associations
1734290001Sglebiusdiscovered by the manycast client is determined by the NTP
1735290001Sglebiusmitigation algorithms and the
1736290001Sglebius@code{minclock}
1737290001Sglebiusand
1738290001Sglebius@code{minsane}
1739290001Sglebiusvalues specified in the
1740290001Sglebius@code{tos}
1741290001Sglebiusconfiguration command.
1742290001SglebiusAt least
1743290001Sglebius@code{minsane}
1744290001Sglebiuscandidate servers must be available and the mitigation
1745290001Sglebiusalgorithms produce at least
1746290001Sglebius@code{minclock}
1747290001Sglebiussurvivors in order to synchronize the clock.
1748290001SglebiusByzantine agreement principles require at least four
1749290001Sglebiuscandidates in order to correctly discard a single falseticker.
1750290001SglebiusFor legacy purposes,
1751290001Sglebius@code{minsane}
1752290001Sglebiusdefaults to 1 and
1753290001Sglebius@code{minclock}
1754290001Sglebiusdefaults to 3.
1755290001SglebiusFor manycast service
1756290001Sglebius@code{minsane}
1757290001Sglebiusshould be explicitly set to 4, assuming at least that
1758290001Sglebiusnumber of servers are available.
1759290001Sglebius
1760290001SglebiusIf at least
1761290001Sglebius@code{minclock}
1762290001Sglebiusservers are found, the manycast poll interval is immediately
1763290001Sglebiusset to eight times
1764290001Sglebius@code{maxpoll}.
1765290001SglebiusIf less than
1766290001Sglebius@code{minclock}
1767290001Sglebiusservers are found when the TTL has reached the maximum hops,
1768290001Sglebiusthe manycast poll interval is doubled.
1769290001SglebiusFor each transmission
1770290001Sglebiusafter that, the poll interval is doubled again until
1771290001Sglebiusreaching the maximum of eight times
1772290001Sglebius@code{maxpoll}.
1773290001SglebiusFurther transmissions use the same poll interval and
1774290001SglebiusTTL values.
1775290001SglebiusNote that while all this is going on,
1776290001Sglebiuseach client/server association found is operating normally
1777290001Sglebiusit the system poll interval.
1778290001Sglebius
1779290001SglebiusAdministratively scoped multicast boundaries are normally
1780290001Sglebiusspecified by the network router configuration and,
1781290001Sglebiusin the case of IPv6, the link/site scope prefix.
1782290001SglebiusBy default, the increment for TTL hops is 32 starting
1783290001Sglebiusfrom 31; however, the
1784290001Sglebius@code{ttl}
1785290001Sglebiusconfiguration command can be
1786290001Sglebiusused to modify the values to match the scope rules.
1787290001Sglebius
1788290001SglebiusIt is often useful to narrow the range of acceptable
1789290001Sglebiusservers which can be found by manycast client associations.
1790290001SglebiusBecause manycast servers respond only when the client
1791290001Sglebiusstratum is equal to or greater than the server stratum,
1792290001Sglebiusprimary (stratum 1) servers fill find only primary servers
1793290001Sglebiusin TTL range, which is probably the most common objective.
1794290001SglebiusHowever, unless configured otherwise, all manycast clients
1795290001Sglebiusin TTL range will eventually find all primary servers
1796290001Sglebiusin TTL range, which is probably not the most common
1797290001Sglebiusobjective in large networks.
1798290001SglebiusThe
1799290001Sglebius@code{tos}
1800290001Sglebiuscommand can be used to modify this behavior.
1801290001SglebiusServers with stratum below
1802290001Sglebius@code{floor}
1803290001Sglebiusor above
1804290001Sglebius@code{ceiling}
1805290001Sglebiusspecified in the
1806290001Sglebius@code{tos}
1807290001Sglebiuscommand are strongly discouraged during the selection
1808290001Sglebiusprocess; however, these servers may be temporally
1809290001Sglebiusaccepted if the number of servers within TTL range is
1810290001Sglebiusless than
1811290001Sglebius@code{minclock}.
1812290001Sglebius
1813290001SglebiusThe above actions occur for each manycast client message,
1814290001Sglebiuswhich repeats at the designated poll interval.
1815290001SglebiusHowever, once the ephemeral client association is mobilized,
1816290001Sglebiussubsequent manycast server replies are discarded,
1817290001Sglebiussince that would result in a duplicate association.
1818290001SglebiusIf during a poll interval the number of client associations
1819290001Sglebiusfalls below
1820290001Sglebius@code{minclock},
1821290001Sglebiusall manycast client prototype associations are reset
1822290001Sglebiusto the initial poll interval and TTL hops and operation
1823290001Sglebiusresumes from the beginning.
1824290001SglebiusIt is important to avoid
1825290001Sglebiusfrequent manycast client messages, since each one requires
1826290001Sglebiusall manycast servers in TTL range to respond.
1827290001SglebiusThe result could well be an implosion, either minor or major,
1828290001Sglebiusdepending on the number of servers in range.
1829290001SglebiusThe recommended value for
1830290001Sglebius@code{maxpoll}
1831290001Sglebiusis 12 (4,096 s).
1832290001Sglebius
1833290001SglebiusIt is possible and frequently useful to configure a host
1834290001Sglebiusas both manycast client and manycast server.
1835290001SglebiusA number of hosts configured this way and sharing a common
1836290001Sglebiusgroup address will automatically organize themselves
1837290001Sglebiusin an optimum configuration based on stratum and
1838290001Sglebiussynchronization distance.
1839290001SglebiusFor example, consider an NTP
1840290001Sglebiussubnet of two primary servers and a hundred or more
1841290001Sglebiusdependent clients.
1842290001SglebiusWith two exceptions, all servers
1843290001Sglebiusand clients have identical configuration files including both
1844290001Sglebius@code{multicastclient}
1845290001Sglebiusand
1846290001Sglebius@code{multicastserver}
1847290001Sglebiuscommands using, for instance, multicast group address
1848290001Sglebius239.1.1.1.
1849290001SglebiusThe only exception is that each primary server
1850290001Sglebiusconfiguration file must include commands for the primary
1851290001Sglebiusreference source such as a GPS receiver.
1852290001Sglebius
1853290001SglebiusThe remaining configuration files for all secondary
1854290001Sglebiusservers and clients have the same contents, except for the
1855290001Sglebius@code{tos}
1856290001Sglebiuscommand, which is specific for each stratum level.
1857290001SglebiusFor stratum 1 and stratum 2 servers, that command is
1858290001Sglebiusnot necessary.
1859290001SglebiusFor stratum 3 and above servers the
1860290001Sglebius@code{floor}
1861290001Sglebiusvalue is set to the intended stratum number.
1862290001SglebiusThus, all stratum 3 configuration files are identical,
1863290001Sglebiusall stratum 4 files are identical and so forth.
1864290001Sglebius
1865290001SglebiusOnce operations have stabilized in this scenario,
1866290001Sglebiusthe primary servers will find the primary reference source
1867290001Sglebiusand each other, since they both operate at the same
1868290001Sglebiusstratum (1), but not with any secondary server or client,
1869290001Sglebiussince these operate at a higher stratum.
1870290001SglebiusThe secondary
1871290001Sglebiusservers will find the servers at the same stratum level.
1872290001SglebiusIf one of the primary servers loses its GPS receiver,
1873290001Sglebiusit will continue to operate as a client and other clients
1874290001Sglebiuswill time out the corresponding association and
1875290001Sglebiusre-associate accordingly.
1876290001Sglebius
1877290001SglebiusSome administrators prefer to avoid running
1878290001Sglebius@code{ntpd(1ntpdmdoc)}
1879290001Sglebiuscontinuously and run either
1880290001Sglebius@code{sntp(1sntpmdoc)}
1881290001Sglebiusor
1882290001Sglebius@code{ntpd(1ntpdmdoc)}
1883290001Sglebius@code{-q}
1884290001Sglebiusas a cron job.
1885290001SglebiusIn either case the servers must be
1886290001Sglebiusconfigured in advance and the program fails if none are
1887290001Sglebiusavailable when the cron job runs.
1888290001SglebiusA really slick
1889290001Sglebiusapplication of manycast is with
1890290001Sglebius@code{ntpd(1ntpdmdoc)}
1891290001Sglebius@code{-q}.
1892290001SglebiusThe program wakes up, scans the local landscape looking
1893290001Sglebiusfor the usual suspects, selects the best from among
1894290001Sglebiusthe rascals, sets the clock and then departs.
1895290001SglebiusServers do not have to be configured in advance and
1896290001Sglebiusall clients throughout the network can have the same
1897290001Sglebiusconfiguration file.
1898290001Sglebius@subsubsection Manycast Interactions with Autokey
1899290001SglebiusEach time a manycast client sends a client mode packet
1900290001Sglebiusto a multicast group address, all manycast servers
1901290001Sglebiusin scope generate a reply including the host name
1902290001Sglebiusand status word.
1903290001SglebiusThe manycast clients then run
1904290001Sglebiusthe Autokey protocol, which collects and verifies
1905290001Sglebiusall certificates involved.
1906290001SglebiusFollowing the burst interval
1907290001Sglebiusall but three survivors are cast off,
1908290001Sglebiusbut the certificates remain in the local cache.
1909290001SglebiusIt often happens that several complete signing trails
1910290001Sglebiusfrom the client to the primary servers are collected in this way.
1911290001Sglebius
1912290001SglebiusAbout once an hour or less often if the poll interval
1913290001Sglebiusexceeds this, the client regenerates the Autokey key list.
1914290001SglebiusThis is in general transparent in client/server mode.
1915290001SglebiusHowever, about once per day the server private value
1916290001Sglebiusused to generate cookies is refreshed along with all
1917290001Sglebiusmanycast client associations.
1918290001SglebiusIn this case all
1919290001Sglebiuscryptographic values including certificates is refreshed.
1920290001SglebiusIf a new certificate has been generated since
1921290001Sglebiusthe last refresh epoch, it will automatically revoke
1922290001Sglebiusall prior certificates that happen to be in the
1923290001Sglebiuscertificate cache.
1924290001SglebiusAt the same time, the manycast
1925290001Sglebiusscheme starts all over from the beginning and
1926290001Sglebiusthe expanding ring shrinks to the minimum and increments
1927290001Sglebiusfrom there while collecting all servers in scope.
1928310419Sdelphij@subsubsection Broadcast Options
1929310419Sdelphij@table @asis
1930310419Sdelphij@item @code{tos} @code{[@code{bcpollbstep} @kbd{gate}]}
1931310419SdelphijThis command provides a way to delay,
1932310419Sdelphijby the specified number of broadcast poll intervals,
1933310419Sdelphijbelieving backward time steps from a broadcast server.
1934310419SdelphijBroadcast time networks are expected to be trusted.
1935310419SdelphijIn the event a broadcast server's time is stepped backwards,
1936310419Sdelphijthere is clear benefit to having the clients notice this change
1937310419Sdelphijas soon as possible.
1938310419SdelphijAttacks such as replay attacks can happen, however,
1939310419Sdelphijand even though there are a number of protections built in to
1940310419Sdelphijbroadcast mode, attempts to perform  a replay attack are possible.
1941310419SdelphijThis value defaults to 0, but can be changed
1942310419Sdelphijto any number of poll intervals between 0 and 4.
1943290001Sglebius@subsubsection Manycast Options
1944290001Sglebius@table @asis
1945290001Sglebius@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}]}
1946290001SglebiusThis command affects the clock selection and clustering
1947290001Sglebiusalgorithms.
1948290001SglebiusIt can be used to select the quality and
1949290001Sglebiusquantity of peers used to synchronize the system clock
1950290001Sglebiusand is most useful in manycast mode.
1951290001SglebiusThe variables operate
1952290001Sglebiusas follows:
1953290001Sglebius@table @asis
1954290001Sglebius@item @code{ceiling} @kbd{ceiling}
1955290001SglebiusPeers with strata above
1956290001Sglebius@code{ceiling}
1957290001Sglebiuswill be discarded if there are at least
1958290001Sglebius@code{minclock}
1959290001Sglebiuspeers remaining.
1960290001SglebiusThis value defaults to 15, but can be changed
1961290001Sglebiusto any number from 1 to 15.
1962290001Sglebius@item @code{cohort} @code{@{0 | 1@}}
1963290001SglebiusThis is a binary flag which enables (0) or disables (1)
1964290001Sglebiusmanycast server replies to manycast clients with the same
1965290001Sglebiusstratum level.
1966290001SglebiusThis is useful to reduce implosions where
1967290001Sglebiuslarge numbers of clients with the same stratum level
1968290001Sglebiusare present.
1969290001SglebiusThe default is to enable these replies.
1970290001Sglebius@item @code{floor} @kbd{floor}
1971290001SglebiusPeers with strata below
1972290001Sglebius@code{floor}
1973290001Sglebiuswill be discarded if there are at least
1974290001Sglebius@code{minclock}
1975290001Sglebiuspeers remaining.
1976290001SglebiusThis value defaults to 1, but can be changed
1977290001Sglebiusto any number from 1 to 15.
1978290001Sglebius@item @code{minclock} @kbd{minclock}
1979290001SglebiusThe clustering algorithm repeatedly casts out outlier
1980290001Sglebiusassociations until no more than
1981290001Sglebius@code{minclock}
1982290001Sglebiusassociations remain.
1983290001SglebiusThis value defaults to 3,
1984290001Sglebiusbut can be changed to any number from 1 to the number of
1985290001Sglebiusconfigured sources.
1986290001Sglebius@item @code{minsane} @kbd{minsane}
1987290001SglebiusThis is the minimum number of candidates available
1988290001Sglebiusto the clock selection algorithm in order to produce
1989290001Sglebiusone or more truechimers for the clustering algorithm.
1990290001SglebiusIf fewer than this number are available, the clock is
1991290001Sglebiusundisciplined and allowed to run free.
1992290001SglebiusThe default is 1
1993290001Sglebiusfor legacy purposes.
1994290001SglebiusHowever, according to principles of
1995290001SglebiusByzantine agreement,
1996290001Sglebius@code{minsane}
1997290001Sglebiusshould be at least 4 in order to detect and discard
1998290001Sglebiusa single falseticker.
1999290001Sglebius@end table
2000290001Sglebius@item @code{ttl} @kbd{hop} @kbd{...}
2001290001SglebiusThis command specifies a list of TTL values in increasing
2002290001Sglebiusorder, up to 8 values can be specified.
2003290001SglebiusIn manycast mode these values are used in turn
2004290001Sglebiusin an expanding-ring search.
2005290001SglebiusThe default is eight
2006290001Sglebiusmultiples of 32 starting at 31.
2007290001Sglebius@end table
2008290001Sglebius@node Reference Clock Support
2009290001Sglebius@subsection Reference Clock Support
2010290001SglebiusThe NTP Version 4 daemon supports some three dozen different radio,
2011290001Sglebiussatellite and modem reference clocks plus a special pseudo-clock
2012290001Sglebiusused for backup or when no other clock source is available.
2013290001SglebiusDetailed descriptions of individual device drivers and options can
2014290001Sglebiusbe found in the
2015290001Sglebius"Reference Clock Drivers"
2016290001Sglebiuspage
2017290001Sglebius(available as part of the HTML documentation
2018290001Sglebiusprovided in
2019290001Sglebius@file{/usr/share/doc/ntp}).
2020290001SglebiusAdditional information can be found in the pages linked
2021290001Sglebiusthere, including the
2022290001Sglebius"Debugging Hints for Reference Clock Drivers"
2023290001Sglebiusand
2024290001Sglebius"How To Write a Reference Clock Driver"
2025290001Sglebiuspages
2026290001Sglebius(available as part of the HTML documentation
2027290001Sglebiusprovided in
2028290001Sglebius@file{/usr/share/doc/ntp}).
2029290001SglebiusIn addition, support for a PPS
2030290001Sglebiussignal is available as described in the
2031290001Sglebius"Pulse-per-second (PPS) Signal Interfacing"
2032290001Sglebiuspage
2033290001Sglebius(available as part of the HTML documentation
2034290001Sglebiusprovided in
2035290001Sglebius@file{/usr/share/doc/ntp}).
2036290001SglebiusMany
2037290001Sglebiusdrivers support special line discipline/streams modules which can
2038290001Sglebiussignificantly improve the accuracy using the driver.
2039290001SglebiusThese are
2040290001Sglebiusdescribed in the
2041290001Sglebius"Line Disciplines and Streams Drivers"
2042290001Sglebiuspage
2043290001Sglebius(available as part of the HTML documentation
2044290001Sglebiusprovided in
2045290001Sglebius@file{/usr/share/doc/ntp}).
2046290001Sglebius
2047290001SglebiusA reference clock will generally (though not always) be a radio
2048290001Sglebiustimecode receiver which is synchronized to a source of standard
2049290001Sglebiustime such as the services offered by the NRC in Canada and NIST and
2050290001SglebiusUSNO in the US.
2051290001SglebiusThe interface between the computer and the timecode
2052290001Sglebiusreceiver is device dependent, but is usually a serial port.
2053290001SglebiusA
2054290001Sglebiusdevice driver specific to each reference clock must be selected and
2055290001Sglebiuscompiled in the distribution; however, most common radio, satellite
2056290001Sglebiusand modem clocks are included by default.
2057290001SglebiusNote that an attempt to
2058290001Sglebiusconfigure a reference clock when the driver has not been compiled
2059290001Sglebiusor the hardware port has not been appropriately configured results
2060290001Sglebiusin a scalding remark to the system log file, but is otherwise non
2061290001Sglebiushazardous.
2062290001Sglebius
2063290001SglebiusFor the purposes of configuration,
2064290001Sglebius@code{ntpd(1ntpdmdoc)}
2065290001Sglebiustreats
2066290001Sglebiusreference clocks in a manner analogous to normal NTP peers as much
2067290001Sglebiusas possible.
2068290001SglebiusReference clocks are identified by a syntactically
2069290001Sglebiuscorrect but invalid IP address, in order to distinguish them from
2070290001Sglebiusnormal NTP peers.
2071290001SglebiusReference clock addresses are of the form
2072290001Sglebius@code{127.127.}@kbd{t}.@kbd{u},
2073290001Sglebiuswhere
2074290001Sglebius@kbd{t}
2075290001Sglebiusis an integer
2076290001Sglebiusdenoting the clock type and
2077290001Sglebius@kbd{u}
2078290001Sglebiusindicates the unit
2079290001Sglebiusnumber in the range 0-3.
2080290001SglebiusWhile it may seem overkill, it is in fact
2081290001Sglebiussometimes useful to configure multiple reference clocks of the same
2082290001Sglebiustype, in which case the unit numbers must be unique.
2083290001Sglebius
2084290001SglebiusThe
2085290001Sglebius@code{server}
2086290001Sglebiuscommand is used to configure a reference
2087290001Sglebiusclock, where the
2088290001Sglebius@kbd{address}
2089290001Sglebiusargument in that command
2090290001Sglebiusis the clock address.
2091290001SglebiusThe
2092290001Sglebius@code{key},
2093290001Sglebius@code{version}
2094290001Sglebiusand
2095290001Sglebius@code{ttl}
2096290001Sglebiusoptions are not used for reference clock support.
2097290001SglebiusThe
2098290001Sglebius@code{mode}
2099290001Sglebiusoption is added for reference clock support, as
2100290001Sglebiusdescribed below.
2101290001SglebiusThe
2102290001Sglebius@code{prefer}
2103290001Sglebiusoption can be useful to
2104290001Sglebiuspersuade the server to cherish a reference clock with somewhat more
2105290001Sglebiusenthusiasm than other reference clocks or peers.
2106290001SglebiusFurther
2107290001Sglebiusinformation on this option can be found in the
2108290001Sglebius"Mitigation Rules and the prefer Keyword"
2109290001Sglebius(available as part of the HTML documentation
2110290001Sglebiusprovided in
2111290001Sglebius@file{/usr/share/doc/ntp})
2112290001Sglebiuspage.
2113290001SglebiusThe
2114290001Sglebius@code{minpoll}
2115290001Sglebiusand
2116290001Sglebius@code{maxpoll}
2117290001Sglebiusoptions have
2118290001Sglebiusmeaning only for selected clock drivers.
2119290001SglebiusSee the individual clock
2120290001Sglebiusdriver document pages for additional information.
2121290001Sglebius
2122290001SglebiusThe
2123290001Sglebius@code{fudge}
2124290001Sglebiuscommand is used to provide additional
2125290001Sglebiusinformation for individual clock drivers and normally follows
2126290001Sglebiusimmediately after the
2127290001Sglebius@code{server}
2128290001Sglebiuscommand.
2129290001SglebiusThe
2130290001Sglebius@kbd{address}
2131290001Sglebiusargument specifies the clock address.
2132290001SglebiusThe
2133290001Sglebius@code{refid}
2134290001Sglebiusand
2135290001Sglebius@code{stratum}
2136290001Sglebiusoptions can be used to
2137290001Sglebiusoverride the defaults for the device.
2138290001SglebiusThere are two optional
2139290001Sglebiusdevice-dependent time offsets and four flags that can be included
2140290001Sglebiusin the
2141290001Sglebius@code{fudge}
2142290001Sglebiuscommand as well.
2143290001Sglebius
2144290001SglebiusThe stratum number of a reference clock is by default zero.
2145290001SglebiusSince the
2146290001Sglebius@code{ntpd(1ntpdmdoc)}
2147290001Sglebiusdaemon adds one to the stratum of each
2148290001Sglebiuspeer, a primary server ordinarily displays an external stratum of
2149290001Sglebiusone.
2150290001SglebiusIn order to provide engineered backups, it is often useful to
2151290001Sglebiusspecify the reference clock stratum as greater than zero.
2152290001SglebiusThe
2153290001Sglebius@code{stratum}
2154290001Sglebiusoption is used for this purpose.
2155290001SglebiusAlso, in cases
2156290001Sglebiusinvolving both a reference clock and a pulse-per-second (PPS)
2157290001Sglebiusdiscipline signal, it is useful to specify the reference clock
2158290001Sglebiusidentifier as other than the default, depending on the driver.
2159290001SglebiusThe
2160290001Sglebius@code{refid}
2161290001Sglebiusoption is used for this purpose.
2162290001SglebiusExcept where noted,
2163290001Sglebiusthese options apply to all clock drivers.
2164290001Sglebius@subsubsection Reference Clock Commands
2165290001Sglebius@table @asis
2166290001Sglebius@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}]}
2167290001SglebiusThis command can be used to configure reference clocks in
2168290001Sglebiusspecial ways.
2169290001SglebiusThe options are interpreted as follows:
2170290001Sglebius@table @asis
2171290001Sglebius@item @code{prefer}
2172290001SglebiusMarks the reference clock as preferred.
2173290001SglebiusAll other things being
2174290001Sglebiusequal, this host will be chosen for synchronization among a set of
2175290001Sglebiuscorrectly operating hosts.
2176290001SglebiusSee the
2177290001Sglebius"Mitigation Rules and the prefer Keyword"
2178290001Sglebiuspage
2179290001Sglebius(available as part of the HTML documentation
2180290001Sglebiusprovided in
2181290001Sglebius@file{/usr/share/doc/ntp})
2182290001Sglebiusfor further information.
2183290001Sglebius@item @code{mode} @kbd{int}
2184290001SglebiusSpecifies a mode number which is interpreted in a
2185290001Sglebiusdevice-specific fashion.
2186290001SglebiusFor instance, it selects a dialing
2187290001Sglebiusprotocol in the ACTS driver and a device subtype in the
2188290001Sglebiusparse
2189290001Sglebiusdrivers.
2190290001Sglebius@item @code{minpoll} @kbd{int}
2191290001Sglebius@item @code{maxpoll} @kbd{int}
2192290001SglebiusThese options specify the minimum and maximum polling interval
2193290001Sglebiusfor reference clock messages, as a power of 2 in seconds
2194290001SglebiusFor
2195290001Sglebiusmost directly connected reference clocks, both
2196290001Sglebius@code{minpoll}
2197290001Sglebiusand
2198290001Sglebius@code{maxpoll}
2199290001Sglebiusdefault to 6 (64 s).
2200290001SglebiusFor modem reference clocks,
2201290001Sglebius@code{minpoll}
2202290001Sglebiusdefaults to 10 (17.1 m) and
2203290001Sglebius@code{maxpoll}
2204290001Sglebiusdefaults to 14 (4.5 h).
2205290001SglebiusThe allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
2206290001Sglebius@end table
2207290001Sglebius@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}]}
2208290001SglebiusThis command can be used to configure reference clocks in
2209290001Sglebiusspecial ways.
2210290001SglebiusIt must immediately follow the
2211290001Sglebius@code{server}
2212290001Sglebiuscommand which configures the driver.
2213290001SglebiusNote that the same capability
2214290001Sglebiusis possible at run time using the
2215290001Sglebius@code{ntpdc(1ntpdcmdoc)}
2216290001Sglebiusprogram.
2217290001SglebiusThe options are interpreted as
2218290001Sglebiusfollows:
2219290001Sglebius@table @asis
2220290001Sglebius@item @code{time1} @kbd{sec}
2221290001SglebiusSpecifies a constant to be added to the time offset produced by
2222290001Sglebiusthe driver, a fixed-point decimal number in seconds.
2223290001SglebiusThis is used
2224290001Sglebiusas a calibration constant to adjust the nominal time offset of a
2225290001Sglebiusparticular clock to agree with an external standard, such as a
2226290001Sglebiusprecision PPS signal.
2227290001SglebiusIt also provides a way to correct a
2228290001Sglebiussystematic error or bias due to serial port or operating system
2229290001Sglebiuslatencies, different cable lengths or receiver internal delay.
2230290001SglebiusThe
2231290001Sglebiusspecified offset is in addition to the propagation delay provided
2232290001Sglebiusby other means, such as internal DIPswitches.
2233290001SglebiusWhere a calibration
2234290001Sglebiusfor an individual system and driver is available, an approximate
2235290001Sglebiuscorrection is noted in the driver documentation pages.
2236290001SglebiusNote: in order to facilitate calibration when more than one
2237290001Sglebiusradio clock or PPS signal is supported, a special calibration
2238290001Sglebiusfeature is available.
2239290001SglebiusIt takes the form of an argument to the
2240290001Sglebius@code{enable}
2241290001Sglebiuscommand described in
2242290001Sglebius@ref{Miscellaneous Options}
2243290001Sglebiuspage and operates as described in the
2244290001Sglebius"Reference Clock Drivers"
2245290001Sglebiuspage
2246290001Sglebius(available as part of the HTML documentation
2247290001Sglebiusprovided in
2248290001Sglebius@file{/usr/share/doc/ntp}).
2249290001Sglebius@item @code{time2} @kbd{secs}
2250290001SglebiusSpecifies a fixed-point decimal number in seconds, which is
2251290001Sglebiusinterpreted in a driver-dependent way.
2252290001SglebiusSee the descriptions of
2253290001Sglebiusspecific drivers in the
2254290001Sglebius"Reference Clock Drivers"
2255290001Sglebiuspage
2256290001Sglebius(available as part of the HTML documentation
2257290001Sglebiusprovided in
2258290001Sglebius@file{/usr/share/doc/ntp}).
2259290001Sglebius@item @code{stratum} @kbd{int}
2260290001SglebiusSpecifies the stratum number assigned to the driver, an integer
2261290001Sglebiusbetween 0 and 15.
2262290001SglebiusThis number overrides the default stratum number
2263290001Sglebiusordinarily assigned by the driver itself, usually zero.
2264290001Sglebius@item @code{refid} @kbd{string}
2265290001SglebiusSpecifies an ASCII string of from one to four characters which
2266290001Sglebiusdefines the reference identifier used by the driver.
2267290001SglebiusThis string
2268290001Sglebiusoverrides the default identifier ordinarily assigned by the driver
2269290001Sglebiusitself.
2270290001Sglebius@item @code{mode} @kbd{int}
2271290001SglebiusSpecifies a mode number which is interpreted in a
2272290001Sglebiusdevice-specific fashion.
2273290001SglebiusFor instance, it selects a dialing
2274290001Sglebiusprotocol in the ACTS driver and a device subtype in the
2275290001Sglebiusparse
2276290001Sglebiusdrivers.
2277290001Sglebius@item @code{flag1} @code{0} @code{|} @code{1}
2278290001Sglebius@item @code{flag2} @code{0} @code{|} @code{1}
2279290001Sglebius@item @code{flag3} @code{0} @code{|} @code{1}
2280290001Sglebius@item @code{flag4} @code{0} @code{|} @code{1}
2281290001SglebiusThese four flags are used for customizing the clock driver.
2282290001SglebiusThe
2283290001Sglebiusinterpretation of these values, and whether they are used at all,
2284290001Sglebiusis a function of the particular clock driver.
2285290001SglebiusHowever, by
2286290001Sglebiusconvention
2287290001Sglebius@code{flag4}
2288290001Sglebiusis used to enable recording monitoring
2289290001Sglebiusdata to the
2290290001Sglebius@code{clockstats}
2291290001Sglebiusfile configured with the
2292290001Sglebius@code{filegen}
2293290001Sglebiuscommand.
2294290001SglebiusFurther information on the
2295290001Sglebius@code{filegen}
2296290001Sglebiuscommand can be found in
2297290001Sglebius@ref{Monitoring Options}.
2298290001Sglebius@end table
2299290001Sglebius@end table
2300290001Sglebius@node Miscellaneous Options
2301290001Sglebius@subsection Miscellaneous Options
2302290001Sglebius@table @asis
2303290001Sglebius@item @code{broadcastdelay} @kbd{seconds}
2304290001SglebiusThe broadcast and multicast modes require a special calibration
2305290001Sglebiusto determine the network delay between the local and remote
2306290001Sglebiusservers.
2307290001SglebiusOrdinarily, this is done automatically by the initial
2308290001Sglebiusprotocol exchanges between the client and server.
2309290001SglebiusIn some cases,
2310290001Sglebiusthe calibration procedure may fail due to network or server access
2311290001Sglebiuscontrols, for example.
2312290001SglebiusThis command specifies the default delay to
2313290001Sglebiusbe used under these circumstances.
2314290001SglebiusTypically (for Ethernet), a
2315290001Sglebiusnumber between 0.003 and 0.007 seconds is appropriate.
2316290001SglebiusThe default
2317290001Sglebiuswhen this command is not used is 0.004 seconds.
2318290001Sglebius@item @code{calldelay} @kbd{delay}
2319290001SglebiusThis option controls the delay in seconds between the first and second
2320290001Sglebiuspackets sent in burst or iburst mode to allow additional time for a modem
2321290001Sglebiusor ISDN call to complete.
2322290001Sglebius@item @code{driftfile} @kbd{driftfile}
2323290001SglebiusThis command specifies the complete path and name of the file used to
2324290001Sglebiusrecord the frequency of the local clock oscillator.
2325290001SglebiusThis is the same
2326290001Sglebiusoperation as the
2327290001Sglebius@code{-f}
2328290001Sglebiuscommand line option.
2329290001SglebiusIf the file exists, it is read at
2330290001Sglebiusstartup in order to set the initial frequency and then updated once per
2331290001Sglebiushour with the current frequency computed by the daemon.
2332290001SglebiusIf the file name is
2333290001Sglebiusspecified, but the file itself does not exist, the starts with an initial
2334290001Sglebiusfrequency of zero and creates the file when writing it for the first time.
2335290001SglebiusIf this command is not given, the daemon will always start with an initial
2336290001Sglebiusfrequency of zero.
2337290001Sglebius
2338290001SglebiusThe file format consists of a single line containing a single
2339290001Sglebiusfloating point number, which records the frequency offset measured
2340290001Sglebiusin parts-per-million (PPM).
2341290001SglebiusThe file is updated by first writing
2342290001Sglebiusthe current drift value into a temporary file and then renaming
2343290001Sglebiusthis file to replace the old version.
2344290001SglebiusThis implies that
2345290001Sglebius@code{ntpd(1ntpdmdoc)}
2346290001Sglebiusmust have write permission for the directory the
2347290001Sglebiusdrift file is located in, and that file system links, symbolic or
2348290001Sglebiusotherwise, should be avoided.
2349290001Sglebius@item @code{dscp} @kbd{value}
2350290001SglebiusThis option specifies the Differentiated Services Control Point (DSCP) value,
2351298770Sdelphija 6-bit code.
2352298770SdelphijThe default value is 46, signifying Expedited Forwarding.
2353301301Sdelphij@item @code{enable} @code{[@code{auth} | @code{bclient} | @code{calibrate} | @code{kernel} | @code{mode7} | @code{monitor} | @code{ntp} | @code{stats} | @code{peer_clear_digest_early} | @code{unpeer_crypto_early} | @code{unpeer_crypto_nak_early} | @code{unpeer_digest_early}]}
2354301301Sdelphij@item @code{disable} @code{[@code{auth} | @code{bclient} | @code{calibrate} | @code{kernel} | @code{mode7} | @code{monitor} | @code{ntp} | @code{stats} | @code{peer_clear_digest_early} | @code{unpeer_crypto_early} | @code{unpeer_crypto_nak_early} | @code{unpeer_digest_early}]}
2355290001SglebiusProvides a way to enable or disable various server options.
2356290001SglebiusFlags not mentioned are unaffected.
2357290001SglebiusNote that all of these flags
2358290001Sglebiuscan be controlled remotely using the
2359290001Sglebius@code{ntpdc(1ntpdcmdoc)}
2360290001Sglebiusutility program.
2361290001Sglebius@table @asis
2362290001Sglebius@item @code{auth}
2363290001SglebiusEnables the server to synchronize with unconfigured peers only if the
2364290001Sglebiuspeer has been correctly authenticated using either public key or
2365290001Sglebiusprivate key cryptography.
2366290001SglebiusThe default for this flag is
2367290001Sglebius@code{enable}.
2368290001Sglebius@item @code{bclient}
2369290001SglebiusEnables the server to listen for a message from a broadcast or
2370290001Sglebiusmulticast server, as in the
2371290001Sglebius@code{multicastclient}
2372290001Sglebiuscommand with default
2373290001Sglebiusaddress.
2374290001SglebiusThe default for this flag is
2375290001Sglebius@code{disable}.
2376290001Sglebius@item @code{calibrate}
2377290001SglebiusEnables the calibrate feature for reference clocks.
2378290001SglebiusThe default for
2379290001Sglebiusthis flag is
2380290001Sglebius@code{disable}.
2381290001Sglebius@item @code{kernel}
2382290001SglebiusEnables the kernel time discipline, if available.
2383290001SglebiusThe default for this
2384290001Sglebiusflag is
2385290001Sglebius@code{enable}
2386290001Sglebiusif support is available, otherwise
2387290001Sglebius@code{disable}.
2388290001Sglebius@item @code{mode7}
2389290001SglebiusEnables processing of NTP mode 7 implementation-specific requests
2390290001Sglebiuswhich are used by the deprecated
2391290001Sglebius@code{ntpdc(1ntpdcmdoc)}
2392290001Sglebiusprogram.
2393290001SglebiusThe default for this flag is disable.
2394290001SglebiusThis flag is excluded from runtime configuration using
2395290001Sglebius@code{ntpq(1ntpqmdoc)}.
2396290001SglebiusThe
2397290001Sglebius@code{ntpq(1ntpqmdoc)}
2398290001Sglebiusprogram provides the same capabilities as
2399290001Sglebius@code{ntpdc(1ntpdcmdoc)}
2400290001Sglebiususing standard mode 6 requests.
2401290001Sglebius@item @code{monitor}
2402290001SglebiusEnables the monitoring facility.
2403290001SglebiusSee the
2404290001Sglebius@code{ntpdc(1ntpdcmdoc)}
2405290001Sglebiusprogram
2406290001Sglebiusand the
2407290001Sglebius@code{monlist}
2408290001Sglebiuscommand or further information.
2409290001SglebiusThe
2410290001Sglebiusdefault for this flag is
2411290001Sglebius@code{enable}.
2412290001Sglebius@item @code{ntp}
2413290001SglebiusEnables time and frequency discipline.
2414290001SglebiusIn effect, this switch opens and
2415290001Sglebiuscloses the feedback loop, which is useful for testing.
2416290001SglebiusThe default for
2417290001Sglebiusthis flag is
2418290001Sglebius@code{enable}.
2419301301Sdelphij@item @code{peer_clear_digest_early}
2420301301SdelphijBy default, if
2421301301Sdelphij@code{ntpd(1ntpdmdoc)}
2422301301Sdelphijis using autokey and it
2423301301Sdelphijreceives a crypto-NAK packet that
2424301301Sdelphijpasses the duplicate packet and origin timestamp checks
2425301301Sdelphijthe peer variables are immediately cleared.
2426301301SdelphijWhile this is generally a feature
2427301301Sdelphijas it allows for quick recovery if a server key has changed,
2428301301Sdelphija properly forged and appropriately delivered crypto-NAK packet
2429301301Sdelphijcan be used in a DoS attack.
2430301301SdelphijIf you have active noticable problems with this type of DoS attack
2431301301Sdelphijthen you should consider
2432301301Sdelphijdisabling this option.
2433301301SdelphijYou can check your
2434301301Sdelphij@code{peerstats}
2435301301Sdelphijfile for evidence of any of these attacks.
2436301301SdelphijThe
2437301301Sdelphijdefault for this flag is
2438301301Sdelphij@code{enable}.
2439290001Sglebius@item @code{stats}
2440290001SglebiusEnables the statistics facility.
2441290001SglebiusSee the
2442290001Sglebius@ref{Monitoring Options}
2443290001Sglebiussection for further information.
2444290001SglebiusThe default for this flag is
2445290001Sglebius@code{disable}.
2446294905Sdelphij@item @code{unpeer_crypto_early}
2447294905SdelphijBy default, if
2448294905Sdelphij@code{ntpd(1ntpdmdoc)}
2449294905Sdelphijreceives an autokey packet that fails TEST9,
2450294905Sdelphija crypto failure,
2451294905Sdelphijthe association is immediately cleared.
2452294905SdelphijThis is almost certainly a feature,
2453294905Sdelphijbut if, in spite of the current recommendation of not using autokey,
2454294905Sdelphijyou are
2455294905Sdelphij.B still
2456294905Sdelphijusing autokey
2457294905Sdelphij.B and
2458294905Sdelphijyou are seeing this sort of DoS attack
2459294905Sdelphijdisabling this flag will delay
2460294905Sdelphijtearing down the association until the reachability counter
2461294905Sdelphijbecomes zero.
2462294905SdelphijYou can check your
2463294905Sdelphij@code{peerstats}
2464294905Sdelphijfile for evidence of any of these attacks.
2465294905SdelphijThe
2466294905Sdelphijdefault for this flag is
2467294905Sdelphij@code{enable}.
2468294905Sdelphij@item @code{unpeer_crypto_nak_early}
2469294905SdelphijBy default, if
2470294905Sdelphij@code{ntpd(1ntpdmdoc)}
2471294905Sdelphijreceives a crypto-NAK packet that
2472294905Sdelphijpasses the duplicate packet and origin timestamp checks
2473294905Sdelphijthe association is immediately cleared.
2474294905SdelphijWhile this is generally a feature
2475294905Sdelphijas it allows for quick recovery if a server key has changed,
2476294905Sdelphija properly forged and appropriately delivered crypto-NAK packet
2477294905Sdelphijcan be used in a DoS attack.
2478294905SdelphijIf you have active noticable problems with this type of DoS attack
2479294905Sdelphijthen you should consider
2480294905Sdelphijdisabling this option.
2481294905SdelphijYou can check your
2482294905Sdelphij@code{peerstats}
2483294905Sdelphijfile for evidence of any of these attacks.
2484294905SdelphijThe
2485294905Sdelphijdefault for this flag is
2486294905Sdelphij@code{enable}.
2487294905Sdelphij@item @code{unpeer_digest_early}
2488294905SdelphijBy default, if
2489294905Sdelphij@code{ntpd(1ntpdmdoc)}
2490294905Sdelphijreceives what should be an authenticated packet
2491294905Sdelphijthat passes other packet sanity checks but
2492294905Sdelphijcontains an invalid digest
2493294905Sdelphijthe association is immediately cleared.
2494294905SdelphijWhile this is generally a feature
2495294905Sdelphijas it allows for quick recovery,
2496294905Sdelphijif this type of packet is carefully forged and sent
2497294905Sdelphijduring an appropriate window it can be used for a DoS attack.
2498294905SdelphijIf you have active noticable problems with this type of DoS attack
2499294905Sdelphijthen you should consider
2500294905Sdelphijdisabling this option.
2501294905SdelphijYou can check your
2502294905Sdelphij@code{peerstats}
2503294905Sdelphijfile for evidence of any of these attacks.
2504294905SdelphijThe
2505294905Sdelphijdefault for this flag is
2506294905Sdelphij@code{enable}.
2507290001Sglebius@end table
2508290001Sglebius@item @code{includefile} @kbd{includefile}
2509290001SglebiusThis command allows additional configuration commands
2510290001Sglebiusto be included from a separate file.
2511290001SglebiusInclude files may
2512290001Sglebiusbe nested to a depth of five; upon reaching the end of any
2513290001Sglebiusinclude file, command processing resumes in the previous
2514290001Sglebiusconfiguration file.
2515290001SglebiusThis option is useful for sites that run
2516290001Sglebius@code{ntpd(1ntpdmdoc)}
2517290001Sglebiuson multiple hosts, with (mostly) common options (e.g., a
2518290001Sglebiusrestriction list).
2519290001Sglebius@item @code{leapsmearinterval} @kbd{seconds}
2520290001SglebiusThis EXPERIMENTAL option is only available if
2521290001Sglebius@code{ntpd(1ntpdmdoc)}
2522290001Sglebiuswas built with the
2523290001Sglebius@code{--enable-leap-smear}
2524290001Sglebiusoption to the
2525290001Sglebius@code{configure}
2526290001Sglebiusscript.
2527290001SglebiusIt specifies the interval over which a leap second correction will be applied.
2528290001SglebiusRecommended values for this option are between
2529290001Sglebius7200 (2 hours) and 86400 (24 hours).
2530290001Sglebius.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
2531290001SglebiusSee http://bugs.ntp.org/2855 for more information.
2532290001Sglebius@item @code{logconfig} @kbd{configkeyword}
2533290001SglebiusThis command controls the amount and type of output written to
2534290001Sglebiusthe system
2535290001Sglebius@code{syslog(3)}
2536290001Sglebiusfacility or the alternate
2537290001Sglebius@code{logfile}
2538290001Sglebiuslog file.
2539290001SglebiusBy default, all output is turned on.
2540290001SglebiusAll
2541290001Sglebius@kbd{configkeyword}
2542290001Sglebiuskeywords can be prefixed with
2543290001Sglebius@quoteleft{}=@quoteright{},
2544290001Sglebius@quoteleft{}+@quoteright{}
2545290001Sglebiusand
2546290001Sglebius@quoteleft{}-@quoteright{},
2547290001Sglebiuswhere
2548290001Sglebius@quoteleft{}=@quoteright{}
2549290001Sglebiussets the
2550290001Sglebius@code{syslog(3)}
2551290001Sglebiuspriority mask,
2552290001Sglebius@quoteleft{}+@quoteright{}
2553290001Sglebiusadds and
2554290001Sglebius@quoteleft{}-@quoteright{}
2555290001Sglebiusremoves
2556290001Sglebiusmessages.
2557290001Sglebius@code{syslog(3)}
2558290001Sglebiusmessages can be controlled in four
2559290001Sglebiusclasses
2560290001Sglebius(@code{clock}, @code{peer}, @code{sys} and @code{sync}).
2561290001SglebiusWithin these classes four types of messages can be
2562290001Sglebiuscontrolled: informational messages
2563290001Sglebius(@code{info}),
2564290001Sglebiusevent messages
2565290001Sglebius(@code{events}),
2566290001Sglebiusstatistics messages
2567290001Sglebius(@code{statistics})
2568290001Sglebiusand
2569290001Sglebiusstatus messages
2570290001Sglebius(@code{status}).
2571290001Sglebius
2572290001SglebiusConfiguration keywords are formed by concatenating the message class with
2573290001Sglebiusthe event class.
2574290001SglebiusThe
2575290001Sglebius@code{all}
2576290001Sglebiusprefix can be used instead of a message class.
2577290001SglebiusA
2578290001Sglebiusmessage class may also be followed by the
2579290001Sglebius@code{all}
2580290001Sglebiuskeyword to enable/disable all
2581298770Sdelphijmessages of the respective message class.
2582298770SdelphijThus, a minimal log configuration
2583290001Sglebiuscould look like this:
2584290001Sglebius@verbatim
2585290001Sglebiuslogconfig =syncstatus +sysevents
2586290001Sglebius@end verbatim
2587290001Sglebius
2588290001SglebiusThis would just list the synchronizations state of
2589290001Sglebius@code{ntpd(1ntpdmdoc)}
2590290001Sglebiusand the major system events.
2591290001SglebiusFor a simple reference server, the
2592290001Sglebiusfollowing minimum message configuration could be useful:
2593290001Sglebius@verbatim
2594290001Sglebiuslogconfig =syncall +clockall
2595290001Sglebius@end verbatim
2596290001Sglebius
2597290001SglebiusThis configuration will list all clock information and
2598290001Sglebiussynchronization information.
2599290001SglebiusAll other events and messages about
2600290001Sglebiuspeers, system events and so on is suppressed.
2601290001Sglebius@item @code{logfile} @kbd{logfile}
2602290001SglebiusThis command specifies the location of an alternate log file to
2603290001Sglebiusbe used instead of the default system
2604290001Sglebius@code{syslog(3)}
2605290001Sglebiusfacility.
2606298770SdelphijThis is the same operation as the
2607298770Sdelphij@code{-l}
2608298770Sdelphijcommand line option.
2609290001Sglebius@item @code{setvar} @kbd{variable} @code{[@code{default}]}
2610290001SglebiusThis command adds an additional system variable.
2611290001SglebiusThese
2612290001Sglebiusvariables can be used to distribute additional information such as
2613290001Sglebiusthe access policy.
2614290001SglebiusIf the variable of the form
2615290001Sglebius@code{name}@code{=}@kbd{value}
2616290001Sglebiusis followed by the
2617290001Sglebius@code{default}
2618290001Sglebiuskeyword, the
2619290001Sglebiusvariable will be listed as part of the default system variables
2620290001Sglebius(@code{rv} command)).
2621290001SglebiusThese additional variables serve
2622290001Sglebiusinformational purposes only.
2623290001SglebiusThey are not related to the protocol
2624290001Sglebiusother that they can be listed.
2625290001SglebiusThe known protocol variables will
2626290001Sglebiusalways override any variables defined via the
2627290001Sglebius@code{setvar}
2628290001Sglebiusmechanism.
2629290001SglebiusThere are three special variables that contain the names
2630290001Sglebiusof all variable of the same group.
2631290001SglebiusThe
2632290001Sglebius@code{sys_var_list}
2633290001Sglebiusholds
2634290001Sglebiusthe names of all system variables.
2635290001SglebiusThe
2636290001Sglebius@code{peer_var_list}
2637290001Sglebiusholds
2638290001Sglebiusthe names of all peer variables and the
2639290001Sglebius@code{clock_var_list}
2640290001Sglebiusholds the names of the reference clock variables.
2641290001Sglebius@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}]}
2642290001SglebiusThis command can be used to alter several system variables in
2643290001Sglebiusvery exceptional circumstances.
2644290001SglebiusIt should occur in the
2645290001Sglebiusconfiguration file before any other configuration options.
2646290001SglebiusThe
2647290001Sglebiusdefault values of these variables have been carefully optimized for
2648290001Sglebiusa wide range of network speeds and reliability expectations.
2649290001SglebiusIn
2650290001Sglebiusgeneral, they interact in intricate ways that are hard to predict
2651290001Sglebiusand some combinations can result in some very nasty behavior.
2652290001SglebiusVery
2653290001Sglebiusrarely is it necessary to change the default values; but, some
2654290001Sglebiusfolks cannot resist twisting the knobs anyway and this command is
2655290001Sglebiusfor them.
2656290001SglebiusEmphasis added: twisters are on their own and can expect
2657290001Sglebiusno help from the support group.
2658290001Sglebius
2659290001SglebiusThe variables operate as follows:
2660290001Sglebius@table @asis
2661290001Sglebius@item @code{allan} @kbd{allan}
2662290001SglebiusThe argument becomes the new value for the minimum Allan
2663290001Sglebiusintercept, which is a parameter of the PLL/FLL clock discipline
2664290001Sglebiusalgorithm.
2665290001SglebiusThe value in log2 seconds defaults to 7 (1024 s), which is also the lower
2666290001Sglebiuslimit.
2667290001Sglebius@item @code{dispersion} @kbd{dispersion}
2668290001SglebiusThe argument becomes the new value for the dispersion increase rate,
2669290001Sglebiusnormally .000015 s/s.
2670290001Sglebius@item @code{freq} @kbd{freq}
2671290001SglebiusThe argument becomes the initial value of the frequency offset in
2672290001Sglebiusparts-per-million.
2673290001SglebiusThis overrides the value in the frequency file, if
2674290001Sglebiuspresent, and avoids the initial training state if it is not.
2675290001Sglebius@item @code{huffpuff} @kbd{huffpuff}
2676290001SglebiusThe argument becomes the new value for the experimental
2677290001Sglebiushuff-n'-puff filter span, which determines the most recent interval
2678290001Sglebiusthe algorithm will search for a minimum delay.
2679290001SglebiusThe lower limit is
2680290001Sglebius900 s (15 m), but a more reasonable value is 7200 (2 hours).
2681290001SglebiusThere
2682290001Sglebiusis no default, since the filter is not enabled unless this command
2683290001Sglebiusis given.
2684290001Sglebius@item @code{panic} @kbd{panic}
2685290001SglebiusThe argument is the panic threshold, normally 1000 s.
2686290001SglebiusIf set to zero,
2687290001Sglebiusthe panic sanity check is disabled and a clock offset of any value will
2688290001Sglebiusbe accepted.
2689290001Sglebius@item @code{step} @kbd{step}
2690290001SglebiusThe argument is the step threshold, which by default is 0.128 s.
2691290001SglebiusIt can
2692290001Sglebiusbe set to any positive number in seconds.
2693290001SglebiusIf set to zero, step
2694290001Sglebiusadjustments will never occur.
2695290001SglebiusNote: The kernel time discipline is
2696290001Sglebiusdisabled if the step threshold is set to zero or greater than the
2697290001Sglebiusdefault.
2698290001Sglebius@item @code{stepback} @kbd{stepback}
2699290001SglebiusThe argument is the step threshold for the backward direction,
2700290001Sglebiuswhich by default is 0.128 s.
2701290001SglebiusIt can
2702290001Sglebiusbe set to any positive number in seconds.
2703290001SglebiusIf both the forward and backward step thresholds are set to zero, step
2704290001Sglebiusadjustments will never occur.
2705290001SglebiusNote: The kernel time discipline is
2706290001Sglebiusdisabled if
2707290001Sglebiuseach direction of step threshold are either
2708290001Sglebiusset to zero or greater than .5 second.
2709290001Sglebius@item @code{stepfwd} @kbd{stepfwd}
2710290001SglebiusAs for stepback, but for the forward direction.
2711290001Sglebius@item @code{stepout} @kbd{stepout}
2712290001SglebiusThe argument is the stepout timeout, which by default is 900 s.
2713290001SglebiusIt can
2714290001Sglebiusbe set to any positive number in seconds.
2715290001SglebiusIf set to zero, the stepout
2716290001Sglebiuspulses will not be suppressed.
2717290001Sglebius@end table
2718290001Sglebius@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
2719290001Sglebius@table @asis
2720290001Sglebius@item @code{memlock} @kbd{Nmegabytes}
2721290001SglebiusSpecify the number of megabytes of memory that should be
2722290001Sglebiusallocated and locked.
2723290001SglebiusProbably only available under Linux, this option may be useful
2724290001Sglebiuswhen dropping root (the
2725290001Sglebius@code{-i}
2726290001Sglebiusoption).
2727290001SglebiusThe default is 32 megabytes on non-Linux machines, and -1 under Linux.
2728290001Sglebius-1 means "do not lock the process into memory".
2729290001Sglebius0 means "lock whatever memory the process wants into memory".
2730290001Sglebius@item @code{stacksize} @kbd{N4kPages}
2731290001SglebiusSpecifies the maximum size of the process stack on systems with the
2732290001Sglebius@code{mlockall()}
2733290001Sglebiusfunction.
2734290001SglebiusDefaults to 50 4k pages (200 4k pages in OpenBSD).
2735290001Sglebius@item @code{filenum} @kbd{Nfiledescriptors}
2736298770SdelphijSpecifies the maximum number of file descriptors ntpd may have open at once.
2737298770SdelphijDefaults to the system default.
2738290001Sglebius@end table
2739290001Sglebius@item @code{trap} @kbd{host_address} @code{[@code{port} @kbd{port_number}]} @code{[@code{interface} @kbd{interface_address}]}
2740290001SglebiusThis command configures a trap receiver at the given host
2741290001Sglebiusaddress and port number for sending messages with the specified
2742290001Sglebiuslocal interface address.
2743290001SglebiusIf the port number is unspecified, a value
2744290001Sglebiusof 18447 is used.
2745290001SglebiusIf the interface address is not specified, the
2746290001Sglebiusmessage is sent with a source address of the local interface the
2747290001Sglebiusmessage is sent through.
2748290001SglebiusNote that on a multihomed host the
2749290001Sglebiusinterface used may vary from time to time with routing changes.
2750290001Sglebius
2751290001SglebiusThe trap receiver will generally log event messages and other
2752290001Sglebiusinformation from the server in a log file.
2753290001SglebiusWhile such monitor
2754290001Sglebiusprograms may also request their own trap dynamically, configuring a
2755290001Sglebiustrap receiver will ensure that no messages are lost when the server
2756290001Sglebiusis started.
2757290001Sglebius@item @code{hop} @kbd{...}
2758290001SglebiusThis command specifies a list of TTL values in increasing order, up to 8
2759290001Sglebiusvalues can be specified.
2760290001SglebiusIn manycast mode these values are used in turn in
2761290001Sglebiusan expanding-ring search.
2762290001SglebiusThe default is eight multiples of 32 starting at
2763290001Sglebius31.
2764290001Sglebius@end table
2765290001Sglebius
2766290001SglebiusThis section was generated by @strong{AutoGen},
2767290001Sglebiususing the @code{agtexi-cmd} template and the option descriptions for the @code{ntp.conf} program.
2768290001SglebiusThis software is released under the NTP license, <http://ntp.org/license>.
2769290001Sglebius
2770290001Sglebius@menu
2771290001Sglebius* ntp.conf Files::                  Files
2772290001Sglebius* ntp.conf See Also::               See Also
2773290001Sglebius* ntp.conf Bugs::                   Bugs
2774290001Sglebius* ntp.conf Notes::                  Notes
2775290001Sglebius@end menu
2776290001Sglebius
2777290001Sglebius@node ntp.conf Files
2778290001Sglebius@subsection ntp.conf Files
2779290001Sglebius@table @asis
2780290001Sglebius@item @file{/etc/ntp.conf}
2781290001Sglebiusthe default name of the configuration file
2782290001Sglebius@item @file{ntp.keys}
2783290001Sglebiusprivate MD5 keys
2784290001Sglebius@item @file{ntpkey}
2785290001SglebiusRSA private key
2786290001Sglebius@item @file{ntpkey_}@kbd{host}
2787290001SglebiusRSA public key
2788290001Sglebius@item @file{ntp_dh}
2789290001SglebiusDiffie-Hellman agreement parameters
2790290001Sglebius@end table
2791290001Sglebius@node ntp.conf See Also
2792290001Sglebius@subsection ntp.conf See Also
2793290001Sglebius@code{ntpd(1ntpdmdoc)},
2794290001Sglebius@code{ntpdc(1ntpdcmdoc)},
2795290001Sglebius@code{ntpq(1ntpqmdoc)}
2796290001Sglebius
2797290001SglebiusIn addition to the manual pages provided,
2798290001Sglebiuscomprehensive documentation is available on the world wide web
2799290001Sglebiusat
2800290001Sglebius@code{http://www.ntp.org/}.
2801290001SglebiusA snapshot of this documentation is available in HTML format in
2802290001Sglebius@file{/usr/share/doc/ntp}.
2803290001Sglebius@*
2804290001Sglebius
2805290001Sglebius@*
2806290001SglebiusDavid L. Mills, @emph{Network Time Protocol (Version 4)}, RFC5905
2807290001Sglebius@node ntp.conf Bugs
2808290001Sglebius@subsection ntp.conf Bugs
2809290001SglebiusThe syntax checking is not picky; some combinations of
2810290001Sglebiusridiculous and even hilarious options and modes may not be
2811290001Sglebiusdetected.
2812290001Sglebius
2813290001SglebiusThe
2814290001Sglebius@file{ntpkey_}@kbd{host}
2815290001Sglebiusfiles are really digital
2816290001Sglebiuscertificates.
2817290001SglebiusThese should be obtained via secure directory
2818290001Sglebiusservices when they become universally available.
2819290001Sglebius@node ntp.conf Notes
2820290001Sglebius@subsection ntp.conf Notes
2821290001SglebiusThis document was derived from FreeBSD.
2822