ntp.conf.def revision 275970
1275970Scy/* -*- Mode: Text -*- */
2275970Scy
3275970Scyautogen definitions options;
4275970Scy
5275970Scy#include copyright.def
6275970Scy
7275970Scy// We want the synopsis to be "/etc/ntp.conf" but we need the prog-name
8275970Scy// to be ntp.conf - the latter is also how autogen produces the output
9275970Scy// file name.
10275970Scyprog-name	= "ntp.conf";
11275970Scyfile-path	= "/etc/ntp.conf";
12275970Scyprog-title	= "Network Time Protocol (NTP) daemon configuration file format";
13275970Scy
14275970Scy/* explain: Additional information whenever the usage routine is invoked */
15275970Scyexplain = <<- _END_EXPLAIN
16275970Scy	_END_EXPLAIN;
17275970Scy
18275970Scydoc-section	= {
19275970Scy  ds-type	= 'DESCRIPTION';
20275970Scy  ds-format	= 'mdoc';
21275970Scy  ds-text	= <<- _END_PROG_MDOC_DESCRIP
22275970ScyThe
23275970Scy.Nm
24275970Scyconfiguration file is read at initial startup by the
25275970Scy.Xr ntpd 1ntpdmdoc
26275970Scydaemon in order to specify the synchronization sources,
27275970Scymodes and other related information.
28275970ScyUsually, it is installed in the
29275970Scy.Pa /etc
30275970Scydirectory,
31275970Scybut could be installed elsewhere
32275970Scy(see the daemon's
33275970Scy.Fl c
34275970Scycommand line option).
35275970Scy.Pp
36275970ScyThe file format is similar to other
37275970Scy.Ux
38275970Scyconfiguration files.
39275970ScyComments begin with a
40275970Scy.Ql #
41275970Scycharacter and extend to the end of the line;
42275970Scyblank lines are ignored.
43275970ScyConfiguration commands consist of an initial keyword
44275970Scyfollowed by a list of arguments,
45275970Scysome of which may be optional, separated by whitespace.
46275970ScyCommands may not be continued over multiple lines.
47275970ScyArguments may be host names,
48275970Scyhost addresses written in numeric, dotted-quad form,
49275970Scyintegers, floating point numbers (when specifying times in seconds)
50275970Scyand text strings.
51275970Scy.Pp
52275970ScyThe rest of this page describes the configuration and control options.
53275970ScyThe
54275970Scy.Qq Notes on Configuring NTP and Setting up an NTP Subnet
55275970Scypage
56275970Scy(available as part of the HTML documentation
57275970Scyprovided in
58275970Scy.Pa /usr/share/doc/ntp )
59275970Scycontains an extended discussion of these options.
60275970ScyIn addition to the discussion of general
61275970Scy.Sx Configuration Options ,
62275970Scythere are sections describing the following supported functionality
63275970Scyand the options used to control it:
64275970Scy.Bl -bullet -offset indent
65275970Scy.It
66275970Scy.Sx Authentication Support
67275970Scy.It
68275970Scy.Sx Monitoring Support
69275970Scy.It
70275970Scy.Sx Access Control Support
71275970Scy.It
72275970Scy.Sx Automatic NTP Configuration Options
73275970Scy.It
74275970Scy.Sx Reference Clock Support
75275970Scy.It
76275970Scy.Sx Miscellaneous Options
77275970Scy.El
78275970Scy.Pp
79275970ScyFollowing these is a section describing
80275970Scy.Sx Miscellaneous Options .
81275970ScyWhile there is a rich set of options available,
82275970Scythe only required option is one or more
83275970Scy.Ic pool ,
84275970Scy.Ic server ,
85275970Scy.Ic peer ,
86275970Scy.Ic broadcast
87275970Scyor
88275970Scy.Ic manycastclient
89275970Scycommands.
90275970Scy.Sh Configuration Support
91275970ScyFollowing is a description of the configuration commands in
92275970ScyNTPv4.
93275970ScyThese commands have the same basic functions as in NTPv3 and
94275970Scyin some cases new functions and new arguments.
95275970ScyThere are two
96275970Scyclasses of commands, configuration commands that configure a
97275970Scypersistent association with a remote server or peer or reference
98275970Scyclock, and auxiliary commands that specify environmental variables
99275970Scythat control various related operations.
100275970Scy.Ss Configuration Commands
101275970ScyThe various modes are determined by the command keyword and the
102275970Scytype of the required IP address.
103275970ScyAddresses are classed by type as
104275970Scy(s) a remote server or peer (IPv4 class A, B and C), (b) the
105275970Scybroadcast address of a local interface, (m) a multicast address (IPv4
106275970Scyclass D), or (r) a reference clock address (127.127.x.x).
107275970ScyNote that
108275970Scyonly those options applicable to each command are listed below.
109275970ScyUse
110275970Scyof options not listed may not be caught as an error, but may result
111275970Scyin some weird and even destructive behavior.
112275970Scy.Pp
113275970ScyIf the Basic Socket Interface Extensions for IPv6 (RFC-2553)
114275970Scyis detected, support for the IPv6 address family is generated
115275970Scyin addition to the default support of the IPv4 address family.
116275970ScyIn a few cases, including the reslist billboard generated
117275970Scyby ntpdc, IPv6 addresses are automatically generated.
118275970ScyIPv6 addresses can be identified by the presence of colons
119275970Scy.Dq \&:
120275970Scyin the address field.
121275970ScyIPv6 addresses can be used almost everywhere where
122275970ScyIPv4 addresses can be used,
123275970Scywith the exception of reference clock addresses,
124275970Scywhich are always IPv4.
125275970Scy.Pp
126275970ScyNote that in contexts where a host name is expected, a
127275970Scy.Fl 4
128275970Scyqualifier preceding
129275970Scythe host name forces DNS resolution to the IPv4 namespace,
130275970Scywhile a
131275970Scy.Fl 6
132275970Scyqualifier forces DNS resolution to the IPv6 namespace.
133275970ScySee IPv6 references for the
134275970Scyequivalent classes for that address family.
135275970Scy.Bl -tag -width indent
136275970Scy.It Xo Ic pool Ar address
137275970Scy.Op Cm burst
138275970Scy.Op Cm iburst
139275970Scy.Op Cm version Ar version
140275970Scy.Op Cm prefer
141275970Scy.Op Cm minpoll Ar minpoll
142275970Scy.Op Cm maxpoll Ar maxpoll
143275970Scy.Xc
144275970Scy.It Xo Ic server Ar address
145275970Scy.Op Cm key Ar key \&| Cm autokey
146275970Scy.Op Cm burst
147275970Scy.Op Cm iburst
148275970Scy.Op Cm version Ar version
149275970Scy.Op Cm prefer
150275970Scy.Op Cm minpoll Ar minpoll
151275970Scy.Op Cm maxpoll Ar maxpoll
152275970Scy.Xc
153275970Scy.It Xo Ic peer Ar address
154275970Scy.Op Cm key Ar key \&| Cm autokey
155275970Scy.Op Cm version Ar version
156275970Scy.Op Cm prefer
157275970Scy.Op Cm minpoll Ar minpoll
158275970Scy.Op Cm maxpoll Ar maxpoll
159275970Scy.Xc
160275970Scy.It Xo Ic broadcast Ar address
161275970Scy.Op Cm key Ar key \&| Cm autokey
162275970Scy.Op Cm version Ar version
163275970Scy.Op Cm prefer
164275970Scy.Op Cm minpoll Ar minpoll
165275970Scy.Op Cm ttl Ar ttl
166275970Scy.Xc
167275970Scy.It Xo Ic manycastclient Ar address
168275970Scy.Op Cm key Ar key \&| Cm autokey
169275970Scy.Op Cm version Ar version
170275970Scy.Op Cm prefer
171275970Scy.Op Cm minpoll Ar minpoll
172275970Scy.Op Cm maxpoll Ar maxpoll
173275970Scy.Op Cm ttl Ar ttl
174275970Scy.Xc
175275970Scy.El
176275970Scy.Pp
177275970ScyThese five commands specify the time server name or address to
178275970Scybe used and the mode in which to operate.
179275970ScyThe
180275970Scy.Ar address
181275970Scycan be
182275970Scyeither a DNS name or an IP address in dotted-quad notation.
183275970ScyAdditional information on association behavior can be found in the
184275970Scy.Qq Association Management
185275970Scypage
186275970Scy(available as part of the HTML documentation
187275970Scyprovided in
188275970Scy.Pa /usr/share/doc/ntp ) .
189275970Scy.Bl -tag -width indent
190275970Scy.It Ic pool
191275970ScyFor type s addresses, this command mobilizes a persistent
192275970Scyclient mode association with a number of remote servers.
193275970ScyIn this mode the local clock can synchronized to the
194275970Scyremote server, but the remote server can never be synchronized to
195275970Scythe local clock.
196275970Scy.It Ic server
197275970ScyFor type s and r addresses, this command mobilizes a persistent
198275970Scyclient mode association with the specified remote server or local
199275970Scyradio clock.
200275970ScyIn this mode the local clock can synchronized to the
201275970Scyremote server, but the remote server can never be synchronized to
202275970Scythe local clock.
203275970ScyThis command should
204275970Scy.Em not
205275970Scybe used for type
206275970Scyb or m addresses.
207275970Scy.It Ic peer
208275970ScyFor type s addresses (only), this command mobilizes a
209275970Scypersistent symmetric-active mode association with the specified
210275970Scyremote peer.
211275970ScyIn this mode the local clock can be synchronized to
212275970Scythe remote peer or the remote peer can be synchronized to the local
213275970Scyclock.
214275970ScyThis is useful in a network of servers where, depending on
215275970Scyvarious failure scenarios, either the local or remote peer may be
216275970Scythe better source of time.
217275970ScyThis command should NOT be used for type
218275970Scyb, m or r addresses.
219275970Scy.It Ic broadcast
220275970ScyFor type b and m addresses (only), this
221275970Scycommand mobilizes a persistent broadcast mode association.
222275970ScyMultiple
223275970Scycommands can be used to specify multiple local broadcast interfaces
224275970Scy(subnets) and/or multiple multicast groups.
225275970ScyNote that local
226275970Scybroadcast messages go only to the interface associated with the
227275970Scysubnet specified, but multicast messages go to all interfaces.
228275970ScyIn broadcast mode the local server sends periodic broadcast
229275970Scymessages to a client population at the
230275970Scy.Ar address
231275970Scyspecified, which is usually the broadcast address on (one of) the
232275970Scylocal network(s) or a multicast address assigned to NTP.
233275970ScyThe IANA
234275970Scyhas assigned the multicast group address IPv4 224.0.1.1 and
235275970ScyIPv6 ff05::101 (site local) exclusively to
236275970ScyNTP, but other nonconflicting addresses can be used to contain the
237275970Scymessages within administrative boundaries.
238275970ScyOrdinarily, this
239275970Scyspecification applies only to the local server operating as a
240275970Scysender; for operation as a broadcast client, see the
241275970Scy.Ic broadcastclient
242275970Scyor
243275970Scy.Ic multicastclient
244275970Scycommands
245275970Scybelow.
246275970Scy.It Ic manycastclient
247275970ScyFor type m addresses (only), this command mobilizes a
248275970Scymanycast client mode association for the multicast address
249275970Scyspecified.
250275970ScyIn this case a specific address must be supplied which
251275970Scymatches the address used on the
252275970Scy.Ic manycastserver
253275970Scycommand for
254275970Scythe designated manycast servers.
255275970ScyThe NTP multicast address
256275970Scy224.0.1.1 assigned by the IANA should NOT be used, unless specific
257275970Scymeans are taken to avoid spraying large areas of the Internet with
258275970Scythese messages and causing a possibly massive implosion of replies
259275970Scyat the sender.
260275970ScyThe
261275970Scy.Ic manycastserver
262275970Scycommand specifies that the local server
263275970Scyis to operate in client mode with the remote servers that are
264275970Scydiscovered as the result of broadcast/multicast messages.
265275970ScyThe
266275970Scyclient broadcasts a request message to the group address associated
267275970Scywith the specified
268275970Scy.Ar address
269275970Scyand specifically enabled
270275970Scyservers respond to these messages.
271275970ScyThe client selects the servers
272275970Scyproviding the best time and continues as with the
273275970Scy.Ic server
274275970Scycommand.
275275970ScyThe remaining servers are discarded as if never
276275970Scyheard.
277275970Scy.El
278275970Scy.Pp
279275970ScyOptions:
280275970Scy.Bl -tag -width indent
281275970Scy.It Cm autokey
282275970ScyAll packets sent to and received from the server or peer are to
283275970Scyinclude authentication fields encrypted using the autokey scheme
284275970Scydescribed in
285275970Scy.Sx Authentication Options .
286275970Scy.It Cm burst
287275970Scywhen the server is reachable, send a burst of eight packets
288275970Scyinstead of the usual one.
289275970ScyThe packet spacing is normally 2 s;
290275970Scyhowever, the spacing between the first and second packets
291275970Scycan be changed with the calldelay command to allow
292275970Scyadditional time for a modem or ISDN call to complete.
293275970ScyThis is designed to improve timekeeping quality
294275970Scywith the
295275970Scy.Ic server
296275970Scycommand and s addresses.
297275970Scy.It Cm iburst
298275970ScyWhen the server is unreachable, send a burst of eight packets
299275970Scyinstead of the usual one.
300275970ScyThe packet spacing is normally 2 s;
301275970Scyhowever, the spacing between the first two packets can be
302275970Scychanged with the calldelay command to allow
303275970Scyadditional time for a modem or ISDN call to complete.
304275970ScyThis is designed to speed the initial synchronization
305275970Scyacquisition with the
306275970Scy.Ic server
307275970Scycommand and s addresses and when
308275970Scy.Xr ntpd 1ntpdmdoc
309275970Scyis started with the
310275970Scy.Fl q
311275970Scyoption.
312275970Scy.It Cm key Ar key
313275970ScyAll packets sent to and received from the server or peer are to
314275970Scyinclude authentication fields encrypted using the specified
315275970Scy.Ar key
316275970Scyidentifier with values from 1 to 65534, inclusive.
317275970ScyThe
318275970Scydefault is to include no encryption field.
319275970Scy.It Cm minpoll Ar minpoll
320275970Scy.It Cm maxpoll Ar maxpoll
321275970ScyThese options specify the minimum and maximum poll intervals
322275970Scyfor NTP messages, as a power of 2 in seconds
323275970ScyThe maximum poll
324275970Scyinterval defaults to 10 (1,024 s), but can be increased by the
325275970Scy.Cm maxpoll
326275970Scyoption to an upper limit of 17 (36.4 h).
327275970ScyThe
328275970Scyminimum poll interval defaults to 6 (64 s), but can be decreased by
329275970Scythe
330275970Scy.Cm minpoll
331275970Scyoption to a lower limit of 4 (16 s).
332275970Scy.It Cm noselect
333275970ScyMarks the server as unused, except for display purposes.
334275970ScyThe server is discarded by the selection algroithm.
335275970Scy.It Cm prefer
336275970ScyMarks the server as preferred.
337275970ScyAll other things being equal,
338275970Scythis host will be chosen for synchronization among a set of
339275970Scycorrectly operating hosts.
340275970ScySee the
341275970Scy.Qq Mitigation Rules and the prefer Keyword
342275970Scypage
343275970Scy(available as part of the HTML documentation
344275970Scyprovided in
345275970Scy.Pa /usr/share/doc/ntp )
346275970Scyfor further information.
347275970Scy.It Cm ttl Ar ttl
348275970ScyThis option is used only with broadcast server and manycast
349275970Scyclient modes.
350275970ScyIt specifies the time-to-live
351275970Scy.Ar ttl
352275970Scyto
353275970Scyuse on broadcast server and multicast server and the maximum
354275970Scy.Ar ttl
355275970Scyfor the expanding ring search with manycast
356275970Scyclient packets.
357275970ScySelection of the proper value, which defaults to
358275970Scy127, is something of a black art and should be coordinated with the
359275970Scynetwork administrator.
360275970Scy.It Cm version Ar version
361275970ScySpecifies the version number to be used for outgoing NTP
362275970Scypackets.
363275970ScyVersions 1-4 are the choices, with version 4 the
364275970Scydefault.
365275970Scy.El
366275970Scy.Ss Auxiliary Commands
367275970Scy.Bl -tag -width indent
368275970Scy.It Ic broadcastclient
369275970ScyThis command enables reception of broadcast server messages to
370275970Scyany local interface (type b) address.
371275970ScyUpon receiving a message for
372275970Scythe first time, the broadcast client measures the nominal server
373275970Scypropagation delay using a brief client/server exchange with the
374275970Scyserver, then enters the broadcast client mode, in which it
375275970Scysynchronizes to succeeding broadcast messages.
376275970ScyNote that, in order
377275970Scyto avoid accidental or malicious disruption in this mode, both the
378275970Scyserver and client should operate using symmetric-key or public-key
379275970Scyauthentication as described in
380275970Scy.Sx Authentication Options .
381275970Scy.It Ic manycastserver Ar address ...
382275970ScyThis command enables reception of manycast client messages to
383275970Scythe multicast group address(es) (type m) specified.
384275970ScyAt least one
385275970Scyaddress is required, but the NTP multicast address 224.0.1.1
386275970Scyassigned by the IANA should NOT be used, unless specific means are
387275970Scytaken to limit the span of the reply and avoid a possibly massive
388275970Scyimplosion at the original sender.
389275970ScyNote that, in order to avoid
390275970Scyaccidental or malicious disruption in this mode, both the server
391275970Scyand client should operate using symmetric-key or public-key
392275970Scyauthentication as described in
393275970Scy.Sx Authentication Options .
394275970Scy.It Ic multicastclient Ar address ...
395275970ScyThis command enables reception of multicast server messages to
396275970Scythe multicast group address(es) (type m) specified.
397275970ScyUpon receiving
398275970Scya message for the first time, the multicast client measures the
399275970Scynominal server propagation delay using a brief client/server
400275970Scyexchange with the server, then enters the broadcast client mode, in
401275970Scywhich it synchronizes to succeeding multicast messages.
402275970ScyNote that,
403275970Scyin order to avoid accidental or malicious disruption in this mode,
404275970Scyboth the server and client should operate using symmetric-key or
405275970Scypublic-key authentication as described in
406275970Scy.Sx Authentication Options .
407275970Scy.El
408275970Scy.Sh Authentication Support
409275970ScyAuthentication support allows the NTP client to verify that the
410275970Scyserver is in fact known and trusted and not an intruder intending
411275970Scyaccidentally or on purpose to masquerade as that server.
412275970ScyThe NTPv3
413275970Scyspecification RFC-1305 defines a scheme which provides
414275970Scycryptographic authentication of received NTP packets.
415275970ScyOriginally,
416275970Scythis was done using the Data Encryption Standard (DES) algorithm
417275970Scyoperating in Cipher Block Chaining (CBC) mode, commonly called
418275970ScyDES-CBC.
419275970ScySubsequently, this was replaced by the RSA Message Digest
420275970Scy5 (MD5) algorithm using a private key, commonly called keyed-MD5.
421275970ScyEither algorithm computes a message digest, or one-way hash, which
422275970Scycan be used to verify the server has the correct private key and
423275970Scykey identifier.
424275970Scy.Pp
425275970ScyNTPv4 retains the NTPv3 scheme, properly described as symmetric key
426275970Scycryptography and, in addition, provides a new Autokey scheme
427275970Scybased on public key cryptography.
428275970ScyPublic key cryptography is generally considered more secure
429275970Scythan symmetric key cryptography, since the security is based
430275970Scyon a private value which is generated by each server and
431275970Scynever revealed.
432275970ScyWith Autokey all key distribution and
433275970Scymanagement functions involve only public values, which
434275970Scyconsiderably simplifies key distribution and storage.
435275970ScyPublic key management is based on X.509 certificates,
436275970Scywhich can be provided by commercial services or
437275970Scyproduced by utility programs in the OpenSSL software library
438275970Scyor the NTPv4 distribution.
439275970Scy.Pp
440275970ScyWhile the algorithms for symmetric key cryptography are
441275970Scyincluded in the NTPv4 distribution, public key cryptography
442275970Scyrequires the OpenSSL software library to be installed
443275970Scybefore building the NTP distribution.
444275970ScyDirections for doing that
445275970Scyare on the Building and Installing the Distribution page.
446275970Scy.Pp
447275970ScyAuthentication is configured separately for each association
448275970Scyusing the
449275970Scy.Cm key
450275970Scyor
451275970Scy.Cm autokey
452275970Scysubcommand on the
453275970Scy.Ic peer ,
454275970Scy.Ic server ,
455275970Scy.Ic broadcast
456275970Scyand
457275970Scy.Ic manycastclient
458275970Scyconfiguration commands as described in
459275970Scy.Sx Configuration Options
460275970Scypage.
461275970ScyThe authentication
462275970Scyoptions described below specify the locations of the key files,
463275970Scyif other than default, which symmetric keys are trusted
464275970Scyand the interval between various operations, if other than default.
465275970Scy.Pp
466275970ScyAuthentication is always enabled,
467275970Scyalthough ineffective if not configured as
468275970Scydescribed below.
469275970ScyIf a NTP packet arrives
470275970Scyincluding a message authentication
471275970Scycode (MAC), it is accepted only if it
472275970Scypasses all cryptographic checks.
473275970ScyThe
474275970Scychecks require correct key ID, key value
475275970Scyand message digest.
476275970ScyIf the packet has
477275970Scybeen modified in any way or replayed
478275970Scyby an intruder, it will fail one or more
479275970Scyof these checks and be discarded.
480275970ScyFurthermore, the Autokey scheme requires a
481275970Scypreliminary protocol exchange to obtain
482275970Scythe server certificate, verify its
483275970Scycredentials and initialize the protocol
484275970Scy.Pp
485275970ScyThe
486275970Scy.Cm auth
487275970Scyflag controls whether new associations or
488275970Scyremote configuration commands require cryptographic authentication.
489275970ScyThis flag can be set or reset by the
490275970Scy.Ic enable
491275970Scyand
492275970Scy.Ic disable
493275970Scycommands and also by remote
494275970Scyconfiguration commands sent by a
495275970Scy.Xr ntpdc 1ntpdcmdoc
496275970Scyprogram running in
497275970Scyanother machine.
498275970ScyIf this flag is enabled, which is the default
499275970Scycase, new broadcast client and symmetric passive associations and
500275970Scyremote configuration commands must be cryptographically
501275970Scyauthenticated using either symmetric key or public key cryptography.
502275970ScyIf this
503275970Scyflag is disabled, these operations are effective
504275970Scyeven if not cryptographic
505275970Scyauthenticated.
506275970ScyIt should be understood
507275970Scythat operating with the
508275970Scy.Ic auth
509275970Scyflag disabled invites a significant vulnerability
510275970Scywhere a rogue hacker can
511275970Scymasquerade as a falseticker and seriously
512275970Scydisrupt system timekeeping.
513275970ScyIt is
514275970Scyimportant to note that this flag has no purpose
515275970Scyother than to allow or disallow
516275970Scya new association in response to new broadcast
517275970Scyand symmetric active messages
518275970Scyand remote configuration commands and, in particular,
519275970Scythe flag has no effect on
520275970Scythe authentication process itself.
521275970Scy.Pp
522275970ScyAn attractive alternative where multicast support is available
523275970Scyis manycast mode, in which clients periodically troll
524275970Scyfor servers as described in the
525275970Scy.Sx Automatic NTP Configuration Options
526275970Scypage.
527275970ScyEither symmetric key or public key
528275970Scycryptographic authentication can be used in this mode.
529275970ScyThe principle advantage
530275970Scyof manycast mode is that potential servers need not be
531275970Scyconfigured in advance,
532275970Scysince the client finds them during regular operation,
533275970Scyand the configuration
534275970Scyfiles for all clients can be identical.
535275970Scy.Pp
536275970ScyThe security model and protocol schemes for
537275970Scyboth symmetric key and public key
538275970Scycryptography are summarized below;
539275970Scyfurther details are in the briefings, papers
540275970Scyand reports at the NTP project page linked from
541275970Scy.Li http://www.ntp.org/ .
542275970Scy.Ss Symmetric-Key Cryptography
543275970ScyThe original RFC-1305 specification allows any one of possibly
544275970Scy65,534 keys, each distinguished by a 32-bit key identifier, to
545275970Scyauthenticate an association.
546275970ScyThe servers and clients involved must
547275970Scyagree on the key and key identifier to
548275970Scyauthenticate NTP packets.
549275970ScyKeys and
550275970Scyrelated information are specified in a key
551275970Scyfile, usually called
552275970Scy.Pa ntp.keys ,
553275970Scywhich must be distributed and stored using
554275970Scysecure means beyond the scope of the NTP protocol itself.
555275970ScyBesides the keys used
556275970Scyfor ordinary NTP associations,
557275970Scyadditional keys can be used as passwords for the
558275970Scy.Xr ntpq 1ntpqmdoc
559275970Scyand
560275970Scy.Xr ntpdc 1ntpdcmdoc
561275970Scyutility programs.
562275970Scy.Pp
563275970ScyWhen
564275970Scy.Xr ntpd 1ntpdmdoc
565275970Scyis first started, it reads the key file specified in the
566275970Scy.Ic keys
567275970Scyconfiguration command and installs the keys
568275970Scyin the key cache.
569275970ScyHowever,
570275970Scyindividual keys must be activated with the
571275970Scy.Ic trusted
572275970Scycommand before use.
573275970ScyThis
574275970Scyallows, for instance, the installation of possibly
575275970Scyseveral batches of keys and
576275970Scythen activating or deactivating each batch
577275970Scyremotely using
578275970Scy.Xr ntpdc 1ntpdcmdoc .
579275970ScyThis also provides a revocation capability that can be used
580275970Scyif a key becomes compromised.
581275970ScyThe
582275970Scy.Ic requestkey
583275970Scycommand selects the key used as the password for the
584275970Scy.Xr ntpdc 1ntpdcmdoc
585275970Scyutility, while the
586275970Scy.Ic controlkey
587275970Scycommand selects the key used as the password for the
588275970Scy.Xr ntpq 1ntpqmdoc
589275970Scyutility.
590275970Scy.Ss Public Key Cryptography
591275970ScyNTPv4 supports the original NTPv3 symmetric key scheme
592275970Scydescribed in RFC-1305 and in addition the Autokey protocol,
593275970Scywhich is based on public key cryptography.
594275970ScyThe Autokey Version 2 protocol described on the Autokey Protocol
595275970Scypage verifies packet integrity using MD5 message digests
596275970Scyand verifies the source with digital signatures and any of several
597275970Scydigest/signature schemes.
598275970ScyOptional identity schemes described on the Identity Schemes
599275970Scypage and based on cryptographic challenge/response algorithms
600275970Scyare also available.
601275970ScyUsing all of these schemes provides strong security against
602275970Scyreplay with or without modification, spoofing, masquerade
603275970Scyand most forms of clogging attacks.
604275970Scy.\" .Pp
605275970Scy.\" The cryptographic means necessary for all Autokey operations
606275970Scy.\" is provided by the OpenSSL software library.
607275970Scy.\" This library is available from http://www.openssl.org/
608275970Scy.\" and can be installed using the procedures outlined
609275970Scy.\" in the Building and Installing the Distribution page.
610275970Scy.\" Once installed,
611275970Scy.\" the configure and build
612275970Scy.\" process automatically detects the library and links
613275970Scy.\" the library routines required.
614275970Scy.Pp
615275970ScyThe Autokey protocol has several modes of operation
616275970Scycorresponding to the various NTP modes supported.
617275970ScyMost modes use a special cookie which can be
618275970Scycomputed independently by the client and server,
619275970Scybut encrypted in transmission.
620275970ScyAll modes use in addition a variant of the S-KEY scheme,
621275970Scyin which a pseudo-random key list is generated and used
622275970Scyin reverse order.
623275970ScyThese schemes are described along with an executive summary,
624275970Scycurrent status, briefing slides and reading list on the
625275970Scy.Sx Autonomous Authentication
626275970Scypage.
627275970Scy.Pp
628275970ScyThe specific cryptographic environment used by Autokey servers
629275970Scyand clients is determined by a set of files
630275970Scyand soft links generated by the
631275970Scy.Xr ntp-keygen 1ntpkeygenmdoc
632275970Scyprogram.
633275970ScyThis includes a required host key file,
634275970Scyrequired certificate file and optional sign key file,
635275970Scyleapsecond file and identity scheme files.
636275970ScyThe
637275970Scydigest/signature scheme is specified in the X.509 certificate
638275970Scyalong with the matching sign key.
639275970ScyThere are several schemes
640275970Scyavailable in the OpenSSL software library, each identified
641275970Scyby a specific string such as
642275970Scy.Cm md5WithRSAEncryption ,
643275970Scywhich stands for the MD5 message digest with RSA
644275970Scyencryption scheme.
645275970ScyThe current NTP distribution supports
646275970Scyall the schemes in the OpenSSL library, including
647275970Scythose based on RSA and DSA digital signatures.
648275970Scy.Pp
649275970ScyNTP secure groups can be used to define cryptographic compartments
650275970Scyand security hierarchies.
651275970ScyIt is important that every host
652275970Scyin the group be able to construct a certificate trail to one
653275970Scyor more trusted hosts in the same group.
654275970ScyEach group
655275970Scyhost runs the Autokey protocol to obtain the certificates
656275970Scyfor all hosts along the trail to one or more trusted hosts.
657275970ScyThis requires the configuration file in all hosts to be
658275970Scyengineered so that, even under anticipated failure conditions,
659275970Scythe NTP subnet will form such that every group host can find
660275970Scya trail to at least one trusted host.
661275970Scy.Ss Naming and Addressing
662275970ScyIt is important to note that Autokey does not use DNS to
663275970Scyresolve addresses, since DNS can't be completely trusted
664275970Scyuntil the name servers have synchronized clocks.
665275970ScyThe cryptographic name used by Autokey to bind the host identity
666275970Scycredentials and cryptographic values must be independent
667275970Scyof interface, network and any other naming convention.
668275970ScyThe name appears in the host certificate in either or both
669275970Scythe subject and issuer fields, so protection against
670275970ScyDNS compromise is essential.
671275970Scy.Pp
672275970ScyBy convention, the name of an Autokey host is the name returned
673275970Scyby the Unix
674275970Scy.Xr gethostname 2
675275970Scysystem call or equivalent in other systems.
676275970ScyBy the system design
677275970Scymodel, there are no provisions to allow alternate names or aliases.
678275970ScyHowever, this is not to say that DNS aliases, different names
679275970Scyfor each interface, etc., are constrained in any way.
680275970Scy.Pp
681275970ScyIt is also important to note that Autokey verifies authenticity
682275970Scyusing the host name, network address and public keys,
683275970Scyall of which are bound together by the protocol specifically
684275970Scyto deflect masquerade attacks.
685275970ScyFor this reason Autokey
686275970Scyincludes the source and destinatino IP addresses in message digest
687275970Scycomputations and so the same addresses must be available
688275970Scyat both the server and client.
689275970ScyFor this reason operation
690275970Scywith network address translation schemes is not possible.
691275970ScyThis reflects the intended robust security model where government
692275970Scyand corporate NTP servers are operated outside firewall perimeters.
693275970Scy.Ss Operation
694275970ScyA specific combination of authentication scheme (none,
695275970Scysymmetric key, public key) and identity scheme is called
696275970Scya cryptotype, although not all combinations are compatible.
697275970ScyThere may be management configurations where the clients,
698275970Scyservers and peers may not all support the same cryptotypes.
699275970ScyA secure NTPv4 subnet can be configured in many ways while
700275970Scykeeping in mind the principles explained above and
701275970Scyin this section.
702275970ScyNote however that some cryptotype
703275970Scycombinations may successfully interoperate with each other,
704275970Scybut may not represent good security practice.
705275970Scy.Pp
706275970ScyThe cryptotype of an association is determined at the time
707275970Scyof mobilization, either at configuration time or some time
708275970Scylater when a message of appropriate cryptotype arrives.
709275970ScyWhen mobilized by a
710275970Scy.Ic server
711275970Scyor
712275970Scy.Ic peer
713275970Scyconfiguration command and no
714275970Scy.Ic key
715275970Scyor
716275970Scy.Ic autokey
717275970Scysubcommands are present, the association is not
718275970Scyauthenticated; if the
719275970Scy.Ic key
720275970Scysubcommand is present, the association is authenticated
721275970Scyusing the symmetric key ID specified; if the
722275970Scy.Ic autokey
723275970Scysubcommand is present, the association is authenticated
724275970Scyusing Autokey.
725275970Scy.Pp
726275970ScyWhen multiple identity schemes are supported in the Autokey
727275970Scyprotocol, the first message exchange determines which one is used.
728275970ScyThe client request message contains bits corresponding
729275970Scyto which schemes it has available.
730275970ScyThe server response message
731275970Scycontains bits corresponding to which schemes it has available.
732275970ScyBoth server and client match the received bits with their own
733275970Scyand select a common scheme.
734275970Scy.Pp
735275970ScyFollowing the principle that time is a public value,
736275970Scya server responds to any client packet that matches
737275970Scyits cryptotype capabilities.
738275970ScyThus, a server receiving
739275970Scyan unauthenticated packet will respond with an unauthenticated
740275970Scypacket, while the same server receiving a packet of a cryptotype
741275970Scyit supports will respond with packets of that cryptotype.
742275970ScyHowever, unconfigured broadcast or manycast client
743275970Scyassociations or symmetric passive associations will not be
744275970Scymobilized unless the server supports a cryptotype compatible
745275970Scywith the first packet received.
746275970ScyBy default, unauthenticated associations will not be mobilized
747275970Scyunless overridden in a decidedly dangerous way.
748275970Scy.Pp
749275970ScySome examples may help to reduce confusion.
750275970ScyClient Alice has no specific cryptotype selected.
751275970ScyServer Bob has both a symmetric key file and minimal Autokey files.
752275970ScyAlice's unauthenticated messages arrive at Bob, who replies with
753275970Scyunauthenticated messages.
754275970ScyCathy has a copy of Bob's symmetric
755275970Scykey file and has selected key ID 4 in messages to Bob.
756275970ScyBob verifies the message with his key ID 4.
757275970ScyIf it's the
758275970Scysame key and the message is verified, Bob sends Cathy a reply
759275970Scyauthenticated with that key.
760275970ScyIf verification fails,
761275970ScyBob sends Cathy a thing called a crypto-NAK, which tells her
762275970Scysomething broke.
763275970ScyShe can see the evidence using the
764275970Scy.Xr ntpq 1ntpqmdoc
765275970Scyprogram.
766275970Scy.Pp
767275970ScyDenise has rolled her own host key and certificate.
768275970ScyShe also uses one of the identity schemes as Bob.
769275970ScyShe sends the first Autokey message to Bob and they
770275970Scyboth dance the protocol authentication and identity steps.
771275970ScyIf all comes out okay, Denise and Bob continue as described above.
772275970Scy.Pp
773275970ScyIt should be clear from the above that Bob can support
774275970Scyall the girls at the same time, as long as he has compatible
775275970Scyauthentication and identity credentials.
776275970ScyNow, Bob can act just like the girls in his own choice of servers;
777275970Scyhe can run multiple configured associations with multiple different
778275970Scyservers (or the same server, although that might not be useful).
779275970ScyBut, wise security policy might preclude some cryptotype
780275970Scycombinations; for instance, running an identity scheme
781275970Scywith one server and no authentication with another might not be wise.
782275970Scy.Ss Key Management
783275970ScyThe cryptographic values used by the Autokey protocol are
784275970Scyincorporated as a set of files generated by the
785275970Scy.Xr ntp-keygen 1ntpkeygenmdoc
786275970Scyutility program, including symmetric key, host key and
787275970Scypublic certificate files, as well as sign key, identity parameters
788275970Scyand leapseconds files.
789275970ScyAlternatively, host and sign keys and
790275970Scycertificate files can be generated by the OpenSSL utilities
791275970Scyand certificates can be imported from public certificate
792275970Scyauthorities.
793275970ScyNote that symmetric keys are necessary for the
794275970Scy.Xr ntpq 1ntpqmdoc
795275970Scyand
796275970Scy.Xr ntpdc 1ntpdcmdoc
797275970Scyutility programs.
798275970ScyThe remaining files are necessary only for the
799275970ScyAutokey protocol.
800275970Scy.Pp
801275970ScyCertificates imported from OpenSSL or public certificate
802275970Scyauthorities have certian limitations.
803275970ScyThe certificate should be in ASN.1 syntax, X.509 Version 3
804275970Scyformat and encoded in PEM, which is the same format
805275970Scyused by OpenSSL.
806275970ScyThe overall length of the certificate encoded
807275970Scyin ASN.1 must not exceed 1024 bytes.
808275970ScyThe subject distinguished
809275970Scyname field (CN) is the fully qualified name of the host
810275970Scyon which it is used; the remaining subject fields are ignored.
811275970ScyThe certificate extension fields must not contain either
812275970Scya subject key identifier or a issuer key identifier field;
813275970Scyhowever, an extended key usage field for a trusted host must
814275970Scycontain the value
815275970Scy.Cm trustRoot ; .
816275970ScyOther extension fields are ignored.
817275970Scy.Ss Authentication Commands
818275970Scy.Bl -tag -width indent
819275970Scy.It Ic autokey Op Ar logsec
820275970ScySpecifies the interval between regenerations of the session key
821275970Scylist used with the Autokey protocol.
822275970ScyNote that the size of the key
823275970Scylist for each association depends on this interval and the current
824275970Scypoll interval.
825275970ScyThe default value is 12 (4096 s or about 1.1 hours).
826275970ScyFor poll intervals above the specified interval, a session key list
827275970Scywith a single entry will be regenerated for every message
828275970Scysent.
829275970Scy.It Ic controlkey Ar key
830275970ScySpecifies the key identifier to use with the
831275970Scy.Xr ntpq 1ntpqmdoc
832275970Scyutility, which uses the standard
833275970Scyprotocol defined in RFC-1305.
834275970ScyThe
835275970Scy.Ar key
836275970Scyargument is
837275970Scythe key identifier for a trusted key, where the value can be in the
838275970Scyrange 1 to 65,534, inclusive.
839275970Scy.It Xo Ic crypto
840275970Scy.Op Cm cert Ar file
841275970Scy.Op Cm leap Ar file
842275970Scy.Op Cm randfile Ar file
843275970Scy.Op Cm host Ar file
844275970Scy.Op Cm sign Ar file
845275970Scy.Op Cm gq Ar file
846275970Scy.Op Cm gqpar Ar file
847275970Scy.Op Cm iffpar Ar file
848275970Scy.Op Cm mvpar Ar file
849275970Scy.Op Cm pw Ar password
850275970Scy.Xc
851275970ScyThis command requires the OpenSSL library.
852275970ScyIt activates public key
853275970Scycryptography, selects the message digest and signature
854275970Scyencryption scheme and loads the required private and public
855275970Scyvalues described above.
856275970ScyIf one or more files are left unspecified,
857275970Scythe default names are used as described above.
858275970ScyUnless the complete path and name of the file are specified, the
859275970Scylocation of a file is relative to the keys directory specified
860275970Scyin the
861275970Scy.Ic keysdir
862275970Scycommand or default
863275970Scy.Pa /usr/local/etc .
864275970ScyFollowing are the subcommands:
865275970Scy.Bl -tag -width indent
866275970Scy.It Cm cert Ar file
867275970ScySpecifies the location of the required host public certificate file.
868275970ScyThis overrides the link
869275970Scy.Pa ntpkey_cert_ Ns Ar hostname
870275970Scyin the keys directory.
871275970Scy.It Cm gqpar Ar file
872275970ScySpecifies the location of the optional GQ parameters file.
873275970ScyThis
874275970Scyoverrides the link
875275970Scy.Pa ntpkey_gq_ Ns Ar hostname
876275970Scyin the keys directory.
877275970Scy.It Cm host Ar file
878275970ScySpecifies the location of the required host key file.
879275970ScyThis overrides
880275970Scythe link
881275970Scy.Pa ntpkey_key_ Ns Ar hostname
882275970Scyin the keys directory.
883275970Scy.It Cm iffpar Ar file
884275970ScySpecifies the location of the optional IFF parameters file.This
885275970Scyoverrides the link
886275970Scy.Pa ntpkey_iff_ Ns Ar hostname
887275970Scyin the keys directory.
888275970Scy.It Cm leap Ar file
889275970ScySpecifies the location of the optional leapsecond file.
890275970ScyThis overrides the link
891275970Scy.Pa ntpkey_leap
892275970Scyin the keys directory.
893275970Scy.It Cm mvpar Ar file
894275970ScySpecifies the location of the optional MV parameters file.
895275970ScyThis
896275970Scyoverrides the link
897275970Scy.Pa ntpkey_mv_ Ns Ar hostname
898275970Scyin the keys directory.
899275970Scy.It Cm pw Ar password
900275970ScySpecifies the password to decrypt files containing private keys and
901275970Scyidentity parameters.
902275970ScyThis is required only if these files have been
903275970Scyencrypted.
904275970Scy.It Cm randfile Ar file
905275970ScySpecifies the location of the random seed file used by the OpenSSL
906275970Scylibrary.
907275970ScyThe defaults are described in the main text above.
908275970Scy.It Cm sign Ar file
909275970ScySpecifies the location of the optional sign key file.
910275970ScyThis overrides
911275970Scythe link
912275970Scy.Pa ntpkey_sign_ Ns Ar hostname
913275970Scyin the keys directory.
914275970ScyIf this file is
915275970Scynot found, the host key is also the sign key.
916275970Scy.El
917275970Scy.It Ic keys Ar keyfile
918275970ScySpecifies the complete path and location of the MD5 key file
919275970Scycontaining the keys and key identifiers used by
920275970Scy.Xr ntpd 1ntpdmdoc ,
921275970Scy.Xr ntpq 1ntpqmdoc
922275970Scyand
923275970Scy.Xr ntpdc 1ntpdcmdoc
924275970Scywhen operating with symmetric key cryptography.
925275970ScyThis is the same operation as the
926275970Scy.Fl k
927275970Scycommand line option.
928275970Scy.It Ic keysdir Ar path
929275970ScyThis command specifies the default directory path for
930275970Scycryptographic keys, parameters and certificates.
931275970ScyThe default is
932275970Scy.Pa /usr/local/etc/ .
933275970Scy.It Ic requestkey Ar key
934275970ScySpecifies the key identifier to use with the
935275970Scy.Xr ntpdc 1ntpdcmdoc
936275970Scyutility program, which uses a
937275970Scyproprietary protocol specific to this implementation of
938275970Scy.Xr ntpd 1ntpdmdoc .
939275970ScyThe
940275970Scy.Ar key
941275970Scyargument is a key identifier
942275970Scyfor the trusted key, where the value can be in the range 1 to
943275970Scy65,534, inclusive.
944275970Scy.It Ic revoke Ar logsec
945275970ScySpecifies the interval between re-randomization of certain
946275970Scycryptographic values used by the Autokey scheme, as a power of 2 in
947275970Scyseconds.
948275970ScyThese values need to be updated frequently in order to
949275970Scydeflect brute-force attacks on the algorithms of the scheme;
950275970Scyhowever, updating some values is a relatively expensive operation.
951275970ScyThe default interval is 16 (65,536 s or about 18 hours).
952275970ScyFor poll
953275970Scyintervals above the specified interval, the values will be updated
954275970Scyfor every message sent.
955275970Scy.It Ic trustedkey Ar key ...
956275970ScySpecifies the key identifiers which are trusted for the
957275970Scypurposes of authenticating peers with symmetric key cryptography,
958275970Scyas well as keys used by the
959275970Scy.Xr ntpq 1ntpqmdoc
960275970Scyand
961275970Scy.Xr ntpdc 1ntpdcmdoc
962275970Scyprograms.
963275970ScyThe authentication procedures require that both the local
964275970Scyand remote servers share the same key and key identifier for this
965275970Scypurpose, although different keys can be used with different
966275970Scyservers.
967275970ScyThe
968275970Scy.Ar key
969275970Scyarguments are 32-bit unsigned
970275970Scyintegers with values from 1 to 65,534.
971275970Scy.El
972275970Scy.Ss Error Codes
973275970ScyThe following error codes are reported via the NTP control
974275970Scyand monitoring protocol trap mechanism.
975275970Scy.Bl -tag -width indent
976275970Scy.It 101
977275970Scy.Pq bad field format or length
978275970ScyThe packet has invalid version, length or format.
979275970Scy.It 102
980275970Scy.Pq bad timestamp
981275970ScyThe packet timestamp is the same or older than the most recent received.
982275970ScyThis could be due to a replay or a server clock time step.
983275970Scy.It 103
984275970Scy.Pq bad filestamp
985275970ScyThe packet filestamp is the same or older than the most recent received.
986275970ScyThis could be due to a replay or a key file generation error.
987275970Scy.It 104
988275970Scy.Pq bad or missing public key
989275970ScyThe public key is missing, has incorrect format or is an unsupported type.
990275970Scy.It 105
991275970Scy.Pq unsupported digest type
992275970ScyThe server requires an unsupported digest/signature scheme.
993275970Scy.It 106
994275970Scy.Pq mismatched digest types
995275970ScyNot used.
996275970Scy.It 107
997275970Scy.Pq bad signature length
998275970ScyThe signature length does not match the current public key.
999275970Scy.It 108
1000275970Scy.Pq signature not verified
1001275970ScyThe message fails the signature check.
1002275970ScyIt could be bogus or signed by a
1003275970Scydifferent private key.
1004275970Scy.It 109
1005275970Scy.Pq certificate not verified
1006275970ScyThe certificate is invalid or signed with the wrong key.
1007275970Scy.It 110
1008275970Scy.Pq certificate not verified
1009275970ScyThe certificate is not yet valid or has expired or the signature could not
1010275970Scybe verified.
1011275970Scy.It 111
1012275970Scy.Pq bad or missing cookie
1013275970ScyThe cookie is missing, corrupted or bogus.
1014275970Scy.It 112
1015275970Scy.Pq bad or missing leapseconds table
1016275970ScyThe leapseconds table is missing, corrupted or bogus.
1017275970Scy.It 113
1018275970Scy.Pq bad or missing certificate
1019275970ScyThe certificate is missing, corrupted or bogus.
1020275970Scy.It 114
1021275970Scy.Pq bad or missing identity
1022275970ScyThe identity key is missing, corrupt or bogus.
1023275970Scy.El
1024275970Scy.Sh Monitoring Support
1025275970Scy.Xr ntpd 1ntpdmdoc
1026275970Scyincludes a comprehensive monitoring facility suitable
1027275970Scyfor continuous, long term recording of server and client
1028275970Scytimekeeping performance.
1029275970ScySee the
1030275970Scy.Ic statistics
1031275970Scycommand below
1032275970Scyfor a listing and example of each type of statistics currently
1033275970Scysupported.
1034275970ScyStatistic files are managed using file generation sets
1035275970Scyand scripts in the
1036275970Scy.Pa ./scripts
1037275970Scydirectory of this distribution.
1038275970ScyUsing
1039275970Scythese facilities and
1040275970Scy.Ux
1041275970Scy.Xr cron 8
1042275970Scyjobs, the data can be
1043275970Scyautomatically summarized and archived for retrospective analysis.
1044275970Scy.Ss Monitoring Commands
1045275970Scy.Bl -tag -width indent
1046275970Scy.It Ic statistics Ar name ...
1047275970ScyEnables writing of statistics records.
1048275970ScyCurrently, eight kinds of
1049275970Scy.Ar name
1050275970Scystatistics are supported.
1051275970Scy.Bl -tag -width indent
1052275970Scy.It Cm clockstats
1053275970ScyEnables recording of clock driver statistics information.
1054275970ScyEach update
1055275970Scyreceived from a clock driver appends a line of the following form to
1056275970Scythe file generation set named
1057275970Scy.Cm clockstats :
1058275970Scy.Bd -literal
1059275970Scy49213 525.624 127.127.4.1 93 226 00:08:29.606 D
1060275970Scy.Ed
1061275970Scy.Pp
1062275970ScyThe first two fields show the date (Modified Julian Day) and time
1063275970Scy(seconds and fraction past UTC midnight).
1064275970ScyThe next field shows the
1065275970Scyclock address in dotted-quad notation.
1066275970ScyThe final field shows the last
1067275970Scytimecode received from the clock in decoded ASCII format, where
1068275970Scymeaningful.
1069275970ScyIn some clock drivers a good deal of additional information
1070275970Scycan be gathered and displayed as well.
1071275970ScySee information specific to each
1072275970Scyclock for further details.
1073275970Scy.It Cm cryptostats
1074275970ScyThis option requires the OpenSSL cryptographic software library.
1075275970ScyIt
1076275970Scyenables recording of cryptographic public key protocol information.
1077275970ScyEach message received by the protocol module appends a line of the
1078275970Scyfollowing form to the file generation set named
1079275970Scy.Cm cryptostats :
1080275970Scy.Bd -literal
1081275970Scy49213 525.624 127.127.4.1 message
1082275970Scy.Ed
1083275970Scy.Pp
1084275970ScyThe first two fields show the date (Modified Julian Day) and time
1085275970Scy(seconds and fraction past UTC midnight).
1086275970ScyThe next field shows the peer
1087275970Scyaddress in dotted-quad notation, The final message field includes the
1088275970Scymessage type and certain ancillary information.
1089275970ScySee the
1090275970Scy.Sx Authentication Options
1091275970Scysection for further information.
1092275970Scy.It Cm loopstats
1093275970ScyEnables recording of loop filter statistics information.
1094275970ScyEach
1095275970Scyupdate of the local clock outputs a line of the following form to
1096275970Scythe file generation set named
1097275970Scy.Cm loopstats :
1098275970Scy.Bd -literal
1099275970Scy50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
1100275970Scy.Ed
1101275970Scy.Pp
1102275970ScyThe first two fields show the date (Modified Julian Day) and
1103275970Scytime (seconds and fraction past UTC midnight).
1104275970ScyThe next five fields
1105275970Scyshow time offset (seconds), frequency offset (parts per million -
1106275970ScyPPM), RMS jitter (seconds), Allan deviation (PPM) and clock
1107275970Scydiscipline time constant.
1108275970Scy.It Cm peerstats
1109275970ScyEnables recording of peer statistics information.
1110275970ScyThis includes
1111275970Scystatistics records of all peers of a NTP server and of special
1112275970Scysignals, where present and configured.
1113275970ScyEach valid update appends a
1114275970Scyline of the following form to the current element of a file
1115275970Scygeneration set named
1116275970Scy.Cm peerstats :
1117275970Scy.Bd -literal
1118275970Scy48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
1119275970Scy.Ed
1120275970Scy.Pp
1121275970ScyThe first two fields show the date (Modified Julian Day) and
1122275970Scytime (seconds and fraction past UTC midnight).
1123275970ScyThe next two fields
1124275970Scyshow the peer address in dotted-quad notation and status,
1125275970Scyrespectively.
1126275970ScyThe status field is encoded in hex in the format
1127275970Scydescribed in Appendix A of the NTP specification RFC 1305.
1128275970ScyThe final four fields show the offset,
1129275970Scydelay, dispersion and RMS jitter, all in seconds.
1130275970Scy.It Cm rawstats
1131275970ScyEnables recording of raw-timestamp statistics information.
1132275970ScyThis
1133275970Scyincludes statistics records of all peers of a NTP server and of
1134275970Scyspecial signals, where present and configured.
1135275970ScyEach NTP message
1136275970Scyreceived from a peer or clock driver appends a line of the
1137275970Scyfollowing form to the file generation set named
1138275970Scy.Cm rawstats :
1139275970Scy.Bd -literal
1140275970Scy50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
1141275970Scy.Ed
1142275970Scy.Pp
1143275970ScyThe first two fields show the date (Modified Julian Day) and
1144275970Scytime (seconds and fraction past UTC midnight).
1145275970ScyThe next two fields
1146275970Scyshow the remote peer or clock address followed by the local address
1147275970Scyin dotted-quad notation.
1148275970ScyThe final four fields show the originate,
1149275970Scyreceive, transmit and final NTP timestamps in order.
1150275970ScyThe timestamp
1151275970Scyvalues are as received and before processing by the various data
1152275970Scysmoothing and mitigation algorithms.
1153275970Scy.It Cm sysstats
1154275970ScyEnables recording of ntpd statistics counters on a periodic basis.
1155275970ScyEach
1156275970Scyhour a line of the following form is appended to the file generation
1157275970Scyset named
1158275970Scy.Cm sysstats :
1159275970Scy.Bd -literal
1160275970Scy50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
1161275970Scy.Ed
1162275970Scy.Pp
1163275970ScyThe first two fields show the date (Modified Julian Day) and time
1164275970Scy(seconds and fraction past UTC midnight).
1165275970ScyThe remaining ten fields show
1166275970Scythe statistics counter values accumulated since the last generated
1167275970Scyline.
1168275970Scy.Bl -tag -width indent
1169275970Scy.It Time since restart Cm 36000
1170275970ScyTime in hours since the system was last rebooted.
1171275970Scy.It Packets received Cm 81965
1172275970ScyTotal number of packets received.
1173275970Scy.It Packets processed Cm 0
1174275970ScyNumber of packets received in response to previous packets sent
1175275970Scy.It Current version Cm 9546
1176275970ScyNumber of packets matching the current NTP version.
1177275970Scy.It Previous version Cm 56
1178275970ScyNumber of packets matching the previous NTP version.
1179275970Scy.It Bad version Cm 71793
1180275970ScyNumber of packets matching neither NTP version.
1181275970Scy.It Access denied Cm 512
1182275970ScyNumber of packets denied access for any reason.
1183275970Scy.It Bad length or format Cm 540
1184275970ScyNumber of packets with invalid length, format or port number.
1185275970Scy.It Bad authentication Cm 10
1186275970ScyNumber of packets not verified as authentic.
1187275970Scy.It Rate exceeded Cm 147
1188275970ScyNumber of packets discarded due to rate limitation.
1189275970Scy.El
1190275970Scy.It Cm statsdir Ar directory_path
1191275970ScyIndicates the full path of a directory where statistics files
1192275970Scyshould be created (see below).
1193275970ScyThis keyword allows
1194275970Scythe (otherwise constant)
1195275970Scy.Cm filegen
1196275970Scyfilename prefix to be modified for file generation sets, which
1197275970Scyis useful for handling statistics logs.
1198275970Scy.It Cm filegen Ar name Xo
1199275970Scy.Op Cm file Ar filename
1200275970Scy.Op Cm type Ar typename
1201275970Scy.Op Cm link | nolink
1202275970Scy.Op Cm enable | disable
1203275970Scy.Xc
1204275970ScyConfigures setting of generation file set name.
1205275970ScyGeneration
1206275970Scyfile sets provide a means for handling files that are
1207275970Scycontinuously growing during the lifetime of a server.
1208275970ScyServer statistics are a typical example for such files.
1209275970ScyGeneration file sets provide access to a set of files used
1210275970Scyto store the actual data.
1211275970ScyAt any time at most one element
1212275970Scyof the set is being written to.
1213275970ScyThe type given specifies
1214275970Scywhen and how data will be directed to a new element of the set.
1215275970ScyThis way, information stored in elements of a file set
1216275970Scythat are currently unused are available for administrational
1217275970Scyoperations without the risk of disturbing the operation of ntpd.
1218275970Scy(Most important: they can be removed to free space for new data
1219275970Scyproduced.)
1220275970Scy.Pp
1221275970ScyNote that this command can be sent from the
1222275970Scy.Xr ntpdc 1ntpdcmdoc
1223275970Scyprogram running at a remote location.
1224275970Scy.Bl -tag -width indent
1225275970Scy.It Cm name
1226275970ScyThis is the type of the statistics records, as shown in the
1227275970Scy.Cm statistics
1228275970Scycommand.
1229275970Scy.It Cm file Ar filename
1230275970ScyThis is the file name for the statistics records.
1231275970ScyFilenames of set
1232275970Scymembers are built from three concatenated elements
1233275970Scy.Ar Cm prefix ,
1234275970Scy.Ar Cm filename
1235275970Scyand
1236275970Scy.Ar Cm suffix :
1237275970Scy.Bl -tag -width indent
1238275970Scy.It Cm prefix
1239275970ScyThis is a constant filename path.
1240275970ScyIt is not subject to
1241275970Scymodifications via the
1242275970Scy.Ar filegen
1243275970Scyoption.
1244275970ScyIt is defined by the
1245275970Scyserver, usually specified as a compile-time constant.
1246275970ScyIt may,
1247275970Scyhowever, be configurable for individual file generation sets
1248275970Scyvia other commands.
1249275970ScyFor example, the prefix used with
1250275970Scy.Ar loopstats
1251275970Scyand
1252275970Scy.Ar peerstats
1253275970Scygeneration can be configured using the
1254275970Scy.Ar statsdir
1255275970Scyoption explained above.
1256275970Scy.It Cm filename
1257275970ScyThis string is directly concatenated to the prefix mentioned
1258275970Scyabove (no intervening
1259275970Scy.Ql / ) .
1260275970ScyThis can be modified using
1261275970Scythe file argument to the
1262275970Scy.Ar filegen
1263275970Scystatement.
1264275970ScyNo
1265275970Scy.Pa ..
1266275970Scyelements are
1267275970Scyallowed in this component to prevent filenames referring to
1268275970Scyparts outside the filesystem hierarchy denoted by
1269275970Scy.Ar prefix .
1270275970Scy.It Cm suffix
1271275970ScyThis part is reflects individual elements of a file set.
1272275970ScyIt is
1273275970Scygenerated according to the type of a file set.
1274275970Scy.El
1275275970Scy.It Cm type Ar typename
1276275970ScyA file generation set is characterized by its type.
1277275970ScyThe following
1278275970Scytypes are supported:
1279275970Scy.Bl -tag -width indent
1280275970Scy.It Cm none
1281275970ScyThe file set is actually a single plain file.
1282275970Scy.It Cm pid
1283275970ScyOne element of file set is used per incarnation of a ntpd
1284275970Scyserver.
1285275970ScyThis type does not perform any changes to file set
1286275970Scymembers during runtime, however it provides an easy way of
1287275970Scyseparating files belonging to different
1288275970Scy.Xr ntpd 1ntpdmdoc
1289275970Scyserver incarnations.
1290275970ScyThe set member filename is built by appending a
1291275970Scy.Ql \&.
1292275970Scyto concatenated
1293275970Scy.Ar prefix
1294275970Scyand
1295275970Scy.Ar filename
1296275970Scystrings, and
1297275970Scyappending the decimal representation of the process ID of the
1298275970Scy.Xr ntpd 1ntpdmdoc
1299275970Scyserver process.
1300275970Scy.It Cm day
1301275970ScyOne file generation set element is created per day.
1302275970ScyA day is
1303275970Scydefined as the period between 00:00 and 24:00 UTC.
1304275970ScyThe file set
1305275970Scymember suffix consists of a
1306275970Scy.Ql \&.
1307275970Scyand a day specification in
1308275970Scythe form
1309275970Scy.Cm YYYYMMdd .
1310275970Scy.Cm YYYY
1311275970Scyis a 4-digit year number (e.g., 1992).
1312275970Scy.Cm MM
1313275970Scyis a two digit month number.
1314275970Scy.Cm dd
1315275970Scyis a two digit day number.
1316275970ScyThus, all information written at 10 December 1992 would end up
1317275970Scyin a file named
1318275970Scy.Ar prefix
1319275970Scy.Ar filename Ns .19921210 .
1320275970Scy.It Cm week
1321275970ScyAny file set member contains data related to a certain week of
1322275970Scya year.
1323275970ScyThe term week is defined by computing day-of-year
1324275970Scymodulo 7.
1325275970ScyElements of such a file generation set are
1326275970Scydistinguished by appending the following suffix to the file set
1327275970Scyfilename base: A dot, a 4-digit year number, the letter
1328275970Scy.Cm W ,
1329275970Scyand a 2-digit week number.
1330275970ScyFor example, information from January,
1331275970Scy10th 1992 would end up in a file with suffix
1332275970Scy.No . Ns Ar 1992W1 .
1333275970Scy.It Cm month
1334275970ScyOne generation file set element is generated per month.
1335275970ScyThe
1336275970Scyfile name suffix consists of a dot, a 4-digit year number, and
1337275970Scya 2-digit month.
1338275970Scy.It Cm year
1339275970ScyOne generation file element is generated per year.
1340275970ScyThe filename
1341275970Scysuffix consists of a dot and a 4 digit year number.
1342275970Scy.It Cm age
1343275970ScyThis type of file generation sets changes to a new element of
1344275970Scythe file set every 24 hours of server operation.
1345275970ScyThe filename
1346275970Scysuffix consists of a dot, the letter
1347275970Scy.Cm a ,
1348275970Scyand an 8-digit number.
1349275970ScyThis number is taken to be the number of seconds the server is
1350275970Scyrunning at the start of the corresponding 24-hour period.
1351275970ScyInformation is only written to a file generation by specifying
1352275970Scy.Cm enable ;
1353275970Scyoutput is prevented by specifying
1354275970Scy.Cm disable .
1355275970Scy.El
1356275970Scy.It Cm link | nolink
1357275970ScyIt is convenient to be able to access the current element of a file
1358275970Scygeneration set by a fixed name.
1359275970ScyThis feature is enabled by
1360275970Scyspecifying
1361275970Scy.Cm link
1362275970Scyand disabled using
1363275970Scy.Cm nolink .
1364275970ScyIf link is specified, a
1365275970Scyhard link from the current file set element to a file without
1366275970Scysuffix is created.
1367275970ScyWhen there is already a file with this name and
1368275970Scythe number of links of this file is one, it is renamed appending a
1369275970Scydot, the letter
1370275970Scy.Cm C ,
1371275970Scyand the pid of the ntpd server process.
1372275970ScyWhen the
1373275970Scynumber of links is greater than one, the file is unlinked.
1374275970ScyThis
1375275970Scyallows the current file to be accessed by a constant name.
1376275970Scy.It Cm enable \&| Cm disable
1377275970ScyEnables or disables the recording function.
1378275970Scy.El
1379275970Scy.El
1380275970Scy.El
1381275970Scy.Sh Access Control Support
1382275970ScyThe
1383275970Scy.Xr ntpd 1ntpdmdoc
1384275970Scydaemon implements a general purpose address/mask based restriction
1385275970Scylist.
1386275970ScyThe list contains address/match entries sorted first
1387275970Scyby increasing address values and and then by increasing mask values.
1388275970ScyA match occurs when the bitwise AND of the mask and the packet
1389275970Scysource address is equal to the bitwise AND of the mask and
1390275970Scyaddress in the list.
1391275970ScyThe list is searched in order with the
1392275970Scylast match found defining the restriction flags associated
1393275970Scywith the entry.
1394275970ScyAdditional information and examples can be found in the
1395275970Scy.Qq Notes on Configuring NTP and Setting up a NTP Subnet
1396275970Scypage
1397275970Scy(available as part of the HTML documentation
1398275970Scyprovided in
1399275970Scy.Pa /usr/share/doc/ntp ) .
1400275970Scy.Pp
1401275970ScyThe restriction facility was implemented in conformance
1402275970Scywith the access policies for the original NSFnet backbone
1403275970Scytime servers.
1404275970ScyLater the facility was expanded to deflect
1405275970Scycryptographic and clogging attacks.
1406275970ScyWhile this facility may
1407275970Scybe useful for keeping unwanted or broken or malicious clients
1408275970Scyfrom congesting innocent servers, it should not be considered
1409275970Scyan alternative to the NTP authentication facilities.
1410275970ScySource address based restrictions are easily circumvented
1411275970Scyby a determined cracker.
1412275970Scy.Pp
1413275970ScyClients can be denied service because they are explicitly
1414275970Scyincluded in the restrict list created by the restrict command
1415275970Scyor implicitly as the result of cryptographic or rate limit
1416275970Scyviolations.
1417275970ScyCryptographic violations include certificate
1418275970Scyor identity verification failure; rate limit violations generally
1419275970Scyresult from defective NTP implementations that send packets
1420275970Scyat abusive rates.
1421275970ScySome violations cause denied service
1422275970Scyonly for the offending packet, others cause denied service
1423275970Scyfor a timed period and others cause the denied service for
1424275970Scyan indefinate period.
1425275970ScyWhen a client or network is denied access
1426275970Scyfor an indefinate period, the only way at present to remove
1427275970Scythe restrictions is by restarting the server.
1428275970Scy.Ss The Kiss-of-Death Packet
1429275970ScyOrdinarily, packets denied service are simply dropped with no
1430275970Scyfurther action except incrementing statistics counters.
1431275970ScySometimes a
1432275970Scymore proactive response is needed, such as a server message that
1433275970Scyexplicitly requests the client to stop sending and leave a message
1434275970Scyfor the system operator.
1435275970ScyA special packet format has been created
1436275970Scyfor this purpose called the "kiss-of-death" (KoD) packet.
1437275970ScyKoD packets have the leap bits set unsynchronized and stratum set
1438275970Scyto zero and the reference identifier field set to a four-byte
1439275970ScyASCII code.
1440275970ScyIf the
1441275970Scy.Cm noserve
1442275970Scyor
1443275970Scy.Cm notrust
1444275970Scyflag of the matching restrict list entry is set,
1445275970Scythe code is "DENY"; if the
1446275970Scy.Cm limited
1447275970Scyflag is set and the rate limit
1448275970Scyis exceeded, the code is "RATE".
1449275970ScyFinally, if a cryptographic violation occurs, the code is "CRYP".
1450275970Scy.Pp
1451275970ScyA client receiving a KoD performs a set of sanity checks to
1452275970Scyminimize security exposure, then updates the stratum and
1453275970Scyreference identifier peer variables, sets the access
1454275970Scydenied (TEST4) bit in the peer flash variable and sends
1455275970Scya message to the log.
1456275970ScyAs long as the TEST4 bit is set,
1457275970Scythe client will send no further packets to the server.
1458275970ScyThe only way at present to recover from this condition is
1459275970Scyto restart the protocol at both the client and server.
1460275970ScyThis
1461275970Scyhappens automatically at the client when the association times out.
1462275970ScyIt will happen at the server only if the server operator cooperates.
1463275970Scy.Ss Access Control Commands
1464275970Scy.Bl -tag -width indent
1465275970Scy.It Xo Ic discard
1466275970Scy.Op Cm average Ar avg
1467275970Scy.Op Cm minimum Ar min
1468275970Scy.Op Cm monitor Ar prob
1469275970Scy.Xc
1470275970ScySet the parameters of the
1471275970Scy.Cm limited
1472275970Scyfacility which protects the server from
1473275970Scyclient abuse.
1474275970ScyThe
1475275970Scy.Cm average
1476275970Scysubcommand specifies the minimum average packet
1477275970Scyspacing, while the
1478275970Scy.Cm minimum
1479275970Scysubcommand specifies the minimum packet spacing.
1480275970ScyPackets that violate these minima are discarded
1481275970Scyand a kiss-o'-death packet returned if enabled.
1482275970ScyThe default
1483275970Scyminimum average and minimum are 5 and 2, respectively.
1484275970ScyThe monitor subcommand specifies the probability of discard
1485275970Scyfor packets that overflow the rate-control window.
1486275970Scy.It Xo Ic restrict address
1487275970Scy.Op Cm mask Ar mask
1488275970Scy.Op Ar flag ...
1489275970Scy.Xc
1490275970ScyThe
1491275970Scy.Ar address
1492275970Scyargument expressed in
1493275970Scydotted-quad form is the address of a host or network.
1494275970ScyAlternatively, the
1495275970Scy.Ar address
1496275970Scyargument can be a valid host DNS name.
1497275970ScyThe
1498275970Scy.Ar mask
1499275970Scyargument expressed in dotted-quad form defaults to
1500275970Scy.Cm 255.255.255.255 ,
1501275970Scymeaning that the
1502275970Scy.Ar address
1503275970Scyis treated as the address of an individual host.
1504275970ScyA default entry (address
1505275970Scy.Cm 0.0.0.0 ,
1506275970Scymask
1507275970Scy.Cm 0.0.0.0 )
1508275970Scyis always included and is always the first entry in the list.
1509275970ScyNote that text string
1510275970Scy.Cm default ,
1511275970Scywith no mask option, may
1512275970Scybe used to indicate the default entry.
1513275970ScyIn the current implementation,
1514275970Scy.Cm flag
1515275970Scyalways
1516275970Scyrestricts access, i.e., an entry with no flags indicates that free
1517275970Scyaccess to the server is to be given.
1518275970ScyThe flags are not orthogonal,
1519275970Scyin that more restrictive flags will often make less restrictive
1520275970Scyones redundant.
1521275970ScyThe flags can generally be classed into two
1522275970Scycategories, those which restrict time service and those which
1523275970Scyrestrict informational queries and attempts to do run-time
1524275970Scyreconfiguration of the server.
1525275970ScyOne or more of the following flags
1526275970Scymay be specified:
1527275970Scy.Bl -tag -width indent
1528275970Scy.It Cm ignore
1529275970ScyDeny packets of all kinds, including
1530275970Scy.Xr ntpq 1ntpqmdoc
1531275970Scyand
1532275970Scy.Xr ntpdc 1ntpdcmdoc
1533275970Scyqueries.
1534275970Scy.It Cm kod
1535275970ScyIf this flag is set when an access violation occurs, a kiss-o'-death
1536275970Scy(KoD) packet is sent.
1537275970ScyKoD packets are rate limited to no more than one
1538275970Scyper second.
1539275970ScyIf another KoD packet occurs within one second after the
1540275970Scylast one, the packet is dropped.
1541275970Scy.It Cm limited
1542275970ScyDeny service if the packet spacing violates the lower limits specified
1543275970Scyin the discard command.
1544275970ScyA history of clients is kept using the
1545275970Scymonitoring capability of
1546275970Scy.Xr ntpd 1ntpdmdoc .
1547275970ScyThus, monitoring is always active as
1548275970Scylong as there is a restriction entry with the
1549275970Scy.Cm limited
1550275970Scyflag.
1551275970Scy.It Cm lowpriotrap
1552275970ScyDeclare traps set by matching hosts to be low priority.
1553275970ScyThe
1554275970Scynumber of traps a server can maintain is limited (the current limit
1555275970Scyis 3).
1556275970ScyTraps are usually assigned on a first come, first served
1557275970Scybasis, with later trap requestors being denied service.
1558275970ScyThis flag
1559275970Scymodifies the assignment algorithm by allowing low priority traps to
1560275970Scybe overridden by later requests for normal priority traps.
1561275970Scy.It Cm nomodify
1562275970ScyDeny
1563275970Scy.Xr ntpq 1ntpqmdoc
1564275970Scyand
1565275970Scy.Xr ntpdc 1ntpdcmdoc
1566275970Scyqueries which attempt to modify the state of the
1567275970Scyserver (i.e., run time reconfiguration).
1568275970ScyQueries which return
1569275970Scyinformation are permitted.
1570275970Scy.It Cm noquery
1571275970ScyDeny
1572275970Scy.Xr ntpq 1ntpqmdoc
1573275970Scyand
1574275970Scy.Xr ntpdc 1ntpdcmdoc
1575275970Scyqueries.
1576275970ScyTime service is not affected.
1577275970Scy.It Cm nopeer
1578275970ScyDeny packets which would result in mobilizing a new association.
1579275970ScyThis
1580275970Scyincludes broadcast and symmetric active packets when a configured
1581275970Scyassociation does not exist.
1582275970ScyIt also includes
1583275970Scy.Cm pool
1584275970Scyassociations, so if you want to use servers from a 
1585275970Scy.Cm pool
1586275970Scydirective and also want to use
1587275970Scy.Cm nopeer
1588275970Scyby default, you'll want a
1589275970Scy.Cm "restrict source ..." line as well that does
1590275970Scy.It not
1591275970Scyinclude the
1592275970Scy.Cm nopeer
1593275970Scydirective.
1594275970Scy.It Cm noserve
1595275970ScyDeny all packets except
1596275970Scy.Xr ntpq 1ntpqmdoc
1597275970Scyand
1598275970Scy.Xr ntpdc 1ntpdcmdoc
1599275970Scyqueries.
1600275970Scy.It Cm notrap
1601275970ScyDecline to provide mode 6 control message trap service to matching
1602275970Scyhosts.
1603275970ScyThe trap service is a subsystem of the ntpdq control message
1604275970Scyprotocol which is intended for use by remote event logging programs.
1605275970Scy.It Cm notrust
1606275970ScyDeny service unless the packet is cryptographically authenticated.
1607275970Scy.It Cm ntpport
1608275970ScyThis is actually a match algorithm modifier, rather than a
1609275970Scyrestriction flag.
1610275970ScyIts presence causes the restriction entry to be
1611275970Scymatched only if the source port in the packet is the standard NTP
1612275970ScyUDP port (123).
1613275970ScyBoth
1614275970Scy.Cm ntpport
1615275970Scyand
1616275970Scy.Cm non-ntpport
1617275970Scymay
1618275970Scybe specified.
1619275970ScyThe
1620275970Scy.Cm ntpport
1621275970Scyis considered more specific and
1622275970Scyis sorted later in the list.
1623275970Scy.It Cm version
1624275970ScyDeny packets that do not match the current NTP version.
1625275970Scy.El
1626275970Scy.Pp
1627275970ScyDefault restriction list entries with the flags ignore, interface,
1628275970Scyntpport, for each of the local host's interface addresses are
1629275970Scyinserted into the table at startup to prevent the server
1630275970Scyfrom attempting to synchronize to its own time.
1631275970ScyA default entry is also always present, though if it is
1632275970Scyotherwise unconfigured; no flags are associated
1633275970Scywith the default entry (i.e., everything besides your own
1634275970ScyNTP server is unrestricted).
1635275970Scy.El
1636275970Scy.Sh Automatic NTP Configuration Options
1637275970Scy.Ss Manycasting
1638275970ScyManycasting is a automatic discovery and configuration paradigm
1639275970Scynew to NTPv4.
1640275970ScyIt is intended as a means for a multicast client
1641275970Scyto troll the nearby network neighborhood to find cooperating
1642275970Scymanycast servers, validate them using cryptographic means
1643275970Scyand evaluate their time values with respect to other servers
1644275970Scythat might be lurking in the vicinity.
1645275970ScyThe intended result is that each manycast client mobilizes
1646275970Scyclient associations with some number of the "best"
1647275970Scyof the nearby manycast servers, yet automatically reconfigures
1648275970Scyto sustain this number of servers should one or another fail.
1649275970Scy.Pp
1650275970ScyNote that the manycasting paradigm does not coincide
1651275970Scywith the anycast paradigm described in RFC-1546,
1652275970Scywhich is designed to find a single server from a clique
1653275970Scyof servers providing the same service.
1654275970ScyThe manycast paradigm is designed to find a plurality
1655275970Scyof redundant servers satisfying defined optimality criteria.
1656275970Scy.Pp
1657275970ScyManycasting can be used with either symmetric key
1658275970Scyor public key cryptography.
1659275970ScyThe public key infrastructure (PKI)
1660275970Scyoffers the best protection against compromised keys
1661275970Scyand is generally considered stronger, at least with relatively
1662275970Scylarge key sizes.
1663275970ScyIt is implemented using the Autokey protocol and
1664275970Scythe OpenSSL cryptographic library available from
1665275970Scy.Li http://www.openssl.org/ .
1666275970ScyThe library can also be used with other NTPv4 modes
1667275970Scyas well and is highly recommended, especially for broadcast modes.
1668275970Scy.Pp
1669275970ScyA persistent manycast client association is configured
1670275970Scyusing the manycastclient command, which is similar to the
1671275970Scyserver command but with a multicast (IPv4 class
1672275970Scy.Cm D
1673275970Scyor IPv6 prefix
1674275970Scy.Cm FF )
1675275970Scygroup address.
1676275970ScyThe IANA has designated IPv4 address 224.1.1.1
1677275970Scyand IPv6 address FF05::101 (site local) for NTP.
1678275970ScyWhen more servers are needed, it broadcasts manycast
1679275970Scyclient messages to this address at the minimum feasible rate
1680275970Scyand minimum feasible time-to-live (TTL) hops, depending
1681275970Scyon how many servers have already been found.
1682275970ScyThere can be as many manycast client associations
1683275970Scyas different group address, each one serving as a template
1684275970Scyfor a future ephemeral unicast client/server association.
1685275970Scy.Pp
1686275970ScyManycast servers configured with the
1687275970Scy.Ic manycastserver
1688275970Scycommand listen on the specified group address for manycast
1689275970Scyclient messages.
1690275970ScyNote the distinction between manycast client,
1691275970Scywhich actively broadcasts messages, and manycast server,
1692275970Scywhich passively responds to them.
1693275970ScyIf a manycast server is
1694275970Scyin scope of the current TTL and is itself synchronized
1695275970Scyto a valid source and operating at a stratum level equal
1696275970Scyto or lower than the manycast client, it replies to the
1697275970Scymanycast client message with an ordinary unicast server message.
1698275970Scy.Pp
1699275970ScyThe manycast client receiving this message mobilizes
1700275970Scyan ephemeral client/server association according to the
1701275970Scymatching manycast client template, but only if cryptographically
1702275970Scyauthenticated and the server stratum is less than or equal
1703275970Scyto the client stratum.
1704275970ScyAuthentication is explicitly required
1705275970Scyand either symmetric key or public key (Autokey) can be used.
1706275970ScyThen, the client polls the server at its unicast address
1707275970Scyin burst mode in order to reliably set the host clock
1708275970Scyand validate the source.
1709275970ScyThis normally results
1710275970Scyin a volley of eight client/server at 2-s intervals
1711275970Scyduring which both the synchronization and cryptographic
1712275970Scyprotocols run concurrently.
1713275970ScyFollowing the volley,
1714275970Scythe client runs the NTP intersection and clustering
1715275970Scyalgorithms, which act to discard all but the "best"
1716275970Scyassociations according to stratum and synchronization
1717275970Scydistance.
1718275970ScyThe surviving associations then continue
1719275970Scyin ordinary client/server mode.
1720275970Scy.Pp
1721275970ScyThe manycast client polling strategy is designed to reduce
1722275970Scyas much as possible the volume of manycast client messages
1723275970Scyand the effects of implosion due to near-simultaneous
1724275970Scyarrival of manycast server messages.
1725275970ScyThe strategy is determined by the
1726275970Scy.Ic manycastclient ,
1727275970Scy.Ic tos
1728275970Scyand
1729275970Scy.Ic ttl
1730275970Scyconfiguration commands.
1731275970ScyThe manycast poll interval is
1732275970Scynormally eight times the system poll interval,
1733275970Scywhich starts out at the
1734275970Scy.Cm minpoll
1735275970Scyvalue specified in the
1736275970Scy.Ic manycastclient ,
1737275970Scycommand and, under normal circumstances, increments to the
1738275970Scy.Cm maxpolll
1739275970Scyvalue specified in this command.
1740275970ScyInitially, the TTL is
1741275970Scyset at the minimum hops specified by the ttl command.
1742275970ScyAt each retransmission the TTL is increased until reaching
1743275970Scythe maximum hops specified by this command or a sufficient
1744275970Scynumber client associations have been found.
1745275970ScyFurther retransmissions use the same TTL.
1746275970Scy.Pp
1747275970ScyThe quality and reliability of the suite of associations
1748275970Scydiscovered by the manycast client is determined by the NTP
1749275970Scymitigation algorithms and the
1750275970Scy.Cm minclock
1751275970Scyand
1752275970Scy.Cm minsane
1753275970Scyvalues specified in the
1754275970Scy.Ic tos
1755275970Scyconfiguration command.
1756275970ScyAt least
1757275970Scy.Cm minsane
1758275970Scycandidate servers must be available and the mitigation
1759275970Scyalgorithms produce at least
1760275970Scy.Cm minclock
1761275970Scysurvivors in order to synchronize the clock.
1762275970ScyByzantine agreement principles require at least four
1763275970Scycandidates in order to correctly discard a single falseticker.
1764275970ScyFor legacy purposes,
1765275970Scy.Cm minsane
1766275970Scydefaults to 1 and
1767275970Scy.Cm minclock
1768275970Scydefaults to 3.
1769275970ScyFor manycast service
1770275970Scy.Cm minsane
1771275970Scyshould be explicitly set to 4, assuming at least that
1772275970Scynumber of servers are available.
1773275970Scy.Pp
1774275970ScyIf at least
1775275970Scy.Cm minclock
1776275970Scyservers are found, the manycast poll interval is immediately
1777275970Scyset to eight times
1778275970Scy.Cm maxpoll .
1779275970ScyIf less than
1780275970Scy.Cm minclock
1781275970Scyservers are found when the TTL has reached the maximum hops,
1782275970Scythe manycast poll interval is doubled.
1783275970ScyFor each transmission
1784275970Scyafter that, the poll interval is doubled again until
1785275970Scyreaching the maximum of eight times
1786275970Scy.Cm maxpoll .
1787275970ScyFurther transmissions use the same poll interval and
1788275970ScyTTL values.
1789275970ScyNote that while all this is going on,
1790275970Scyeach client/server association found is operating normally
1791275970Scyit the system poll interval.
1792275970Scy.Pp
1793275970ScyAdministratively scoped multicast boundaries are normally
1794275970Scyspecified by the network router configuration and,
1795275970Scyin the case of IPv6, the link/site scope prefix.
1796275970ScyBy default, the increment for TTL hops is 32 starting
1797275970Scyfrom 31; however, the
1798275970Scy.Ic ttl
1799275970Scyconfiguration command can be
1800275970Scyused to modify the values to match the scope rules.
1801275970Scy.Pp
1802275970ScyIt is often useful to narrow the range of acceptable
1803275970Scyservers which can be found by manycast client associations.
1804275970ScyBecause manycast servers respond only when the client
1805275970Scystratum is equal to or greater than the server stratum,
1806275970Scyprimary (stratum 1) servers fill find only primary servers
1807275970Scyin TTL range, which is probably the most common objective.
1808275970ScyHowever, unless configured otherwise, all manycast clients
1809275970Scyin TTL range will eventually find all primary servers
1810275970Scyin TTL range, which is probably not the most common
1811275970Scyobjective in large networks.
1812275970ScyThe
1813275970Scy.Ic tos
1814275970Scycommand can be used to modify this behavior.
1815275970ScyServers with stratum below
1816275970Scy.Cm floor
1817275970Scyor above
1818275970Scy.Cm ceiling
1819275970Scyspecified in the
1820275970Scy.Ic tos
1821275970Scycommand are strongly discouraged during the selection
1822275970Scyprocess; however, these servers may be temporally
1823275970Scyaccepted if the number of servers within TTL range is
1824275970Scyless than
1825275970Scy.Cm minclock .
1826275970Scy.Pp
1827275970ScyThe above actions occur for each manycast client message,
1828275970Scywhich repeats at the designated poll interval.
1829275970ScyHowever, once the ephemeral client association is mobilized,
1830275970Scysubsequent manycast server replies are discarded,
1831275970Scysince that would result in a duplicate association.
1832275970ScyIf during a poll interval the number of client associations
1833275970Scyfalls below
1834275970Scy.Cm minclock ,
1835275970Scyall manycast client prototype associations are reset
1836275970Scyto the initial poll interval and TTL hops and operation
1837275970Scyresumes from the beginning.
1838275970ScyIt is important to avoid
1839275970Scyfrequent manycast client messages, since each one requires
1840275970Scyall manycast servers in TTL range to respond.
1841275970ScyThe result could well be an implosion, either minor or major,
1842275970Scydepending on the number of servers in range.
1843275970ScyThe recommended value for
1844275970Scy.Cm maxpoll
1845275970Scyis 12 (4,096 s).
1846275970Scy.Pp
1847275970ScyIt is possible and frequently useful to configure a host
1848275970Scyas both manycast client and manycast server.
1849275970ScyA number of hosts configured this way and sharing a common
1850275970Scygroup address will automatically organize themselves
1851275970Scyin an optimum configuration based on stratum and
1852275970Scysynchronization distance.
1853275970ScyFor example, consider an NTP
1854275970Scysubnet of two primary servers and a hundred or more
1855275970Scydependent clients.
1856275970ScyWith two exceptions, all servers
1857275970Scyand clients have identical configuration files including both
1858275970Scy.Ic multicastclient
1859275970Scyand
1860275970Scy.Ic multicastserver
1861275970Scycommands using, for instance, multicast group address
1862275970Scy239.1.1.1.
1863275970ScyThe only exception is that each primary server
1864275970Scyconfiguration file must include commands for the primary
1865275970Scyreference source such as a GPS receiver.
1866275970Scy.Pp
1867275970ScyThe remaining configuration files for all secondary
1868275970Scyservers and clients have the same contents, except for the
1869275970Scy.Ic tos
1870275970Scycommand, which is specific for each stratum level.
1871275970ScyFor stratum 1 and stratum 2 servers, that command is
1872275970Scynot necessary.
1873275970ScyFor stratum 3 and above servers the
1874275970Scy.Cm floor
1875275970Scyvalue is set to the intended stratum number.
1876275970ScyThus, all stratum 3 configuration files are identical,
1877275970Scyall stratum 4 files are identical and so forth.
1878275970Scy.Pp
1879275970ScyOnce operations have stabilized in this scenario,
1880275970Scythe primary servers will find the primary reference source
1881275970Scyand each other, since they both operate at the same
1882275970Scystratum (1), but not with any secondary server or client,
1883275970Scysince these operate at a higher stratum.
1884275970ScyThe secondary
1885275970Scyservers will find the servers at the same stratum level.
1886275970ScyIf one of the primary servers loses its GPS receiver,
1887275970Scyit will continue to operate as a client and other clients
1888275970Scywill time out the corresponding association and
1889275970Scyre-associate accordingly.
1890275970Scy.Pp
1891275970ScySome administrators prefer to avoid running
1892275970Scy.Xr ntpd 1ntpdmdoc
1893275970Scycontinuously and run either
1894275970Scy.Xr ntpdate 8
1895275970Scyor
1896275970Scy.Xr ntpd 1ntpdmdoc
1897275970Scy.Fl q
1898275970Scyas a cron job.
1899275970ScyIn either case the servers must be
1900275970Scyconfigured in advance and the program fails if none are
1901275970Scyavailable when the cron job runs.
1902275970ScyA really slick
1903275970Scyapplication of manycast is with
1904275970Scy.Xr ntpd 1ntpdmdoc
1905275970Scy.Fl q .
1906275970ScyThe program wakes up, scans the local landscape looking
1907275970Scyfor the usual suspects, selects the best from among
1908275970Scythe rascals, sets the clock and then departs.
1909275970ScyServers do not have to be configured in advance and
1910275970Scyall clients throughout the network can have the same
1911275970Scyconfiguration file.
1912275970Scy.Ss Manycast Interactions with Autokey
1913275970ScyEach time a manycast client sends a client mode packet
1914275970Scyto a multicast group address, all manycast servers
1915275970Scyin scope generate a reply including the host name
1916275970Scyand status word.
1917275970ScyThe manycast clients then run
1918275970Scythe Autokey protocol, which collects and verifies
1919275970Scyall certificates involved.
1920275970ScyFollowing the burst interval
1921275970Scyall but three survivors are cast off,
1922275970Scybut the certificates remain in the local cache.
1923275970ScyIt often happens that several complete signing trails
1924275970Scyfrom the client to the primary servers are collected in this way.
1925275970Scy.Pp
1926275970ScyAbout once an hour or less often if the poll interval
1927275970Scyexceeds this, the client regenerates the Autokey key list.
1928275970ScyThis is in general transparent in client/server mode.
1929275970ScyHowever, about once per day the server private value
1930275970Scyused to generate cookies is refreshed along with all
1931275970Scymanycast client associations.
1932275970ScyIn this case all
1933275970Scycryptographic values including certificates is refreshed.
1934275970ScyIf a new certificate has been generated since
1935275970Scythe last refresh epoch, it will automatically revoke
1936275970Scyall prior certificates that happen to be in the
1937275970Scycertificate cache.
1938275970ScyAt the same time, the manycast
1939275970Scyscheme starts all over from the beginning and
1940275970Scythe expanding ring shrinks to the minimum and increments
1941275970Scyfrom there while collecting all servers in scope.
1942275970Scy.Ss Manycast Options
1943275970Scy.Bl -tag -width indent
1944275970Scy.It Xo Ic tos
1945275970Scy.Oo
1946275970Scy.Cm ceiling Ar ceiling |
1947275970Scy.Cm cohort { 0 | 1 } |
1948275970Scy.Cm floor Ar floor |
1949275970Scy.Cm minclock Ar minclock |
1950275970Scy.Cm minsane Ar minsane
1951275970Scy.Oc
1952275970Scy.Xc
1953275970ScyThis command affects the clock selection and clustering
1954275970Scyalgorithms.
1955275970ScyIt can be used to select the quality and
1956275970Scyquantity of peers used to synchronize the system clock
1957275970Scyand is most useful in manycast mode.
1958275970ScyThe variables operate
1959275970Scyas follows:
1960275970Scy.Bl -tag -width indent
1961275970Scy.It Cm ceiling Ar ceiling
1962275970ScyPeers with strata above
1963275970Scy.Cm ceiling
1964275970Scywill be discarded if there are at least
1965275970Scy.Cm minclock
1966275970Scypeers remaining.
1967275970ScyThis value defaults to 15, but can be changed
1968275970Scyto any number from 1 to 15.
1969275970Scy.It Cm cohort Bro 0 | 1 Brc
1970275970ScyThis is a binary flag which enables (0) or disables (1)
1971275970Scymanycast server replies to manycast clients with the same
1972275970Scystratum level.
1973275970ScyThis is useful to reduce implosions where
1974275970Scylarge numbers of clients with the same stratum level
1975275970Scyare present.
1976275970ScyThe default is to enable these replies.
1977275970Scy.It Cm floor Ar floor
1978275970ScyPeers with strata below
1979275970Scy.Cm floor
1980275970Scywill be discarded if there are at least
1981275970Scy.Cm minclock
1982275970Scypeers remaining.
1983275970ScyThis value defaults to 1, but can be changed
1984275970Scyto any number from 1 to 15.
1985275970Scy.It Cm minclock Ar minclock
1986275970ScyThe clustering algorithm repeatedly casts out outlyer
1987275970Scyassociations until no more than
1988275970Scy.Cm minclock
1989275970Scyassociations remain.
1990275970ScyThis value defaults to 3,
1991275970Scybut can be changed to any number from 1 to the number of
1992275970Scyconfigured sources.
1993275970Scy.It Cm minsane Ar minsane
1994275970ScyThis is the minimum number of candidates available
1995275970Scyto the clock selection algorithm in order to produce
1996275970Scyone or more truechimers for the clustering algorithm.
1997275970ScyIf fewer than this number are available, the clock is
1998275970Scyundisciplined and allowed to run free.
1999275970ScyThe default is 1
2000275970Scyfor legacy purposes.
2001275970ScyHowever, according to principles of
2002275970ScyByzantine agreement,
2003275970Scy.Cm minsane
2004275970Scyshould be at least 4 in order to detect and discard
2005275970Scya single falseticker.
2006275970Scy.El
2007275970Scy.It Cm ttl Ar hop ...
2008275970ScyThis command specifies a list of TTL values in increasing
2009275970Scyorder, up to 8 values can be specified.
2010275970ScyIn manycast mode these values are used in turn
2011275970Scyin an expanding-ring search.
2012275970ScyThe default is eight
2013275970Scymultiples of 32 starting at 31.
2014275970Scy.El
2015275970Scy.Sh Reference Clock Support
2016275970ScyThe NTP Version 4 daemon supports some three dozen different radio,
2017275970Scysatellite and modem reference clocks plus a special pseudo-clock
2018275970Scyused for backup or when no other clock source is available.
2019275970ScyDetailed descriptions of individual device drivers and options can
2020275970Scybe found in the
2021275970Scy.Qq Reference Clock Drivers
2022275970Scypage
2023275970Scy(available as part of the HTML documentation
2024275970Scyprovided in
2025275970Scy.Pa /usr/share/doc/ntp ) .
2026275970ScyAdditional information can be found in the pages linked
2027275970Scythere, including the
2028275970Scy.Qq Debugging Hints for Reference Clock Drivers
2029275970Scyand
2030275970Scy.Qq How To Write a Reference Clock Driver
2031275970Scypages
2032275970Scy(available as part of the HTML documentation
2033275970Scyprovided in
2034275970Scy.Pa /usr/share/doc/ntp ) .
2035275970ScyIn addition, support for a PPS
2036275970Scysignal is available as described in the
2037275970Scy.Qq Pulse-per-second (PPS) Signal Interfacing
2038275970Scypage
2039275970Scy(available as part of the HTML documentation
2040275970Scyprovided in
2041275970Scy.Pa /usr/share/doc/ntp ) .
2042275970ScyMany
2043275970Scydrivers support special line discipline/streams modules which can
2044275970Scysignificantly improve the accuracy using the driver.
2045275970ScyThese are
2046275970Scydescribed in the
2047275970Scy.Qq Line Disciplines and Streams Drivers
2048275970Scypage
2049275970Scy(available as part of the HTML documentation
2050275970Scyprovided in
2051275970Scy.Pa /usr/share/doc/ntp ) .
2052275970Scy.Pp
2053275970ScyA reference clock will generally (though not always) be a radio
2054275970Scytimecode receiver which is synchronized to a source of standard
2055275970Scytime such as the services offered by the NRC in Canada and NIST and
2056275970ScyUSNO in the US.
2057275970ScyThe interface between the computer and the timecode
2058275970Scyreceiver is device dependent, but is usually a serial port.
2059275970ScyA
2060275970Scydevice driver specific to each reference clock must be selected and
2061275970Scycompiled in the distribution; however, most common radio, satellite
2062275970Scyand modem clocks are included by default.
2063275970ScyNote that an attempt to
2064275970Scyconfigure a reference clock when the driver has not been compiled
2065275970Scyor the hardware port has not been appropriately configured results
2066275970Scyin a scalding remark to the system log file, but is otherwise non
2067275970Scyhazardous.
2068275970Scy.Pp
2069275970ScyFor the purposes of configuration,
2070275970Scy.Xr ntpd 1ntpdmdoc
2071275970Scytreats
2072275970Scyreference clocks in a manner analogous to normal NTP peers as much
2073275970Scyas possible.
2074275970ScyReference clocks are identified by a syntactically
2075275970Scycorrect but invalid IP address, in order to distinguish them from
2076275970Scynormal NTP peers.
2077275970ScyReference clock addresses are of the form
2078275970Scy.Sm off
2079275970Scy.Li 127.127. Ar t . Ar u ,
2080275970Scy.Sm on
2081275970Scywhere
2082275970Scy.Ar t
2083275970Scyis an integer
2084275970Scydenoting the clock type and
2085275970Scy.Ar u
2086275970Scyindicates the unit
2087275970Scynumber in the range 0-3.
2088275970ScyWhile it may seem overkill, it is in fact
2089275970Scysometimes useful to configure multiple reference clocks of the same
2090275970Scytype, in which case the unit numbers must be unique.
2091275970Scy.Pp
2092275970ScyThe
2093275970Scy.Ic server
2094275970Scycommand is used to configure a reference
2095275970Scyclock, where the
2096275970Scy.Ar address
2097275970Scyargument in that command
2098275970Scyis the clock address.
2099275970ScyThe
2100275970Scy.Cm key ,
2101275970Scy.Cm version
2102275970Scyand
2103275970Scy.Cm ttl
2104275970Scyoptions are not used for reference clock support.
2105275970ScyThe
2106275970Scy.Cm mode
2107275970Scyoption is added for reference clock support, as
2108275970Scydescribed below.
2109275970ScyThe
2110275970Scy.Cm prefer
2111275970Scyoption can be useful to
2112275970Scypersuade the server to cherish a reference clock with somewhat more
2113275970Scyenthusiasm than other reference clocks or peers.
2114275970ScyFurther
2115275970Scyinformation on this option can be found in the
2116275970Scy.Qq Mitigation Rules and the prefer Keyword
2117275970Scy(available as part of the HTML documentation
2118275970Scyprovided in
2119275970Scy.Pa /usr/share/doc/ntp )
2120275970Scypage.
2121275970ScyThe
2122275970Scy.Cm minpoll
2123275970Scyand
2124275970Scy.Cm maxpoll
2125275970Scyoptions have
2126275970Scymeaning only for selected clock drivers.
2127275970ScySee the individual clock
2128275970Scydriver document pages for additional information.
2129275970Scy.Pp
2130275970ScyThe
2131275970Scy.Ic fudge
2132275970Scycommand is used to provide additional
2133275970Scyinformation for individual clock drivers and normally follows
2134275970Scyimmediately after the
2135275970Scy.Ic server
2136275970Scycommand.
2137275970ScyThe
2138275970Scy.Ar address
2139275970Scyargument specifies the clock address.
2140275970ScyThe
2141275970Scy.Cm refid
2142275970Scyand
2143275970Scy.Cm stratum
2144275970Scyoptions can be used to
2145275970Scyoverride the defaults for the device.
2146275970ScyThere are two optional
2147275970Scydevice-dependent time offsets and four flags that can be included
2148275970Scyin the
2149275970Scy.Ic fudge
2150275970Scycommand as well.
2151275970Scy.Pp
2152275970ScyThe stratum number of a reference clock is by default zero.
2153275970ScySince the
2154275970Scy.Xr ntpd 1ntpdmdoc
2155275970Scydaemon adds one to the stratum of each
2156275970Scypeer, a primary server ordinarily displays an external stratum of
2157275970Scyone.
2158275970ScyIn order to provide engineered backups, it is often useful to
2159275970Scyspecify the reference clock stratum as greater than zero.
2160275970ScyThe
2161275970Scy.Cm stratum
2162275970Scyoption is used for this purpose.
2163275970ScyAlso, in cases
2164275970Scyinvolving both a reference clock and a pulse-per-second (PPS)
2165275970Scydiscipline signal, it is useful to specify the reference clock
2166275970Scyidentifier as other than the default, depending on the driver.
2167275970ScyThe
2168275970Scy.Cm refid
2169275970Scyoption is used for this purpose.
2170275970ScyExcept where noted,
2171275970Scythese options apply to all clock drivers.
2172275970Scy.Ss Reference Clock Commands
2173275970Scy.Bl -tag -width indent
2174275970Scy.It Xo Ic server
2175275970Scy.Sm off
2176275970Scy.Li 127.127. Ar t . Ar u
2177275970Scy.Sm on
2178275970Scy.Op Cm prefer
2179275970Scy.Op Cm mode Ar int
2180275970Scy.Op Cm minpoll Ar int
2181275970Scy.Op Cm maxpoll Ar int
2182275970Scy.Xc
2183275970ScyThis command can be used to configure reference clocks in
2184275970Scyspecial ways.
2185275970ScyThe options are interpreted as follows:
2186275970Scy.Bl -tag -width indent
2187275970Scy.It Cm prefer
2188275970ScyMarks the reference clock as preferred.
2189275970ScyAll other things being
2190275970Scyequal, this host will be chosen for synchronization among a set of
2191275970Scycorrectly operating hosts.
2192275970ScySee the
2193275970Scy.Qq Mitigation Rules and the prefer Keyword
2194275970Scypage
2195275970Scy(available as part of the HTML documentation
2196275970Scyprovided in
2197275970Scy.Pa /usr/share/doc/ntp )
2198275970Scyfor further information.
2199275970Scy.It Cm mode Ar int
2200275970ScySpecifies a mode number which is interpreted in a
2201275970Scydevice-specific fashion.
2202275970ScyFor instance, it selects a dialing
2203275970Scyprotocol in the ACTS driver and a device subtype in the
2204275970Scyparse
2205275970Scydrivers.
2206275970Scy.It Cm minpoll Ar int
2207275970Scy.It Cm maxpoll Ar int
2208275970ScyThese options specify the minimum and maximum polling interval
2209275970Scyfor reference clock messages, as a power of 2 in seconds
2210275970ScyFor
2211275970Scymost directly connected reference clocks, both
2212275970Scy.Cm minpoll
2213275970Scyand
2214275970Scy.Cm maxpoll
2215275970Scydefault to 6 (64 s).
2216275970ScyFor modem reference clocks,
2217275970Scy.Cm minpoll
2218275970Scydefaults to 10 (17.1 m) and
2219275970Scy.Cm maxpoll
2220275970Scydefaults to 14 (4.5 h).
2221275970ScyThe allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
2222275970Scy.El
2223275970Scy.It Xo Ic fudge
2224275970Scy.Sm off
2225275970Scy.Li 127.127. Ar t . Ar u
2226275970Scy.Sm on
2227275970Scy.Op Cm time1 Ar sec
2228275970Scy.Op Cm time2 Ar sec
2229275970Scy.Op Cm stratum Ar int
2230275970Scy.Op Cm refid Ar string
2231275970Scy.Op Cm mode Ar int
2232275970Scy.Op Cm flag1 Cm 0 \&| Cm 1
2233275970Scy.Op Cm flag2 Cm 0 \&| Cm 1
2234275970Scy.Op Cm flag3 Cm 0 \&| Cm 1
2235275970Scy.Op Cm flag4 Cm 0 \&| Cm 1
2236275970Scy.Xc
2237275970ScyThis command can be used to configure reference clocks in
2238275970Scyspecial ways.
2239275970ScyIt must immediately follow the
2240275970Scy.Ic server
2241275970Scycommand which configures the driver.
2242275970ScyNote that the same capability
2243275970Scyis possible at run time using the
2244275970Scy.Xr ntpdc 1ntpdcmdoc
2245275970Scyprogram.
2246275970ScyThe options are interpreted as
2247275970Scyfollows:
2248275970Scy.Bl -tag -width indent
2249275970Scy.It Cm time1 Ar sec
2250275970ScySpecifies a constant to be added to the time offset produced by
2251275970Scythe driver, a fixed-point decimal number in seconds.
2252275970ScyThis is used
2253275970Scyas a calibration constant to adjust the nominal time offset of a
2254275970Scyparticular clock to agree with an external standard, such as a
2255275970Scyprecision PPS signal.
2256275970ScyIt also provides a way to correct a
2257275970Scysystematic error or bias due to serial port or operating system
2258275970Scylatencies, different cable lengths or receiver internal delay.
2259275970ScyThe
2260275970Scyspecified offset is in addition to the propagation delay provided
2261275970Scyby other means, such as internal DIPswitches.
2262275970ScyWhere a calibration
2263275970Scyfor an individual system and driver is available, an approximate
2264275970Scycorrection is noted in the driver documentation pages.
2265275970ScyNote: in order to facilitate calibration when more than one
2266275970Scyradio clock or PPS signal is supported, a special calibration
2267275970Scyfeature is available.
2268275970ScyIt takes the form of an argument to the
2269275970Scy.Ic enable
2270275970Scycommand described in
2271275970Scy.Sx Miscellaneous Options
2272275970Scypage and operates as described in the
2273275970Scy.Qq Reference Clock Drivers
2274275970Scypage
2275275970Scy(available as part of the HTML documentation
2276275970Scyprovided in
2277275970Scy.Pa /usr/share/doc/ntp ) .
2278275970Scy.It Cm time2 Ar secs
2279275970ScySpecifies a fixed-point decimal number in seconds, which is
2280275970Scyinterpreted in a driver-dependent way.
2281275970ScySee the descriptions of
2282275970Scyspecific drivers in the
2283275970Scy.Qq Reference Clock Drivers
2284275970Scypage
2285275970Scy(available as part of the HTML documentation
2286275970Scyprovided in
2287275970Scy.Pa /usr/share/doc/ntp ) .
2288275970Scy.It Cm stratum Ar int
2289275970ScySpecifies the stratum number assigned to the driver, an integer
2290275970Scybetween 0 and 15.
2291275970ScyThis number overrides the default stratum number
2292275970Scyordinarily assigned by the driver itself, usually zero.
2293275970Scy.It Cm refid Ar string
2294275970ScySpecifies an ASCII string of from one to four characters which
2295275970Scydefines the reference identifier used by the driver.
2296275970ScyThis string
2297275970Scyoverrides the default identifier ordinarily assigned by the driver
2298275970Scyitself.
2299275970Scy.It Cm mode Ar int
2300275970ScySpecifies a mode number which is interpreted in a
2301275970Scydevice-specific fashion.
2302275970ScyFor instance, it selects a dialing
2303275970Scyprotocol in the ACTS driver and a device subtype in the
2304275970Scyparse
2305275970Scydrivers.
2306275970Scy.It Cm flag1 Cm 0 \&| Cm 1
2307275970Scy.It Cm flag2 Cm 0 \&| Cm 1
2308275970Scy.It Cm flag3 Cm 0 \&| Cm 1
2309275970Scy.It Cm flag4 Cm 0 \&| Cm 1
2310275970ScyThese four flags are used for customizing the clock driver.
2311275970ScyThe
2312275970Scyinterpretation of these values, and whether they are used at all,
2313275970Scyis a function of the particular clock driver.
2314275970ScyHowever, by
2315275970Scyconvention
2316275970Scy.Cm flag4
2317275970Scyis used to enable recording monitoring
2318275970Scydata to the
2319275970Scy.Cm clockstats
2320275970Scyfile configured with the
2321275970Scy.Ic filegen
2322275970Scycommand.
2323275970ScyFurther information on the
2324275970Scy.Ic filegen
2325275970Scycommand can be found in
2326275970Scy.Sx Monitoring Options .
2327275970Scy.El
2328275970Scy.El
2329275970Scy.Sh Miscellaneous Options
2330275970Scy.Bl -tag -width indent
2331275970Scy.It Ic broadcastdelay Ar seconds
2332275970ScyThe broadcast and multicast modes require a special calibration
2333275970Scyto determine the network delay between the local and remote
2334275970Scyservers.
2335275970ScyOrdinarily, this is done automatically by the initial
2336275970Scyprotocol exchanges between the client and server.
2337275970ScyIn some cases,
2338275970Scythe calibration procedure may fail due to network or server access
2339275970Scycontrols, for example.
2340275970ScyThis command specifies the default delay to
2341275970Scybe used under these circumstances.
2342275970ScyTypically (for Ethernet), a
2343275970Scynumber between 0.003 and 0.007 seconds is appropriate.
2344275970ScyThe default
2345275970Scywhen this command is not used is 0.004 seconds.
2346275970Scy.It Ic calldelay Ar delay
2347275970ScyThis option controls the delay in seconds between the first and second
2348275970Scypackets sent in burst or iburst mode to allow additional time for a modem
2349275970Scyor ISDN call to complete.
2350275970Scy.It Ic driftfile Ar driftfile
2351275970ScyThis command specifies the complete path and name of the file used to
2352275970Scyrecord the frequency of the local clock oscillator.
2353275970ScyThis is the same
2354275970Scyoperation as the
2355275970Scy.Fl f
2356275970Scycommand line option.
2357275970ScyIf the file exists, it is read at
2358275970Scystartup in order to set the initial frequency and then updated once per
2359275970Scyhour with the current frequency computed by the daemon.
2360275970ScyIf the file name is
2361275970Scyspecified, but the file itself does not exist, the starts with an initial
2362275970Scyfrequency of zero and creates the file when writing it for the first time.
2363275970ScyIf this command is not given, the daemon will always start with an initial
2364275970Scyfrequency of zero.
2365275970Scy.Pp
2366275970ScyThe file format consists of a single line containing a single
2367275970Scyfloating point number, which records the frequency offset measured
2368275970Scyin parts-per-million (PPM).
2369275970ScyThe file is updated by first writing
2370275970Scythe current drift value into a temporary file and then renaming
2371275970Scythis file to replace the old version.
2372275970ScyThis implies that
2373275970Scy.Xr ntpd 1ntpdmdoc
2374275970Scymust have write permission for the directory the
2375275970Scydrift file is located in, and that file system links, symbolic or
2376275970Scyotherwise, should be avoided.
2377275970Scy.It Xo Ic enable
2378275970Scy.Oo
2379275970Scy.Cm auth | Cm bclient |
2380275970Scy.Cm calibrate | Cm kernel |
2381275970Scy.Cm mode7 | monitor |
2382275970Scy.Cm ntp | Cm stats
2383275970Scy.Oc
2384275970Scy.Xc
2385275970Scy.It Xo Ic disable
2386275970Scy.Oo
2387275970Scy.Cm auth | Cm bclient |
2388275970Scy.Cm calibrate | Cm kernel |
2389275970Scy.Cm mode7 | monitor |
2390275970Scy.Cm ntp | Cm stats
2391275970Scy.Oc
2392275970Scy.Xc
2393275970ScyProvides a way to enable or disable various server options.
2394275970ScyFlags not mentioned are unaffected.
2395275970ScyNote that all of these flags
2396275970Scycan be controlled remotely using the
2397275970Scy.Xr ntpdc 1ntpdcmdoc
2398275970Scyutility program.
2399275970Scy.Bl -tag -width indent
2400275970Scy.It Cm auth
2401275970ScyEnables the server to synchronize with unconfigured peers only if the
2402275970Scypeer has been correctly authenticated using either public key or
2403275970Scyprivate key cryptography.
2404275970ScyThe default for this flag is
2405275970Scy.Ic enable .
2406275970Scy.It Cm bclient
2407275970ScyEnables the server to listen for a message from a broadcast or
2408275970Scymulticast server, as in the
2409275970Scy.Ic multicastclient
2410275970Scycommand with default
2411275970Scyaddress.
2412275970ScyThe default for this flag is
2413275970Scy.Ic disable .
2414275970Scy.It Cm calibrate
2415275970ScyEnables the calibrate feature for reference clocks.
2416275970ScyThe default for
2417275970Scythis flag is
2418275970Scy.Ic disable .
2419275970Scy.It Cm kernel
2420275970ScyEnables the kernel time discipline, if available.
2421275970ScyThe default for this
2422275970Scyflag is
2423275970Scy.Ic enable
2424275970Scyif support is available, otherwise
2425275970Scy.Ic disable .
2426275970Scy.It Cm mode7
2427275970ScyEnables processing of NTP mode 7 implementation-specific requests
2428275970Scywhich are used by the deprecated
2429275970Scy.Xr ntpdc 1ntpdcmdoc
2430275970Scyprogram.
2431275970ScyThe default for this flag is disable.
2432275970ScyThis flag is excluded from runtime configuration using
2433275970Scy.Xr ntpq 1ntpqmdoc .
2434275970ScyThe
2435275970Scy.Xr ntpq 1ntpqmdoc
2436275970Scyprogram provides the same capabilities as
2437275970Scy.Xr ntpdc 1ntpdcmdoc
2438275970Scyusing standard mode 6 requests.
2439275970Scy.It Cm monitor
2440275970ScyEnables the monitoring facility.
2441275970ScySee the
2442275970Scy.Xr ntpdc 1ntpdcmdoc
2443275970Scyprogram
2444275970Scyand the
2445275970Scy.Ic monlist
2446275970Scycommand or further information.
2447275970ScyThe
2448275970Scydefault for this flag is
2449275970Scy.Ic enable .
2450275970Scy.It Cm ntp
2451275970ScyEnables time and frequency discipline.
2452275970ScyIn effect, this switch opens and
2453275970Scycloses the feedback loop, which is useful for testing.
2454275970ScyThe default for
2455275970Scythis flag is
2456275970Scy.Ic enable .
2457275970Scy.It Cm stats
2458275970ScyEnables the statistics facility.
2459275970ScySee the
2460275970Scy.Sx Monitoring Options
2461275970Scysection for further information.
2462275970ScyThe default for this flag is
2463275970Scy.Ic disable .
2464275970Scy.El
2465275970Scy.It Ic includefile Ar includefile
2466275970ScyThis command allows additional configuration commands
2467275970Scyto be included from a separate file.
2468275970ScyInclude files may
2469275970Scybe nested to a depth of five; upon reaching the end of any
2470275970Scyinclude file, command processing resumes in the previous
2471275970Scyconfiguration file.
2472275970ScyThis option is useful for sites that run
2473275970Scy.Xr ntpd 1ntpdmdoc
2474275970Scyon multiple hosts, with (mostly) common options (e.g., a
2475275970Scyrestriction list).
2476275970Scy.It Ic logconfig Ar configkeyword
2477275970ScyThis command controls the amount and type of output written to
2478275970Scythe system
2479275970Scy.Xr syslog 3
2480275970Scyfacility or the alternate
2481275970Scy.Ic logfile
2482275970Scylog file.
2483275970ScyBy default, all output is turned on.
2484275970ScyAll
2485275970Scy.Ar configkeyword
2486275970Scykeywords can be prefixed with
2487275970Scy.Ql = ,
2488275970Scy.Ql +
2489275970Scyand
2490275970Scy.Ql - ,
2491275970Scywhere
2492275970Scy.Ql =
2493275970Scysets the
2494275970Scy.Xr syslog 3
2495275970Scypriority mask,
2496275970Scy.Ql +
2497275970Scyadds and
2498275970Scy.Ql -
2499275970Scyremoves
2500275970Scymessages.
2501275970Scy.Xr syslog 3
2502275970Scymessages can be controlled in four
2503275970Scyclasses
2504275970Scy.Po
2505275970Scy.Cm clock ,
2506275970Scy.Cm peer ,
2507275970Scy.Cm sys
2508275970Scyand
2509275970Scy.Cm sync
2510275970Scy.Pc .
2511275970ScyWithin these classes four types of messages can be
2512275970Scycontrolled: informational messages
2513275970Scy.Po
2514275970Scy.Cm info
2515275970Scy.Pc ,
2516275970Scyevent messages
2517275970Scy.Po
2518275970Scy.Cm events
2519275970Scy.Pc ,
2520275970Scystatistics messages
2521275970Scy.Po
2522275970Scy.Cm statistics
2523275970Scy.Pc
2524275970Scyand
2525275970Scystatus messages
2526275970Scy.Po
2527275970Scy.Cm status
2528275970Scy.Pc .
2529275970Scy.Pp
2530275970ScyConfiguration keywords are formed by concatenating the message class with
2531275970Scythe event class.
2532275970ScyThe
2533275970Scy.Cm all
2534275970Scyprefix can be used instead of a message class.
2535275970ScyA
2536275970Scymessage class may also be followed by the
2537275970Scy.Cm all
2538275970Scykeyword to enable/disable all
2539275970Scymessages of the respective message class.Thus, a minimal log configuration
2540275970Scycould look like this:
2541275970Scy.Bd -literal
2542275970Scylogconfig =syncstatus +sysevents
2543275970Scy.Ed
2544275970Scy.Pp
2545275970ScyThis would just list the synchronizations state of
2546275970Scy.Xr ntpd 1ntpdmdoc
2547275970Scyand the major system events.
2548275970ScyFor a simple reference server, the
2549275970Scyfollowing minimum message configuration could be useful:
2550275970Scy.Bd -literal
2551275970Scylogconfig =syncall +clockall
2552275970Scy.Ed
2553275970Scy.Pp
2554275970ScyThis configuration will list all clock information and
2555275970Scysynchronization information.
2556275970ScyAll other events and messages about
2557275970Scypeers, system events and so on is suppressed.
2558275970Scy.It Ic logfile Ar logfile
2559275970ScyThis command specifies the location of an alternate log file to
2560275970Scybe used instead of the default system
2561275970Scy.Xr syslog 3
2562275970Scyfacility.
2563275970ScyThis is the same operation as the -l command line option.
2564275970Scy.It Ic setvar Ar variable Op Cm default
2565275970ScyThis command adds an additional system variable.
2566275970ScyThese
2567275970Scyvariables can be used to distribute additional information such as
2568275970Scythe access policy.
2569275970ScyIf the variable of the form
2570275970Scy.Sm off
2571275970Scy.Va name = Ar value
2572275970Scy.Sm on
2573275970Scyis followed by the
2574275970Scy.Cm default
2575275970Scykeyword, the
2576275970Scyvariable will be listed as part of the default system variables
2577275970Scy.Po
2578275970Scy.Xr ntpq 1ntpqmdoc
2579275970Scy.Ic rv
2580275970Scycommand
2581275970Scy.Pc ) .
2582275970ScyThese additional variables serve
2583275970Scyinformational purposes only.
2584275970ScyThey are not related to the protocol
2585275970Scyother that they can be listed.
2586275970ScyThe known protocol variables will
2587275970Scyalways override any variables defined via the
2588275970Scy.Ic setvar
2589275970Scymechanism.
2590275970ScyThere are three special variables that contain the names
2591275970Scyof all variable of the same group.
2592275970ScyThe
2593275970Scy.Va sys_var_list
2594275970Scyholds
2595275970Scythe names of all system variables.
2596275970ScyThe
2597275970Scy.Va peer_var_list
2598275970Scyholds
2599275970Scythe names of all peer variables and the
2600275970Scy.Va clock_var_list
2601275970Scyholds the names of the reference clock variables.
2602275970Scy.It Xo Ic tinker
2603275970Scy.Oo
2604275970Scy.Cm allan Ar allan |
2605275970Scy.Cm dispersion Ar dispersion |
2606275970Scy.Cm freq Ar freq |
2607275970Scy.Cm huffpuff Ar huffpuff |
2608275970Scy.Cm panic Ar panic |
2609275970Scy.Cm step Ar srep |
2610275970Scy.Cm stepout Ar stepout
2611275970Scy.Oc
2612275970Scy.Xc
2613275970ScyThis command can be used to alter several system variables in
2614275970Scyvery exceptional circumstances.
2615275970ScyIt should occur in the
2616275970Scyconfiguration file before any other configuration options.
2617275970ScyThe
2618275970Scydefault values of these variables have been carefully optimized for
2619275970Scya wide range of network speeds and reliability expectations.
2620275970ScyIn
2621275970Scygeneral, they interact in intricate ways that are hard to predict
2622275970Scyand some combinations can result in some very nasty behavior.
2623275970ScyVery
2624275970Scyrarely is it necessary to change the default values; but, some
2625275970Scyfolks cannot resist twisting the knobs anyway and this command is
2626275970Scyfor them.
2627275970ScyEmphasis added: twisters are on their own and can expect
2628275970Scyno help from the support group.
2629275970Scy.Pp
2630275970ScyThe variables operate as follows:
2631275970Scy.Bl -tag -width indent
2632275970Scy.It Cm allan Ar allan
2633275970ScyThe argument becomes the new value for the minimum Allan
2634275970Scyintercept, which is a parameter of the PLL/FLL clock discipline
2635275970Scyalgorithm.
2636275970ScyThe value in log2 seconds defaults to 7 (1024 s), which is also the lower
2637275970Scylimit.
2638275970Scy.It Cm dispersion Ar dispersion
2639275970ScyThe argument becomes the new value for the dispersion increase rate,
2640275970Scynormally .000015 s/s.
2641275970Scy.It Cm freq Ar freq
2642275970ScyThe argument becomes the initial value of the frequency offset in
2643275970Scyparts-per-million.
2644275970ScyThis overrides the value in the frequency file, if
2645275970Scypresent, and avoids the initial training state if it is not.
2646275970Scy.It Cm huffpuff Ar huffpuff
2647275970ScyThe argument becomes the new value for the experimental
2648275970Scyhuff-n'-puff filter span, which determines the most recent interval
2649275970Scythe algorithm will search for a minimum delay.
2650275970ScyThe lower limit is
2651275970Scy900 s (15 m), but a more reasonable value is 7200 (2 hours).
2652275970ScyThere
2653275970Scyis no default, since the filter is not enabled unless this command
2654275970Scyis given.
2655275970Scy.It Cm panic Ar panic
2656275970ScyThe argument is the panic threshold, normally 1000 s.
2657275970ScyIf set to zero,
2658275970Scythe panic sanity check is disabled and a clock offset of any value will
2659275970Scybe accepted.
2660275970Scy.It Cm step Ar step
2661275970ScyThe argument is the step threshold, which by default is 0.128 s.
2662275970ScyIt can
2663275970Scybe set to any positive number in seconds.
2664275970ScyIf set to zero, step
2665275970Scyadjustments will never occur.
2666275970ScyNote: The kernel time discipline is
2667275970Scydisabled if the step threshold is set to zero or greater than the
2668275970Scydefault.
2669275970Scy.It Cm stepout Ar stepout
2670275970ScyThe argument is the stepout timeout, which by default is 900 s.
2671275970ScyIt can
2672275970Scybe set to any positive number in seconds.
2673275970ScyIf set to zero, the stepout
2674275970Scypulses will not be suppressed.
2675275970Scy.El
2676275970Scy.It Xo Ic rlimit
2677275970Scy.Oo
2678275970Scy.Cm memlock Ar Nmegabytes |
2679275970Scy.Cm stacksize Ar N4kPages
2680275970Scy.Cm filenum Ar Nfiledescriptors
2681275970Scy.Oc
2682275970Scy.Xc
2683275970Scy.Bl -tag -width indent
2684275970Scy.It Cm memlock Ar Nmegabytes
2685275970ScySpecify the number of megabytes of memory that can be allocated.
2686275970ScyProbably only available under Linux, this option is useful
2687275970Scywhen dropping root (the
2688275970Scy.Fl i
2689275970Scyoption).
2690275970ScyThe default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.
2691275970Scy.It Cm stacksize Ar N4kPages
2692275970ScySpecifies the maximum size of the process stack on systems with the
2693275970Scy.It Cm filenum Ar Nfiledescriptors
2694275970ScySpecifies the maximum number of file descriptors ntpd may have open at once. Defaults to the system default.
2695275970Scy.Fn mlockall
2696275970Scyfunction.
2697275970ScyDefaults to 50 4k pages (200 4k pages in OpenBSD).
2698275970Scy.El
2699275970Scy.It Xo Ic trap Ar host_address
2700275970Scy.Op Cm port Ar port_number
2701275970Scy.Op Cm interface Ar interface_address
2702275970Scy.Xc
2703275970ScyThis command configures a trap receiver at the given host
2704275970Scyaddress and port number for sending messages with the specified
2705275970Scylocal interface address.
2706275970ScyIf the port number is unspecified, a value
2707275970Scyof 18447 is used.
2708275970ScyIf the interface address is not specified, the
2709275970Scymessage is sent with a source address of the local interface the
2710275970Scymessage is sent through.
2711275970ScyNote that on a multihomed host the
2712275970Scyinterface used may vary from time to time with routing changes.
2713275970Scy.Pp
2714275970ScyThe trap receiver will generally log event messages and other
2715275970Scyinformation from the server in a log file.
2716275970ScyWhile such monitor
2717275970Scyprograms may also request their own trap dynamically, configuring a
2718275970Scytrap receiver will ensure that no messages are lost when the server
2719275970Scyis started.
2720275970Scy.It Cm hop Ar ...
2721275970ScyThis command specifies a list of TTL values in increasing order, up to 8
2722275970Scyvalues can be specified.
2723275970ScyIn manycast mode these values are used in turn in
2724275970Scyan expanding-ring search.
2725275970ScyThe default is eight multiples of 32 starting at
2726275970Scy31.
2727275970Scy.El
2728275970Scy	_END_PROG_MDOC_DESCRIP;
2729275970Scy};
2730275970Scy
2731275970Scydoc-section	= {
2732275970Scy  ds-type	= 'FILES';
2733275970Scy  ds-format	= 'mdoc';
2734275970Scy  ds-text	= <<- _END_MDOC_FILES
2735275970Scy.Bl -tag -width /etc/ntp.drift -compact
2736275970Scy.It Pa /etc/ntp.conf
2737275970Scythe default name of the configuration file
2738275970Scy.It Pa ntp.keys
2739275970Scyprivate MD5 keys
2740275970Scy.It Pa ntpkey
2741275970ScyRSA private key
2742275970Scy.It Pa ntpkey_ Ns Ar host
2743275970ScyRSA public key
2744275970Scy.It Pa ntp_dh
2745275970ScyDiffie-Hellman agreement parameters
2746275970Scy.El
2747275970Scy	_END_MDOC_FILES;
2748275970Scy};
2749275970Scy
2750275970Scydoc-section	= {
2751275970Scy  ds-type	= 'SEE ALSO';
2752275970Scy  ds-format	= 'mdoc';
2753275970Scy  ds-text	= <<- _END_MDOC_SEE_ALSO
2754275970Scy.Xr ntpd 1ntpdmdoc ,
2755275970Scy.Xr ntpdc 1ntpdcmdoc ,
2756275970Scy.Xr ntpq 1ntpqmdoc
2757275970Scy.Pp
2758275970ScyIn addition to the manual pages provided,
2759275970Scycomprehensive documentation is available on the world wide web
2760275970Scyat
2761275970Scy.Li http://www.ntp.org/ .
2762275970ScyA snapshot of this documentation is available in HTML format in
2763275970Scy.Pa /usr/share/doc/ntp .
2764275970Scy.Rs
2765275970Scy.%A David L. Mills
2766275970Scy.%T Network Time Protocol (Version 4)
2767275970Scy.%O RFC5905
2768275970Scy.Re
2769275970Scy	_END_MDOC_SEE_ALSO;
2770275970Scy};
2771275970Scy
2772275970Scydoc-section	= {
2773275970Scy  ds-type	= 'BUGS';
2774275970Scy  ds-format	= 'mdoc';
2775275970Scy  ds-text	= <<- _END_MDOC_BUGS
2776275970ScyThe syntax checking is not picky; some combinations of
2777275970Scyridiculous and even hilarious options and modes may not be
2778275970Scydetected.
2779275970Scy.Pp
2780275970ScyThe
2781275970Scy.Pa ntpkey_ Ns Ar host
2782275970Scyfiles are really digital
2783275970Scycertificates.
2784275970ScyThese should be obtained via secure directory
2785275970Scyservices when they become universally available.
2786275970Scy	_END_MDOC_BUGS;
2787275970Scy};
2788275970Scy
2789275970Scydoc-section	= {
2790275970Scy  ds-type	= 'NOTES';
2791275970Scy  ds-format	= 'mdoc';
2792275970Scy  ds-text	= <<- _END_MDOC_NOTES
2793275970ScyThis document was derived from FreeBSD.
2794275970Scy	_END_MDOC_NOTES;
2795275970Scy};
2796