xref: /freebsd/contrib/ntp/ntpd/ntp.conf.def (revision c7a33fe37d7688cb21c743f68256680e003210ad)
12b15cb3dSCy Schubert/* -*- Mode: Text -*- */
22b15cb3dSCy Schubert
32b15cb3dSCy Schubertautogen definitions options;
42b15cb3dSCy Schubert
52b15cb3dSCy Schubert#include copyright.def
62b15cb3dSCy Schubert
72b15cb3dSCy Schubert// We want the synopsis to be "/etc/ntp.conf" but we need the prog-name
82b15cb3dSCy Schubert// to be ntp.conf - the latter is also how autogen produces the output
92b15cb3dSCy Schubert// file name.
102b15cb3dSCy Schubertprog-name	= "ntp.conf";
112b15cb3dSCy Schubertfile-path	= "/etc/ntp.conf";
12*c7a33fe3SAlexander Ziaeeprog-title	= "Network Time Protocol daemon (ntpd) configuration format";
132b15cb3dSCy Schubert
142b15cb3dSCy Schubert/* explain: Additional information whenever the usage routine is invoked */
152b15cb3dSCy Schubertexplain = <<- _END_EXPLAIN
162b15cb3dSCy Schubert	_END_EXPLAIN;
172b15cb3dSCy Schubert
182b15cb3dSCy Schubertdoc-section	= {
192b15cb3dSCy Schubert  ds-type	= 'DESCRIPTION';
202b15cb3dSCy Schubert  ds-format	= 'mdoc';
212b15cb3dSCy Schubert  ds-text	= <<- _END_PROG_MDOC_DESCRIP
222b15cb3dSCy SchubertThe
232b15cb3dSCy Schubert.Nm
242b15cb3dSCy Schubertconfiguration file is read at initial startup by the
252b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
262b15cb3dSCy Schubertdaemon in order to specify the synchronization sources,
272b15cb3dSCy Schubertmodes and other related information.
282b15cb3dSCy SchubertUsually, it is installed in the
292b15cb3dSCy Schubert.Pa /etc
302b15cb3dSCy Schubertdirectory,
312b15cb3dSCy Schubertbut could be installed elsewhere
322b15cb3dSCy Schubert(see the daemon's
332b15cb3dSCy Schubert.Fl c
342b15cb3dSCy Schubertcommand line option).
352b15cb3dSCy Schubert.Pp
362b15cb3dSCy SchubertThe file format is similar to other
372b15cb3dSCy Schubert.Ux
382b15cb3dSCy Schubertconfiguration files.
392b15cb3dSCy SchubertComments begin with a
402b15cb3dSCy Schubert.Ql #
412b15cb3dSCy Schubertcharacter and extend to the end of the line;
422b15cb3dSCy Schubertblank lines are ignored.
432b15cb3dSCy SchubertConfiguration commands consist of an initial keyword
442b15cb3dSCy Schubertfollowed by a list of arguments,
452b15cb3dSCy Schubertsome of which may be optional, separated by whitespace.
462b15cb3dSCy SchubertCommands may not be continued over multiple lines.
472b15cb3dSCy SchubertArguments may be host names,
482b15cb3dSCy Schuberthost addresses written in numeric, dotted-quad form,
492b15cb3dSCy Schubertintegers, floating point numbers (when specifying times in seconds)
502b15cb3dSCy Schubertand text strings.
512b15cb3dSCy Schubert.Pp
522b15cb3dSCy SchubertThe rest of this page describes the configuration and control options.
532b15cb3dSCy SchubertThe
542b15cb3dSCy Schubert.Qq Notes on Configuring NTP and Setting up an NTP Subnet
552b15cb3dSCy Schubertpage
562b15cb3dSCy Schubert(available as part of the HTML documentation
572b15cb3dSCy Schubertprovided in
582b15cb3dSCy Schubert.Pa /usr/share/doc/ntp )
592b15cb3dSCy Schubertcontains an extended discussion of these options.
602b15cb3dSCy SchubertIn addition to the discussion of general
612b15cb3dSCy Schubert.Sx Configuration Options ,
622b15cb3dSCy Schubertthere are sections describing the following supported functionality
632b15cb3dSCy Schubertand the options used to control it:
642b15cb3dSCy Schubert.Bl -bullet -offset indent
652b15cb3dSCy Schubert.It
662b15cb3dSCy Schubert.Sx Authentication Support
672b15cb3dSCy Schubert.It
682b15cb3dSCy Schubert.Sx Monitoring Support
692b15cb3dSCy Schubert.It
702b15cb3dSCy Schubert.Sx Access Control Support
712b15cb3dSCy Schubert.It
722b15cb3dSCy Schubert.Sx Automatic NTP Configuration Options
732b15cb3dSCy Schubert.It
742b15cb3dSCy Schubert.Sx Reference Clock Support
752b15cb3dSCy Schubert.It
762b15cb3dSCy Schubert.Sx Miscellaneous Options
772b15cb3dSCy Schubert.El
782b15cb3dSCy Schubert.Pp
792b15cb3dSCy SchubertFollowing these is a section describing
802b15cb3dSCy Schubert.Sx Miscellaneous Options .
812b15cb3dSCy SchubertWhile there is a rich set of options available,
822b15cb3dSCy Schubertthe only required option is one or more
832b15cb3dSCy Schubert.Ic pool ,
842b15cb3dSCy Schubert.Ic server ,
852b15cb3dSCy Schubert.Ic peer ,
862b15cb3dSCy Schubert.Ic broadcast
872b15cb3dSCy Schubertor
882b15cb3dSCy Schubert.Ic manycastclient
892b15cb3dSCy Schubertcommands.
902b15cb3dSCy Schubert.Sh Configuration Support
912b15cb3dSCy SchubertFollowing is a description of the configuration commands in
922b15cb3dSCy SchubertNTPv4.
932b15cb3dSCy SchubertThese commands have the same basic functions as in NTPv3 and
942b15cb3dSCy Schubertin some cases new functions and new arguments.
952b15cb3dSCy SchubertThere are two
962b15cb3dSCy Schubertclasses of commands, configuration commands that configure a
972b15cb3dSCy Schubertpersistent association with a remote server or peer or reference
982b15cb3dSCy Schubertclock, and auxiliary commands that specify environmental variables
992b15cb3dSCy Schubertthat control various related operations.
1002b15cb3dSCy Schubert.Ss Configuration Commands
1012b15cb3dSCy SchubertThe various modes are determined by the command keyword and the
1022b15cb3dSCy Schuberttype of the required IP address.
1032b15cb3dSCy SchubertAddresses are classed by type as
1042b15cb3dSCy Schubert(s) a remote server or peer (IPv4 class A, B and C), (b) the
1052b15cb3dSCy Schubertbroadcast address of a local interface, (m) a multicast address (IPv4
1062b15cb3dSCy Schubertclass D), or (r) a reference clock address (127.127.x.x).
1072b15cb3dSCy SchubertNote that
1082b15cb3dSCy Schubertonly those options applicable to each command are listed below.
1092b15cb3dSCy SchubertUse
1102b15cb3dSCy Schubertof options not listed may not be caught as an error, but may result
1112b15cb3dSCy Schubertin some weird and even destructive behavior.
1122b15cb3dSCy Schubert.Pp
1132b15cb3dSCy SchubertIf the Basic Socket Interface Extensions for IPv6 (RFC-2553)
1142b15cb3dSCy Schubertis detected, support for the IPv6 address family is generated
1152b15cb3dSCy Schubertin addition to the default support of the IPv4 address family.
1164990d495SXin LIIn a few cases, including the
1174990d495SXin LI.Cm reslist
1184990d495SXin LIbillboard generated
1194990d495SXin LIby
1204990d495SXin LI.Xr ntpq 1ntpqmdoc
1214990d495SXin LIor
1224990d495SXin LI.Xr ntpdc 1ntpdcmdoc ,
1234990d495SXin LIIPv6 addresses are automatically generated.
1242b15cb3dSCy SchubertIPv6 addresses can be identified by the presence of colons
1252b15cb3dSCy Schubert.Dq \&:
1262b15cb3dSCy Schubertin the address field.
1272b15cb3dSCy SchubertIPv6 addresses can be used almost everywhere where
1282b15cb3dSCy SchubertIPv4 addresses can be used,
1292b15cb3dSCy Schubertwith the exception of reference clock addresses,
1302b15cb3dSCy Schubertwhich are always IPv4.
1312b15cb3dSCy Schubert.Pp
1322b15cb3dSCy SchubertNote that in contexts where a host name is expected, a
1332b15cb3dSCy Schubert.Fl 4
1342b15cb3dSCy Schubertqualifier preceding
1352b15cb3dSCy Schubertthe host name forces DNS resolution to the IPv4 namespace,
1362b15cb3dSCy Schubertwhile a
1372b15cb3dSCy Schubert.Fl 6
1382b15cb3dSCy Schubertqualifier forces DNS resolution to the IPv6 namespace.
1392b15cb3dSCy SchubertSee IPv6 references for the
1402b15cb3dSCy Schubertequivalent classes for that address family.
1412b15cb3dSCy Schubert.Bl -tag -width indent
1422b15cb3dSCy Schubert.It Xo Ic pool Ar address
1432b15cb3dSCy Schubert.Op Cm burst
1442b15cb3dSCy Schubert.Op Cm iburst
1452b15cb3dSCy Schubert.Op Cm version Ar version
1462b15cb3dSCy Schubert.Op Cm prefer
1472b15cb3dSCy Schubert.Op Cm minpoll Ar minpoll
1482b15cb3dSCy Schubert.Op Cm maxpoll Ar maxpoll
1492d4e511cSCy Schubert.Op Cm xmtnonce
1502b15cb3dSCy Schubert.Xc
1512b15cb3dSCy Schubert.It Xo Ic server Ar address
1522b15cb3dSCy Schubert.Op Cm key Ar key \&| Cm autokey
1532b15cb3dSCy Schubert.Op Cm burst
1542b15cb3dSCy Schubert.Op Cm iburst
1552b15cb3dSCy Schubert.Op Cm version Ar version
1562b15cb3dSCy Schubert.Op Cm prefer
1572b15cb3dSCy Schubert.Op Cm minpoll Ar minpoll
1582b15cb3dSCy Schubert.Op Cm maxpoll Ar maxpoll
1594990d495SXin LI.Op Cm true
1602d4e511cSCy Schubert.Op Cm xmtnonce
1612b15cb3dSCy Schubert.Xc
1622b15cb3dSCy Schubert.It Xo Ic peer Ar address
1632b15cb3dSCy Schubert.Op Cm key Ar key \&| Cm autokey
1642b15cb3dSCy Schubert.Op Cm version Ar version
1652b15cb3dSCy Schubert.Op Cm prefer
1662b15cb3dSCy Schubert.Op Cm minpoll Ar minpoll
1672b15cb3dSCy Schubert.Op Cm maxpoll Ar maxpoll
1684990d495SXin LI.Op Cm true
1694990d495SXin LI.Op Cm xleave
1702b15cb3dSCy Schubert.Xc
1712b15cb3dSCy Schubert.It Xo Ic broadcast Ar address
1722b15cb3dSCy Schubert.Op Cm key Ar key \&| Cm autokey
1732b15cb3dSCy Schubert.Op Cm version Ar version
1742b15cb3dSCy Schubert.Op Cm prefer
1752b15cb3dSCy Schubert.Op Cm minpoll Ar minpoll
1762b15cb3dSCy Schubert.Op Cm ttl Ar ttl
1774990d495SXin LI.Op Cm xleave
1782b15cb3dSCy Schubert.Xc
1792b15cb3dSCy Schubert.It Xo Ic manycastclient Ar address
1802b15cb3dSCy Schubert.Op Cm key Ar key \&| Cm autokey
1812b15cb3dSCy Schubert.Op Cm version Ar version
1822b15cb3dSCy Schubert.Op Cm prefer
1832b15cb3dSCy Schubert.Op Cm minpoll Ar minpoll
1842b15cb3dSCy Schubert.Op Cm maxpoll Ar maxpoll
1852b15cb3dSCy Schubert.Op Cm ttl Ar ttl
1862b15cb3dSCy Schubert.Xc
1872b15cb3dSCy Schubert.El
1882b15cb3dSCy Schubert.Pp
1892b15cb3dSCy SchubertThese five commands specify the time server name or address to
1902b15cb3dSCy Schubertbe used and the mode in which to operate.
1912b15cb3dSCy SchubertThe
1922b15cb3dSCy Schubert.Ar address
1932b15cb3dSCy Schubertcan be
1942b15cb3dSCy Schuberteither a DNS name or an IP address in dotted-quad notation.
1952b15cb3dSCy SchubertAdditional information on association behavior can be found in the
1962b15cb3dSCy Schubert.Qq Association Management
1972b15cb3dSCy Schubertpage
1982b15cb3dSCy Schubert(available as part of the HTML documentation
1992b15cb3dSCy Schubertprovided in
2002b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
2012b15cb3dSCy Schubert.Bl -tag -width indent
2022b15cb3dSCy Schubert.It Ic pool
2032b15cb3dSCy SchubertFor type s addresses, this command mobilizes a persistent
2042b15cb3dSCy Schubertclient mode association with a number of remote servers.
2052b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
2062b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
2072b15cb3dSCy Schubertthe local clock.
2082b15cb3dSCy Schubert.It Ic server
2092b15cb3dSCy SchubertFor type s and r addresses, this command mobilizes a persistent
2102b15cb3dSCy Schubertclient mode association with the specified remote server or local
2112b15cb3dSCy Schubertradio clock.
2122b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
2132b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
2142b15cb3dSCy Schubertthe local clock.
2152b15cb3dSCy SchubertThis command should
2162b15cb3dSCy Schubert.Em not
2172b15cb3dSCy Schubertbe used for type
2182b15cb3dSCy Schubertb or m addresses.
2192b15cb3dSCy Schubert.It Ic peer
2202b15cb3dSCy SchubertFor type s addresses (only), this command mobilizes a
2212b15cb3dSCy Schubertpersistent symmetric-active mode association with the specified
2222b15cb3dSCy Schubertremote peer.
2232b15cb3dSCy SchubertIn this mode the local clock can be synchronized to
2242b15cb3dSCy Schubertthe remote peer or the remote peer can be synchronized to the local
2252b15cb3dSCy Schubertclock.
2262b15cb3dSCy SchubertThis is useful in a network of servers where, depending on
2272b15cb3dSCy Schubertvarious failure scenarios, either the local or remote peer may be
2282b15cb3dSCy Schubertthe better source of time.
2292b15cb3dSCy SchubertThis command should NOT be used for type
2302b15cb3dSCy Schubertb, m or r addresses.
2312b15cb3dSCy Schubert.It Ic broadcast
2322b15cb3dSCy SchubertFor type b and m addresses (only), this
2332b15cb3dSCy Schubertcommand mobilizes a persistent broadcast mode association.
2342b15cb3dSCy SchubertMultiple
2352b15cb3dSCy Schubertcommands can be used to specify multiple local broadcast interfaces
2362b15cb3dSCy Schubert(subnets) and/or multiple multicast groups.
2372b15cb3dSCy SchubertNote that local
2382b15cb3dSCy Schubertbroadcast messages go only to the interface associated with the
2392b15cb3dSCy Schubertsubnet specified, but multicast messages go to all interfaces.
2402b15cb3dSCy SchubertIn broadcast mode the local server sends periodic broadcast
2412b15cb3dSCy Schubertmessages to a client population at the
2422b15cb3dSCy Schubert.Ar address
2432b15cb3dSCy Schubertspecified, which is usually the broadcast address on (one of) the
2442b15cb3dSCy Schubertlocal network(s) or a multicast address assigned to NTP.
2452b15cb3dSCy SchubertThe IANA
2462b15cb3dSCy Schuberthas assigned the multicast group address IPv4 224.0.1.1 and
2472b15cb3dSCy SchubertIPv6 ff05::101 (site local) exclusively to
2482b15cb3dSCy SchubertNTP, but other nonconflicting addresses can be used to contain the
2492b15cb3dSCy Schubertmessages within administrative boundaries.
2502b15cb3dSCy SchubertOrdinarily, this
2512b15cb3dSCy Schubertspecification applies only to the local server operating as a
2522b15cb3dSCy Schubertsender; for operation as a broadcast client, see the
2532b15cb3dSCy Schubert.Ic broadcastclient
2542b15cb3dSCy Schubertor
2552b15cb3dSCy Schubert.Ic multicastclient
2562b15cb3dSCy Schubertcommands
2572b15cb3dSCy Schubertbelow.
2582b15cb3dSCy Schubert.It Ic manycastclient
2592b15cb3dSCy SchubertFor type m addresses (only), this command mobilizes a
2602b15cb3dSCy Schubertmanycast client mode association for the multicast address
2612b15cb3dSCy Schubertspecified.
2622b15cb3dSCy SchubertIn this case a specific address must be supplied which
2632b15cb3dSCy Schubertmatches the address used on the
2642b15cb3dSCy Schubert.Ic manycastserver
2652b15cb3dSCy Schubertcommand for
2662b15cb3dSCy Schubertthe designated manycast servers.
2672b15cb3dSCy SchubertThe NTP multicast address
2682b15cb3dSCy Schubert224.0.1.1 assigned by the IANA should NOT be used, unless specific
2692b15cb3dSCy Schubertmeans are taken to avoid spraying large areas of the Internet with
2702b15cb3dSCy Schubertthese messages and causing a possibly massive implosion of replies
2712b15cb3dSCy Schubertat the sender.
2722b15cb3dSCy SchubertThe
2732b15cb3dSCy Schubert.Ic manycastserver
2742b15cb3dSCy Schubertcommand specifies that the local server
2752b15cb3dSCy Schubertis to operate in client mode with the remote servers that are
2762b15cb3dSCy Schubertdiscovered as the result of broadcast/multicast messages.
2772b15cb3dSCy SchubertThe
2782b15cb3dSCy Schubertclient broadcasts a request message to the group address associated
2792b15cb3dSCy Schubertwith the specified
2802b15cb3dSCy Schubert.Ar address
2812b15cb3dSCy Schubertand specifically enabled
2822b15cb3dSCy Schubertservers respond to these messages.
2832b15cb3dSCy SchubertThe client selects the servers
2842b15cb3dSCy Schubertproviding the best time and continues as with the
2852b15cb3dSCy Schubert.Ic server
2862b15cb3dSCy Schubertcommand.
2872b15cb3dSCy SchubertThe remaining servers are discarded as if never
2882b15cb3dSCy Schubertheard.
2892b15cb3dSCy Schubert.El
2902b15cb3dSCy Schubert.Pp
2912b15cb3dSCy SchubertOptions:
2922b15cb3dSCy Schubert.Bl -tag -width indent
2932b15cb3dSCy Schubert.It Cm autokey
2942b15cb3dSCy SchubertAll packets sent to and received from the server or peer are to
2952b15cb3dSCy Schubertinclude authentication fields encrypted using the autokey scheme
2962b15cb3dSCy Schubertdescribed in
2972b15cb3dSCy Schubert.Sx Authentication Options .
2982b15cb3dSCy Schubert.It Cm burst
299f5f40dd6SCy Schubertwhen the server is reachable, send a burst of six packets
300f5f40dd6SCy Schubertinstead of the usual one. The packet spacing is 2 s.
301f5f40dd6SCy SchubertThis is designed to improve timekeeping quality with the
3022b15cb3dSCy Schubert.Ic server
3032b15cb3dSCy Schubertcommand and s addresses.
3042b15cb3dSCy Schubert.It Cm iburst
3052b15cb3dSCy SchubertWhen the server is unreachable, send a burst of eight packets
3062b15cb3dSCy Schubertinstead of the usual one.
307f5f40dd6SCy SchubertThe packet spacing is 2 s.
3082b15cb3dSCy SchubertThis is designed to speed the initial synchronization
3092b15cb3dSCy Schubertacquisition with the
3102b15cb3dSCy Schubert.Ic server
3112b15cb3dSCy Schubertcommand and s addresses and when
3122b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
3132b15cb3dSCy Schubertis started with the
3142b15cb3dSCy Schubert.Fl q
3152b15cb3dSCy Schubertoption.
3162b15cb3dSCy Schubert.It Cm key Ar key
3172b15cb3dSCy SchubertAll packets sent to and received from the server or peer are to
3182b15cb3dSCy Schubertinclude authentication fields encrypted using the specified
3192b15cb3dSCy Schubert.Ar key
3204e1ef62aSXin LIidentifier with values from 1 to 65535, inclusive.
3212b15cb3dSCy SchubertThe
3222b15cb3dSCy Schubertdefault is to include no encryption field.
3232b15cb3dSCy Schubert.It Cm minpoll Ar minpoll
3242b15cb3dSCy Schubert.It Cm maxpoll Ar maxpoll
3252b15cb3dSCy SchubertThese options specify the minimum and maximum poll intervals
3262b15cb3dSCy Schubertfor NTP messages, as a power of 2 in seconds
3272b15cb3dSCy SchubertThe maximum poll
3282b15cb3dSCy Schubertinterval defaults to 10 (1,024 s), but can be increased by the
3292b15cb3dSCy Schubert.Cm maxpoll
3302b15cb3dSCy Schubertoption to an upper limit of 17 (36.4 h).
3312b15cb3dSCy SchubertThe
3322b15cb3dSCy Schubertminimum poll interval defaults to 6 (64 s), but can be decreased by
3332b15cb3dSCy Schubertthe
3342b15cb3dSCy Schubert.Cm minpoll
3352b15cb3dSCy Schubertoption to a lower limit of 4 (16 s).
3362b15cb3dSCy Schubert.It Cm noselect
3372b15cb3dSCy SchubertMarks the server as unused, except for display purposes.
3382b15cb3dSCy SchubertThe server is discarded by the selection algroithm.
3394990d495SXin LI.It Cm preempt
3404990d495SXin LISays the association can be preempted.
3412b15cb3dSCy Schubert.It Cm prefer
3422b15cb3dSCy SchubertMarks the server as preferred.
3432b15cb3dSCy SchubertAll other things being equal,
3442b15cb3dSCy Schubertthis host will be chosen for synchronization among a set of
3452b15cb3dSCy Schubertcorrectly operating hosts.
3462b15cb3dSCy SchubertSee the
3472b15cb3dSCy Schubert.Qq Mitigation Rules and the prefer Keyword
3482b15cb3dSCy Schubertpage
3492b15cb3dSCy Schubert(available as part of the HTML documentation
3502b15cb3dSCy Schubertprovided in
3512b15cb3dSCy Schubert.Pa /usr/share/doc/ntp )
3522b15cb3dSCy Schubertfor further information.
3534990d495SXin LI.It Cm true
3542d4e511cSCy SchubertMarks the server as a truechimer,
3552d4e511cSCy Schubertforcing the association to always survive the selection and clustering algorithms.
3564990d495SXin LIThis option should almost certainly
3574990d495SXin LI.Em only
3584990d495SXin LIbe used while testing an association.
3592b15cb3dSCy Schubert.It Cm ttl Ar ttl
3602b15cb3dSCy SchubertThis option is used only with broadcast server and manycast
3612b15cb3dSCy Schubertclient modes.
3622b15cb3dSCy SchubertIt specifies the time-to-live
3632b15cb3dSCy Schubert.Ar ttl
3642b15cb3dSCy Schubertto
3652b15cb3dSCy Schubertuse on broadcast server and multicast server and the maximum
3662b15cb3dSCy Schubert.Ar ttl
3672b15cb3dSCy Schubertfor the expanding ring search with manycast
3682b15cb3dSCy Schubertclient packets.
3692b15cb3dSCy SchubertSelection of the proper value, which defaults to
3702b15cb3dSCy Schubert127, is something of a black art and should be coordinated with the
3712b15cb3dSCy Schubertnetwork administrator.
3722b15cb3dSCy Schubert.It Cm version Ar version
3732b15cb3dSCy SchubertSpecifies the version number to be used for outgoing NTP
3742b15cb3dSCy Schubertpackets.
3752b15cb3dSCy SchubertVersions 1-4 are the choices, with version 4 the
3762b15cb3dSCy Schubertdefault.
3774990d495SXin LI.It Cm xleave
3784990d495SXin LIValid in
3794990d495SXin LI.Cm peer
3804990d495SXin LIand
3814990d495SXin LI.Cm broadcast
3824990d495SXin LImodes only, this flag enables interleave mode.
3832d4e511cSCy Schubert.It Cm xmtnonce
3842d4e511cSCy SchubertValid only for
3852d4e511cSCy Schubert.Cm server
3862d4e511cSCy Schubertand
3872d4e511cSCy Schubert.Cm pool
3882d4e511cSCy Schubertmodes, this flag puts a random number in the packet's transmit timestamp.
3892d4e511cSCy Schubert
3902b15cb3dSCy Schubert.El
3912b15cb3dSCy Schubert.Ss Auxiliary Commands
3922b15cb3dSCy Schubert.Bl -tag -width indent
3932b15cb3dSCy Schubert.It Ic broadcastclient
3942b15cb3dSCy SchubertThis command enables reception of broadcast server messages to
3952b15cb3dSCy Schubertany local interface (type b) address.
3962b15cb3dSCy SchubertUpon receiving a message for
3972b15cb3dSCy Schubertthe first time, the broadcast client measures the nominal server
3982b15cb3dSCy Schubertpropagation delay using a brief client/server exchange with the
3992b15cb3dSCy Schubertserver, then enters the broadcast client mode, in which it
4002b15cb3dSCy Schubertsynchronizes to succeeding broadcast messages.
4012b15cb3dSCy SchubertNote that, in order
4022b15cb3dSCy Schubertto avoid accidental or malicious disruption in this mode, both the
4032b15cb3dSCy Schubertserver and client should operate using symmetric-key or public-key
4042b15cb3dSCy Schubertauthentication as described in
4052b15cb3dSCy Schubert.Sx Authentication Options .
4062b15cb3dSCy Schubert.It Ic manycastserver Ar address ...
4072b15cb3dSCy SchubertThis command enables reception of manycast client messages to
4082b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
4092b15cb3dSCy SchubertAt least one
4102b15cb3dSCy Schubertaddress is required, but the NTP multicast address 224.0.1.1
4112b15cb3dSCy Schubertassigned by the IANA should NOT be used, unless specific means are
4122b15cb3dSCy Schuberttaken to limit the span of the reply and avoid a possibly massive
4132b15cb3dSCy Schubertimplosion at the original sender.
4142b15cb3dSCy SchubertNote that, in order to avoid
4152b15cb3dSCy Schubertaccidental or malicious disruption in this mode, both the server
4162b15cb3dSCy Schubertand client should operate using symmetric-key or public-key
4172b15cb3dSCy Schubertauthentication as described in
4182b15cb3dSCy Schubert.Sx Authentication Options .
4192b15cb3dSCy Schubert.It Ic multicastclient Ar address ...
4202b15cb3dSCy SchubertThis command enables reception of multicast server messages to
4212b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
4222b15cb3dSCy SchubertUpon receiving
4232b15cb3dSCy Schuberta message for the first time, the multicast client measures the
4242b15cb3dSCy Schubertnominal server propagation delay using a brief client/server
4252b15cb3dSCy Schubertexchange with the server, then enters the broadcast client mode, in
4262b15cb3dSCy Schubertwhich it synchronizes to succeeding multicast messages.
4272b15cb3dSCy SchubertNote that,
4282b15cb3dSCy Schubertin order to avoid accidental or malicious disruption in this mode,
4292b15cb3dSCy Schubertboth the server and client should operate using symmetric-key or
4302b15cb3dSCy Schubertpublic-key authentication as described in
4312b15cb3dSCy Schubert.Sx Authentication Options .
4322b15cb3dSCy Schubert.It Ic mdnstries Ar number
4332b15cb3dSCy SchubertIf we are participating in mDNS,
4342b15cb3dSCy Schubertafter we have synched for the first time
4352b15cb3dSCy Schubertwe attempt to register with the mDNS system.
4362b15cb3dSCy SchubertIf that registration attempt fails,
4372b15cb3dSCy Schubertwe try again at one minute intervals for up to
4382b15cb3dSCy Schubert.Ic mdnstries
4392b15cb3dSCy Schuberttimes.
4402b15cb3dSCy SchubertAfter all,
4412b15cb3dSCy Schubert.Ic ntpd
4422b15cb3dSCy Schubertmay be starting before mDNS.
4432b15cb3dSCy SchubertThe default value for
4442b15cb3dSCy Schubert.Ic mdnstries
4452b15cb3dSCy Schubertis 5.
4462b15cb3dSCy Schubert.El
4472b15cb3dSCy Schubert.Sh Authentication Support
4482b15cb3dSCy SchubertAuthentication support allows the NTP client to verify that the
4492b15cb3dSCy Schubertserver is in fact known and trusted and not an intruder intending
4502b15cb3dSCy Schubertaccidentally or on purpose to masquerade as that server.
4512b15cb3dSCy SchubertThe NTPv3
4522b15cb3dSCy Schubertspecification RFC-1305 defines a scheme which provides
4532b15cb3dSCy Schubertcryptographic authentication of received NTP packets.
4542b15cb3dSCy SchubertOriginally,
4552b15cb3dSCy Schubertthis was done using the Data Encryption Standard (DES) algorithm
4562b15cb3dSCy Schubertoperating in Cipher Block Chaining (CBC) mode, commonly called
4572b15cb3dSCy SchubertDES-CBC.
4582b15cb3dSCy SchubertSubsequently, this was replaced by the RSA Message Digest
4592b15cb3dSCy Schubert5 (MD5) algorithm using a private key, commonly called keyed-MD5.
4602b15cb3dSCy SchubertEither algorithm computes a message digest, or one-way hash, which
4612b15cb3dSCy Schubertcan be used to verify the server has the correct private key and
4622b15cb3dSCy Schubertkey identifier.
4632b15cb3dSCy Schubert.Pp
4642b15cb3dSCy SchubertNTPv4 retains the NTPv3 scheme, properly described as symmetric key
4652b15cb3dSCy Schubertcryptography and, in addition, provides a new Autokey scheme
4662b15cb3dSCy Schubertbased on public key cryptography.
4672b15cb3dSCy SchubertPublic key cryptography is generally considered more secure
4682b15cb3dSCy Schubertthan symmetric key cryptography, since the security is based
4692b15cb3dSCy Schuberton a private value which is generated by each server and
4702b15cb3dSCy Schubertnever revealed.
4712b15cb3dSCy SchubertWith Autokey all key distribution and
4722b15cb3dSCy Schubertmanagement functions involve only public values, which
4732b15cb3dSCy Schubertconsiderably simplifies key distribution and storage.
4742b15cb3dSCy SchubertPublic key management is based on X.509 certificates,
4752b15cb3dSCy Schubertwhich can be provided by commercial services or
4762b15cb3dSCy Schubertproduced by utility programs in the OpenSSL software library
4772b15cb3dSCy Schubertor the NTPv4 distribution.
4782b15cb3dSCy Schubert.Pp
4792b15cb3dSCy SchubertWhile the algorithms for symmetric key cryptography are
4802b15cb3dSCy Schubertincluded in the NTPv4 distribution, public key cryptography
4812b15cb3dSCy Schubertrequires the OpenSSL software library to be installed
4822b15cb3dSCy Schubertbefore building the NTP distribution.
4832b15cb3dSCy SchubertDirections for doing that
4842b15cb3dSCy Schubertare on the Building and Installing the Distribution page.
4852b15cb3dSCy Schubert.Pp
4862b15cb3dSCy SchubertAuthentication is configured separately for each association
4872b15cb3dSCy Schubertusing the
4882b15cb3dSCy Schubert.Cm key
4892b15cb3dSCy Schubertor
4902b15cb3dSCy Schubert.Cm autokey
4912b15cb3dSCy Schubertsubcommand on the
4922b15cb3dSCy Schubert.Ic peer ,
4932b15cb3dSCy Schubert.Ic server ,
4942b15cb3dSCy Schubert.Ic broadcast
4952b15cb3dSCy Schubertand
4962b15cb3dSCy Schubert.Ic manycastclient
4972b15cb3dSCy Schubertconfiguration commands as described in
4982b15cb3dSCy Schubert.Sx Configuration Options
4992b15cb3dSCy Schubertpage.
5002b15cb3dSCy SchubertThe authentication
5012b15cb3dSCy Schubertoptions described below specify the locations of the key files,
5022b15cb3dSCy Schubertif other than default, which symmetric keys are trusted
5032b15cb3dSCy Schubertand the interval between various operations, if other than default.
5042b15cb3dSCy Schubert.Pp
5052b15cb3dSCy SchubertAuthentication is always enabled,
5062b15cb3dSCy Schubertalthough ineffective if not configured as
5072b15cb3dSCy Schubertdescribed below.
5082b15cb3dSCy SchubertIf a NTP packet arrives
5092b15cb3dSCy Schubertincluding a message authentication
5102b15cb3dSCy Schubertcode (MAC), it is accepted only if it
5112b15cb3dSCy Schubertpasses all cryptographic checks.
5122b15cb3dSCy SchubertThe
5132b15cb3dSCy Schubertchecks require correct key ID, key value
5142b15cb3dSCy Schubertand message digest.
5152b15cb3dSCy SchubertIf the packet has
5162b15cb3dSCy Schubertbeen modified in any way or replayed
5172b15cb3dSCy Schubertby an intruder, it will fail one or more
5182b15cb3dSCy Schubertof these checks and be discarded.
5192b15cb3dSCy SchubertFurthermore, the Autokey scheme requires a
5202b15cb3dSCy Schubertpreliminary protocol exchange to obtain
5212b15cb3dSCy Schubertthe server certificate, verify its
5222b15cb3dSCy Schubertcredentials and initialize the protocol
5232b15cb3dSCy Schubert.Pp
5242b15cb3dSCy SchubertThe
5252b15cb3dSCy Schubert.Cm auth
5262b15cb3dSCy Schubertflag controls whether new associations or
5272b15cb3dSCy Schubertremote configuration commands require cryptographic authentication.
5282b15cb3dSCy SchubertThis flag can be set or reset by the
5292b15cb3dSCy Schubert.Ic enable
5302b15cb3dSCy Schubertand
5312b15cb3dSCy Schubert.Ic disable
5322b15cb3dSCy Schubertcommands and also by remote
5332b15cb3dSCy Schubertconfiguration commands sent by a
5342b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
5354990d495SXin LIprogram running on
5362b15cb3dSCy Schubertanother machine.
5372b15cb3dSCy SchubertIf this flag is enabled, which is the default
5382b15cb3dSCy Schubertcase, new broadcast client and symmetric passive associations and
5392b15cb3dSCy Schubertremote configuration commands must be cryptographically
5402b15cb3dSCy Schubertauthenticated using either symmetric key or public key cryptography.
5412b15cb3dSCy SchubertIf this
5422b15cb3dSCy Schubertflag is disabled, these operations are effective
5432b15cb3dSCy Schuberteven if not cryptographic
5442b15cb3dSCy Schubertauthenticated.
5452b15cb3dSCy SchubertIt should be understood
5462b15cb3dSCy Schubertthat operating with the
5472b15cb3dSCy Schubert.Ic auth
5482b15cb3dSCy Schubertflag disabled invites a significant vulnerability
5492b15cb3dSCy Schubertwhere a rogue hacker can
5502b15cb3dSCy Schubertmasquerade as a falseticker and seriously
5512b15cb3dSCy Schubertdisrupt system timekeeping.
5522b15cb3dSCy SchubertIt is
5532b15cb3dSCy Schubertimportant to note that this flag has no purpose
5542b15cb3dSCy Schubertother than to allow or disallow
5552b15cb3dSCy Schuberta new association in response to new broadcast
5562b15cb3dSCy Schubertand symmetric active messages
5572b15cb3dSCy Schubertand remote configuration commands and, in particular,
5582b15cb3dSCy Schubertthe flag has no effect on
5592b15cb3dSCy Schubertthe authentication process itself.
5602b15cb3dSCy Schubert.Pp
5612b15cb3dSCy SchubertAn attractive alternative where multicast support is available
5622b15cb3dSCy Schubertis manycast mode, in which clients periodically troll
5632b15cb3dSCy Schubertfor servers as described in the
5642b15cb3dSCy Schubert.Sx Automatic NTP Configuration Options
5652b15cb3dSCy Schubertpage.
5662b15cb3dSCy SchubertEither symmetric key or public key
5672b15cb3dSCy Schubertcryptographic authentication can be used in this mode.
5682b15cb3dSCy SchubertThe principle advantage
5692b15cb3dSCy Schubertof manycast mode is that potential servers need not be
5702b15cb3dSCy Schubertconfigured in advance,
5712b15cb3dSCy Schubertsince the client finds them during regular operation,
5722b15cb3dSCy Schubertand the configuration
5732b15cb3dSCy Schubertfiles for all clients can be identical.
5742b15cb3dSCy Schubert.Pp
5752b15cb3dSCy SchubertThe security model and protocol schemes for
5762b15cb3dSCy Schubertboth symmetric key and public key
5772b15cb3dSCy Schubertcryptography are summarized below;
5782b15cb3dSCy Schubertfurther details are in the briefings, papers
5792b15cb3dSCy Schubertand reports at the NTP project page linked from
5802b15cb3dSCy Schubert.Li http://www.ntp.org/ .
5812b15cb3dSCy Schubert.Ss Symmetric-Key Cryptography
5822b15cb3dSCy SchubertThe original RFC-1305 specification allows any one of possibly
5834e1ef62aSXin LI65,535 keys, each distinguished by a 32-bit key identifier, to
5842b15cb3dSCy Schubertauthenticate an association.
5852b15cb3dSCy SchubertThe servers and clients involved must
5862b15cb3dSCy Schubertagree on the key and key identifier to
5872b15cb3dSCy Schubertauthenticate NTP packets.
5882b15cb3dSCy SchubertKeys and
5892b15cb3dSCy Schubertrelated information are specified in a key
5902b15cb3dSCy Schubertfile, usually called
5912b15cb3dSCy Schubert.Pa ntp.keys ,
5922b15cb3dSCy Schubertwhich must be distributed and stored using
5932b15cb3dSCy Schubertsecure means beyond the scope of the NTP protocol itself.
5942b15cb3dSCy SchubertBesides the keys used
5952b15cb3dSCy Schubertfor ordinary NTP associations,
5962b15cb3dSCy Schubertadditional keys can be used as passwords for the
5972b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
5982b15cb3dSCy Schubertand
5992b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
6002b15cb3dSCy Schubertutility programs.
6012b15cb3dSCy Schubert.Pp
6022b15cb3dSCy SchubertWhen
6032b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
6042b15cb3dSCy Schubertis first started, it reads the key file specified in the
6052b15cb3dSCy Schubert.Ic keys
6062b15cb3dSCy Schubertconfiguration command and installs the keys
6072b15cb3dSCy Schubertin the key cache.
6082b15cb3dSCy SchubertHowever,
6092b15cb3dSCy Schubertindividual keys must be activated with the
6102b15cb3dSCy Schubert.Ic trusted
6112b15cb3dSCy Schubertcommand before use.
6122b15cb3dSCy SchubertThis
6132b15cb3dSCy Schubertallows, for instance, the installation of possibly
6142b15cb3dSCy Schubertseveral batches of keys and
6152b15cb3dSCy Schubertthen activating or deactivating each batch
6162b15cb3dSCy Schubertremotely using
6172b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc .
6182b15cb3dSCy SchubertThis also provides a revocation capability that can be used
6192b15cb3dSCy Schubertif a key becomes compromised.
6202b15cb3dSCy SchubertThe
6212b15cb3dSCy Schubert.Ic requestkey
6222b15cb3dSCy Schubertcommand selects the key used as the password for the
6232b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
6242b15cb3dSCy Schubertutility, while the
6252b15cb3dSCy Schubert.Ic controlkey
6262b15cb3dSCy Schubertcommand selects the key used as the password for the
6272b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
6282b15cb3dSCy Schubertutility.
6292b15cb3dSCy Schubert.Ss Public Key Cryptography
6302b15cb3dSCy SchubertNTPv4 supports the original NTPv3 symmetric key scheme
6312b15cb3dSCy Schubertdescribed in RFC-1305 and in addition the Autokey protocol,
6322b15cb3dSCy Schubertwhich is based on public key cryptography.
6332b15cb3dSCy SchubertThe Autokey Version 2 protocol described on the Autokey Protocol
6342b15cb3dSCy Schubertpage verifies packet integrity using MD5 message digests
6352b15cb3dSCy Schubertand verifies the source with digital signatures and any of several
6362b15cb3dSCy Schubertdigest/signature schemes.
6372b15cb3dSCy SchubertOptional identity schemes described on the Identity Schemes
6382b15cb3dSCy Schubertpage and based on cryptographic challenge/response algorithms
6392b15cb3dSCy Schubertare also available.
6402b15cb3dSCy SchubertUsing all of these schemes provides strong security against
6412b15cb3dSCy Schubertreplay with or without modification, spoofing, masquerade
6422b15cb3dSCy Schubertand most forms of clogging attacks.
6432b15cb3dSCy Schubert.\" .Pp
6442b15cb3dSCy Schubert.\" The cryptographic means necessary for all Autokey operations
6452b15cb3dSCy Schubert.\" is provided by the OpenSSL software library.
6462b15cb3dSCy Schubert.\" This library is available from http://www.openssl.org/
6472b15cb3dSCy Schubert.\" and can be installed using the procedures outlined
6482b15cb3dSCy Schubert.\" in the Building and Installing the Distribution page.
6492b15cb3dSCy Schubert.\" Once installed,
6502b15cb3dSCy Schubert.\" the configure and build
6512b15cb3dSCy Schubert.\" process automatically detects the library and links
6522b15cb3dSCy Schubert.\" the library routines required.
6532b15cb3dSCy Schubert.Pp
6542b15cb3dSCy SchubertThe Autokey protocol has several modes of operation
6552b15cb3dSCy Schubertcorresponding to the various NTP modes supported.
6562b15cb3dSCy SchubertMost modes use a special cookie which can be
6572b15cb3dSCy Schubertcomputed independently by the client and server,
6582b15cb3dSCy Schubertbut encrypted in transmission.
6592b15cb3dSCy SchubertAll modes use in addition a variant of the S-KEY scheme,
6602b15cb3dSCy Schubertin which a pseudo-random key list is generated and used
6612b15cb3dSCy Schubertin reverse order.
6622b15cb3dSCy SchubertThese schemes are described along with an executive summary,
6632b15cb3dSCy Schubertcurrent status, briefing slides and reading list on the
6642b15cb3dSCy Schubert.Sx Autonomous Authentication
6652b15cb3dSCy Schubertpage.
6662b15cb3dSCy Schubert.Pp
6672b15cb3dSCy SchubertThe specific cryptographic environment used by Autokey servers
6682b15cb3dSCy Schubertand clients is determined by a set of files
6692b15cb3dSCy Schubertand soft links generated by the
6702b15cb3dSCy Schubert.Xr ntp-keygen 1ntpkeygenmdoc
6712b15cb3dSCy Schubertprogram.
6722b15cb3dSCy SchubertThis includes a required host key file,
6732b15cb3dSCy Schubertrequired certificate file and optional sign key file,
6742b15cb3dSCy Schubertleapsecond file and identity scheme files.
6752b15cb3dSCy SchubertThe
6762b15cb3dSCy Schubertdigest/signature scheme is specified in the X.509 certificate
6772b15cb3dSCy Schubertalong with the matching sign key.
6782b15cb3dSCy SchubertThere are several schemes
6792b15cb3dSCy Schubertavailable in the OpenSSL software library, each identified
6802b15cb3dSCy Schubertby a specific string such as
6812b15cb3dSCy Schubert.Cm md5WithRSAEncryption ,
6822b15cb3dSCy Schubertwhich stands for the MD5 message digest with RSA
6832b15cb3dSCy Schubertencryption scheme.
6842b15cb3dSCy SchubertThe current NTP distribution supports
6852b15cb3dSCy Schubertall the schemes in the OpenSSL library, including
6862b15cb3dSCy Schubertthose based on RSA and DSA digital signatures.
6872b15cb3dSCy Schubert.Pp
6882b15cb3dSCy SchubertNTP secure groups can be used to define cryptographic compartments
6892b15cb3dSCy Schubertand security hierarchies.
6902b15cb3dSCy SchubertIt is important that every host
6912b15cb3dSCy Schubertin the group be able to construct a certificate trail to one
6922b15cb3dSCy Schubertor more trusted hosts in the same group.
6932b15cb3dSCy SchubertEach group
6942b15cb3dSCy Schuberthost runs the Autokey protocol to obtain the certificates
6952b15cb3dSCy Schubertfor all hosts along the trail to one or more trusted hosts.
6962b15cb3dSCy SchubertThis requires the configuration file in all hosts to be
6972b15cb3dSCy Schubertengineered so that, even under anticipated failure conditions,
6982b15cb3dSCy Schubertthe NTP subnet will form such that every group host can find
6992b15cb3dSCy Schuberta trail to at least one trusted host.
7002b15cb3dSCy Schubert.Ss Naming and Addressing
7012b15cb3dSCy SchubertIt is important to note that Autokey does not use DNS to
7022b15cb3dSCy Schubertresolve addresses, since DNS can't be completely trusted
7032b15cb3dSCy Schubertuntil the name servers have synchronized clocks.
7042b15cb3dSCy SchubertThe cryptographic name used by Autokey to bind the host identity
7052b15cb3dSCy Schubertcredentials and cryptographic values must be independent
7062b15cb3dSCy Schubertof interface, network and any other naming convention.
7072b15cb3dSCy SchubertThe name appears in the host certificate in either or both
7082b15cb3dSCy Schubertthe subject and issuer fields, so protection against
7092b15cb3dSCy SchubertDNS compromise is essential.
7102b15cb3dSCy Schubert.Pp
7112b15cb3dSCy SchubertBy convention, the name of an Autokey host is the name returned
7122b15cb3dSCy Schubertby the Unix
7132b15cb3dSCy Schubert.Xr gethostname 2
7142b15cb3dSCy Schubertsystem call or equivalent in other systems.
7152b15cb3dSCy SchubertBy the system design
7162b15cb3dSCy Schubertmodel, there are no provisions to allow alternate names or aliases.
7172b15cb3dSCy SchubertHowever, this is not to say that DNS aliases, different names
7182b15cb3dSCy Schubertfor each interface, etc., are constrained in any way.
7192b15cb3dSCy Schubert.Pp
7202b15cb3dSCy SchubertIt is also important to note that Autokey verifies authenticity
7212b15cb3dSCy Schubertusing the host name, network address and public keys,
7222b15cb3dSCy Schubertall of which are bound together by the protocol specifically
7232b15cb3dSCy Schubertto deflect masquerade attacks.
7242b15cb3dSCy SchubertFor this reason Autokey
7254990d495SXin LIincludes the source and destination IP addresses in message digest
7262b15cb3dSCy Schubertcomputations and so the same addresses must be available
7272b15cb3dSCy Schubertat both the server and client.
7282b15cb3dSCy SchubertFor this reason operation
7292b15cb3dSCy Schubertwith network address translation schemes is not possible.
7302b15cb3dSCy SchubertThis reflects the intended robust security model where government
7312b15cb3dSCy Schubertand corporate NTP servers are operated outside firewall perimeters.
7322b15cb3dSCy Schubert.Ss Operation
7332b15cb3dSCy SchubertA specific combination of authentication scheme (none,
7342b15cb3dSCy Schubertsymmetric key, public key) and identity scheme is called
7352b15cb3dSCy Schuberta cryptotype, although not all combinations are compatible.
7362b15cb3dSCy SchubertThere may be management configurations where the clients,
7372b15cb3dSCy Schubertservers and peers may not all support the same cryptotypes.
7382b15cb3dSCy SchubertA secure NTPv4 subnet can be configured in many ways while
7392b15cb3dSCy Schubertkeeping in mind the principles explained above and
7402b15cb3dSCy Schubertin this section.
7412b15cb3dSCy SchubertNote however that some cryptotype
7422b15cb3dSCy Schubertcombinations may successfully interoperate with each other,
7432b15cb3dSCy Schubertbut may not represent good security practice.
7442b15cb3dSCy Schubert.Pp
7452b15cb3dSCy SchubertThe cryptotype of an association is determined at the time
7462b15cb3dSCy Schubertof mobilization, either at configuration time or some time
7472b15cb3dSCy Schubertlater when a message of appropriate cryptotype arrives.
7482b15cb3dSCy SchubertWhen mobilized by a
7492b15cb3dSCy Schubert.Ic server
7502b15cb3dSCy Schubertor
7512b15cb3dSCy Schubert.Ic peer
7522b15cb3dSCy Schubertconfiguration command and no
7532b15cb3dSCy Schubert.Ic key
7542b15cb3dSCy Schubertor
7552b15cb3dSCy Schubert.Ic autokey
7562b15cb3dSCy Schubertsubcommands are present, the association is not
7572b15cb3dSCy Schubertauthenticated; if the
7582b15cb3dSCy Schubert.Ic key
7592b15cb3dSCy Schubertsubcommand is present, the association is authenticated
7602b15cb3dSCy Schubertusing the symmetric key ID specified; if the
7612b15cb3dSCy Schubert.Ic autokey
7622b15cb3dSCy Schubertsubcommand is present, the association is authenticated
7632b15cb3dSCy Schubertusing Autokey.
7642b15cb3dSCy Schubert.Pp
7652b15cb3dSCy SchubertWhen multiple identity schemes are supported in the Autokey
7662b15cb3dSCy Schubertprotocol, the first message exchange determines which one is used.
7672b15cb3dSCy SchubertThe client request message contains bits corresponding
7682b15cb3dSCy Schubertto which schemes it has available.
7692b15cb3dSCy SchubertThe server response message
7702b15cb3dSCy Schubertcontains bits corresponding to which schemes it has available.
7712b15cb3dSCy SchubertBoth server and client match the received bits with their own
7722b15cb3dSCy Schubertand select a common scheme.
7732b15cb3dSCy Schubert.Pp
7742b15cb3dSCy SchubertFollowing the principle that time is a public value,
7752b15cb3dSCy Schuberta server responds to any client packet that matches
7762b15cb3dSCy Schubertits cryptotype capabilities.
7772b15cb3dSCy SchubertThus, a server receiving
7782b15cb3dSCy Schubertan unauthenticated packet will respond with an unauthenticated
7792b15cb3dSCy Schubertpacket, while the same server receiving a packet of a cryptotype
7802b15cb3dSCy Schubertit supports will respond with packets of that cryptotype.
7812b15cb3dSCy SchubertHowever, unconfigured broadcast or manycast client
7822b15cb3dSCy Schubertassociations or symmetric passive associations will not be
7832b15cb3dSCy Schubertmobilized unless the server supports a cryptotype compatible
7842b15cb3dSCy Schubertwith the first packet received.
7852b15cb3dSCy SchubertBy default, unauthenticated associations will not be mobilized
7862b15cb3dSCy Schubertunless overridden in a decidedly dangerous way.
7872b15cb3dSCy Schubert.Pp
7882b15cb3dSCy SchubertSome examples may help to reduce confusion.
7892b15cb3dSCy SchubertClient Alice has no specific cryptotype selected.
7902b15cb3dSCy SchubertServer Bob has both a symmetric key file and minimal Autokey files.
7912b15cb3dSCy SchubertAlice's unauthenticated messages arrive at Bob, who replies with
7922b15cb3dSCy Schubertunauthenticated messages.
7932b15cb3dSCy SchubertCathy has a copy of Bob's symmetric
7942b15cb3dSCy Schubertkey file and has selected key ID 4 in messages to Bob.
7952b15cb3dSCy SchubertBob verifies the message with his key ID 4.
7962b15cb3dSCy SchubertIf it's the
7972b15cb3dSCy Schubertsame key and the message is verified, Bob sends Cathy a reply
7982b15cb3dSCy Schubertauthenticated with that key.
7992b15cb3dSCy SchubertIf verification fails,
8002b15cb3dSCy SchubertBob sends Cathy a thing called a crypto-NAK, which tells her
8012b15cb3dSCy Schubertsomething broke.
8022b15cb3dSCy SchubertShe can see the evidence using the
8032b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
8042b15cb3dSCy Schubertprogram.
8052b15cb3dSCy Schubert.Pp
8062b15cb3dSCy SchubertDenise has rolled her own host key and certificate.
8072b15cb3dSCy SchubertShe also uses one of the identity schemes as Bob.
8082b15cb3dSCy SchubertShe sends the first Autokey message to Bob and they
8092b15cb3dSCy Schubertboth dance the protocol authentication and identity steps.
8102b15cb3dSCy SchubertIf all comes out okay, Denise and Bob continue as described above.
8112b15cb3dSCy Schubert.Pp
8122b15cb3dSCy SchubertIt should be clear from the above that Bob can support
8132b15cb3dSCy Schubertall the girls at the same time, as long as he has compatible
8142b15cb3dSCy Schubertauthentication and identity credentials.
8152b15cb3dSCy SchubertNow, Bob can act just like the girls in his own choice of servers;
8162b15cb3dSCy Schuberthe can run multiple configured associations with multiple different
8172b15cb3dSCy Schubertservers (or the same server, although that might not be useful).
8182b15cb3dSCy SchubertBut, wise security policy might preclude some cryptotype
8192b15cb3dSCy Schubertcombinations; for instance, running an identity scheme
8202b15cb3dSCy Schubertwith one server and no authentication with another might not be wise.
8212b15cb3dSCy Schubert.Ss Key Management
8222b15cb3dSCy SchubertThe cryptographic values used by the Autokey protocol are
8232b15cb3dSCy Schubertincorporated as a set of files generated by the
8242b15cb3dSCy Schubert.Xr ntp-keygen 1ntpkeygenmdoc
8252b15cb3dSCy Schubertutility program, including symmetric key, host key and
8262b15cb3dSCy Schubertpublic certificate files, as well as sign key, identity parameters
8272b15cb3dSCy Schubertand leapseconds files.
8282b15cb3dSCy SchubertAlternatively, host and sign keys and
8292b15cb3dSCy Schubertcertificate files can be generated by the OpenSSL utilities
8302b15cb3dSCy Schubertand certificates can be imported from public certificate
8312b15cb3dSCy Schubertauthorities.
8322b15cb3dSCy SchubertNote that symmetric keys are necessary for the
8332b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
8342b15cb3dSCy Schubertand
8352b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
8362b15cb3dSCy Schubertutility programs.
8372b15cb3dSCy SchubertThe remaining files are necessary only for the
8382b15cb3dSCy SchubertAutokey protocol.
8392b15cb3dSCy Schubert.Pp
8402b15cb3dSCy SchubertCertificates imported from OpenSSL or public certificate
8412b15cb3dSCy Schubertauthorities have certian limitations.
8422b15cb3dSCy SchubertThe certificate should be in ASN.1 syntax, X.509 Version 3
8432b15cb3dSCy Schubertformat and encoded in PEM, which is the same format
8442b15cb3dSCy Schubertused by OpenSSL.
8452b15cb3dSCy SchubertThe overall length of the certificate encoded
8462b15cb3dSCy Schubertin ASN.1 must not exceed 1024 bytes.
8472b15cb3dSCy SchubertThe subject distinguished
8482b15cb3dSCy Schubertname field (CN) is the fully qualified name of the host
8492b15cb3dSCy Schuberton which it is used; the remaining subject fields are ignored.
8502b15cb3dSCy SchubertThe certificate extension fields must not contain either
8512b15cb3dSCy Schuberta subject key identifier or a issuer key identifier field;
8522b15cb3dSCy Schuberthowever, an extended key usage field for a trusted host must
8532b15cb3dSCy Schubertcontain the value
8542b15cb3dSCy Schubert.Cm trustRoot ; .
8552b15cb3dSCy SchubertOther extension fields are ignored.
8562b15cb3dSCy Schubert.Ss Authentication Commands
8572b15cb3dSCy Schubert.Bl -tag -width indent
8582b15cb3dSCy Schubert.It Ic autokey Op Ar logsec
8592b15cb3dSCy SchubertSpecifies the interval between regenerations of the session key
8602b15cb3dSCy Schubertlist used with the Autokey protocol.
8612b15cb3dSCy SchubertNote that the size of the key
8622b15cb3dSCy Schubertlist for each association depends on this interval and the current
8632b15cb3dSCy Schubertpoll interval.
8642b15cb3dSCy SchubertThe default value is 12 (4096 s or about 1.1 hours).
8652b15cb3dSCy SchubertFor poll intervals above the specified interval, a session key list
8662b15cb3dSCy Schubertwith a single entry will be regenerated for every message
8672b15cb3dSCy Schubertsent.
8682b15cb3dSCy Schubert.It Ic controlkey Ar key
8692b15cb3dSCy SchubertSpecifies the key identifier to use with the
8702b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
8712b15cb3dSCy Schubertutility, which uses the standard
8722b15cb3dSCy Schubertprotocol defined in RFC-1305.
8732b15cb3dSCy SchubertThe
8742b15cb3dSCy Schubert.Ar key
8752b15cb3dSCy Schubertargument is
8762b15cb3dSCy Schubertthe key identifier for a trusted key, where the value can be in the
8774e1ef62aSXin LIrange 1 to 65,535, inclusive.
8782b15cb3dSCy Schubert.It Xo Ic crypto
8792b15cb3dSCy Schubert.Op Cm cert Ar file
8802b15cb3dSCy Schubert.Op Cm leap Ar file
8812b15cb3dSCy Schubert.Op Cm randfile Ar file
8822b15cb3dSCy Schubert.Op Cm host Ar file
8832b15cb3dSCy Schubert.Op Cm gq Ar file
8842b15cb3dSCy Schubert.Op Cm gqpar Ar file
8852b15cb3dSCy Schubert.Op Cm iffpar Ar file
8862b15cb3dSCy Schubert.Op Cm mvpar Ar file
8872b15cb3dSCy Schubert.Op Cm pw Ar password
8882b15cb3dSCy Schubert.Xc
8892b15cb3dSCy SchubertThis command requires the OpenSSL library.
8902b15cb3dSCy SchubertIt activates public key
8912b15cb3dSCy Schubertcryptography, selects the message digest and signature
8922b15cb3dSCy Schubertencryption scheme and loads the required private and public
8932b15cb3dSCy Schubertvalues described above.
8942b15cb3dSCy SchubertIf one or more files are left unspecified,
8952b15cb3dSCy Schubertthe default names are used as described above.
8962b15cb3dSCy SchubertUnless the complete path and name of the file are specified, the
8972b15cb3dSCy Schubertlocation of a file is relative to the keys directory specified
8982b15cb3dSCy Schubertin the
8992b15cb3dSCy Schubert.Ic keysdir
9002b15cb3dSCy Schubertcommand or default
9012b15cb3dSCy Schubert.Pa /usr/local/etc .
9022b15cb3dSCy SchubertFollowing are the subcommands:
9032b15cb3dSCy Schubert.Bl -tag -width indent
9042b15cb3dSCy Schubert.It Cm cert Ar file
9052b15cb3dSCy SchubertSpecifies the location of the required host public certificate file.
9062b15cb3dSCy SchubertThis overrides the link
9072b15cb3dSCy Schubert.Pa ntpkey_cert_ Ns Ar hostname
9082b15cb3dSCy Schubertin the keys directory.
9092b15cb3dSCy Schubert.It Cm gqpar Ar file
9102b15cb3dSCy SchubertSpecifies the location of the optional GQ parameters file.
9112b15cb3dSCy SchubertThis
9122b15cb3dSCy Schubertoverrides the link
9132b15cb3dSCy Schubert.Pa ntpkey_gq_ Ns Ar hostname
9142b15cb3dSCy Schubertin the keys directory.
9152b15cb3dSCy Schubert.It Cm host Ar file
9162b15cb3dSCy SchubertSpecifies the location of the required host key file.
9172b15cb3dSCy SchubertThis overrides
9182b15cb3dSCy Schubertthe link
9192b15cb3dSCy Schubert.Pa ntpkey_key_ Ns Ar hostname
9202b15cb3dSCy Schubertin the keys directory.
9212b15cb3dSCy Schubert.It Cm iffpar Ar file
9224990d495SXin LISpecifies the location of the optional IFF parameters file.
9234990d495SXin LIThis overrides the link
9242b15cb3dSCy Schubert.Pa ntpkey_iff_ Ns Ar hostname
9252b15cb3dSCy Schubertin the keys directory.
9262b15cb3dSCy Schubert.It Cm leap Ar file
9272b15cb3dSCy SchubertSpecifies the location of the optional leapsecond file.
9282b15cb3dSCy SchubertThis overrides the link
9292b15cb3dSCy Schubert.Pa ntpkey_leap
9302b15cb3dSCy Schubertin the keys directory.
9312b15cb3dSCy Schubert.It Cm mvpar Ar file
9322b15cb3dSCy SchubertSpecifies the location of the optional MV parameters file.
9334990d495SXin LIThis overrides the link
9342b15cb3dSCy Schubert.Pa ntpkey_mv_ Ns Ar hostname
9352b15cb3dSCy Schubertin the keys directory.
9362b15cb3dSCy Schubert.It Cm pw Ar password
9372b15cb3dSCy SchubertSpecifies the password to decrypt files containing private keys and
9382b15cb3dSCy Schubertidentity parameters.
9392b15cb3dSCy SchubertThis is required only if these files have been
9402b15cb3dSCy Schubertencrypted.
9412b15cb3dSCy Schubert.It Cm randfile Ar file
9422b15cb3dSCy SchubertSpecifies the location of the random seed file used by the OpenSSL
9432b15cb3dSCy Schubertlibrary.
9442b15cb3dSCy SchubertThe defaults are described in the main text above.
9452b15cb3dSCy Schubert.El
9462b15cb3dSCy Schubert.It Ic keys Ar keyfile
9472b15cb3dSCy SchubertSpecifies the complete path and location of the MD5 key file
9482b15cb3dSCy Schubertcontaining the keys and key identifiers used by
9492b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc ,
9502b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
9512b15cb3dSCy Schubertand
9522b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
9532b15cb3dSCy Schubertwhen operating with symmetric key cryptography.
9542b15cb3dSCy SchubertThis is the same operation as the
9552b15cb3dSCy Schubert.Fl k
9562b15cb3dSCy Schubertcommand line option.
9572b15cb3dSCy Schubert.It Ic keysdir Ar path
9582b15cb3dSCy SchubertThis command specifies the default directory path for
9592b15cb3dSCy Schubertcryptographic keys, parameters and certificates.
9602b15cb3dSCy SchubertThe default is
9612b15cb3dSCy Schubert.Pa /usr/local/etc/ .
9622b15cb3dSCy Schubert.It Ic requestkey Ar key
9632b15cb3dSCy SchubertSpecifies the key identifier to use with the
9642b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
9652b15cb3dSCy Schubertutility program, which uses a
9662b15cb3dSCy Schubertproprietary protocol specific to this implementation of
9672b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc .
9682b15cb3dSCy SchubertThe
9692b15cb3dSCy Schubert.Ar key
9702b15cb3dSCy Schubertargument is a key identifier
9712b15cb3dSCy Schubertfor the trusted key, where the value can be in the range 1 to
9724e1ef62aSXin LI65,535, inclusive.
9732b15cb3dSCy Schubert.It Ic revoke Ar logsec
9742b15cb3dSCy SchubertSpecifies the interval between re-randomization of certain
9752b15cb3dSCy Schubertcryptographic values used by the Autokey scheme, as a power of 2 in
9762b15cb3dSCy Schubertseconds.
9772b15cb3dSCy SchubertThese values need to be updated frequently in order to
9782b15cb3dSCy Schubertdeflect brute-force attacks on the algorithms of the scheme;
9792b15cb3dSCy Schuberthowever, updating some values is a relatively expensive operation.
9802b15cb3dSCy SchubertThe default interval is 16 (65,536 s or about 18 hours).
9812b15cb3dSCy SchubertFor poll
9822b15cb3dSCy Schubertintervals above the specified interval, the values will be updated
9832b15cb3dSCy Schubertfor every message sent.
9842b15cb3dSCy Schubert.It Ic trustedkey Ar key ...
9852b15cb3dSCy SchubertSpecifies the key identifiers which are trusted for the
9862b15cb3dSCy Schubertpurposes of authenticating peers with symmetric key cryptography,
9872b15cb3dSCy Schubertas well as keys used by the
9882b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
9892b15cb3dSCy Schubertand
9902b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
9912b15cb3dSCy Schubertprograms.
9922b15cb3dSCy SchubertThe authentication procedures require that both the local
9932b15cb3dSCy Schubertand remote servers share the same key and key identifier for this
9942b15cb3dSCy Schubertpurpose, although different keys can be used with different
9952b15cb3dSCy Schubertservers.
9962b15cb3dSCy SchubertThe
9972b15cb3dSCy Schubert.Ar key
9982b15cb3dSCy Schubertarguments are 32-bit unsigned
9994e1ef62aSXin LIintegers with values from 1 to 65,535.
10002b15cb3dSCy Schubert.El
10012b15cb3dSCy Schubert.Ss Error Codes
10022b15cb3dSCy SchubertThe following error codes are reported via the NTP control
10032b15cb3dSCy Schubertand monitoring protocol trap mechanism.
10042b15cb3dSCy Schubert.Bl -tag -width indent
10052b15cb3dSCy Schubert.It 101
10062b15cb3dSCy Schubert.Pq bad field format or length
10072b15cb3dSCy SchubertThe packet has invalid version, length or format.
10082b15cb3dSCy Schubert.It 102
10092b15cb3dSCy Schubert.Pq bad timestamp
10102b15cb3dSCy SchubertThe packet timestamp is the same or older than the most recent received.
10112b15cb3dSCy SchubertThis could be due to a replay or a server clock time step.
10122b15cb3dSCy Schubert.It 103
10132b15cb3dSCy Schubert.Pq bad filestamp
10142b15cb3dSCy SchubertThe packet filestamp is the same or older than the most recent received.
10152b15cb3dSCy SchubertThis could be due to a replay or a key file generation error.
10162b15cb3dSCy Schubert.It 104
10172b15cb3dSCy Schubert.Pq bad or missing public key
10182b15cb3dSCy SchubertThe public key is missing, has incorrect format or is an unsupported type.
10192b15cb3dSCy Schubert.It 105
10202b15cb3dSCy Schubert.Pq unsupported digest type
10212b15cb3dSCy SchubertThe server requires an unsupported digest/signature scheme.
10222b15cb3dSCy Schubert.It 106
10232b15cb3dSCy Schubert.Pq mismatched digest types
10242b15cb3dSCy SchubertNot used.
10252b15cb3dSCy Schubert.It 107
10262b15cb3dSCy Schubert.Pq bad signature length
10272b15cb3dSCy SchubertThe signature length does not match the current public key.
10282b15cb3dSCy Schubert.It 108
10292b15cb3dSCy Schubert.Pq signature not verified
10302b15cb3dSCy SchubertThe message fails the signature check.
10312b15cb3dSCy SchubertIt could be bogus or signed by a
10322b15cb3dSCy Schubertdifferent private key.
10332b15cb3dSCy Schubert.It 109
10342b15cb3dSCy Schubert.Pq certificate not verified
10352b15cb3dSCy SchubertThe certificate is invalid or signed with the wrong key.
10362b15cb3dSCy Schubert.It 110
10372b15cb3dSCy Schubert.Pq certificate not verified
10382b15cb3dSCy SchubertThe certificate is not yet valid or has expired or the signature could not
10392b15cb3dSCy Schubertbe verified.
10402b15cb3dSCy Schubert.It 111
10412b15cb3dSCy Schubert.Pq bad or missing cookie
10422b15cb3dSCy SchubertThe cookie is missing, corrupted or bogus.
10432b15cb3dSCy Schubert.It 112
10442b15cb3dSCy Schubert.Pq bad or missing leapseconds table
10452b15cb3dSCy SchubertThe leapseconds table is missing, corrupted or bogus.
10462b15cb3dSCy Schubert.It 113
10472b15cb3dSCy Schubert.Pq bad or missing certificate
10482b15cb3dSCy SchubertThe certificate is missing, corrupted or bogus.
10492b15cb3dSCy Schubert.It 114
10502b15cb3dSCy Schubert.Pq bad or missing identity
10512b15cb3dSCy SchubertThe identity key is missing, corrupt or bogus.
10522b15cb3dSCy Schubert.El
10532b15cb3dSCy Schubert.Sh Monitoring Support
10542b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
10552b15cb3dSCy Schubertincludes a comprehensive monitoring facility suitable
10562b15cb3dSCy Schubertfor continuous, long term recording of server and client
10572b15cb3dSCy Schuberttimekeeping performance.
10582b15cb3dSCy SchubertSee the
10592b15cb3dSCy Schubert.Ic statistics
10602b15cb3dSCy Schubertcommand below
10612b15cb3dSCy Schubertfor a listing and example of each type of statistics currently
10622b15cb3dSCy Schubertsupported.
10632b15cb3dSCy SchubertStatistic files are managed using file generation sets
10642b15cb3dSCy Schubertand scripts in the
10652b15cb3dSCy Schubert.Pa ./scripts
10664990d495SXin LIdirectory of the source code distribution.
10672b15cb3dSCy SchubertUsing
10682b15cb3dSCy Schubertthese facilities and
10692b15cb3dSCy Schubert.Ux
10702b15cb3dSCy Schubert.Xr cron 8
10712b15cb3dSCy Schubertjobs, the data can be
10722b15cb3dSCy Schubertautomatically summarized and archived for retrospective analysis.
10732b15cb3dSCy Schubert.Ss Monitoring Commands
10742b15cb3dSCy Schubert.Bl -tag -width indent
10752b15cb3dSCy Schubert.It Ic statistics Ar name ...
10762b15cb3dSCy SchubertEnables writing of statistics records.
10772b15cb3dSCy SchubertCurrently, eight kinds of
10782b15cb3dSCy Schubert.Ar name
10792b15cb3dSCy Schubertstatistics are supported.
10802b15cb3dSCy Schubert.Bl -tag -width indent
10812b15cb3dSCy Schubert.It Cm clockstats
10822b15cb3dSCy SchubertEnables recording of clock driver statistics information.
10832b15cb3dSCy SchubertEach update
10842b15cb3dSCy Schubertreceived from a clock driver appends a line of the following form to
10852b15cb3dSCy Schubertthe file generation set named
10862b15cb3dSCy Schubert.Cm clockstats :
10872b15cb3dSCy Schubert.Bd -literal
10882b15cb3dSCy Schubert49213 525.624 127.127.4.1 93 226 00:08:29.606 D
10892b15cb3dSCy Schubert.Ed
10902b15cb3dSCy Schubert.Pp
10912b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and time
10922b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
10932b15cb3dSCy SchubertThe next field shows the
10942b15cb3dSCy Schubertclock address in dotted-quad notation.
10952b15cb3dSCy SchubertThe final field shows the last
10962b15cb3dSCy Schuberttimecode received from the clock in decoded ASCII format, where
10972b15cb3dSCy Schubertmeaningful.
10982b15cb3dSCy SchubertIn some clock drivers a good deal of additional information
10992b15cb3dSCy Schubertcan be gathered and displayed as well.
11002b15cb3dSCy SchubertSee information specific to each
11012b15cb3dSCy Schubertclock for further details.
11022b15cb3dSCy Schubert.It Cm cryptostats
11032b15cb3dSCy SchubertThis option requires the OpenSSL cryptographic software library.
11042b15cb3dSCy SchubertIt
11052b15cb3dSCy Schubertenables recording of cryptographic public key protocol information.
11062b15cb3dSCy SchubertEach message received by the protocol module appends a line of the
11072b15cb3dSCy Schubertfollowing form to the file generation set named
11082b15cb3dSCy Schubert.Cm cryptostats :
11092b15cb3dSCy Schubert.Bd -literal
11102b15cb3dSCy Schubert49213 525.624 127.127.4.1 message
11112b15cb3dSCy Schubert.Ed
11122b15cb3dSCy Schubert.Pp
11132b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and time
11142b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
11152b15cb3dSCy SchubertThe next field shows the peer
11162b15cb3dSCy Schubertaddress in dotted-quad notation, The final message field includes the
11172b15cb3dSCy Schubertmessage type and certain ancillary information.
11182b15cb3dSCy SchubertSee the
11192b15cb3dSCy Schubert.Sx Authentication Options
11202b15cb3dSCy Schubertsection for further information.
11212b15cb3dSCy Schubert.It Cm loopstats
11222b15cb3dSCy SchubertEnables recording of loop filter statistics information.
11232b15cb3dSCy SchubertEach
11242b15cb3dSCy Schubertupdate of the local clock outputs a line of the following form to
11252b15cb3dSCy Schubertthe file generation set named
11262b15cb3dSCy Schubert.Cm loopstats :
11272b15cb3dSCy Schubert.Bd -literal
11282b15cb3dSCy Schubert50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
11292b15cb3dSCy Schubert.Ed
11302b15cb3dSCy Schubert.Pp
11312b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and
11322b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
11332b15cb3dSCy SchubertThe next five fields
11342b15cb3dSCy Schubertshow time offset (seconds), frequency offset (parts per million -
11352b15cb3dSCy SchubertPPM), RMS jitter (seconds), Allan deviation (PPM) and clock
11362b15cb3dSCy Schubertdiscipline time constant.
11372b15cb3dSCy Schubert.It Cm peerstats
11382b15cb3dSCy SchubertEnables recording of peer statistics information.
11392b15cb3dSCy SchubertThis includes
11402b15cb3dSCy Schubertstatistics records of all peers of a NTP server and of special
11412b15cb3dSCy Schubertsignals, where present and configured.
11422b15cb3dSCy SchubertEach valid update appends a
11432b15cb3dSCy Schubertline of the following form to the current element of a file
11442b15cb3dSCy Schubertgeneration set named
11452b15cb3dSCy Schubert.Cm peerstats :
11462b15cb3dSCy Schubert.Bd -literal
11472b15cb3dSCy Schubert48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
11482b15cb3dSCy Schubert.Ed
11492b15cb3dSCy Schubert.Pp
11502b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and
11512b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
11522b15cb3dSCy SchubertThe next two fields
11532b15cb3dSCy Schubertshow the peer address in dotted-quad notation and status,
11542b15cb3dSCy Schubertrespectively.
11552b15cb3dSCy SchubertThe status field is encoded in hex in the format
11562b15cb3dSCy Schubertdescribed in Appendix A of the NTP specification RFC 1305.
11572b15cb3dSCy SchubertThe final four fields show the offset,
11582b15cb3dSCy Schubertdelay, dispersion and RMS jitter, all in seconds.
11592b15cb3dSCy Schubert.It Cm rawstats
11602b15cb3dSCy SchubertEnables recording of raw-timestamp statistics information.
11612b15cb3dSCy SchubertThis
11622b15cb3dSCy Schubertincludes statistics records of all peers of a NTP server and of
11632b15cb3dSCy Schubertspecial signals, where present and configured.
11642b15cb3dSCy SchubertEach NTP message
11652b15cb3dSCy Schubertreceived from a peer or clock driver appends a line of the
11662b15cb3dSCy Schubertfollowing form to the file generation set named
11672b15cb3dSCy Schubert.Cm rawstats :
11682b15cb3dSCy Schubert.Bd -literal
11692b15cb3dSCy Schubert50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
11702b15cb3dSCy Schubert.Ed
11712b15cb3dSCy Schubert.Pp
11722b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and
11732b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
11742b15cb3dSCy SchubertThe next two fields
11752b15cb3dSCy Schubertshow the remote peer or clock address followed by the local address
11762b15cb3dSCy Schubertin dotted-quad notation.
11772b15cb3dSCy SchubertThe final four fields show the originate,
11782b15cb3dSCy Schubertreceive, transmit and final NTP timestamps in order.
11792b15cb3dSCy SchubertThe timestamp
11802b15cb3dSCy Schubertvalues are as received and before processing by the various data
11812b15cb3dSCy Schubertsmoothing and mitigation algorithms.
11822b15cb3dSCy Schubert.It Cm sysstats
11832b15cb3dSCy SchubertEnables recording of ntpd statistics counters on a periodic basis.
11842b15cb3dSCy SchubertEach
11852b15cb3dSCy Schuberthour a line of the following form is appended to the file generation
11862b15cb3dSCy Schubertset named
11872b15cb3dSCy Schubert.Cm sysstats :
11882b15cb3dSCy Schubert.Bd -literal
11892b15cb3dSCy Schubert50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
11902b15cb3dSCy Schubert.Ed
11912b15cb3dSCy Schubert.Pp
11922b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and time
11932b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
11942b15cb3dSCy SchubertThe remaining ten fields show
11952b15cb3dSCy Schubertthe statistics counter values accumulated since the last generated
11962b15cb3dSCy Schubertline.
11972b15cb3dSCy Schubert.Bl -tag -width indent
11982b15cb3dSCy Schubert.It Time since restart Cm 36000
11992b15cb3dSCy SchubertTime in hours since the system was last rebooted.
12002b15cb3dSCy Schubert.It Packets received Cm 81965
12012b15cb3dSCy SchubertTotal number of packets received.
12022b15cb3dSCy Schubert.It Packets processed Cm 0
12032b15cb3dSCy SchubertNumber of packets received in response to previous packets sent
12042b15cb3dSCy Schubert.It Current version Cm 9546
12052b15cb3dSCy SchubertNumber of packets matching the current NTP version.
12062b15cb3dSCy Schubert.It Previous version Cm 56
12072b15cb3dSCy SchubertNumber of packets matching the previous NTP version.
12082b15cb3dSCy Schubert.It Bad version Cm 71793
12092b15cb3dSCy SchubertNumber of packets matching neither NTP version.
12102b15cb3dSCy Schubert.It Access denied Cm 512
12112b15cb3dSCy SchubertNumber of packets denied access for any reason.
12122b15cb3dSCy Schubert.It Bad length or format Cm 540
12132b15cb3dSCy SchubertNumber of packets with invalid length, format or port number.
12142b15cb3dSCy Schubert.It Bad authentication Cm 10
12152b15cb3dSCy SchubertNumber of packets not verified as authentic.
12162b15cb3dSCy Schubert.It Rate exceeded Cm 147
12172b15cb3dSCy SchubertNumber of packets discarded due to rate limitation.
12182b15cb3dSCy Schubert.El
12192b15cb3dSCy Schubert.It Cm statsdir Ar directory_path
12202b15cb3dSCy SchubertIndicates the full path of a directory where statistics files
12212b15cb3dSCy Schubertshould be created (see below).
12222b15cb3dSCy SchubertThis keyword allows
12232b15cb3dSCy Schubertthe (otherwise constant)
12242b15cb3dSCy Schubert.Cm filegen
12252b15cb3dSCy Schubertfilename prefix to be modified for file generation sets, which
12262b15cb3dSCy Schubertis useful for handling statistics logs.
12272b15cb3dSCy Schubert.It Cm filegen Ar name Xo
12282b15cb3dSCy Schubert.Op Cm file Ar filename
12292b15cb3dSCy Schubert.Op Cm type Ar typename
12302b15cb3dSCy Schubert.Op Cm link | nolink
12312b15cb3dSCy Schubert.Op Cm enable | disable
12322b15cb3dSCy Schubert.Xc
12332b15cb3dSCy SchubertConfigures setting of generation file set name.
12342b15cb3dSCy SchubertGeneration
12352b15cb3dSCy Schubertfile sets provide a means for handling files that are
12362b15cb3dSCy Schubertcontinuously growing during the lifetime of a server.
12372b15cb3dSCy SchubertServer statistics are a typical example for such files.
12382b15cb3dSCy SchubertGeneration file sets provide access to a set of files used
12392b15cb3dSCy Schubertto store the actual data.
12402b15cb3dSCy SchubertAt any time at most one element
12412b15cb3dSCy Schubertof the set is being written to.
12422b15cb3dSCy SchubertThe type given specifies
12432b15cb3dSCy Schubertwhen and how data will be directed to a new element of the set.
12442b15cb3dSCy SchubertThis way, information stored in elements of a file set
12452b15cb3dSCy Schubertthat are currently unused are available for administrational
12462b15cb3dSCy Schubertoperations without the risk of disturbing the operation of ntpd.
12472b15cb3dSCy Schubert(Most important: they can be removed to free space for new data
12482b15cb3dSCy Schubertproduced.)
12492b15cb3dSCy Schubert.Pp
12502b15cb3dSCy SchubertNote that this command can be sent from the
12512b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
12522b15cb3dSCy Schubertprogram running at a remote location.
12532b15cb3dSCy Schubert.Bl -tag -width indent
12542b15cb3dSCy Schubert.It Cm name
12552b15cb3dSCy SchubertThis is the type of the statistics records, as shown in the
12562b15cb3dSCy Schubert.Cm statistics
12572b15cb3dSCy Schubertcommand.
12582b15cb3dSCy Schubert.It Cm file Ar filename
12592b15cb3dSCy SchubertThis is the file name for the statistics records.
12602b15cb3dSCy SchubertFilenames of set
12612b15cb3dSCy Schubertmembers are built from three concatenated elements
12622b15cb3dSCy Schubert.Ar Cm prefix ,
12632b15cb3dSCy Schubert.Ar Cm filename
12642b15cb3dSCy Schubertand
12652b15cb3dSCy Schubert.Ar Cm suffix :
12662b15cb3dSCy Schubert.Bl -tag -width indent
12672b15cb3dSCy Schubert.It Cm prefix
12682b15cb3dSCy SchubertThis is a constant filename path.
12692b15cb3dSCy SchubertIt is not subject to
12702b15cb3dSCy Schubertmodifications via the
12712b15cb3dSCy Schubert.Ar filegen
12722b15cb3dSCy Schubertoption.
12732b15cb3dSCy SchubertIt is defined by the
12742b15cb3dSCy Schubertserver, usually specified as a compile-time constant.
12752b15cb3dSCy SchubertIt may,
12762b15cb3dSCy Schuberthowever, be configurable for individual file generation sets
12772b15cb3dSCy Schubertvia other commands.
12782b15cb3dSCy SchubertFor example, the prefix used with
12792b15cb3dSCy Schubert.Ar loopstats
12802b15cb3dSCy Schubertand
12812b15cb3dSCy Schubert.Ar peerstats
12822b15cb3dSCy Schubertgeneration can be configured using the
12832b15cb3dSCy Schubert.Ar statsdir
12842b15cb3dSCy Schubertoption explained above.
12852b15cb3dSCy Schubert.It Cm filename
12862b15cb3dSCy SchubertThis string is directly concatenated to the prefix mentioned
12872b15cb3dSCy Schubertabove (no intervening
12882b15cb3dSCy Schubert.Ql / ) .
12892b15cb3dSCy SchubertThis can be modified using
12902b15cb3dSCy Schubertthe file argument to the
12912b15cb3dSCy Schubert.Ar filegen
12922b15cb3dSCy Schubertstatement.
12932b15cb3dSCy SchubertNo
12942b15cb3dSCy Schubert.Pa ..
12952b15cb3dSCy Schubertelements are
12962b15cb3dSCy Schubertallowed in this component to prevent filenames referring to
12972b15cb3dSCy Schubertparts outside the filesystem hierarchy denoted by
12982b15cb3dSCy Schubert.Ar prefix .
12992b15cb3dSCy Schubert.It Cm suffix
13002b15cb3dSCy SchubertThis part is reflects individual elements of a file set.
13012b15cb3dSCy SchubertIt is
13022b15cb3dSCy Schubertgenerated according to the type of a file set.
13032b15cb3dSCy Schubert.El
13042b15cb3dSCy Schubert.It Cm type Ar typename
13052b15cb3dSCy SchubertA file generation set is characterized by its type.
13062b15cb3dSCy SchubertThe following
13072b15cb3dSCy Schuberttypes are supported:
13082b15cb3dSCy Schubert.Bl -tag -width indent
13092b15cb3dSCy Schubert.It Cm none
13102b15cb3dSCy SchubertThe file set is actually a single plain file.
13112b15cb3dSCy Schubert.It Cm pid
13122b15cb3dSCy SchubertOne element of file set is used per incarnation of a ntpd
13132b15cb3dSCy Schubertserver.
13142b15cb3dSCy SchubertThis type does not perform any changes to file set
13152b15cb3dSCy Schubertmembers during runtime, however it provides an easy way of
13162b15cb3dSCy Schubertseparating files belonging to different
13172b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
13182b15cb3dSCy Schubertserver incarnations.
13192b15cb3dSCy SchubertThe set member filename is built by appending a
13202b15cb3dSCy Schubert.Ql \&.
13212b15cb3dSCy Schubertto concatenated
13222b15cb3dSCy Schubert.Ar prefix
13232b15cb3dSCy Schubertand
13242b15cb3dSCy Schubert.Ar filename
13252b15cb3dSCy Schubertstrings, and
13262b15cb3dSCy Schubertappending the decimal representation of the process ID of the
13272b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
13282b15cb3dSCy Schubertserver process.
13292b15cb3dSCy Schubert.It Cm day
13302b15cb3dSCy SchubertOne file generation set element is created per day.
13312b15cb3dSCy SchubertA day is
13322b15cb3dSCy Schubertdefined as the period between 00:00 and 24:00 UTC.
13332b15cb3dSCy SchubertThe file set
13342b15cb3dSCy Schubertmember suffix consists of a
13352b15cb3dSCy Schubert.Ql \&.
13362b15cb3dSCy Schubertand a day specification in
13372b15cb3dSCy Schubertthe form
13382b15cb3dSCy Schubert.Cm YYYYMMdd .
13392b15cb3dSCy Schubert.Cm YYYY
13402b15cb3dSCy Schubertis a 4-digit year number (e.g., 1992).
13412b15cb3dSCy Schubert.Cm MM
13422b15cb3dSCy Schubertis a two digit month number.
13432b15cb3dSCy Schubert.Cm dd
13442b15cb3dSCy Schubertis a two digit day number.
13452b15cb3dSCy SchubertThus, all information written at 10 December 1992 would end up
13462b15cb3dSCy Schubertin a file named
13472b15cb3dSCy Schubert.Ar prefix
13482b15cb3dSCy Schubert.Ar filename Ns .19921210 .
13492b15cb3dSCy Schubert.It Cm week
13502b15cb3dSCy SchubertAny file set member contains data related to a certain week of
13512b15cb3dSCy Schuberta year.
13522b15cb3dSCy SchubertThe term week is defined by computing day-of-year
13532b15cb3dSCy Schubertmodulo 7.
13542b15cb3dSCy SchubertElements of such a file generation set are
13552b15cb3dSCy Schubertdistinguished by appending the following suffix to the file set
13562b15cb3dSCy Schubertfilename base: A dot, a 4-digit year number, the letter
13572b15cb3dSCy Schubert.Cm W ,
13582b15cb3dSCy Schubertand a 2-digit week number.
13592b15cb3dSCy SchubertFor example, information from January,
13602b15cb3dSCy Schubert10th 1992 would end up in a file with suffix
13612b15cb3dSCy Schubert.No . Ns Ar 1992W1 .
13622b15cb3dSCy Schubert.It Cm month
13632b15cb3dSCy SchubertOne generation file set element is generated per month.
13642b15cb3dSCy SchubertThe
13652b15cb3dSCy Schubertfile name suffix consists of a dot, a 4-digit year number, and
13662b15cb3dSCy Schuberta 2-digit month.
13672b15cb3dSCy Schubert.It Cm year
13682b15cb3dSCy SchubertOne generation file element is generated per year.
13692b15cb3dSCy SchubertThe filename
13702b15cb3dSCy Schubertsuffix consists of a dot and a 4 digit year number.
13712b15cb3dSCy Schubert.It Cm age
13722b15cb3dSCy SchubertThis type of file generation sets changes to a new element of
13732b15cb3dSCy Schubertthe file set every 24 hours of server operation.
13742b15cb3dSCy SchubertThe filename
13752b15cb3dSCy Schubertsuffix consists of a dot, the letter
13762b15cb3dSCy Schubert.Cm a ,
13772b15cb3dSCy Schubertand an 8-digit number.
13782b15cb3dSCy SchubertThis number is taken to be the number of seconds the server is
13792b15cb3dSCy Schubertrunning at the start of the corresponding 24-hour period.
13802b15cb3dSCy SchubertInformation is only written to a file generation by specifying
13812b15cb3dSCy Schubert.Cm enable ;
13822b15cb3dSCy Schubertoutput is prevented by specifying
13832b15cb3dSCy Schubert.Cm disable .
13842b15cb3dSCy Schubert.El
13852b15cb3dSCy Schubert.It Cm link | nolink
13862b15cb3dSCy SchubertIt is convenient to be able to access the current element of a file
13872b15cb3dSCy Schubertgeneration set by a fixed name.
13882b15cb3dSCy SchubertThis feature is enabled by
13892b15cb3dSCy Schubertspecifying
13902b15cb3dSCy Schubert.Cm link
13912b15cb3dSCy Schubertand disabled using
13922b15cb3dSCy Schubert.Cm nolink .
13932b15cb3dSCy SchubertIf link is specified, a
13942b15cb3dSCy Schuberthard link from the current file set element to a file without
13952b15cb3dSCy Schubertsuffix is created.
13962b15cb3dSCy SchubertWhen there is already a file with this name and
13972b15cb3dSCy Schubertthe number of links of this file is one, it is renamed appending a
13982b15cb3dSCy Schubertdot, the letter
13992b15cb3dSCy Schubert.Cm C ,
14004990d495SXin LIand the pid of the
14014990d495SXin LI.Xr ntpd 1ntpdmdoc
14024990d495SXin LIserver process.
14032b15cb3dSCy SchubertWhen the
14042b15cb3dSCy Schubertnumber of links is greater than one, the file is unlinked.
14052b15cb3dSCy SchubertThis
14062b15cb3dSCy Schubertallows the current file to be accessed by a constant name.
14072b15cb3dSCy Schubert.It Cm enable \&| Cm disable
14082b15cb3dSCy SchubertEnables or disables the recording function.
14092b15cb3dSCy Schubert.El
14102b15cb3dSCy Schubert.El
14112b15cb3dSCy Schubert.El
14122b15cb3dSCy Schubert.Sh Access Control Support
14132b15cb3dSCy SchubertThe
14142b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
14152b15cb3dSCy Schubertdaemon implements a general purpose address/mask based restriction
14162b15cb3dSCy Schubertlist.
14172b15cb3dSCy SchubertThe list contains address/match entries sorted first
14182b15cb3dSCy Schubertby increasing address values and and then by increasing mask values.
14192b15cb3dSCy SchubertA match occurs when the bitwise AND of the mask and the packet
14202b15cb3dSCy Schubertsource address is equal to the bitwise AND of the mask and
14212b15cb3dSCy Schubertaddress in the list.
14222b15cb3dSCy SchubertThe list is searched in order with the
14232b15cb3dSCy Schubertlast match found defining the restriction flags associated
14242b15cb3dSCy Schubertwith the entry.
14252b15cb3dSCy SchubertAdditional information and examples can be found in the
14262b15cb3dSCy Schubert.Qq Notes on Configuring NTP and Setting up a NTP Subnet
14272b15cb3dSCy Schubertpage
14282b15cb3dSCy Schubert(available as part of the HTML documentation
14292b15cb3dSCy Schubertprovided in
14302b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
14312b15cb3dSCy Schubert.Pp
14322b15cb3dSCy SchubertThe restriction facility was implemented in conformance
14332b15cb3dSCy Schubertwith the access policies for the original NSFnet backbone
14342b15cb3dSCy Schuberttime servers.
14352b15cb3dSCy SchubertLater the facility was expanded to deflect
14362b15cb3dSCy Schubertcryptographic and clogging attacks.
14372b15cb3dSCy SchubertWhile this facility may
14382b15cb3dSCy Schubertbe useful for keeping unwanted or broken or malicious clients
14392b15cb3dSCy Schubertfrom congesting innocent servers, it should not be considered
14402b15cb3dSCy Schubertan alternative to the NTP authentication facilities.
14412b15cb3dSCy SchubertSource address based restrictions are easily circumvented
14422b15cb3dSCy Schubertby a determined cracker.
14432b15cb3dSCy Schubert.Pp
14442b15cb3dSCy SchubertClients can be denied service because they are explicitly
14454990d495SXin LIincluded in the restrict list created by the
14464990d495SXin LI.Ic restrict
14474990d495SXin LIcommand
14482b15cb3dSCy Schubertor implicitly as the result of cryptographic or rate limit
14492b15cb3dSCy Schubertviolations.
14502b15cb3dSCy SchubertCryptographic violations include certificate
14512b15cb3dSCy Schubertor identity verification failure; rate limit violations generally
14522b15cb3dSCy Schubertresult from defective NTP implementations that send packets
14532b15cb3dSCy Schubertat abusive rates.
14542b15cb3dSCy SchubertSome violations cause denied service
14552b15cb3dSCy Schubertonly for the offending packet, others cause denied service
14562b15cb3dSCy Schubertfor a timed period and others cause the denied service for
14574990d495SXin LIan indefinite period.
14582b15cb3dSCy SchubertWhen a client or network is denied access
14594990d495SXin LIfor an indefinite period, the only way at present to remove
14602b15cb3dSCy Schubertthe restrictions is by restarting the server.
14612b15cb3dSCy Schubert.Ss The Kiss-of-Death Packet
14622b15cb3dSCy SchubertOrdinarily, packets denied service are simply dropped with no
14632b15cb3dSCy Schubertfurther action except incrementing statistics counters.
14642b15cb3dSCy SchubertSometimes a
14652b15cb3dSCy Schubertmore proactive response is needed, such as a server message that
14662b15cb3dSCy Schubertexplicitly requests the client to stop sending and leave a message
14672b15cb3dSCy Schubertfor the system operator.
14682b15cb3dSCy SchubertA special packet format has been created
14692b15cb3dSCy Schubertfor this purpose called the "kiss-of-death" (KoD) packet.
14702b15cb3dSCy SchubertKoD packets have the leap bits set unsynchronized and stratum set
14712b15cb3dSCy Schubertto zero and the reference identifier field set to a four-byte
14722b15cb3dSCy SchubertASCII code.
14732b15cb3dSCy SchubertIf the
14742b15cb3dSCy Schubert.Cm noserve
14752b15cb3dSCy Schubertor
14762b15cb3dSCy Schubert.Cm notrust
14772b15cb3dSCy Schubertflag of the matching restrict list entry is set,
14782b15cb3dSCy Schubertthe code is "DENY"; if the
14792b15cb3dSCy Schubert.Cm limited
14802b15cb3dSCy Schubertflag is set and the rate limit
14812b15cb3dSCy Schubertis exceeded, the code is "RATE".
14822b15cb3dSCy SchubertFinally, if a cryptographic violation occurs, the code is "CRYP".
14832b15cb3dSCy Schubert.Pp
14842b15cb3dSCy SchubertA client receiving a KoD performs a set of sanity checks to
14852b15cb3dSCy Schubertminimize security exposure, then updates the stratum and
14862b15cb3dSCy Schubertreference identifier peer variables, sets the access
14872b15cb3dSCy Schubertdenied (TEST4) bit in the peer flash variable and sends
14882b15cb3dSCy Schuberta message to the log.
14892b15cb3dSCy SchubertAs long as the TEST4 bit is set,
14902b15cb3dSCy Schubertthe client will send no further packets to the server.
14912b15cb3dSCy SchubertThe only way at present to recover from this condition is
14922b15cb3dSCy Schubertto restart the protocol at both the client and server.
14932b15cb3dSCy SchubertThis
14942b15cb3dSCy Schuberthappens automatically at the client when the association times out.
14952b15cb3dSCy SchubertIt will happen at the server only if the server operator cooperates.
14962b15cb3dSCy Schubert.Ss Access Control Commands
14972b15cb3dSCy Schubert.Bl -tag -width indent
14982b15cb3dSCy Schubert.It Xo Ic discard
14992b15cb3dSCy Schubert.Op Cm average Ar avg
15002b15cb3dSCy Schubert.Op Cm minimum Ar min
15012b15cb3dSCy Schubert.Op Cm monitor Ar prob
15022b15cb3dSCy Schubert.Xc
15032b15cb3dSCy SchubertSet the parameters of the
15042b15cb3dSCy Schubert.Cm limited
15052b15cb3dSCy Schubertfacility which protects the server from
15062b15cb3dSCy Schubertclient abuse.
15072b15cb3dSCy SchubertThe
15082b15cb3dSCy Schubert.Cm average
15092b15cb3dSCy Schubertsubcommand specifies the minimum average packet
1510a466cc55SCy Schubertspacing in log2 seconds, defaulting to 3 (8s), while the
15112b15cb3dSCy Schubert.Cm minimum
1512a466cc55SCy Schubertsubcommand specifies the minimum packet spacing
1513a466cc55SCy Schubertin seconds, defaulting to 2.
15142b15cb3dSCy SchubertPackets that violate these minima are discarded
15152b15cb3dSCy Schubertand a kiss-o'-death packet returned if enabled.
15164990d495SXin LIThe
15174990d495SXin LI.Ic monitor
1518a466cc55SCy Schubertsubcommand indirectly specifies the probability of
1519a466cc55SCy Schubertreplacing the oldest entry from the monitor (MRU)
1520a466cc55SCy Schubertlist of recent requests used to enforce rate controls,
1521a466cc55SCy Schubertwhen that list is at its maximum size. The probability
1522a466cc55SCy Schubertof replacing the oldest entry is the age of that entry
1523a466cc55SCy Schubertin seconds divided by the
1524a466cc55SCy Schubert.Ic monitor
1525a466cc55SCy Schubertvalue, default 3000. For example, if the oldest entry
1526a466cc55SCy Schubertin the MRU list represents a request 300 seconds ago,
1527a466cc55SCy Schubertby default the probability of replacing it with an
1528a466cc55SCy Schubertentry representing the client request being processed
1529a466cc55SCy Schubertnow is 10%. Conversely, if the oldest entry is more
1530a466cc55SCy Schubertthan 3000 seconds old, the probability is 100%.
1531f5f40dd6SCy Schubert.It Xo Ic restrict
1532f5f40dd6SCy Schubert.Ar address
15332b15cb3dSCy Schubert.Op Cm mask Ar mask
153409100258SXin LI.Op Cm ippeerlimit Ar int
15352b15cb3dSCy Schubert.Op Ar flag ...
15362b15cb3dSCy Schubert.Xc
15372b15cb3dSCy SchubertThe
15382b15cb3dSCy Schubert.Ar address
15392b15cb3dSCy Schubertargument expressed in
1540f5f40dd6SCy Schubertnumeric form is the address of a host or network.
15412b15cb3dSCy SchubertAlternatively, the
15422b15cb3dSCy Schubert.Ar address
1543f5f40dd6SCy Schubertargument can be a valid hostname.  When a hostname
1544f5f40dd6SCy Schubertis provided, a restriction entry is created for each
1545f5f40dd6SCy Schubertaddress the hostname resolves to, and any provided
1546f5f40dd6SCy Schubert.Ar mask
1547f5f40dd6SCy Schubertis ignored and an individual host mask is
1548f5f40dd6SCy Schubertused for each entry.
15492b15cb3dSCy SchubertThe
15502b15cb3dSCy Schubert.Ar mask
1551f5f40dd6SCy Schubertargument expressed in numeric form defaults to
1552f5f40dd6SCy Schubertall bits lit, meaning that the
15532b15cb3dSCy Schubert.Ar address
15542b15cb3dSCy Schubertis treated as the address of an individual host.
1555f5f40dd6SCy SchubertA default entry with address and mask all zeroes
15562b15cb3dSCy Schubertis always included and is always the first entry in the list.
15572b15cb3dSCy SchubertNote that text string
15582b15cb3dSCy Schubert.Cm default ,
15592b15cb3dSCy Schubertwith no mask option, may
15602b15cb3dSCy Schubertbe used to indicate the default entry.
156109100258SXin LIThe
156209100258SXin LI.Cm ippeerlimit
156309100258SXin LIdirective limits the number of peer requests for each IP to
156409100258SXin LI.Ar int ,
156509100258SXin LIwhere a value of -1 means "unlimited", the current default.
156609100258SXin LIA value of 0 means "none".
156709100258SXin LIThere would usually be at most 1 peering request per IP,
156809100258SXin LIbut if the remote peering requests are behind a proxy
156909100258SXin LIthere could well be more than 1 per IP.
15702b15cb3dSCy SchubertIn the current implementation,
15712b15cb3dSCy Schubert.Cm flag
15722b15cb3dSCy Schubertalways
15732b15cb3dSCy Schubertrestricts access, i.e., an entry with no flags indicates that free
15742b15cb3dSCy Schubertaccess to the server is to be given.
15752b15cb3dSCy SchubertThe flags are not orthogonal,
15762b15cb3dSCy Schubertin that more restrictive flags will often make less restrictive
15772b15cb3dSCy Schubertones redundant.
15782b15cb3dSCy SchubertThe flags can generally be classed into two
15792b15cb3dSCy Schubertcategories, those which restrict time service and those which
15802b15cb3dSCy Schubertrestrict informational queries and attempts to do run-time
15812b15cb3dSCy Schubertreconfiguration of the server.
15822b15cb3dSCy SchubertOne or more of the following flags
15832b15cb3dSCy Schubertmay be specified:
15842b15cb3dSCy Schubert.Bl -tag -width indent
15852b15cb3dSCy Schubert.It Cm ignore
15862b15cb3dSCy SchubertDeny packets of all kinds, including
15872b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
15882b15cb3dSCy Schubertand
15892b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
15902b15cb3dSCy Schubertqueries.
15912b15cb3dSCy Schubert.It Cm kod
1592f5f40dd6SCy SchubertIf this flag is set when a rate violation occurs, a kiss-o'-death
1593f5f40dd6SCy Schubert(KoD) packet is sometimes sent.
1594f5f40dd6SCy SchubertKoD packets are rate limited to no more than one per minimum
1595f5f40dd6SCy Schubertaverage interpacket spacing, set by
1596f5f40dd6SCy Schubert.Cm discard average
1597f5f40dd6SCy Schubertdefaulting to 8s.  Otherwise, no response is sent.
15982b15cb3dSCy Schubert.It Cm limited
15992b15cb3dSCy SchubertDeny service if the packet spacing violates the lower limits specified
16004990d495SXin LIin the
16014990d495SXin LI.Ic discard
16024990d495SXin LIcommand.
16032b15cb3dSCy SchubertA history of clients is kept using the
16042b15cb3dSCy Schubertmonitoring capability of
16052b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc .
16062b15cb3dSCy SchubertThus, monitoring is always active as
16072b15cb3dSCy Schubertlong as there is a restriction entry with the
16082b15cb3dSCy Schubert.Cm limited
16092b15cb3dSCy Schubertflag.
16102b15cb3dSCy Schubert.It Cm lowpriotrap
16112b15cb3dSCy SchubertDeclare traps set by matching hosts to be low priority.
16122b15cb3dSCy SchubertThe
16132b15cb3dSCy Schubertnumber of traps a server can maintain is limited (the current limit
16142b15cb3dSCy Schubertis 3).
16152b15cb3dSCy SchubertTraps are usually assigned on a first come, first served
16162b15cb3dSCy Schubertbasis, with later trap requestors being denied service.
16172b15cb3dSCy SchubertThis flag
16182b15cb3dSCy Schubertmodifies the assignment algorithm by allowing low priority traps to
16192b15cb3dSCy Schubertbe overridden by later requests for normal priority traps.
162009100258SXin LI.It Cm noepeer
162109100258SXin LIDeny ephemeral peer requests,
162209100258SXin LIeven if they come from an authenticated source.
162309100258SXin LINote that the ability to use a symmetric key for authentication may be restricted to
162409100258SXin LIone or more IPs or subnets via the third field of the
162509100258SXin LI.Pa ntp.keys
162609100258SXin LIfile.
162709100258SXin LIThis restriction is not enabled by default,
162809100258SXin LIto maintain backward compatability.
162909100258SXin LIExpect
163009100258SXin LI.Cm noepeer
163109100258SXin LIto become the default in ntp-4.4.
16322b15cb3dSCy Schubert.It Cm nomodify
16332b15cb3dSCy SchubertDeny
16342b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
16352b15cb3dSCy Schubertand
16362b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
16372b15cb3dSCy Schubertqueries which attempt to modify the state of the
16382b15cb3dSCy Schubertserver (i.e., run time reconfiguration).
16392b15cb3dSCy SchubertQueries which return
16402b15cb3dSCy Schubertinformation are permitted.
16412b15cb3dSCy Schubert.It Cm noquery
16422b15cb3dSCy SchubertDeny
16432b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
16442b15cb3dSCy Schubertand
16452b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
16462b15cb3dSCy Schubertqueries.
16472b15cb3dSCy SchubertTime service is not affected.
16482b15cb3dSCy Schubert.It Cm nopeer
164909100258SXin LIDeny unauthenticated packets which would result in mobilizing a new association.
165009100258SXin LIThis includes
165109100258SXin LIbroadcast and symmetric active packets
165209100258SXin LIwhen a configured association does not exist.
16532b15cb3dSCy SchubertIt also includes
16542b15cb3dSCy Schubert.Cm pool
16552b15cb3dSCy Schubertassociations, so if you want to use servers from a
16562b15cb3dSCy Schubert.Cm pool
16572b15cb3dSCy Schubertdirective and also want to use
16582b15cb3dSCy Schubert.Cm nopeer
16592b15cb3dSCy Schubertby default, you'll want a
166009100258SXin LI.Cm "restrict source ..."
166109100258SXin LIline as well that does
166209100258SXin LI.Em not
16632b15cb3dSCy Schubertinclude the
16642b15cb3dSCy Schubert.Cm nopeer
16652b15cb3dSCy Schubertdirective.
16662b15cb3dSCy Schubert.It Cm noserve
16672b15cb3dSCy SchubertDeny all packets except
16682b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
16692b15cb3dSCy Schubertand
16702b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
16712b15cb3dSCy Schubertqueries.
16722b15cb3dSCy Schubert.It Cm notrap
16732b15cb3dSCy SchubertDecline to provide mode 6 control message trap service to matching
16742b15cb3dSCy Schuberthosts.
16754990d495SXin LIThe trap service is a subsystem of the
16764990d495SXin LI.Xr ntpq 1ntpqmdoc
16774990d495SXin LIcontrol message
16782b15cb3dSCy Schubertprotocol which is intended for use by remote event logging programs.
16792b15cb3dSCy Schubert.It Cm notrust
16802b15cb3dSCy SchubertDeny service unless the packet is cryptographically authenticated.
16812b15cb3dSCy Schubert.It Cm ntpport
16822b15cb3dSCy SchubertThis is actually a match algorithm modifier, rather than a
16832b15cb3dSCy Schubertrestriction flag.
16842b15cb3dSCy SchubertIts presence causes the restriction entry to be
16852b15cb3dSCy Schubertmatched only if the source port in the packet is the standard NTP
16862b15cb3dSCy SchubertUDP port (123).
1687f5f40dd6SCy SchubertThere can be two restriction entries with the same IP address if
1688f5f40dd6SCy Schubertone specifies
16892b15cb3dSCy Schubert.Cm ntpport
1690f5f40dd6SCy Schubertand the other does not.
16912b15cb3dSCy SchubertThe
16922b15cb3dSCy Schubert.Cm ntpport
1693f5f40dd6SCy Schubertentry is considered more specific and
16942b15cb3dSCy Schubertis sorted later in the list.
16952d4e511cSCy Schubert.It Ic "serverresponse fuzz"
16962d4e511cSCy SchubertWhen reponding to server requests,
16972d4e511cSCy Schubertfuzz the low order bits of the
16982d4e511cSCy Schubert.Cm reftime .
16992b15cb3dSCy Schubert.It Cm version
17002b15cb3dSCy SchubertDeny packets that do not match the current NTP version.
17012b15cb3dSCy Schubert.El
17022b15cb3dSCy Schubert.Pp
17032b15cb3dSCy SchubertDefault restriction list entries with the flags ignore, interface,
17042b15cb3dSCy Schubertntpport, for each of the local host's interface addresses are
1705f5f40dd6SCy Schubertinserted into the table at startup to prevent ntpd
1706f5f40dd6SCy Schubertfrom attempting to synchronize to itself, such as with
1707f5f40dd6SCy Schubert.Cm manycastclient
1708f5f40dd6SCy Schubertwhen
1709f5f40dd6SCy Schubert.Cm manycast
1710f5f40dd6SCy Schubertis also specified with the same multicast address.
17112b15cb3dSCy SchubertA default entry is also always present, though if it is
17122b15cb3dSCy Schubertotherwise unconfigured; no flags are associated
17132b15cb3dSCy Schubertwith the default entry (i.e., everything besides your own
17142b15cb3dSCy SchubertNTP server is unrestricted).
1715f5f40dd6SCy Schubert.It Xo Ic delrestrict
1716f5f40dd6SCy Schubert.Op source
1717f5f40dd6SCy Schubert.Ar address
1718f5f40dd6SCy Schubert.Xc
1719f5f40dd6SCy SchubertRemove a previously-set restriction.  This is useful for
1720f5f40dd6SCy Schubertruntime configuration via
1721f5f40dd6SCy Schubert.Xr ntpq 1ntpqmdoc
1722f5f40dd6SCy Schubert.  If
1723f5f40dd6SCy Schubert.Cm source
1724f5f40dd6SCy Schubertis specified, a dynamic restriction created from the
1725f5f40dd6SCy Schubert.Cm restrict source
1726f5f40dd6SCy Schuberttemplate at the time
1727f5f40dd6SCy Schubertan association was added is removed.  Without
1728f5f40dd6SCy Schubert.Cm source
1729f5f40dd6SCy Schuberta static restriction is removed.
17302b15cb3dSCy Schubert.El
17312b15cb3dSCy Schubert.Sh Automatic NTP Configuration Options
17322b15cb3dSCy Schubert.Ss Manycasting
17332b15cb3dSCy SchubertManycasting is a automatic discovery and configuration paradigm
17342b15cb3dSCy Schubertnew to NTPv4.
17352b15cb3dSCy SchubertIt is intended as a means for a multicast client
17362b15cb3dSCy Schubertto troll the nearby network neighborhood to find cooperating
17372b15cb3dSCy Schubertmanycast servers, validate them using cryptographic means
17382b15cb3dSCy Schubertand evaluate their time values with respect to other servers
17392b15cb3dSCy Schubertthat might be lurking in the vicinity.
17402b15cb3dSCy SchubertThe intended result is that each manycast client mobilizes
17412b15cb3dSCy Schubertclient associations with some number of the "best"
17422b15cb3dSCy Schubertof the nearby manycast servers, yet automatically reconfigures
17432b15cb3dSCy Schubertto sustain this number of servers should one or another fail.
17442b15cb3dSCy Schubert.Pp
17452b15cb3dSCy SchubertNote that the manycasting paradigm does not coincide
17462b15cb3dSCy Schubertwith the anycast paradigm described in RFC-1546,
17472b15cb3dSCy Schubertwhich is designed to find a single server from a clique
17482b15cb3dSCy Schubertof servers providing the same service.
17492b15cb3dSCy SchubertThe manycast paradigm is designed to find a plurality
17502b15cb3dSCy Schubertof redundant servers satisfying defined optimality criteria.
17512b15cb3dSCy Schubert.Pp
17522b15cb3dSCy SchubertManycasting can be used with either symmetric key
17532b15cb3dSCy Schubertor public key cryptography.
17542b15cb3dSCy SchubertThe public key infrastructure (PKI)
17552b15cb3dSCy Schubertoffers the best protection against compromised keys
17562b15cb3dSCy Schubertand is generally considered stronger, at least with relatively
17572b15cb3dSCy Schubertlarge key sizes.
17582b15cb3dSCy SchubertIt is implemented using the Autokey protocol and
17592b15cb3dSCy Schubertthe OpenSSL cryptographic library available from
17602b15cb3dSCy Schubert.Li http://www.openssl.org/ .
17612b15cb3dSCy SchubertThe library can also be used with other NTPv4 modes
17622b15cb3dSCy Schubertas well and is highly recommended, especially for broadcast modes.
17632b15cb3dSCy Schubert.Pp
17642b15cb3dSCy SchubertA persistent manycast client association is configured
17654990d495SXin LIusing the
17664990d495SXin LI.Ic manycastclient
17674990d495SXin LIcommand, which is similar to the
17684990d495SXin LI.Ic server
17694990d495SXin LIcommand but with a multicast (IPv4 class
17702b15cb3dSCy Schubert.Cm D
17712b15cb3dSCy Schubertor IPv6 prefix
17722b15cb3dSCy Schubert.Cm FF )
17732b15cb3dSCy Schubertgroup address.
17742b15cb3dSCy SchubertThe IANA has designated IPv4 address 224.1.1.1
17752b15cb3dSCy Schubertand IPv6 address FF05::101 (site local) for NTP.
17762b15cb3dSCy SchubertWhen more servers are needed, it broadcasts manycast
17772b15cb3dSCy Schubertclient messages to this address at the minimum feasible rate
17782b15cb3dSCy Schubertand minimum feasible time-to-live (TTL) hops, depending
17792b15cb3dSCy Schuberton how many servers have already been found.
17802b15cb3dSCy SchubertThere can be as many manycast client associations
17812b15cb3dSCy Schubertas different group address, each one serving as a template
17822b15cb3dSCy Schubertfor a future ephemeral unicast client/server association.
17832b15cb3dSCy Schubert.Pp
17842b15cb3dSCy SchubertManycast servers configured with the
17852b15cb3dSCy Schubert.Ic manycastserver
17862b15cb3dSCy Schubertcommand listen on the specified group address for manycast
17872b15cb3dSCy Schubertclient messages.
17882b15cb3dSCy SchubertNote the distinction between manycast client,
17892b15cb3dSCy Schubertwhich actively broadcasts messages, and manycast server,
17902b15cb3dSCy Schubertwhich passively responds to them.
17912b15cb3dSCy SchubertIf a manycast server is
17922b15cb3dSCy Schubertin scope of the current TTL and is itself synchronized
17932b15cb3dSCy Schubertto a valid source and operating at a stratum level equal
17942b15cb3dSCy Schubertto or lower than the manycast client, it replies to the
17952b15cb3dSCy Schubertmanycast client message with an ordinary unicast server message.
17962b15cb3dSCy Schubert.Pp
17972b15cb3dSCy SchubertThe manycast client receiving this message mobilizes
17982b15cb3dSCy Schubertan ephemeral client/server association according to the
17992b15cb3dSCy Schubertmatching manycast client template, but only if cryptographically
18002b15cb3dSCy Schubertauthenticated and the server stratum is less than or equal
18012b15cb3dSCy Schubertto the client stratum.
18022b15cb3dSCy SchubertAuthentication is explicitly required
18032b15cb3dSCy Schubertand either symmetric key or public key (Autokey) can be used.
18042b15cb3dSCy SchubertThen, the client polls the server at its unicast address
18052b15cb3dSCy Schubertin burst mode in order to reliably set the host clock
18062b15cb3dSCy Schubertand validate the source.
18072b15cb3dSCy SchubertThis normally results
18082b15cb3dSCy Schubertin a volley of eight client/server at 2-s intervals
18092b15cb3dSCy Schubertduring which both the synchronization and cryptographic
18102b15cb3dSCy Schubertprotocols run concurrently.
18112b15cb3dSCy SchubertFollowing the volley,
18122b15cb3dSCy Schubertthe client runs the NTP intersection and clustering
18132b15cb3dSCy Schubertalgorithms, which act to discard all but the "best"
18142b15cb3dSCy Schubertassociations according to stratum and synchronization
18152b15cb3dSCy Schubertdistance.
18162b15cb3dSCy SchubertThe surviving associations then continue
18172b15cb3dSCy Schubertin ordinary client/server mode.
18182b15cb3dSCy Schubert.Pp
18192b15cb3dSCy SchubertThe manycast client polling strategy is designed to reduce
18202b15cb3dSCy Schubertas much as possible the volume of manycast client messages
18212b15cb3dSCy Schubertand the effects of implosion due to near-simultaneous
18222b15cb3dSCy Schubertarrival of manycast server messages.
18232b15cb3dSCy SchubertThe strategy is determined by the
18242b15cb3dSCy Schubert.Ic manycastclient ,
18252b15cb3dSCy Schubert.Ic tos
18262b15cb3dSCy Schubertand
18272b15cb3dSCy Schubert.Ic ttl
18282b15cb3dSCy Schubertconfiguration commands.
18292b15cb3dSCy SchubertThe manycast poll interval is
18302b15cb3dSCy Schubertnormally eight times the system poll interval,
18312b15cb3dSCy Schubertwhich starts out at the
18322b15cb3dSCy Schubert.Cm minpoll
18332b15cb3dSCy Schubertvalue specified in the
18342b15cb3dSCy Schubert.Ic manycastclient ,
18352b15cb3dSCy Schubertcommand and, under normal circumstances, increments to the
18362b15cb3dSCy Schubert.Cm maxpolll
18372b15cb3dSCy Schubertvalue specified in this command.
18382b15cb3dSCy SchubertInitially, the TTL is
18394990d495SXin LIset at the minimum hops specified by the
18404990d495SXin LI.Ic ttl
18414990d495SXin LIcommand.
18422b15cb3dSCy SchubertAt each retransmission the TTL is increased until reaching
18432b15cb3dSCy Schubertthe maximum hops specified by this command or a sufficient
18442b15cb3dSCy Schubertnumber client associations have been found.
18452b15cb3dSCy SchubertFurther retransmissions use the same TTL.
18462b15cb3dSCy Schubert.Pp
18472b15cb3dSCy SchubertThe quality and reliability of the suite of associations
18482b15cb3dSCy Schubertdiscovered by the manycast client is determined by the NTP
18492b15cb3dSCy Schubertmitigation algorithms and the
18502b15cb3dSCy Schubert.Cm minclock
18512b15cb3dSCy Schubertand
18522b15cb3dSCy Schubert.Cm minsane
18532b15cb3dSCy Schubertvalues specified in the
18542b15cb3dSCy Schubert.Ic tos
18552b15cb3dSCy Schubertconfiguration command.
18562b15cb3dSCy SchubertAt least
18572b15cb3dSCy Schubert.Cm minsane
18582b15cb3dSCy Schubertcandidate servers must be available and the mitigation
18592b15cb3dSCy Schubertalgorithms produce at least
18602b15cb3dSCy Schubert.Cm minclock
18612b15cb3dSCy Schubertsurvivors in order to synchronize the clock.
18622b15cb3dSCy SchubertByzantine agreement principles require at least four
18632b15cb3dSCy Schubertcandidates in order to correctly discard a single falseticker.
18642b15cb3dSCy SchubertFor legacy purposes,
18652b15cb3dSCy Schubert.Cm minsane
18662b15cb3dSCy Schubertdefaults to 1 and
18672b15cb3dSCy Schubert.Cm minclock
18682b15cb3dSCy Schubertdefaults to 3.
18692b15cb3dSCy SchubertFor manycast service
18702b15cb3dSCy Schubert.Cm minsane
18712b15cb3dSCy Schubertshould be explicitly set to 4, assuming at least that
18722b15cb3dSCy Schubertnumber of servers are available.
18732b15cb3dSCy Schubert.Pp
18742b15cb3dSCy SchubertIf at least
18752b15cb3dSCy Schubert.Cm minclock
18762b15cb3dSCy Schubertservers are found, the manycast poll interval is immediately
18772b15cb3dSCy Schubertset to eight times
18782b15cb3dSCy Schubert.Cm maxpoll .
18792b15cb3dSCy SchubertIf less than
18802b15cb3dSCy Schubert.Cm minclock
18812b15cb3dSCy Schubertservers are found when the TTL has reached the maximum hops,
18822b15cb3dSCy Schubertthe manycast poll interval is doubled.
18832b15cb3dSCy SchubertFor each transmission
18842b15cb3dSCy Schubertafter that, the poll interval is doubled again until
18852b15cb3dSCy Schubertreaching the maximum of eight times
18862b15cb3dSCy Schubert.Cm maxpoll .
18872b15cb3dSCy SchubertFurther transmissions use the same poll interval and
18882b15cb3dSCy SchubertTTL values.
18892b15cb3dSCy SchubertNote that while all this is going on,
18902b15cb3dSCy Schuberteach client/server association found is operating normally
18912b15cb3dSCy Schubertit the system poll interval.
18922b15cb3dSCy Schubert.Pp
18932b15cb3dSCy SchubertAdministratively scoped multicast boundaries are normally
18942b15cb3dSCy Schubertspecified by the network router configuration and,
18952b15cb3dSCy Schubertin the case of IPv6, the link/site scope prefix.
18962b15cb3dSCy SchubertBy default, the increment for TTL hops is 32 starting
18972b15cb3dSCy Schubertfrom 31; however, the
18982b15cb3dSCy Schubert.Ic ttl
18992b15cb3dSCy Schubertconfiguration command can be
19002b15cb3dSCy Schubertused to modify the values to match the scope rules.
19012b15cb3dSCy Schubert.Pp
19022b15cb3dSCy SchubertIt is often useful to narrow the range of acceptable
19032b15cb3dSCy Schubertservers which can be found by manycast client associations.
19042b15cb3dSCy SchubertBecause manycast servers respond only when the client
19052b15cb3dSCy Schubertstratum is equal to or greater than the server stratum,
19062b15cb3dSCy Schubertprimary (stratum 1) servers fill find only primary servers
19072b15cb3dSCy Schubertin TTL range, which is probably the most common objective.
19082b15cb3dSCy SchubertHowever, unless configured otherwise, all manycast clients
19092b15cb3dSCy Schubertin TTL range will eventually find all primary servers
19102b15cb3dSCy Schubertin TTL range, which is probably not the most common
19112b15cb3dSCy Schubertobjective in large networks.
19122b15cb3dSCy SchubertThe
19132b15cb3dSCy Schubert.Ic tos
19142b15cb3dSCy Schubertcommand can be used to modify this behavior.
19152b15cb3dSCy SchubertServers with stratum below
19162b15cb3dSCy Schubert.Cm floor
19172b15cb3dSCy Schubertor above
19182b15cb3dSCy Schubert.Cm ceiling
19192b15cb3dSCy Schubertspecified in the
19202b15cb3dSCy Schubert.Ic tos
19212b15cb3dSCy Schubertcommand are strongly discouraged during the selection
19222b15cb3dSCy Schubertprocess; however, these servers may be temporally
19232b15cb3dSCy Schubertaccepted if the number of servers within TTL range is
19242b15cb3dSCy Schubertless than
19252b15cb3dSCy Schubert.Cm minclock .
19262b15cb3dSCy Schubert.Pp
19272b15cb3dSCy SchubertThe above actions occur for each manycast client message,
19282b15cb3dSCy Schubertwhich repeats at the designated poll interval.
19292b15cb3dSCy SchubertHowever, once the ephemeral client association is mobilized,
19302b15cb3dSCy Schubertsubsequent manycast server replies are discarded,
19312b15cb3dSCy Schubertsince that would result in a duplicate association.
19322b15cb3dSCy SchubertIf during a poll interval the number of client associations
19332b15cb3dSCy Schubertfalls below
19342b15cb3dSCy Schubert.Cm minclock ,
19352b15cb3dSCy Schubertall manycast client prototype associations are reset
19362b15cb3dSCy Schubertto the initial poll interval and TTL hops and operation
19372b15cb3dSCy Schubertresumes from the beginning.
19382b15cb3dSCy SchubertIt is important to avoid
19392b15cb3dSCy Schubertfrequent manycast client messages, since each one requires
19402b15cb3dSCy Schubertall manycast servers in TTL range to respond.
19412b15cb3dSCy SchubertThe result could well be an implosion, either minor or major,
19422b15cb3dSCy Schubertdepending on the number of servers in range.
19432b15cb3dSCy SchubertThe recommended value for
19442b15cb3dSCy Schubert.Cm maxpoll
19452b15cb3dSCy Schubertis 12 (4,096 s).
19462b15cb3dSCy Schubert.Pp
19472b15cb3dSCy SchubertIt is possible and frequently useful to configure a host
19482b15cb3dSCy Schubertas both manycast client and manycast server.
19492b15cb3dSCy SchubertA number of hosts configured this way and sharing a common
19502b15cb3dSCy Schubertgroup address will automatically organize themselves
19512b15cb3dSCy Schubertin an optimum configuration based on stratum and
19522b15cb3dSCy Schubertsynchronization distance.
19532b15cb3dSCy SchubertFor example, consider an NTP
19542b15cb3dSCy Schubertsubnet of two primary servers and a hundred or more
19552b15cb3dSCy Schubertdependent clients.
19562b15cb3dSCy SchubertWith two exceptions, all servers
19572b15cb3dSCy Schubertand clients have identical configuration files including both
19582b15cb3dSCy Schubert.Ic multicastclient
19592b15cb3dSCy Schubertand
19602b15cb3dSCy Schubert.Ic multicastserver
19612b15cb3dSCy Schubertcommands using, for instance, multicast group address
19622b15cb3dSCy Schubert239.1.1.1.
19632b15cb3dSCy SchubertThe only exception is that each primary server
19642b15cb3dSCy Schubertconfiguration file must include commands for the primary
19652b15cb3dSCy Schubertreference source such as a GPS receiver.
19662b15cb3dSCy Schubert.Pp
19672b15cb3dSCy SchubertThe remaining configuration files for all secondary
19682b15cb3dSCy Schubertservers and clients have the same contents, except for the
19692b15cb3dSCy Schubert.Ic tos
19702b15cb3dSCy Schubertcommand, which is specific for each stratum level.
19712b15cb3dSCy SchubertFor stratum 1 and stratum 2 servers, that command is
19722b15cb3dSCy Schubertnot necessary.
19732b15cb3dSCy SchubertFor stratum 3 and above servers the
19742b15cb3dSCy Schubert.Cm floor
19752b15cb3dSCy Schubertvalue is set to the intended stratum number.
19762b15cb3dSCy SchubertThus, all stratum 3 configuration files are identical,
19772b15cb3dSCy Schubertall stratum 4 files are identical and so forth.
19782b15cb3dSCy Schubert.Pp
19792b15cb3dSCy SchubertOnce operations have stabilized in this scenario,
19802b15cb3dSCy Schubertthe primary servers will find the primary reference source
19812b15cb3dSCy Schubertand each other, since they both operate at the same
19822b15cb3dSCy Schubertstratum (1), but not with any secondary server or client,
19832b15cb3dSCy Schubertsince these operate at a higher stratum.
19842b15cb3dSCy SchubertThe secondary
19852b15cb3dSCy Schubertservers will find the servers at the same stratum level.
19862b15cb3dSCy SchubertIf one of the primary servers loses its GPS receiver,
19872b15cb3dSCy Schubertit will continue to operate as a client and other clients
19882b15cb3dSCy Schubertwill time out the corresponding association and
19892b15cb3dSCy Schubertre-associate accordingly.
19902b15cb3dSCy Schubert.Pp
19912b15cb3dSCy SchubertSome administrators prefer to avoid running
19922b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
19932b15cb3dSCy Schubertcontinuously and run either
19949034852cSGleb Smirnoff.Xr sntp 1sntpmdoc
19952b15cb3dSCy Schubertor
19962b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
19972b15cb3dSCy Schubert.Fl q
19982b15cb3dSCy Schubertas a cron job.
19992b15cb3dSCy SchubertIn either case the servers must be
20002b15cb3dSCy Schubertconfigured in advance and the program fails if none are
20012b15cb3dSCy Schubertavailable when the cron job runs.
20022b15cb3dSCy SchubertA really slick
20032b15cb3dSCy Schubertapplication of manycast is with
20042b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
20052b15cb3dSCy Schubert.Fl q .
20062b15cb3dSCy SchubertThe program wakes up, scans the local landscape looking
20072b15cb3dSCy Schubertfor the usual suspects, selects the best from among
20082b15cb3dSCy Schubertthe rascals, sets the clock and then departs.
20092b15cb3dSCy SchubertServers do not have to be configured in advance and
20102b15cb3dSCy Schubertall clients throughout the network can have the same
20112b15cb3dSCy Schubertconfiguration file.
20122b15cb3dSCy Schubert.Ss Manycast Interactions with Autokey
20132b15cb3dSCy SchubertEach time a manycast client sends a client mode packet
20142b15cb3dSCy Schubertto a multicast group address, all manycast servers
20152b15cb3dSCy Schubertin scope generate a reply including the host name
20162b15cb3dSCy Schubertand status word.
20172b15cb3dSCy SchubertThe manycast clients then run
20182b15cb3dSCy Schubertthe Autokey protocol, which collects and verifies
20192b15cb3dSCy Schubertall certificates involved.
20202b15cb3dSCy SchubertFollowing the burst interval
20212b15cb3dSCy Schubertall but three survivors are cast off,
20222b15cb3dSCy Schubertbut the certificates remain in the local cache.
20232b15cb3dSCy SchubertIt often happens that several complete signing trails
20242b15cb3dSCy Schubertfrom the client to the primary servers are collected in this way.
20252b15cb3dSCy Schubert.Pp
20262b15cb3dSCy SchubertAbout once an hour or less often if the poll interval
20272b15cb3dSCy Schubertexceeds this, the client regenerates the Autokey key list.
20282b15cb3dSCy SchubertThis is in general transparent in client/server mode.
20292b15cb3dSCy SchubertHowever, about once per day the server private value
20302b15cb3dSCy Schubertused to generate cookies is refreshed along with all
20312b15cb3dSCy Schubertmanycast client associations.
20322b15cb3dSCy SchubertIn this case all
20332b15cb3dSCy Schubertcryptographic values including certificates is refreshed.
20342b15cb3dSCy SchubertIf a new certificate has been generated since
20352b15cb3dSCy Schubertthe last refresh epoch, it will automatically revoke
20362b15cb3dSCy Schubertall prior certificates that happen to be in the
20372b15cb3dSCy Schubertcertificate cache.
20382b15cb3dSCy SchubertAt the same time, the manycast
20392b15cb3dSCy Schubertscheme starts all over from the beginning and
20402b15cb3dSCy Schubertthe expanding ring shrinks to the minimum and increments
20412b15cb3dSCy Schubertfrom there while collecting all servers in scope.
2042f391d6bcSXin LI.Ss Broadcast Options
2043f391d6bcSXin LI.Bl -tag -width indent
2044f391d6bcSXin LI.It Xo Ic tos
2045f391d6bcSXin LI.Oo
2046f391d6bcSXin LI.Cm bcpollbstep Ar gate
2047f391d6bcSXin LI.Oc
2048f391d6bcSXin LI.Xc
2049f391d6bcSXin LIThis command provides a way to delay,
2050f391d6bcSXin LIby the specified number of broadcast poll intervals,
2051f391d6bcSXin LIbelieving backward time steps from a broadcast server.
2052f391d6bcSXin LIBroadcast time networks are expected to be trusted.
2053f391d6bcSXin LIIn the event a broadcast server's time is stepped backwards,
2054f391d6bcSXin LIthere is clear benefit to having the clients notice this change
2055f391d6bcSXin LIas soon as possible.
2056f391d6bcSXin LIAttacks such as replay attacks can happen, however,
2057f391d6bcSXin LIand even though there are a number of protections built in to
2058f391d6bcSXin LIbroadcast mode, attempts to perform a replay attack are possible.
2059f391d6bcSXin LIThis value defaults to 0, but can be changed
2060f391d6bcSXin LIto any number of poll intervals between 0 and 4.
206109100258SXin LI.El
20622b15cb3dSCy Schubert.Ss Manycast Options
20632b15cb3dSCy Schubert.Bl -tag -width indent
20642b15cb3dSCy Schubert.It Xo Ic tos
20652b15cb3dSCy Schubert.Oo
20662b15cb3dSCy Schubert.Cm ceiling Ar ceiling |
20672b15cb3dSCy Schubert.Cm cohort { 0 | 1 } |
20682b15cb3dSCy Schubert.Cm floor Ar floor |
20692b15cb3dSCy Schubert.Cm minclock Ar minclock |
20702b15cb3dSCy Schubert.Cm minsane Ar minsane
20712b15cb3dSCy Schubert.Oc
20722b15cb3dSCy Schubert.Xc
20732b15cb3dSCy SchubertThis command affects the clock selection and clustering
20742b15cb3dSCy Schubertalgorithms.
20752b15cb3dSCy SchubertIt can be used to select the quality and
20762b15cb3dSCy Schubertquantity of peers used to synchronize the system clock
20772b15cb3dSCy Schubertand is most useful in manycast mode.
20782b15cb3dSCy SchubertThe variables operate
20792b15cb3dSCy Schubertas follows:
20802b15cb3dSCy Schubert.Bl -tag -width indent
20812b15cb3dSCy Schubert.It Cm ceiling Ar ceiling
20822b15cb3dSCy SchubertPeers with strata above
20832b15cb3dSCy Schubert.Cm ceiling
20842b15cb3dSCy Schubertwill be discarded if there are at least
20852b15cb3dSCy Schubert.Cm minclock
20862b15cb3dSCy Schubertpeers remaining.
20872b15cb3dSCy SchubertThis value defaults to 15, but can be changed
20882b15cb3dSCy Schubertto any number from 1 to 15.
20892b15cb3dSCy Schubert.It Cm cohort Bro 0 | 1 Brc
20902b15cb3dSCy SchubertThis is a binary flag which enables (0) or disables (1)
20912b15cb3dSCy Schubertmanycast server replies to manycast clients with the same
20922b15cb3dSCy Schubertstratum level.
20932b15cb3dSCy SchubertThis is useful to reduce implosions where
20942b15cb3dSCy Schubertlarge numbers of clients with the same stratum level
20952b15cb3dSCy Schubertare present.
20962b15cb3dSCy SchubertThe default is to enable these replies.
20972b15cb3dSCy Schubert.It Cm floor Ar floor
20982b15cb3dSCy SchubertPeers with strata below
20992b15cb3dSCy Schubert.Cm floor
21002b15cb3dSCy Schubertwill be discarded if there are at least
21012b15cb3dSCy Schubert.Cm minclock
21022b15cb3dSCy Schubertpeers remaining.
21032b15cb3dSCy SchubertThis value defaults to 1, but can be changed
21042b15cb3dSCy Schubertto any number from 1 to 15.
21052b15cb3dSCy Schubert.It Cm minclock Ar minclock
21069034852cSGleb SmirnoffThe clustering algorithm repeatedly casts out outlier
21072b15cb3dSCy Schubertassociations until no more than
21082b15cb3dSCy Schubert.Cm minclock
21092b15cb3dSCy Schubertassociations remain.
21102b15cb3dSCy SchubertThis value defaults to 3,
21112b15cb3dSCy Schubertbut can be changed to any number from 1 to the number of
21122b15cb3dSCy Schubertconfigured sources.
21132b15cb3dSCy Schubert.It Cm minsane Ar minsane
21142b15cb3dSCy SchubertThis is the minimum number of candidates available
21152b15cb3dSCy Schubertto the clock selection algorithm in order to produce
21162b15cb3dSCy Schubertone or more truechimers for the clustering algorithm.
21172b15cb3dSCy SchubertIf fewer than this number are available, the clock is
21182b15cb3dSCy Schubertundisciplined and allowed to run free.
21192b15cb3dSCy SchubertThe default is 1
21202b15cb3dSCy Schubertfor legacy purposes.
21212b15cb3dSCy SchubertHowever, according to principles of
21222b15cb3dSCy SchubertByzantine agreement,
21232b15cb3dSCy Schubert.Cm minsane
21242b15cb3dSCy Schubertshould be at least 4 in order to detect and discard
21252b15cb3dSCy Schuberta single falseticker.
21262b15cb3dSCy Schubert.El
21272b15cb3dSCy Schubert.It Cm ttl Ar hop ...
21282b15cb3dSCy SchubertThis command specifies a list of TTL values in increasing
21292b15cb3dSCy Schubertorder, up to 8 values can be specified.
21302b15cb3dSCy SchubertIn manycast mode these values are used in turn
21312b15cb3dSCy Schubertin an expanding-ring search.
21322b15cb3dSCy SchubertThe default is eight
21332b15cb3dSCy Schubertmultiples of 32 starting at 31.
21342b15cb3dSCy Schubert.El
21352b15cb3dSCy Schubert.Sh Reference Clock Support
21362b15cb3dSCy SchubertThe NTP Version 4 daemon supports some three dozen different radio,
21372b15cb3dSCy Schubertsatellite and modem reference clocks plus a special pseudo-clock
21382b15cb3dSCy Schubertused for backup or when no other clock source is available.
21392b15cb3dSCy SchubertDetailed descriptions of individual device drivers and options can
21402b15cb3dSCy Schubertbe found in the
21412b15cb3dSCy Schubert.Qq Reference Clock Drivers
21422b15cb3dSCy Schubertpage
21432b15cb3dSCy Schubert(available as part of the HTML documentation
21442b15cb3dSCy Schubertprovided in
21452b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
21462b15cb3dSCy SchubertAdditional information can be found in the pages linked
21472b15cb3dSCy Schubertthere, including the
21482b15cb3dSCy Schubert.Qq Debugging Hints for Reference Clock Drivers
21492b15cb3dSCy Schubertand
21502b15cb3dSCy Schubert.Qq How To Write a Reference Clock Driver
21512b15cb3dSCy Schubertpages
21522b15cb3dSCy Schubert(available as part of the HTML documentation
21532b15cb3dSCy Schubertprovided in
21542b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
21552b15cb3dSCy SchubertIn addition, support for a PPS
21562b15cb3dSCy Schubertsignal is available as described in the
21572b15cb3dSCy Schubert.Qq Pulse-per-second (PPS) Signal Interfacing
21582b15cb3dSCy Schubertpage
21592b15cb3dSCy Schubert(available as part of the HTML documentation
21602b15cb3dSCy Schubertprovided in
21612b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
21622b15cb3dSCy SchubertMany
21632b15cb3dSCy Schubertdrivers support special line discipline/streams modules which can
21642b15cb3dSCy Schubertsignificantly improve the accuracy using the driver.
21652b15cb3dSCy SchubertThese are
21662b15cb3dSCy Schubertdescribed in the
21672b15cb3dSCy Schubert.Qq Line Disciplines and Streams Drivers
21682b15cb3dSCy Schubertpage
21692b15cb3dSCy Schubert(available as part of the HTML documentation
21702b15cb3dSCy Schubertprovided in
21712b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
21722b15cb3dSCy Schubert.Pp
21732b15cb3dSCy SchubertA reference clock will generally (though not always) be a radio
21742b15cb3dSCy Schuberttimecode receiver which is synchronized to a source of standard
21752b15cb3dSCy Schuberttime such as the services offered by the NRC in Canada and NIST and
21762b15cb3dSCy SchubertUSNO in the US.
21772b15cb3dSCy SchubertThe interface between the computer and the timecode
21782b15cb3dSCy Schubertreceiver is device dependent, but is usually a serial port.
21792b15cb3dSCy SchubertA
21802b15cb3dSCy Schubertdevice driver specific to each reference clock must be selected and
21812b15cb3dSCy Schubertcompiled in the distribution; however, most common radio, satellite
21822b15cb3dSCy Schubertand modem clocks are included by default.
21832b15cb3dSCy SchubertNote that an attempt to
21842b15cb3dSCy Schubertconfigure a reference clock when the driver has not been compiled
21852b15cb3dSCy Schubertor the hardware port has not been appropriately configured results
21862b15cb3dSCy Schubertin a scalding remark to the system log file, but is otherwise non
21872b15cb3dSCy Schuberthazardous.
21882b15cb3dSCy Schubert.Pp
21892b15cb3dSCy SchubertFor the purposes of configuration,
21902b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
21912b15cb3dSCy Schuberttreats
21922b15cb3dSCy Schubertreference clocks in a manner analogous to normal NTP peers as much
21932b15cb3dSCy Schubertas possible.
21942b15cb3dSCy SchubertReference clocks are identified by a syntactically
21952b15cb3dSCy Schubertcorrect but invalid IP address, in order to distinguish them from
21962b15cb3dSCy Schubertnormal NTP peers.
21972b15cb3dSCy SchubertReference clock addresses are of the form
21982b15cb3dSCy Schubert.Sm off
21992b15cb3dSCy Schubert.Li 127.127. Ar t . Ar u ,
22002b15cb3dSCy Schubert.Sm on
22012b15cb3dSCy Schubertwhere
22022b15cb3dSCy Schubert.Ar t
22032b15cb3dSCy Schubertis an integer
22042b15cb3dSCy Schubertdenoting the clock type and
22052b15cb3dSCy Schubert.Ar u
22062b15cb3dSCy Schubertindicates the unit
22072b15cb3dSCy Schubertnumber in the range 0-3.
22082b15cb3dSCy SchubertWhile it may seem overkill, it is in fact
22092b15cb3dSCy Schubertsometimes useful to configure multiple reference clocks of the same
22102b15cb3dSCy Schuberttype, in which case the unit numbers must be unique.
22112b15cb3dSCy Schubert.Pp
22122b15cb3dSCy SchubertThe
22132b15cb3dSCy Schubert.Ic server
22142b15cb3dSCy Schubertcommand is used to configure a reference
22152b15cb3dSCy Schubertclock, where the
22162b15cb3dSCy Schubert.Ar address
22172b15cb3dSCy Schubertargument in that command
22182b15cb3dSCy Schubertis the clock address.
22192b15cb3dSCy SchubertThe
22202b15cb3dSCy Schubert.Cm key ,
22212b15cb3dSCy Schubert.Cm version
22222b15cb3dSCy Schubertand
22232b15cb3dSCy Schubert.Cm ttl
22242b15cb3dSCy Schubertoptions are not used for reference clock support.
22252b15cb3dSCy SchubertThe
22262b15cb3dSCy Schubert.Cm mode
22272b15cb3dSCy Schubertoption is added for reference clock support, as
22282b15cb3dSCy Schubertdescribed below.
22292b15cb3dSCy SchubertThe
22302b15cb3dSCy Schubert.Cm prefer
22312b15cb3dSCy Schubertoption can be useful to
22322b15cb3dSCy Schubertpersuade the server to cherish a reference clock with somewhat more
22332b15cb3dSCy Schubertenthusiasm than other reference clocks or peers.
22342b15cb3dSCy SchubertFurther
22352b15cb3dSCy Schubertinformation on this option can be found in the
22362b15cb3dSCy Schubert.Qq Mitigation Rules and the prefer Keyword
22372b15cb3dSCy Schubert(available as part of the HTML documentation
22382b15cb3dSCy Schubertprovided in
22392b15cb3dSCy Schubert.Pa /usr/share/doc/ntp )
22402b15cb3dSCy Schubertpage.
22412b15cb3dSCy SchubertThe
22422b15cb3dSCy Schubert.Cm minpoll
22432b15cb3dSCy Schubertand
22442b15cb3dSCy Schubert.Cm maxpoll
22452b15cb3dSCy Schubertoptions have
22462b15cb3dSCy Schubertmeaning only for selected clock drivers.
22472b15cb3dSCy SchubertSee the individual clock
22482b15cb3dSCy Schubertdriver document pages for additional information.
22492b15cb3dSCy Schubert.Pp
22502b15cb3dSCy SchubertThe
22512b15cb3dSCy Schubert.Ic fudge
22522b15cb3dSCy Schubertcommand is used to provide additional
22532b15cb3dSCy Schubertinformation for individual clock drivers and normally follows
22542b15cb3dSCy Schubertimmediately after the
22552b15cb3dSCy Schubert.Ic server
22562b15cb3dSCy Schubertcommand.
22572b15cb3dSCy SchubertThe
22582b15cb3dSCy Schubert.Ar address
22592b15cb3dSCy Schubertargument specifies the clock address.
22602b15cb3dSCy SchubertThe
22612b15cb3dSCy Schubert.Cm refid
22622b15cb3dSCy Schubertand
22632b15cb3dSCy Schubert.Cm stratum
22642b15cb3dSCy Schubertoptions can be used to
22652b15cb3dSCy Schubertoverride the defaults for the device.
22662b15cb3dSCy SchubertThere are two optional
22672b15cb3dSCy Schubertdevice-dependent time offsets and four flags that can be included
22682b15cb3dSCy Schubertin the
22692b15cb3dSCy Schubert.Ic fudge
22702b15cb3dSCy Schubertcommand as well.
22712b15cb3dSCy Schubert.Pp
22722b15cb3dSCy SchubertThe stratum number of a reference clock is by default zero.
22732b15cb3dSCy SchubertSince the
22742b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
22752b15cb3dSCy Schubertdaemon adds one to the stratum of each
22762b15cb3dSCy Schubertpeer, a primary server ordinarily displays an external stratum of
22772b15cb3dSCy Schubertone.
22782b15cb3dSCy SchubertIn order to provide engineered backups, it is often useful to
22792b15cb3dSCy Schubertspecify the reference clock stratum as greater than zero.
22802b15cb3dSCy SchubertThe
22812b15cb3dSCy Schubert.Cm stratum
22822b15cb3dSCy Schubertoption is used for this purpose.
22832b15cb3dSCy SchubertAlso, in cases
22842b15cb3dSCy Schubertinvolving both a reference clock and a pulse-per-second (PPS)
22852b15cb3dSCy Schubertdiscipline signal, it is useful to specify the reference clock
22862b15cb3dSCy Schubertidentifier as other than the default, depending on the driver.
22872b15cb3dSCy SchubertThe
22882b15cb3dSCy Schubert.Cm refid
22892b15cb3dSCy Schubertoption is used for this purpose.
22902b15cb3dSCy SchubertExcept where noted,
22912b15cb3dSCy Schubertthese options apply to all clock drivers.
22922b15cb3dSCy Schubert.Ss Reference Clock Commands
22932b15cb3dSCy Schubert.Bl -tag -width indent
22942b15cb3dSCy Schubert.It Xo Ic server
22952b15cb3dSCy Schubert.Sm off
22962b15cb3dSCy Schubert.Li 127.127. Ar t . Ar u
22972b15cb3dSCy Schubert.Sm on
22982b15cb3dSCy Schubert.Op Cm prefer
22992b15cb3dSCy Schubert.Op Cm mode Ar int
23002b15cb3dSCy Schubert.Op Cm minpoll Ar int
23012b15cb3dSCy Schubert.Op Cm maxpoll Ar int
23022b15cb3dSCy Schubert.Xc
23032b15cb3dSCy SchubertThis command can be used to configure reference clocks in
23042b15cb3dSCy Schubertspecial ways.
23052b15cb3dSCy SchubertThe options are interpreted as follows:
23062b15cb3dSCy Schubert.Bl -tag -width indent
23072b15cb3dSCy Schubert.It Cm prefer
23082b15cb3dSCy SchubertMarks the reference clock as preferred.
23092b15cb3dSCy SchubertAll other things being
23102b15cb3dSCy Schubertequal, this host will be chosen for synchronization among a set of
23112b15cb3dSCy Schubertcorrectly operating hosts.
23122b15cb3dSCy SchubertSee the
23132b15cb3dSCy Schubert.Qq Mitigation Rules and the prefer Keyword
23142b15cb3dSCy Schubertpage
23152b15cb3dSCy Schubert(available as part of the HTML documentation
23162b15cb3dSCy Schubertprovided in
23172b15cb3dSCy Schubert.Pa /usr/share/doc/ntp )
23182b15cb3dSCy Schubertfor further information.
23192b15cb3dSCy Schubert.It Cm mode Ar int
23202b15cb3dSCy SchubertSpecifies a mode number which is interpreted in a
23212b15cb3dSCy Schubertdevice-specific fashion.
23222b15cb3dSCy SchubertFor instance, it selects a dialing
23232b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
23242b15cb3dSCy Schubertparse
23252b15cb3dSCy Schubertdrivers.
23262b15cb3dSCy Schubert.It Cm minpoll Ar int
23272b15cb3dSCy Schubert.It Cm maxpoll Ar int
23282b15cb3dSCy SchubertThese options specify the minimum and maximum polling interval
23292b15cb3dSCy Schubertfor reference clock messages, as a power of 2 in seconds
23302b15cb3dSCy SchubertFor
23312b15cb3dSCy Schubertmost directly connected reference clocks, both
23322b15cb3dSCy Schubert.Cm minpoll
23332b15cb3dSCy Schubertand
23342b15cb3dSCy Schubert.Cm maxpoll
23352b15cb3dSCy Schubertdefault to 6 (64 s).
23362b15cb3dSCy SchubertFor modem reference clocks,
23372b15cb3dSCy Schubert.Cm minpoll
23382b15cb3dSCy Schubertdefaults to 10 (17.1 m) and
23392b15cb3dSCy Schubert.Cm maxpoll
23402b15cb3dSCy Schubertdefaults to 14 (4.5 h).
23412b15cb3dSCy SchubertThe allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
23422b15cb3dSCy Schubert.El
23432b15cb3dSCy Schubert.It Xo Ic fudge
23442b15cb3dSCy Schubert.Sm off
23452b15cb3dSCy Schubert.Li 127.127. Ar t . Ar u
23462b15cb3dSCy Schubert.Sm on
23472b15cb3dSCy Schubert.Op Cm time1 Ar sec
23482b15cb3dSCy Schubert.Op Cm time2 Ar sec
23492b15cb3dSCy Schubert.Op Cm stratum Ar int
23502b15cb3dSCy Schubert.Op Cm refid Ar string
23512b15cb3dSCy Schubert.Op Cm mode Ar int
23522b15cb3dSCy Schubert.Op Cm flag1 Cm 0 \&| Cm 1
23532b15cb3dSCy Schubert.Op Cm flag2 Cm 0 \&| Cm 1
23542b15cb3dSCy Schubert.Op Cm flag3 Cm 0 \&| Cm 1
23552b15cb3dSCy Schubert.Op Cm flag4 Cm 0 \&| Cm 1
23562b15cb3dSCy Schubert.Xc
23572b15cb3dSCy SchubertThis command can be used to configure reference clocks in
23582b15cb3dSCy Schubertspecial ways.
23592b15cb3dSCy SchubertIt must immediately follow the
23602b15cb3dSCy Schubert.Ic server
23612b15cb3dSCy Schubertcommand which configures the driver.
23622b15cb3dSCy SchubertNote that the same capability
23632b15cb3dSCy Schubertis possible at run time using the
23642b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
23652b15cb3dSCy Schubertprogram.
23662b15cb3dSCy SchubertThe options are interpreted as
23672b15cb3dSCy Schubertfollows:
23682b15cb3dSCy Schubert.Bl -tag -width indent
23692b15cb3dSCy Schubert.It Cm time1 Ar sec
23702b15cb3dSCy SchubertSpecifies a constant to be added to the time offset produced by
23712b15cb3dSCy Schubertthe driver, a fixed-point decimal number in seconds.
23722b15cb3dSCy SchubertThis is used
23732b15cb3dSCy Schubertas a calibration constant to adjust the nominal time offset of a
23742b15cb3dSCy Schubertparticular clock to agree with an external standard, such as a
23752b15cb3dSCy Schubertprecision PPS signal.
23762b15cb3dSCy SchubertIt also provides a way to correct a
23772b15cb3dSCy Schubertsystematic error or bias due to serial port or operating system
23782b15cb3dSCy Schubertlatencies, different cable lengths or receiver internal delay.
23792b15cb3dSCy SchubertThe
23802b15cb3dSCy Schubertspecified offset is in addition to the propagation delay provided
23812b15cb3dSCy Schubertby other means, such as internal DIPswitches.
23822b15cb3dSCy SchubertWhere a calibration
23832b15cb3dSCy Schubertfor an individual system and driver is available, an approximate
23842b15cb3dSCy Schubertcorrection is noted in the driver documentation pages.
23852b15cb3dSCy SchubertNote: in order to facilitate calibration when more than one
23862b15cb3dSCy Schubertradio clock or PPS signal is supported, a special calibration
23872b15cb3dSCy Schubertfeature is available.
23882b15cb3dSCy SchubertIt takes the form of an argument to the
23892b15cb3dSCy Schubert.Ic enable
23902b15cb3dSCy Schubertcommand described in
23912b15cb3dSCy Schubert.Sx Miscellaneous Options
23922b15cb3dSCy Schubertpage and operates as described in the
23932b15cb3dSCy Schubert.Qq Reference Clock Drivers
23942b15cb3dSCy Schubertpage
23952b15cb3dSCy Schubert(available as part of the HTML documentation
23962b15cb3dSCy Schubertprovided in
23972b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
23982b15cb3dSCy Schubert.It Cm time2 Ar secs
23992b15cb3dSCy SchubertSpecifies a fixed-point decimal number in seconds, which is
24002b15cb3dSCy Schubertinterpreted in a driver-dependent way.
24012b15cb3dSCy SchubertSee the descriptions of
24022b15cb3dSCy Schubertspecific drivers in the
24032b15cb3dSCy Schubert.Qq Reference Clock Drivers
24042b15cb3dSCy Schubertpage
24052b15cb3dSCy Schubert(available as part of the HTML documentation
24062b15cb3dSCy Schubertprovided in
24072b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ).
24082b15cb3dSCy Schubert.It Cm stratum Ar int
24092b15cb3dSCy SchubertSpecifies the stratum number assigned to the driver, an integer
24102b15cb3dSCy Schubertbetween 0 and 15.
24112b15cb3dSCy SchubertThis number overrides the default stratum number
24122b15cb3dSCy Schubertordinarily assigned by the driver itself, usually zero.
24132b15cb3dSCy Schubert.It Cm refid Ar string
24142b15cb3dSCy SchubertSpecifies an ASCII string of from one to four characters which
24152b15cb3dSCy Schubertdefines the reference identifier used by the driver.
24162b15cb3dSCy SchubertThis string
24172b15cb3dSCy Schubertoverrides the default identifier ordinarily assigned by the driver
24182b15cb3dSCy Schubertitself.
24192b15cb3dSCy Schubert.It Cm mode Ar int
24202b15cb3dSCy SchubertSpecifies a mode number which is interpreted in a
24212b15cb3dSCy Schubertdevice-specific fashion.
24222b15cb3dSCy SchubertFor instance, it selects a dialing
24232b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
24242b15cb3dSCy Schubertparse
24252b15cb3dSCy Schubertdrivers.
24262b15cb3dSCy Schubert.It Cm flag1 Cm 0 \&| Cm 1
24272b15cb3dSCy Schubert.It Cm flag2 Cm 0 \&| Cm 1
24282b15cb3dSCy Schubert.It Cm flag3 Cm 0 \&| Cm 1
24292b15cb3dSCy Schubert.It Cm flag4 Cm 0 \&| Cm 1
24302b15cb3dSCy SchubertThese four flags are used for customizing the clock driver.
24312b15cb3dSCy SchubertThe
24322b15cb3dSCy Schubertinterpretation of these values, and whether they are used at all,
24332b15cb3dSCy Schubertis a function of the particular clock driver.
24342b15cb3dSCy SchubertHowever, by
24352b15cb3dSCy Schubertconvention
24362b15cb3dSCy Schubert.Cm flag4
24372b15cb3dSCy Schubertis used to enable recording monitoring
24382b15cb3dSCy Schubertdata to the
24392b15cb3dSCy Schubert.Cm clockstats
24402b15cb3dSCy Schubertfile configured with the
24412b15cb3dSCy Schubert.Ic filegen
24422b15cb3dSCy Schubertcommand.
24432b15cb3dSCy SchubertFurther information on the
24442b15cb3dSCy Schubert.Ic filegen
24452b15cb3dSCy Schubertcommand can be found in
24462b15cb3dSCy Schubert.Sx Monitoring Options .
24472b15cb3dSCy Schubert.El
24482b15cb3dSCy Schubert.El
24492b15cb3dSCy Schubert.Sh Miscellaneous Options
24502b15cb3dSCy Schubert.Bl -tag -width indent
24512b15cb3dSCy Schubert.It Ic broadcastdelay Ar seconds
24522b15cb3dSCy SchubertThe broadcast and multicast modes require a special calibration
24532b15cb3dSCy Schubertto determine the network delay between the local and remote
24542b15cb3dSCy Schubertservers.
24552b15cb3dSCy SchubertOrdinarily, this is done automatically by the initial
24562b15cb3dSCy Schubertprotocol exchanges between the client and server.
24572b15cb3dSCy SchubertIn some cases,
24582b15cb3dSCy Schubertthe calibration procedure may fail due to network or server access
24592b15cb3dSCy Schubertcontrols, for example.
24602b15cb3dSCy SchubertThis command specifies the default delay to
24612b15cb3dSCy Schubertbe used under these circumstances.
24622b15cb3dSCy SchubertTypically (for Ethernet), a
24632b15cb3dSCy Schubertnumber between 0.003 and 0.007 seconds is appropriate.
24642b15cb3dSCy SchubertThe default
24652b15cb3dSCy Schubertwhen this command is not used is 0.004 seconds.
24662b15cb3dSCy Schubert.It Ic driftfile Ar driftfile
24672b15cb3dSCy SchubertThis command specifies the complete path and name of the file used to
24682b15cb3dSCy Schubertrecord the frequency of the local clock oscillator.
24692b15cb3dSCy SchubertThis is the same
24702b15cb3dSCy Schubertoperation as the
24712b15cb3dSCy Schubert.Fl f
24722b15cb3dSCy Schubertcommand line option.
24732b15cb3dSCy SchubertIf the file exists, it is read at
24742b15cb3dSCy Schubertstartup in order to set the initial frequency and then updated once per
24752b15cb3dSCy Schuberthour with the current frequency computed by the daemon.
24762b15cb3dSCy SchubertIf the file name is
24772b15cb3dSCy Schubertspecified, but the file itself does not exist, the starts with an initial
24782b15cb3dSCy Schubertfrequency of zero and creates the file when writing it for the first time.
24792b15cb3dSCy SchubertIf this command is not given, the daemon will always start with an initial
24802b15cb3dSCy Schubertfrequency of zero.
24812b15cb3dSCy Schubert.Pp
24822b15cb3dSCy SchubertThe file format consists of a single line containing a single
24832b15cb3dSCy Schubertfloating point number, which records the frequency offset measured
24842b15cb3dSCy Schubertin parts-per-million (PPM).
24852b15cb3dSCy SchubertThe file is updated by first writing
24862b15cb3dSCy Schubertthe current drift value into a temporary file and then renaming
24872b15cb3dSCy Schubertthis file to replace the old version.
24882b15cb3dSCy SchubertThis implies that
24892b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
24902b15cb3dSCy Schubertmust have write permission for the directory the
24912b15cb3dSCy Schubertdrift file is located in, and that file system links, symbolic or
24922b15cb3dSCy Schubertotherwise, should be avoided.
2493276da39aSCy Schubert.It Ic dscp Ar value
2494276da39aSCy SchubertThis option specifies the Differentiated Services Control Point (DSCP) value,
24954990d495SXin LIa 6-bit code.
24964990d495SXin LIThe default value is 46, signifying Expedited Forwarding.
24972b15cb3dSCy Schubert.It Xo Ic enable
24982b15cb3dSCy Schubert.Oo
24992b15cb3dSCy Schubert.Cm auth | Cm bclient |
25002b15cb3dSCy Schubert.Cm calibrate | Cm kernel |
250168ba7e87SXin LI.Cm mode7 | Cm monitor |
250268ba7e87SXin LI.Cm ntp | Cm stats |
2503e27abb66SXin LI.Cm peer_clear_digest_early |
250468ba7e87SXin LI.Cm unpeer_crypto_early | Cm unpeer_crypto_nak_early | Cm unpeer_digest_early
25052b15cb3dSCy Schubert.Oc
25062b15cb3dSCy Schubert.Xc
25072b15cb3dSCy Schubert.It Xo Ic disable
25082b15cb3dSCy Schubert.Oo
25092b15cb3dSCy Schubert.Cm auth | Cm bclient |
25102b15cb3dSCy Schubert.Cm calibrate | Cm kernel |
251168ba7e87SXin LI.Cm mode7 | Cm monitor |
251268ba7e87SXin LI.Cm ntp | Cm stats |
2513e27abb66SXin LI.Cm peer_clear_digest_early |
251468ba7e87SXin LI.Cm unpeer_crypto_early | Cm unpeer_crypto_nak_early | Cm unpeer_digest_early
25152b15cb3dSCy Schubert.Oc
25162b15cb3dSCy Schubert.Xc
25172b15cb3dSCy SchubertProvides a way to enable or disable various server options.
25182b15cb3dSCy SchubertFlags not mentioned are unaffected.
25192b15cb3dSCy SchubertNote that all of these flags
25202b15cb3dSCy Schubertcan be controlled remotely using the
25212b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
25222b15cb3dSCy Schubertutility program.
25232b15cb3dSCy Schubert.Bl -tag -width indent
25242b15cb3dSCy Schubert.It Cm auth
25252b15cb3dSCy SchubertEnables the server to synchronize with unconfigured peers only if the
25262b15cb3dSCy Schubertpeer has been correctly authenticated using either public key or
25272b15cb3dSCy Schubertprivate key cryptography.
25282b15cb3dSCy SchubertThe default for this flag is
25292b15cb3dSCy Schubert.Ic enable .
25302b15cb3dSCy Schubert.It Cm bclient
25312b15cb3dSCy SchubertEnables the server to listen for a message from a broadcast or
25322b15cb3dSCy Schubertmulticast server, as in the
25332b15cb3dSCy Schubert.Ic multicastclient
25342b15cb3dSCy Schubertcommand with default
25352b15cb3dSCy Schubertaddress.
25362b15cb3dSCy SchubertThe default for this flag is
25372b15cb3dSCy Schubert.Ic disable .
25382b15cb3dSCy Schubert.It Cm calibrate
25392b15cb3dSCy SchubertEnables the calibrate feature for reference clocks.
25402b15cb3dSCy SchubertThe default for
25412b15cb3dSCy Schubertthis flag is
25422b15cb3dSCy Schubert.Ic disable .
25432b15cb3dSCy Schubert.It Cm kernel
25442b15cb3dSCy SchubertEnables the kernel time discipline, if available.
25452b15cb3dSCy SchubertThe default for this
25462b15cb3dSCy Schubertflag is
25472b15cb3dSCy Schubert.Ic enable
25482b15cb3dSCy Schubertif support is available, otherwise
25492b15cb3dSCy Schubert.Ic disable .
25502b15cb3dSCy Schubert.It Cm mode7
25512b15cb3dSCy SchubertEnables processing of NTP mode 7 implementation-specific requests
25522b15cb3dSCy Schubertwhich are used by the deprecated
25532b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
25542b15cb3dSCy Schubertprogram.
25552b15cb3dSCy SchubertThe default for this flag is disable.
25562b15cb3dSCy SchubertThis flag is excluded from runtime configuration using
25572b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc .
25582b15cb3dSCy SchubertThe
25592b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
25602b15cb3dSCy Schubertprogram provides the same capabilities as
25612b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
25622b15cb3dSCy Schubertusing standard mode 6 requests.
25632b15cb3dSCy Schubert.It Cm monitor
25642b15cb3dSCy SchubertEnables the monitoring facility.
25652b15cb3dSCy SchubertSee the
25662b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
25672b15cb3dSCy Schubertprogram
25682b15cb3dSCy Schubertand the
25692b15cb3dSCy Schubert.Ic monlist
25702b15cb3dSCy Schubertcommand or further information.
25712b15cb3dSCy SchubertThe
25722b15cb3dSCy Schubertdefault for this flag is
25732b15cb3dSCy Schubert.Ic enable .
25742b15cb3dSCy Schubert.It Cm ntp
25752b15cb3dSCy SchubertEnables time and frequency discipline.
25762b15cb3dSCy SchubertIn effect, this switch opens and
25772b15cb3dSCy Schubertcloses the feedback loop, which is useful for testing.
25782b15cb3dSCy SchubertThe default for
25792b15cb3dSCy Schubertthis flag is
25802b15cb3dSCy Schubert.Ic enable .
2581e27abb66SXin LI.It Cm peer_clear_digest_early
2582e27abb66SXin LIBy default, if
2583e27abb66SXin LI.Xr ntpd 1ntpdmdoc
2584e27abb66SXin LIis using autokey and it
2585e27abb66SXin LIreceives a crypto-NAK packet that
2586e27abb66SXin LIpasses the duplicate packet and origin timestamp checks
2587e27abb66SXin LIthe peer variables are immediately cleared.
2588e27abb66SXin LIWhile this is generally a feature
2589e27abb66SXin LIas it allows for quick recovery if a server key has changed,
2590e27abb66SXin LIa properly forged and appropriately delivered crypto-NAK packet
2591e27abb66SXin LIcan be used in a DoS attack.
2592e27abb66SXin LIIf you have active noticable problems with this type of DoS attack
2593e27abb66SXin LIthen you should consider
2594e27abb66SXin LIdisabling this option.
2595e27abb66SXin LIYou can check your
2596e27abb66SXin LI.Cm peerstats
2597e27abb66SXin LIfile for evidence of any of these attacks.
2598e27abb66SXin LIThe
2599e27abb66SXin LIdefault for this flag is
2600e27abb66SXin LI.Ic enable .
26012b15cb3dSCy Schubert.It Cm stats
26022b15cb3dSCy SchubertEnables the statistics facility.
26032b15cb3dSCy SchubertSee the
26042b15cb3dSCy Schubert.Sx Monitoring Options
26052b15cb3dSCy Schubertsection for further information.
26062b15cb3dSCy SchubertThe default for this flag is
26072b15cb3dSCy Schubert.Ic disable .
260868ba7e87SXin LI.It Cm unpeer_crypto_early
260968ba7e87SXin LIBy default, if
261068ba7e87SXin LI.Xr ntpd 1ntpdmdoc
261168ba7e87SXin LIreceives an autokey packet that fails TEST9,
261268ba7e87SXin LIa crypto failure,
261368ba7e87SXin LIthe association is immediately cleared.
261468ba7e87SXin LIThis is almost certainly a feature,
261568ba7e87SXin LIbut if, in spite of the current recommendation of not using autokey,
261668ba7e87SXin LIyou are
261768ba7e87SXin LI.B still
261868ba7e87SXin LIusing autokey
261968ba7e87SXin LI.B and
262068ba7e87SXin LIyou are seeing this sort of DoS attack
262168ba7e87SXin LIdisabling this flag will delay
262268ba7e87SXin LItearing down the association until the reachability counter
262368ba7e87SXin LIbecomes zero.
262468ba7e87SXin LIYou can check your
262568ba7e87SXin LI.Cm peerstats
262668ba7e87SXin LIfile for evidence of any of these attacks.
262768ba7e87SXin LIThe
262868ba7e87SXin LIdefault for this flag is
262968ba7e87SXin LI.Ic enable .
263068ba7e87SXin LI.It Cm unpeer_crypto_nak_early
263168ba7e87SXin LIBy default, if
263268ba7e87SXin LI.Xr ntpd 1ntpdmdoc
263368ba7e87SXin LIreceives a crypto-NAK packet that
263468ba7e87SXin LIpasses the duplicate packet and origin timestamp checks
263568ba7e87SXin LIthe association is immediately cleared.
263668ba7e87SXin LIWhile this is generally a feature
263768ba7e87SXin LIas it allows for quick recovery if a server key has changed,
263868ba7e87SXin LIa properly forged and appropriately delivered crypto-NAK packet
263968ba7e87SXin LIcan be used in a DoS attack.
264068ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
264168ba7e87SXin LIthen you should consider
264268ba7e87SXin LIdisabling this option.
264368ba7e87SXin LIYou can check your
264468ba7e87SXin LI.Cm peerstats
264568ba7e87SXin LIfile for evidence of any of these attacks.
264668ba7e87SXin LIThe
264768ba7e87SXin LIdefault for this flag is
264868ba7e87SXin LI.Ic enable .
264968ba7e87SXin LI.It Cm unpeer_digest_early
265068ba7e87SXin LIBy default, if
265168ba7e87SXin LI.Xr ntpd 1ntpdmdoc
265268ba7e87SXin LIreceives what should be an authenticated packet
265368ba7e87SXin LIthat passes other packet sanity checks but
265468ba7e87SXin LIcontains an invalid digest
265568ba7e87SXin LIthe association is immediately cleared.
265668ba7e87SXin LIWhile this is generally a feature
265768ba7e87SXin LIas it allows for quick recovery,
265868ba7e87SXin LIif this type of packet is carefully forged and sent
265968ba7e87SXin LIduring an appropriate window it can be used for a DoS attack.
266068ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
266168ba7e87SXin LIthen you should consider
266268ba7e87SXin LIdisabling this option.
266368ba7e87SXin LIYou can check your
266468ba7e87SXin LI.Cm peerstats
266568ba7e87SXin LIfile for evidence of any of these attacks.
266668ba7e87SXin LIThe
266768ba7e87SXin LIdefault for this flag is
266868ba7e87SXin LI.Ic enable .
26692b15cb3dSCy Schubert.El
26702b15cb3dSCy Schubert.It Ic includefile Ar includefile
26712b15cb3dSCy SchubertThis command allows additional configuration commands
26722b15cb3dSCy Schubertto be included from a separate file.
26732b15cb3dSCy SchubertInclude files may
26742b15cb3dSCy Schubertbe nested to a depth of five; upon reaching the end of any
26752b15cb3dSCy Schubertinclude file, command processing resumes in the previous
26762b15cb3dSCy Schubertconfiguration file.
26772b15cb3dSCy SchubertThis option is useful for sites that run
26782b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
26792b15cb3dSCy Schuberton multiple hosts, with (mostly) common options (e.g., a
26802b15cb3dSCy Schubertrestriction list).
268109100258SXin LI.It Xo Ic interface
268209100258SXin LI.Oo
268309100258SXin LI.Cm listen | Cm ignore | Cm drop
268409100258SXin LI.Oc
268509100258SXin LI.Oo
268609100258SXin LI.Cm all | Cm ipv4 | Cm ipv6 | Cm wildcard
268709100258SXin LI.Ar name | Ar address
268809100258SXin LI.Oo Cm / Ar prefixlen
268909100258SXin LI.Oc
269009100258SXin LI.Oc
269109100258SXin LI.Xc
269209100258SXin LIThe
269309100258SXin LI.Cm interface
269409100258SXin LIdirective controls which network addresses
269509100258SXin LI.Xr ntpd 1ntpdmdoc
269609100258SXin LIopens, and whether input is dropped without processing.
269709100258SXin LIThe first parameter determines the action for addresses
269809100258SXin LIwhich match the second parameter.
269909100258SXin LIThe second parameter specifies a class of addresses,
270009100258SXin LIor a specific interface name,
270109100258SXin LIor an address.
270209100258SXin LIIn the address case,
270309100258SXin LI.Ar prefixlen
270409100258SXin LIdetermines how many bits must match for this rule to apply.
270509100258SXin LI.Cm ignore
270609100258SXin LIprevents opening matching addresses,
270709100258SXin LI.Cm drop
270809100258SXin LIcauses
270909100258SXin LI.Xr ntpd 1ntpdmdoc
271009100258SXin LIto open the address and drop all received packets without examination.
271109100258SXin LIMultiple
271209100258SXin LI.Cm interface
271309100258SXin LIdirectives can be used.
271409100258SXin LIThe last rule which matches a particular address determines the action for it.
271509100258SXin LI.Cm interface
271609100258SXin LIdirectives are disabled if any
271709100258SXin LI.Fl I ,
271809100258SXin LI.Fl -interface ,
271909100258SXin LI.Fl L ,
272009100258SXin LIor
272109100258SXin LI.Fl -novirtualips
272209100258SXin LIcommand-line options are specified in the configuration file,
272309100258SXin LIall available network addresses are opened.
272409100258SXin LIThe
272509100258SXin LI.Cm nic
272609100258SXin LIdirective is an alias for
272709100258SXin LI.Cm interface .
272809100258SXin LI.It Ic leapfile Ar leapfile
272909100258SXin LIThis command loads the IERS leapseconds file and initializes the
273009100258SXin LIleapsecond values for the next leapsecond event, leapfile expiration
273109100258SXin LItime, and TAI offset.
273209100258SXin LIThe file can be obtained directly from the IERS at
273309100258SXin LI.Li https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
273409100258SXin LIor
273509100258SXin LI.Li ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list .
273609100258SXin LIThe
273709100258SXin LI.Cm leapfile
273809100258SXin LIis scanned when
273909100258SXin LI.Xr ntpd 1ntpdmdoc
274009100258SXin LIprocesses the
274109100258SXin LI.Cm leapfile directive or when
274209100258SXin LI.Cm ntpd detects that the
274309100258SXin LI.Ar leapfile
274409100258SXin LIhas changed.
274509100258SXin LI.Cm ntpd
274609100258SXin LIchecks once a day to see if the
274709100258SXin LI.Ar leapfile
274809100258SXin LIhas changed.
274909100258SXin LIThe
275009100258SXin LI.Xr update-leap 1update_leapmdoc
275109100258SXin LIscript can be run to see if the
275209100258SXin LI.Ar leapfile
275309100258SXin LIshould be updated.
2754276da39aSCy Schubert.It Ic leapsmearinterval Ar seconds
2755276da39aSCy SchubertThis EXPERIMENTAL option is only available if
2756276da39aSCy Schubert.Xr ntpd 1ntpdmdoc
2757276da39aSCy Schubertwas built with the
2758276da39aSCy Schubert.Cm --enable-leap-smear
2759276da39aSCy Schubertoption to the
2760276da39aSCy Schubert.Cm configure
2761276da39aSCy Schubertscript.
2762276da39aSCy SchubertIt specifies the interval over which a leap second correction will be applied.
2763276da39aSCy SchubertRecommended values for this option are between
2764276da39aSCy Schubert7200 (2 hours) and 86400 (24 hours).
2765276da39aSCy Schubert.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
2766276da39aSCy SchubertSee http://bugs.ntp.org/2855 for more information.
27672b15cb3dSCy Schubert.It Ic logconfig Ar configkeyword
27682b15cb3dSCy SchubertThis command controls the amount and type of output written to
27692b15cb3dSCy Schubertthe system
27702b15cb3dSCy Schubert.Xr syslog 3
27712b15cb3dSCy Schubertfacility or the alternate
27722b15cb3dSCy Schubert.Ic logfile
27732b15cb3dSCy Schubertlog file.
27742b15cb3dSCy SchubertBy default, all output is turned on.
27752b15cb3dSCy SchubertAll
27762b15cb3dSCy Schubert.Ar configkeyword
27772b15cb3dSCy Schubertkeywords can be prefixed with
27782b15cb3dSCy Schubert.Ql = ,
27792b15cb3dSCy Schubert.Ql +
27802b15cb3dSCy Schubertand
27812b15cb3dSCy Schubert.Ql - ,
27822b15cb3dSCy Schubertwhere
27832b15cb3dSCy Schubert.Ql =
27842b15cb3dSCy Schubertsets the
27852b15cb3dSCy Schubert.Xr syslog 3
27862b15cb3dSCy Schubertpriority mask,
27872b15cb3dSCy Schubert.Ql +
27882b15cb3dSCy Schubertadds and
27892b15cb3dSCy Schubert.Ql -
27902b15cb3dSCy Schubertremoves
27912b15cb3dSCy Schubertmessages.
27922b15cb3dSCy Schubert.Xr syslog 3
27932b15cb3dSCy Schubertmessages can be controlled in four
27942b15cb3dSCy Schubertclasses
27952b15cb3dSCy Schubert.Po
27962b15cb3dSCy Schubert.Cm clock ,
27972b15cb3dSCy Schubert.Cm peer ,
27982b15cb3dSCy Schubert.Cm sys
27992b15cb3dSCy Schubertand
28002b15cb3dSCy Schubert.Cm sync
28012b15cb3dSCy Schubert.Pc .
28022b15cb3dSCy SchubertWithin these classes four types of messages can be
28032b15cb3dSCy Schubertcontrolled: informational messages
28042b15cb3dSCy Schubert.Po
28052b15cb3dSCy Schubert.Cm info
28062b15cb3dSCy Schubert.Pc ,
28072b15cb3dSCy Schubertevent messages
28082b15cb3dSCy Schubert.Po
28092b15cb3dSCy Schubert.Cm events
28102b15cb3dSCy Schubert.Pc ,
28112b15cb3dSCy Schubertstatistics messages
28122b15cb3dSCy Schubert.Po
28132b15cb3dSCy Schubert.Cm statistics
28142b15cb3dSCy Schubert.Pc
28152b15cb3dSCy Schubertand
28162b15cb3dSCy Schubertstatus messages
28172b15cb3dSCy Schubert.Po
28182b15cb3dSCy Schubert.Cm status
28192b15cb3dSCy Schubert.Pc .
28202b15cb3dSCy Schubert.Pp
28212b15cb3dSCy SchubertConfiguration keywords are formed by concatenating the message class with
28222b15cb3dSCy Schubertthe event class.
28232b15cb3dSCy SchubertThe
28242b15cb3dSCy Schubert.Cm all
28252b15cb3dSCy Schubertprefix can be used instead of a message class.
28262b15cb3dSCy SchubertA
28272b15cb3dSCy Schubertmessage class may also be followed by the
28282b15cb3dSCy Schubert.Cm all
28292b15cb3dSCy Schubertkeyword to enable/disable all
28304990d495SXin LImessages of the respective message class.
28314990d495SXin LIThus, a minimal log configuration
28322b15cb3dSCy Schubertcould look like this:
28332b15cb3dSCy Schubert.Bd -literal
28342b15cb3dSCy Schubertlogconfig =syncstatus +sysevents
28352b15cb3dSCy Schubert.Ed
28362b15cb3dSCy Schubert.Pp
28372b15cb3dSCy SchubertThis would just list the synchronizations state of
28382b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
28392b15cb3dSCy Schubertand the major system events.
28402b15cb3dSCy SchubertFor a simple reference server, the
28412b15cb3dSCy Schubertfollowing minimum message configuration could be useful:
28422b15cb3dSCy Schubert.Bd -literal
28432b15cb3dSCy Schubertlogconfig =syncall +clockall
28442b15cb3dSCy Schubert.Ed
28452b15cb3dSCy Schubert.Pp
28462b15cb3dSCy SchubertThis configuration will list all clock information and
28472b15cb3dSCy Schubertsynchronization information.
28482b15cb3dSCy SchubertAll other events and messages about
28492b15cb3dSCy Schubertpeers, system events and so on is suppressed.
28502b15cb3dSCy Schubert.It Ic logfile Ar logfile
28512b15cb3dSCy SchubertThis command specifies the location of an alternate log file to
28522b15cb3dSCy Schubertbe used instead of the default system
28532b15cb3dSCy Schubert.Xr syslog 3
28542b15cb3dSCy Schubertfacility.
28554990d495SXin LIThis is the same operation as the
28564990d495SXin LI.Fl l
28574990d495SXin LIcommand line option.
285809100258SXin LI.It Xo Ic mru
285909100258SXin LI.Oo
286009100258SXin LI.Cm maxdepth Ar count | Cm maxmem Ar kilobytes |
286109100258SXin LI.Cm mindepth Ar count | Cm maxage Ar seconds |
286209100258SXin LI.Cm initialloc Ar count | Cm initmem Ar kilobytes |
286309100258SXin LI.Cm incalloc Ar count | Cm incmem Ar kilobytes
286409100258SXin LI.Oc
286509100258SXin LI.Xc
286609100258SXin LIControls size limite of the monitoring facility's Most Recently Used
286709100258SXin LI(MRU) list
286809100258SXin LIof client addresses, which is also used by the
286909100258SXin LIrate control facility.
287009100258SXin LI.Bl -tag -width indent
287109100258SXin LI.It Ic maxdepth Ar count
287209100258SXin LI.It Ic maxmem Ar kilobytes
287309100258SXin LIEquivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
287409100258SXin LIThe acutal limit will be up to
287509100258SXin LI.Cm incalloc
287609100258SXin LIentries or
287709100258SXin LI.Cm incmem
287809100258SXin LIkilobytes larger.
287909100258SXin LIAs with all of the
288009100258SXin LI.Cm mru
288109100258SXin LIoptions offered in units of entries or kilobytes, if both
288209100258SXin LI.Cm maxdepth
288309100258SXin LIand
288409100258SXin LI.Cm maxmem are used, the last one used controls.
288509100258SXin LIThe default is 1024 kilobytes.
288609100258SXin LI.It Cm mindepth Ar count
288709100258SXin LILower limit on the MRU list size.
288809100258SXin LIWhen the MRU list has fewer than
288909100258SXin LI.Cm mindepth
289009100258SXin LIentries, existing entries are never removed to make room for newer ones,
289109100258SXin LIregardless of their age.
289209100258SXin LIThe default is 600 entries.
289309100258SXin LI.It Cm maxage Ar seconds
289409100258SXin LIOnce the MRU list has
289509100258SXin LI.Cm mindepth
289609100258SXin LIentries and an additional client is to ba added to the list,
289709100258SXin LIif the oldest entry was updated more than
289809100258SXin LI.Cm maxage
289909100258SXin LIseconds ago, that entry is removed and its storage is reused.
290009100258SXin LIIf the oldest entry was updated more recently the MRU list is grown,
290109100258SXin LIsubject to
290209100258SXin LI.Cm maxdepth / moxmem .
290309100258SXin LIThe default is 64 seconds.
290409100258SXin LI.It Cm initalloc Ar count
290509100258SXin LI.It Cm initmem Ar kilobytes
290609100258SXin LIInitial memory allocation at the time the monitoringfacility is first enabled,
290709100258SXin LIin terms of the number of entries or kilobytes.
290809100258SXin LIThe default is 4 kilobytes.
290909100258SXin LI.It Cm incalloc Ar count
291009100258SXin LI.It Cm incmem Ar kilobytes
291109100258SXin LISize of additional memory allocations when growing the MRU list, in entries or kilobytes.
291209100258SXin LIThe default is 4 kilobytes.
291309100258SXin LI.El
291409100258SXin LI.It Ic nonvolatile Ar threshold
291509100258SXin LISpecify the
291609100258SXin LI.Ar threshold
291709100258SXin LIdelta in seconds before an hourly change to the
291809100258SXin LI.Cm driftfile
291909100258SXin LI(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
292009100258SXin LIThe frequency file is inspected each hour.
292109100258SXin LIIf the difference between the current frequency and the last value written
292209100258SXin LIexceeds the threshold, the file is written and the
292309100258SXin LI.Cm threshold
292409100258SXin LIbecomes the new threshold value.
292509100258SXin LIIf the threshold is not exceeeded, it is reduced by half.
292609100258SXin LIThis is intended to reduce the number of file writes
292709100258SXin LIfor embedded systems with nonvolatile memory.
292809100258SXin LI.It Ic phone Ar dial ...
292909100258SXin LIThis command is used in conjunction with
293009100258SXin LIthe ACTS modem driver (type 18)
293109100258SXin LIor the JJY driver (type 40, mode 100 - 180).
293209100258SXin LIFor the ACTS modem driver (type 18), the arguments consist of
293309100258SXin LIa maximum of 10 telephone numbers used to dial USNO, NIST, or European
293409100258SXin LItime service.
293509100258SXin LIFor the JJY driver (type 40 mode 100 - 180), the argument is
293609100258SXin LIone telephone number used to dial the telephone JJY service.
293709100258SXin LIThe Hayes command ATDT is normally prepended to the number.
293809100258SXin LIThe number can contain other modem control codes as well.
29392d4e511cSCy Schubert.It Xo Cm pollskewlist
29402d4e511cSCy Schubert.Oo
29412d4e511cSCy Schubert.Ar poll
2942a466cc55SCy Schubert.Ar early late
29432d4e511cSCy Schubert.Oc
29442d4e511cSCy Schubert.Ar ...
29452d4e511cSCy Schubert.Oo
29462d4e511cSCy Schubert.Cm default
2947a466cc55SCy Schubert.Ar early late
29482d4e511cSCy Schubert.Oc
29492d4e511cSCy Schubert.Xc
29502d4e511cSCy SchubertEnable skewing of our poll requests to our servers.
29512d4e511cSCy Schubert.Ar poll
29522d4e511cSCy Schubertis a number between 3 and 17 inclusive, identifying a specific poll interval.
29532d4e511cSCy SchubertA poll interval is 2^n seconds in duration,
29542d4e511cSCy Schubertso a poll value of 3 corresponds to 8 seconds
29552d4e511cSCy Schubertand
29562d4e511cSCy Schuberta poll interval of 17 corresponds to
29572d4e511cSCy Schubert131,072 seconds, or about a day and a half.
29582d4e511cSCy SchubertThe next two numbers must be between 0 and one-half of the poll interval,
29592d4e511cSCy Schubertinclusive.
2960a466cc55SCy SchubertAr early
2961a466cc55SCy Schubertspecifies how early the poll may start,
29622d4e511cSCy Schubertwhile
2963a466cc55SCy SchubertAr late
2964a466cc55SCy Schubertspecifies how late the poll may be delayed.
29652d4e511cSCy SchubertWith no arguments, internally specified default values are chosen.
296609100258SXin LI.It Xo Ic reset
296709100258SXin LI.Oo
296809100258SXin LI.Ic allpeers
296909100258SXin LI.Oc
297009100258SXin LI.Oo
297109100258SXin LI.Ic auth
297209100258SXin LI.Oc
297309100258SXin LI.Oo
297409100258SXin LI.Ic ctl
297509100258SXin LI.Oc
297609100258SXin LI.Oo
297709100258SXin LI.Ic io
297809100258SXin LI.Oc
297909100258SXin LI.Oo
298009100258SXin LI.Ic mem
298109100258SXin LI.Oc
298209100258SXin LI.Oo
298309100258SXin LI.Ic sys
298409100258SXin LI.Oc
298509100258SXin LI.Oo
298609100258SXin LI.Ic timer
298709100258SXin LI.Oc
298809100258SXin LI.Xc
298909100258SXin LIReset one or more groups of counters maintained by
299009100258SXin LI.Cm ntpd
299109100258SXin LIand exposed by
299209100258SXin LI.Cm ntpq
299309100258SXin LIand
299409100258SXin LI.Cm ntpdc .
299509100258SXin LI.It Xo Ic rlimit
299609100258SXin LI.Oo
299709100258SXin LI.Cm memlock Ar Nmegabytes |
299809100258SXin LI.Cm stacksize Ar N4kPages
299909100258SXin LI.Cm filenum Ar Nfiledescriptors
300009100258SXin LI.Oc
300109100258SXin LI.Xc
300209100258SXin LI.Bl -tag -width indent
300309100258SXin LI.It Cm memlock Ar Nmegabytes
300409100258SXin LISpecify the number of megabytes of memory that should be
300509100258SXin LIallocated and locked.
300609100258SXin LIProbably only available under Linux, this option may be useful
300709100258SXin LIwhen dropping root (the
300809100258SXin LI.Fl i
300909100258SXin LIoption).
301009100258SXin LIThe default is 32 megabytes on non-Linux machines, and -1 under Linux.
301109100258SXin LI-1 means "do not lock the process into memory".
301209100258SXin LI0 means "lock whatever memory the process wants into memory".
301309100258SXin LI.It Cm stacksize Ar N4kPages
301409100258SXin LISpecifies the maximum size of the process stack on systems with the
301509100258SXin LI.Fn mlockall
301609100258SXin LIfunction.
301709100258SXin LIDefaults to 50 4k pages (200 4k pages in OpenBSD).
301809100258SXin LI.It Cm filenum Ar Nfiledescriptors
301909100258SXin LISpecifies the maximum number of file descriptors ntpd may have open at once.
302009100258SXin LIDefaults to the system default.
302109100258SXin LI.El
302209100258SXin LI.It Ic saveconfigdir Ar directory_path
302309100258SXin LISpecify the directory in which to write configuration snapshots
302409100258SXin LIrequested with
302509100258SXin LI.Cm ntpq 's
302609100258SXin LI.Cm saveconfig
302709100258SXin LIcommand.
302809100258SXin LIIf
302909100258SXin LI.Cm saveconfigdir
303009100258SXin LIdoes not appear in the configuration file,
303109100258SXin LI.Cm saveconfig
303209100258SXin LIrequests are rejected by
303309100258SXin LI.Cm ntpd .
303409100258SXin LI.It Ic saveconfig Ar filename
303509100258SXin LIWrite the current configuration, including any runtime
303609100258SXin LImodifications given with
303709100258SXin LI.Cm :config
303809100258SXin LIor
303909100258SXin LI.Cm config-from-file
304009100258SXin LIto the
304109100258SXin LI.Cm ntpd
304209100258SXin LIhost's
304309100258SXin LI.Ar filename
304409100258SXin LIin the
304509100258SXin LI.Cm saveconfigdir .
304609100258SXin LIThis command will be rejected unless the
304709100258SXin LI.Cm saveconfigdir
304809100258SXin LIdirective appears in
304909100258SXin LI.Cm ntpd 's
305009100258SXin LIconfiguration file.
305109100258SXin LI.Ar filename
305209100258SXin LIcan use
305309100258SXin LI.Xr strftime 3
305409100258SXin LIformat directives to substitute the current date and time,
305509100258SXin LIfor example,
305609100258SXin LI.Cm saveconfig\ ntp-%Y%m%d-%H%M%S.conf .
305709100258SXin LIThe filename used is stored in the system variable
305809100258SXin LI.Cm savedconfig .
305909100258SXin LIAuthentication is required.
30602b15cb3dSCy Schubert.It Ic setvar Ar variable Op Cm default
30612b15cb3dSCy SchubertThis command adds an additional system variable.
30622b15cb3dSCy SchubertThese
30632b15cb3dSCy Schubertvariables can be used to distribute additional information such as
30642b15cb3dSCy Schubertthe access policy.
30652b15cb3dSCy SchubertIf the variable of the form
30662b15cb3dSCy Schubert.Sm off
30672b15cb3dSCy Schubert.Va name = Ar value
30682b15cb3dSCy Schubert.Sm on
30692b15cb3dSCy Schubertis followed by the
30702b15cb3dSCy Schubert.Cm default
30712b15cb3dSCy Schubertkeyword, the
30722b15cb3dSCy Schubertvariable will be listed as part of the default system variables
30732b15cb3dSCy Schubert.Po
30742b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
30752b15cb3dSCy Schubert.Ic rv
30762b15cb3dSCy Schubertcommand
30772b15cb3dSCy Schubert.Pc ) .
30782b15cb3dSCy SchubertThese additional variables serve
30792b15cb3dSCy Schubertinformational purposes only.
30802b15cb3dSCy SchubertThey are not related to the protocol
30812b15cb3dSCy Schubertother that they can be listed.
30822b15cb3dSCy SchubertThe known protocol variables will
30832b15cb3dSCy Schubertalways override any variables defined via the
30842b15cb3dSCy Schubert.Ic setvar
30852b15cb3dSCy Schubertmechanism.
30862b15cb3dSCy SchubertThere are three special variables that contain the names
30872b15cb3dSCy Schubertof all variable of the same group.
30882b15cb3dSCy SchubertThe
30892b15cb3dSCy Schubert.Va sys_var_list
30902b15cb3dSCy Schubertholds
30912b15cb3dSCy Schubertthe names of all system variables.
30922b15cb3dSCy SchubertThe
30932b15cb3dSCy Schubert.Va peer_var_list
30942b15cb3dSCy Schubertholds
30952b15cb3dSCy Schubertthe names of all peer variables and the
30962b15cb3dSCy Schubert.Va clock_var_list
30972b15cb3dSCy Schubertholds the names of the reference clock variables.
309809100258SXin LI.It Cm sysinfo
309909100258SXin LIDisplay operational summary.
310009100258SXin LI.It Cm sysstats
310109100258SXin LIShow statistics counters maintained in the protocol module.
31022b15cb3dSCy Schubert.It Xo Ic tinker
31032b15cb3dSCy Schubert.Oo
31042b15cb3dSCy Schubert.Cm allan Ar allan |
31052b15cb3dSCy Schubert.Cm dispersion Ar dispersion |
31062b15cb3dSCy Schubert.Cm freq Ar freq |
31072b15cb3dSCy Schubert.Cm huffpuff Ar huffpuff |
31082b15cb3dSCy Schubert.Cm panic Ar panic |
3109a25439b6SCy Schubert.Cm step Ar step |
3110a25439b6SCy Schubert.Cm stepback Ar stepback |
3111a25439b6SCy Schubert.Cm stepfwd Ar stepfwd |
31122b15cb3dSCy Schubert.Cm stepout Ar stepout
31132b15cb3dSCy Schubert.Oc
31142b15cb3dSCy Schubert.Xc
31152b15cb3dSCy SchubertThis command can be used to alter several system variables in
31162b15cb3dSCy Schubertvery exceptional circumstances.
31172b15cb3dSCy SchubertIt should occur in the
31182b15cb3dSCy Schubertconfiguration file before any other configuration options.
31192b15cb3dSCy SchubertThe
31202b15cb3dSCy Schubertdefault values of these variables have been carefully optimized for
31212b15cb3dSCy Schuberta wide range of network speeds and reliability expectations.
31222b15cb3dSCy SchubertIn
31232b15cb3dSCy Schubertgeneral, they interact in intricate ways that are hard to predict
31242b15cb3dSCy Schubertand some combinations can result in some very nasty behavior.
31252b15cb3dSCy SchubertVery
31262b15cb3dSCy Schubertrarely is it necessary to change the default values; but, some
31272b15cb3dSCy Schubertfolks cannot resist twisting the knobs anyway and this command is
31282b15cb3dSCy Schubertfor them.
31292b15cb3dSCy SchubertEmphasis added: twisters are on their own and can expect
31302b15cb3dSCy Schubertno help from the support group.
31312b15cb3dSCy Schubert.Pp
31322b15cb3dSCy SchubertThe variables operate as follows:
31332b15cb3dSCy Schubert.Bl -tag -width indent
31342b15cb3dSCy Schubert.It Cm allan Ar allan
31352b15cb3dSCy SchubertThe argument becomes the new value for the minimum Allan
31362b15cb3dSCy Schubertintercept, which is a parameter of the PLL/FLL clock discipline
31372b15cb3dSCy Schubertalgorithm.
31382b15cb3dSCy SchubertThe value in log2 seconds defaults to 7 (1024 s), which is also the lower
31392b15cb3dSCy Schubertlimit.
31402b15cb3dSCy Schubert.It Cm dispersion Ar dispersion
31412b15cb3dSCy SchubertThe argument becomes the new value for the dispersion increase rate,
31422b15cb3dSCy Schubertnormally .000015 s/s.
31432b15cb3dSCy Schubert.It Cm freq Ar freq
31442b15cb3dSCy SchubertThe argument becomes the initial value of the frequency offset in
31452b15cb3dSCy Schubertparts-per-million.
31462b15cb3dSCy SchubertThis overrides the value in the frequency file, if
31472b15cb3dSCy Schubertpresent, and avoids the initial training state if it is not.
31482b15cb3dSCy Schubert.It Cm huffpuff Ar huffpuff
31492b15cb3dSCy SchubertThe argument becomes the new value for the experimental
31502b15cb3dSCy Schuberthuff-n'-puff filter span, which determines the most recent interval
31512b15cb3dSCy Schubertthe algorithm will search for a minimum delay.
31522b15cb3dSCy SchubertThe lower limit is
31532b15cb3dSCy Schubert900 s (15 m), but a more reasonable value is 7200 (2 hours).
31542b15cb3dSCy SchubertThere
31552b15cb3dSCy Schubertis no default, since the filter is not enabled unless this command
31562b15cb3dSCy Schubertis given.
31572b15cb3dSCy Schubert.It Cm panic Ar panic
31582b15cb3dSCy SchubertThe argument is the panic threshold, normally 1000 s.
31592b15cb3dSCy SchubertIf set to zero,
31602b15cb3dSCy Schubertthe panic sanity check is disabled and a clock offset of any value will
31612b15cb3dSCy Schubertbe accepted.
31622b15cb3dSCy Schubert.It Cm step Ar step
31632b15cb3dSCy SchubertThe argument is the step threshold, which by default is 0.128 s.
31642b15cb3dSCy SchubertIt can
31652b15cb3dSCy Schubertbe set to any positive number in seconds.
31662b15cb3dSCy SchubertIf set to zero, step
31672b15cb3dSCy Schubertadjustments will never occur.
31682b15cb3dSCy SchubertNote: The kernel time discipline is
31692b15cb3dSCy Schubertdisabled if the step threshold is set to zero or greater than the
31702b15cb3dSCy Schubertdefault.
3171a25439b6SCy Schubert.It Cm stepback Ar stepback
3172a25439b6SCy SchubertThe argument is the step threshold for the backward direction,
3173a25439b6SCy Schubertwhich by default is 0.128 s.
3174a25439b6SCy SchubertIt can
3175a25439b6SCy Schubertbe set to any positive number in seconds.
3176a25439b6SCy SchubertIf both the forward and backward step thresholds are set to zero, step
3177a25439b6SCy Schubertadjustments will never occur.
3178a25439b6SCy SchubertNote: The kernel time discipline is
3179a25439b6SCy Schubertdisabled if
3180a25439b6SCy Schuberteach direction of step threshold are either
3181a25439b6SCy Schubertset to zero or greater than .5 second.
3182a25439b6SCy Schubert.It Cm stepfwd Ar stepfwd
3183a25439b6SCy SchubertAs for stepback, but for the forward direction.
31842b15cb3dSCy Schubert.It Cm stepout Ar stepout
31852b15cb3dSCy SchubertThe argument is the stepout timeout, which by default is 900 s.
31862b15cb3dSCy SchubertIt can
31872b15cb3dSCy Schubertbe set to any positive number in seconds.
31882b15cb3dSCy SchubertIf set to zero, the stepout
31892b15cb3dSCy Schubertpulses will not be suppressed.
31902b15cb3dSCy Schubert.El
319109100258SXin LI.It Cm writevar Ar assocID\ name = value [,...]
319209100258SXin LIWrite (create or update) the specified variables.
319309100258SXin LIIf the
319409100258SXin LI.Cm assocID
319509100258SXin LIis zero, the variablea re from the
319609100258SXin LIsystem variables
319709100258SXin LIname space, otherwise they are from the
319809100258SXin LIpeer variables
319909100258SXin LIname space.
320009100258SXin LIThe
320109100258SXin LI.Cm assocID
320209100258SXin LIis required, as the same name can occur in both name spaces.
32032b15cb3dSCy Schubert.It Xo Ic trap Ar host_address
32042b15cb3dSCy Schubert.Op Cm port Ar port_number
32052b15cb3dSCy Schubert.Op Cm interface Ar interface_address
32062b15cb3dSCy Schubert.Xc
32072b15cb3dSCy SchubertThis command configures a trap receiver at the given host
32082b15cb3dSCy Schubertaddress and port number for sending messages with the specified
32092b15cb3dSCy Schubertlocal interface address.
32102b15cb3dSCy SchubertIf the port number is unspecified, a value
32112b15cb3dSCy Schubertof 18447 is used.
32122b15cb3dSCy SchubertIf the interface address is not specified, the
32132b15cb3dSCy Schubertmessage is sent with a source address of the local interface the
32142b15cb3dSCy Schubertmessage is sent through.
32152b15cb3dSCy SchubertNote that on a multihomed host the
32162b15cb3dSCy Schubertinterface used may vary from time to time with routing changes.
321709100258SXin LI.It Cm ttl Ar hop ...
321809100258SXin LIThis command specifies a list of TTL values in increasing order.
321909100258SXin LIUp to 8 values can be specified.
322009100258SXin LIIn
322109100258SXin LI.Cm manycast
322209100258SXin LImode these values are used in-turn in an expanding-ring search.
322309100258SXin LIThe default is eight multiples of 32 starting at 31.
32242b15cb3dSCy Schubert.Pp
32252b15cb3dSCy SchubertThe trap receiver will generally log event messages and other
32262b15cb3dSCy Schubertinformation from the server in a log file.
32272b15cb3dSCy SchubertWhile such monitor
32282b15cb3dSCy Schubertprograms may also request their own trap dynamically, configuring a
32292b15cb3dSCy Schuberttrap receiver will ensure that no messages are lost when the server
32302b15cb3dSCy Schubertis started.
32312b15cb3dSCy Schubert.It Cm hop Ar ...
32322b15cb3dSCy SchubertThis command specifies a list of TTL values in increasing order, up to 8
32332b15cb3dSCy Schubertvalues can be specified.
32342b15cb3dSCy SchubertIn manycast mode these values are used in turn in
32352b15cb3dSCy Schubertan expanding-ring search.
32362b15cb3dSCy SchubertThe default is eight multiples of 32 starting at
32372b15cb3dSCy Schubert31.
32382b15cb3dSCy Schubert.El
32392b15cb3dSCy Schubert	_END_PROG_MDOC_DESCRIP;
32402b15cb3dSCy Schubert};
32412b15cb3dSCy Schubert
32422b15cb3dSCy Schubertdoc-section	= {
32432b15cb3dSCy Schubert  ds-type	= 'FILES';
32442b15cb3dSCy Schubert  ds-format	= 'mdoc';
32452b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_FILES
32462b15cb3dSCy Schubert.Bl -tag -width /etc/ntp.drift -compact
32472b15cb3dSCy Schubert.It Pa /etc/ntp.conf
32482b15cb3dSCy Schubertthe default name of the configuration file
32492b15cb3dSCy Schubert.It Pa ntp.keys
32502b15cb3dSCy Schubertprivate MD5 keys
32512b15cb3dSCy Schubert.It Pa ntpkey
32522b15cb3dSCy SchubertRSA private key
32532b15cb3dSCy Schubert.It Pa ntpkey_ Ns Ar host
32542b15cb3dSCy SchubertRSA public key
32552b15cb3dSCy Schubert.It Pa ntp_dh
32562b15cb3dSCy SchubertDiffie-Hellman agreement parameters
32572b15cb3dSCy Schubert.El
32582b15cb3dSCy Schubert	_END_MDOC_FILES;
32592b15cb3dSCy Schubert};
32602b15cb3dSCy Schubert
32612b15cb3dSCy Schubertdoc-section	= {
32622b15cb3dSCy Schubert  ds-type	= 'SEE ALSO';
32632b15cb3dSCy Schubert  ds-format	= 'mdoc';
32642b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_SEE_ALSO
32652b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc ,
32662b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc ,
32672b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
32682b15cb3dSCy Schubert.Pp
32692b15cb3dSCy SchubertIn addition to the manual pages provided,
32702b15cb3dSCy Schubertcomprehensive documentation is available on the world wide web
32712b15cb3dSCy Schubertat
32722b15cb3dSCy Schubert.Li http://www.ntp.org/ .
32732b15cb3dSCy SchubertA snapshot of this documentation is available in HTML format in
32742b15cb3dSCy Schubert.Pa /usr/share/doc/ntp .
32752b15cb3dSCy Schubert.Rs
32762b15cb3dSCy Schubert.%A David L. Mills
32772b15cb3dSCy Schubert.%T Network Time Protocol (Version 4)
32782b15cb3dSCy Schubert.%O RFC5905
32792b15cb3dSCy Schubert.Re
32802b15cb3dSCy Schubert	_END_MDOC_SEE_ALSO;
32812b15cb3dSCy Schubert};
32822b15cb3dSCy Schubert
32832b15cb3dSCy Schubertdoc-section	= {
32842b15cb3dSCy Schubert  ds-type	= 'BUGS';
32852b15cb3dSCy Schubert  ds-format	= 'mdoc';
32862b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_BUGS
32872b15cb3dSCy SchubertThe syntax checking is not picky; some combinations of
32882b15cb3dSCy Schubertridiculous and even hilarious options and modes may not be
32892b15cb3dSCy Schubertdetected.
32902b15cb3dSCy Schubert.Pp
32912b15cb3dSCy SchubertThe
32922b15cb3dSCy Schubert.Pa ntpkey_ Ns Ar host
32932b15cb3dSCy Schubertfiles are really digital
32942b15cb3dSCy Schubertcertificates.
32952b15cb3dSCy SchubertThese should be obtained via secure directory
32962b15cb3dSCy Schubertservices when they become universally available.
32972b15cb3dSCy Schubert	_END_MDOC_BUGS;
32982b15cb3dSCy Schubert};
32992b15cb3dSCy Schubert
33002b15cb3dSCy Schubertdoc-section	= {
33012b15cb3dSCy Schubert  ds-type	= 'NOTES';
33022b15cb3dSCy Schubert  ds-format	= 'mdoc';
33032b15cb3dSCy Schubert  ds-text	= <<- _END_MDOC_NOTES
33042b15cb3dSCy SchubertThis document was derived from FreeBSD.
33052b15cb3dSCy Schubert	_END_MDOC_NOTES;
33062b15cb3dSCy Schubert};
3307