xref: /freebsd/contrib/ntp/ntpd/invoke-ntp.conf.texi (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
12b15cb3dSCy Schubert@node ntp.conf Notes
22b15cb3dSCy Schubert@section Notes about ntp.conf
32b15cb3dSCy Schubert@pindex ntp.conf
42b15cb3dSCy Schubert@cindex Network Time Protocol (NTP) daemon configuration file format
52b15cb3dSCy Schubert@ignore
62b15cb3dSCy Schubert#
72b15cb3dSCy Schubert# EDIT THIS FILE WITH CAUTION  (invoke-ntp.conf.texi)
82b15cb3dSCy Schubert#
9*f5f40dd6SCy Schubert# It has been AutoGen-ed  May 25, 2024 at 12:03:56 AM by AutoGen 5.18.16
102b15cb3dSCy Schubert# From the definitions    ntp.conf.def
112b15cb3dSCy Schubert# and the template file   agtexi-file.tpl
122b15cb3dSCy Schubert@end ignore
132b15cb3dSCy Schubert
142b15cb3dSCy Schubert
152b15cb3dSCy Schubert
162b15cb3dSCy SchubertThe
172b15cb3dSCy Schubert@code{ntp.conf}
182b15cb3dSCy Schubertconfiguration file is read at initial startup by the
192b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
202b15cb3dSCy Schubertdaemon in order to specify the synchronization sources,
212b15cb3dSCy Schubertmodes and other related information.
222b15cb3dSCy SchubertUsually, it is installed in the
232b15cb3dSCy Schubert@file{/etc}
242b15cb3dSCy Schubertdirectory,
252b15cb3dSCy Schubertbut could be installed elsewhere
262b15cb3dSCy Schubert(see the daemon's
272b15cb3dSCy Schubert@code{-c}
282b15cb3dSCy Schubertcommand line option).
292b15cb3dSCy Schubert
302b15cb3dSCy SchubertThe file format is similar to other
312b15cb3dSCy Schubert@sc{unix}
322b15cb3dSCy Schubertconfiguration files.
332b15cb3dSCy SchubertComments begin with a
342b15cb3dSCy Schubert@quoteleft{}#@quoteright{}
352b15cb3dSCy Schubertcharacter and extend to the end of the line;
362b15cb3dSCy Schubertblank lines are ignored.
372b15cb3dSCy SchubertConfiguration commands consist of an initial keyword
382b15cb3dSCy Schubertfollowed by a list of arguments,
392b15cb3dSCy Schubertsome of which may be optional, separated by whitespace.
402b15cb3dSCy SchubertCommands may not be continued over multiple lines.
412b15cb3dSCy SchubertArguments may be host names,
422b15cb3dSCy Schuberthost addresses written in numeric, dotted-quad form,
432b15cb3dSCy Schubertintegers, floating point numbers (when specifying times in seconds)
442b15cb3dSCy Schubertand text strings.
452b15cb3dSCy Schubert
462b15cb3dSCy SchubertThe rest of this page describes the configuration and control options.
472b15cb3dSCy SchubertThe
482b15cb3dSCy Schubert"Notes on Configuring NTP and Setting up an NTP Subnet"
492b15cb3dSCy Schubertpage
502b15cb3dSCy Schubert(available as part of the HTML documentation
512b15cb3dSCy Schubertprovided in
522b15cb3dSCy Schubert@file{/usr/share/doc/ntp})
532b15cb3dSCy Schubertcontains an extended discussion of these options.
542b15cb3dSCy SchubertIn addition to the discussion of general
552b15cb3dSCy Schubert@ref{Configuration Options},
562b15cb3dSCy Schubertthere are sections describing the following supported functionality
572b15cb3dSCy Schubertand the options used to control it:
582b15cb3dSCy Schubert@itemize @bullet
592b15cb3dSCy Schubert@item
602b15cb3dSCy Schubert@ref{Authentication Support}
612b15cb3dSCy Schubert@item
622b15cb3dSCy Schubert@ref{Monitoring Support}
632b15cb3dSCy Schubert@item
642b15cb3dSCy Schubert@ref{Access Control Support}
652b15cb3dSCy Schubert@item
662b15cb3dSCy Schubert@ref{Automatic NTP Configuration Options}
672b15cb3dSCy Schubert@item
682b15cb3dSCy Schubert@ref{Reference Clock Support}
692b15cb3dSCy Schubert@item
702b15cb3dSCy Schubert@ref{Miscellaneous Options}
712b15cb3dSCy Schubert@end itemize
722b15cb3dSCy Schubert
732b15cb3dSCy SchubertFollowing these is a section describing
742b15cb3dSCy Schubert@ref{Miscellaneous Options}.
752b15cb3dSCy SchubertWhile there is a rich set of options available,
762b15cb3dSCy Schubertthe only required option is one or more
772b15cb3dSCy Schubert@code{pool},
782b15cb3dSCy Schubert@code{server},
792b15cb3dSCy Schubert@code{peer},
802b15cb3dSCy Schubert@code{broadcast}
812b15cb3dSCy Schubertor
822b15cb3dSCy Schubert@code{manycastclient}
832b15cb3dSCy Schubertcommands.
842b15cb3dSCy Schubert@node Configuration Support
852b15cb3dSCy Schubert@subsection Configuration Support
862b15cb3dSCy SchubertFollowing is a description of the configuration commands in
872b15cb3dSCy SchubertNTPv4.
882b15cb3dSCy SchubertThese commands have the same basic functions as in NTPv3 and
892b15cb3dSCy Schubertin some cases new functions and new arguments.
902b15cb3dSCy SchubertThere are two
912b15cb3dSCy Schubertclasses of commands, configuration commands that configure a
922b15cb3dSCy Schubertpersistent association with a remote server or peer or reference
932b15cb3dSCy Schubertclock, and auxiliary commands that specify environmental variables
942b15cb3dSCy Schubertthat control various related operations.
952b15cb3dSCy Schubert@subsubsection Configuration Commands
962b15cb3dSCy SchubertThe various modes are determined by the command keyword and the
972b15cb3dSCy Schuberttype of the required IP address.
982b15cb3dSCy SchubertAddresses are classed by type as
992b15cb3dSCy Schubert(s) a remote server or peer (IPv4 class A, B and C), (b) the
1002b15cb3dSCy Schubertbroadcast address of a local interface, (m) a multicast address (IPv4
1012b15cb3dSCy Schubertclass D), or (r) a reference clock address (127.127.x.x).
1022b15cb3dSCy SchubertNote that
1032b15cb3dSCy Schubertonly those options applicable to each command are listed below.
1042b15cb3dSCy SchubertUse
1052b15cb3dSCy Schubertof options not listed may not be caught as an error, but may result
1062b15cb3dSCy Schubertin some weird and even destructive behavior.
1072b15cb3dSCy Schubert
1082b15cb3dSCy SchubertIf the Basic Socket Interface Extensions for IPv6 (RFC-2553)
1092b15cb3dSCy Schubertis detected, support for the IPv6 address family is generated
1102b15cb3dSCy Schubertin addition to the default support of the IPv4 address family.
1114990d495SXin LIIn a few cases, including the
1124990d495SXin LI@code{reslist}
1134990d495SXin LIbillboard generated
1144990d495SXin LIby
1154990d495SXin LI@code{ntpq(1ntpqmdoc)}
1164990d495SXin LIor
1174990d495SXin LI@code{ntpdc(1ntpdcmdoc)},
1184990d495SXin LIIPv6 addresses are automatically generated.
1192b15cb3dSCy SchubertIPv6 addresses can be identified by the presence of colons
1202b15cb3dSCy Schubert@quotedblleft{}:@quotedblright{}
1212b15cb3dSCy Schubertin the address field.
1222b15cb3dSCy SchubertIPv6 addresses can be used almost everywhere where
1232b15cb3dSCy SchubertIPv4 addresses can be used,
1242b15cb3dSCy Schubertwith the exception of reference clock addresses,
1252b15cb3dSCy Schubertwhich are always IPv4.
1262b15cb3dSCy Schubert
1272b15cb3dSCy SchubertNote that in contexts where a host name is expected, a
1282b15cb3dSCy Schubert@code{-4}
1292b15cb3dSCy Schubertqualifier preceding
1302b15cb3dSCy Schubertthe host name forces DNS resolution to the IPv4 namespace,
1312b15cb3dSCy Schubertwhile a
1322b15cb3dSCy Schubert@code{-6}
1332b15cb3dSCy Schubertqualifier forces DNS resolution to the IPv6 namespace.
1342b15cb3dSCy SchubertSee IPv6 references for the
1352b15cb3dSCy Schubertequivalent classes for that address family.
1362b15cb3dSCy Schubert@table @asis
1372d4e511cSCy Schubert@item @code{pool} @kbd{address} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{xmtnonce}]}
1382d4e511cSCy Schubert@item @code{server} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{burst}]} @code{[@code{iburst}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{true}]} @code{[@code{xmtnonce}]}
1394990d495SXin LI@item @code{peer} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{true}]} @code{[@code{xleave}]}
1404990d495SXin LI@item @code{broadcast} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{ttl} @kbd{ttl}]} @code{[@code{xleave}]}
1412b15cb3dSCy Schubert@item @code{manycastclient} @kbd{address} @code{[@code{key} @kbd{key} @kbd{|} @code{autokey}]} @code{[@code{version} @kbd{version}]} @code{[@code{prefer}]} @code{[@code{minpoll} @kbd{minpoll}]} @code{[@code{maxpoll} @kbd{maxpoll}]} @code{[@code{ttl} @kbd{ttl}]}
1422b15cb3dSCy Schubert@end table
1432b15cb3dSCy Schubert
1442b15cb3dSCy SchubertThese five commands specify the time server name or address to
1452b15cb3dSCy Schubertbe used and the mode in which to operate.
1462b15cb3dSCy SchubertThe
1472b15cb3dSCy Schubert@kbd{address}
1482b15cb3dSCy Schubertcan be
1492b15cb3dSCy Schuberteither a DNS name or an IP address in dotted-quad notation.
1502b15cb3dSCy SchubertAdditional information on association behavior can be found in the
1512b15cb3dSCy Schubert"Association Management"
1522b15cb3dSCy Schubertpage
1532b15cb3dSCy Schubert(available as part of the HTML documentation
1542b15cb3dSCy Schubertprovided in
1552b15cb3dSCy Schubert@file{/usr/share/doc/ntp}).
1562b15cb3dSCy Schubert@table @asis
1572b15cb3dSCy Schubert@item @code{pool}
1582b15cb3dSCy SchubertFor type s addresses, this command mobilizes a persistent
1592b15cb3dSCy Schubertclient mode association with a number of remote servers.
1602b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
1612b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
1622b15cb3dSCy Schubertthe local clock.
1632b15cb3dSCy Schubert@item @code{server}
1642b15cb3dSCy SchubertFor type s and r addresses, this command mobilizes a persistent
1652b15cb3dSCy Schubertclient mode association with the specified remote server or local
1662b15cb3dSCy Schubertradio clock.
1672b15cb3dSCy SchubertIn this mode the local clock can synchronized to the
1682b15cb3dSCy Schubertremote server, but the remote server can never be synchronized to
1692b15cb3dSCy Schubertthe local clock.
1702b15cb3dSCy SchubertThis command should
1712b15cb3dSCy Schubert@emph{not}
1722b15cb3dSCy Schubertbe used for type
1732b15cb3dSCy Schubertb or m addresses.
1742b15cb3dSCy Schubert@item @code{peer}
1752b15cb3dSCy SchubertFor type s addresses (only), this command mobilizes a
1762b15cb3dSCy Schubertpersistent symmetric-active mode association with the specified
1772b15cb3dSCy Schubertremote peer.
1782b15cb3dSCy SchubertIn this mode the local clock can be synchronized to
1792b15cb3dSCy Schubertthe remote peer or the remote peer can be synchronized to the local
1802b15cb3dSCy Schubertclock.
1812b15cb3dSCy SchubertThis is useful in a network of servers where, depending on
1822b15cb3dSCy Schubertvarious failure scenarios, either the local or remote peer may be
1832b15cb3dSCy Schubertthe better source of time.
1842b15cb3dSCy SchubertThis command should NOT be used for type
1852b15cb3dSCy Schubertb, m or r addresses.
1862b15cb3dSCy Schubert@item @code{broadcast}
1872b15cb3dSCy SchubertFor type b and m addresses (only), this
1882b15cb3dSCy Schubertcommand mobilizes a persistent broadcast mode association.
1892b15cb3dSCy SchubertMultiple
1902b15cb3dSCy Schubertcommands can be used to specify multiple local broadcast interfaces
1912b15cb3dSCy Schubert(subnets) and/or multiple multicast groups.
1922b15cb3dSCy SchubertNote that local
1932b15cb3dSCy Schubertbroadcast messages go only to the interface associated with the
1942b15cb3dSCy Schubertsubnet specified, but multicast messages go to all interfaces.
1952b15cb3dSCy SchubertIn broadcast mode the local server sends periodic broadcast
1962b15cb3dSCy Schubertmessages to a client population at the
1972b15cb3dSCy Schubert@kbd{address}
1982b15cb3dSCy Schubertspecified, which is usually the broadcast address on (one of) the
1992b15cb3dSCy Schubertlocal network(s) or a multicast address assigned to NTP.
2002b15cb3dSCy SchubertThe IANA
2012b15cb3dSCy Schuberthas assigned the multicast group address IPv4 224.0.1.1 and
2022b15cb3dSCy SchubertIPv6 ff05::101 (site local) exclusively to
2032b15cb3dSCy SchubertNTP, but other nonconflicting addresses can be used to contain the
2042b15cb3dSCy Schubertmessages within administrative boundaries.
2052b15cb3dSCy SchubertOrdinarily, this
2062b15cb3dSCy Schubertspecification applies only to the local server operating as a
2072b15cb3dSCy Schubertsender; for operation as a broadcast client, see the
2082b15cb3dSCy Schubert@code{broadcastclient}
2092b15cb3dSCy Schubertor
2102b15cb3dSCy Schubert@code{multicastclient}
2112b15cb3dSCy Schubertcommands
2122b15cb3dSCy Schubertbelow.
2132b15cb3dSCy Schubert@item @code{manycastclient}
2142b15cb3dSCy SchubertFor type m addresses (only), this command mobilizes a
2152b15cb3dSCy Schubertmanycast client mode association for the multicast address
2162b15cb3dSCy Schubertspecified.
2172b15cb3dSCy SchubertIn this case a specific address must be supplied which
2182b15cb3dSCy Schubertmatches the address used on the
2192b15cb3dSCy Schubert@code{manycastserver}
2202b15cb3dSCy Schubertcommand for
2212b15cb3dSCy Schubertthe designated manycast servers.
2222b15cb3dSCy SchubertThe NTP multicast address
2232b15cb3dSCy Schubert224.0.1.1 assigned by the IANA should NOT be used, unless specific
2242b15cb3dSCy Schubertmeans are taken to avoid spraying large areas of the Internet with
2252b15cb3dSCy Schubertthese messages and causing a possibly massive implosion of replies
2262b15cb3dSCy Schubertat the sender.
2272b15cb3dSCy SchubertThe
2282b15cb3dSCy Schubert@code{manycastserver}
2292b15cb3dSCy Schubertcommand specifies that the local server
2302b15cb3dSCy Schubertis to operate in client mode with the remote servers that are
2312b15cb3dSCy Schubertdiscovered as the result of broadcast/multicast messages.
2322b15cb3dSCy SchubertThe
2332b15cb3dSCy Schubertclient broadcasts a request message to the group address associated
2342b15cb3dSCy Schubertwith the specified
2352b15cb3dSCy Schubert@kbd{address}
2362b15cb3dSCy Schubertand specifically enabled
2372b15cb3dSCy Schubertservers respond to these messages.
2382b15cb3dSCy SchubertThe client selects the servers
2392b15cb3dSCy Schubertproviding the best time and continues as with the
2402b15cb3dSCy Schubert@code{server}
2412b15cb3dSCy Schubertcommand.
2422b15cb3dSCy SchubertThe remaining servers are discarded as if never
2432b15cb3dSCy Schubertheard.
2442b15cb3dSCy Schubert@end table
2452b15cb3dSCy Schubert
2462b15cb3dSCy SchubertOptions:
2472b15cb3dSCy Schubert@table @asis
2482b15cb3dSCy Schubert@item @code{autokey}
2492b15cb3dSCy SchubertAll packets sent to and received from the server or peer are to
2502b15cb3dSCy Schubertinclude authentication fields encrypted using the autokey scheme
2512b15cb3dSCy Schubertdescribed in
2522b15cb3dSCy Schubert@ref{Authentication Options}.
2532b15cb3dSCy Schubert@item @code{burst}
254*f5f40dd6SCy Schubertwhen the server is reachable, send a burst of six packets
255*f5f40dd6SCy Schubertinstead of the usual one. The packet spacing is 2 s.
256*f5f40dd6SCy SchubertThis is designed to improve timekeeping quality with the
2572b15cb3dSCy Schubert@code{server}
2582b15cb3dSCy Schubertcommand and s addresses.
2592b15cb3dSCy Schubert@item @code{iburst}
2602b15cb3dSCy SchubertWhen the server is unreachable, send a burst of eight packets
2612b15cb3dSCy Schubertinstead of the usual one.
262*f5f40dd6SCy SchubertThe packet spacing is 2 s.
2632b15cb3dSCy SchubertThis is designed to speed the initial synchronization
2642b15cb3dSCy Schubertacquisition with the
2652b15cb3dSCy Schubert@code{server}
2662b15cb3dSCy Schubertcommand and s addresses and when
2672b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
2682b15cb3dSCy Schubertis started with the
2692b15cb3dSCy Schubert@code{-q}
2702b15cb3dSCy Schubertoption.
2712b15cb3dSCy Schubert@item @code{key} @kbd{key}
2722b15cb3dSCy SchubertAll packets sent to and received from the server or peer are to
2732b15cb3dSCy Schubertinclude authentication fields encrypted using the specified
2742b15cb3dSCy Schubert@kbd{key}
2754e1ef62aSXin LIidentifier with values from 1 to 65535, inclusive.
2762b15cb3dSCy SchubertThe
2772b15cb3dSCy Schubertdefault is to include no encryption field.
2782b15cb3dSCy Schubert@item @code{minpoll} @kbd{minpoll}
2792b15cb3dSCy Schubert@item @code{maxpoll} @kbd{maxpoll}
2802b15cb3dSCy SchubertThese options specify the minimum and maximum poll intervals
2812b15cb3dSCy Schubertfor NTP messages, as a power of 2 in seconds
2822b15cb3dSCy SchubertThe maximum poll
2832b15cb3dSCy Schubertinterval defaults to 10 (1,024 s), but can be increased by the
2842b15cb3dSCy Schubert@code{maxpoll}
2852b15cb3dSCy Schubertoption to an upper limit of 17 (36.4 h).
2862b15cb3dSCy SchubertThe
2872b15cb3dSCy Schubertminimum poll interval defaults to 6 (64 s), but can be decreased by
2882b15cb3dSCy Schubertthe
2892b15cb3dSCy Schubert@code{minpoll}
2902b15cb3dSCy Schubertoption to a lower limit of 4 (16 s).
2912b15cb3dSCy Schubert@item @code{noselect}
2922b15cb3dSCy SchubertMarks the server as unused, except for display purposes.
2932b15cb3dSCy SchubertThe server is discarded by the selection algroithm.
2944990d495SXin LI@item @code{preempt}
2954990d495SXin LISays the association can be preempted.
2962b15cb3dSCy Schubert@item @code{prefer}
2972b15cb3dSCy SchubertMarks the server as preferred.
2982b15cb3dSCy SchubertAll other things being equal,
2992b15cb3dSCy Schubertthis host will be chosen for synchronization among a set of
3002b15cb3dSCy Schubertcorrectly operating hosts.
3012b15cb3dSCy SchubertSee the
3022b15cb3dSCy Schubert"Mitigation Rules and the prefer Keyword"
3032b15cb3dSCy Schubertpage
3042b15cb3dSCy Schubert(available as part of the HTML documentation
3052b15cb3dSCy Schubertprovided in
3062b15cb3dSCy Schubert@file{/usr/share/doc/ntp})
3072b15cb3dSCy Schubertfor further information.
3084990d495SXin LI@item @code{true}
3092d4e511cSCy SchubertMarks the server as a truechimer,
3102d4e511cSCy Schubertforcing the association to always survive the selection and clustering algorithms.
3114990d495SXin LIThis option should almost certainly
3124990d495SXin LI@emph{only}
3134990d495SXin LIbe used while testing an association.
3142b15cb3dSCy Schubert@item @code{ttl} @kbd{ttl}
3152b15cb3dSCy SchubertThis option is used only with broadcast server and manycast
3162b15cb3dSCy Schubertclient modes.
3172b15cb3dSCy SchubertIt specifies the time-to-live
3182b15cb3dSCy Schubert@kbd{ttl}
3192b15cb3dSCy Schubertto
3202b15cb3dSCy Schubertuse on broadcast server and multicast server and the maximum
3212b15cb3dSCy Schubert@kbd{ttl}
3222b15cb3dSCy Schubertfor the expanding ring search with manycast
3232b15cb3dSCy Schubertclient packets.
3242b15cb3dSCy SchubertSelection of the proper value, which defaults to
3252b15cb3dSCy Schubert127, is something of a black art and should be coordinated with the
3262b15cb3dSCy Schubertnetwork administrator.
3272b15cb3dSCy Schubert@item @code{version} @kbd{version}
3282b15cb3dSCy SchubertSpecifies the version number to be used for outgoing NTP
3292b15cb3dSCy Schubertpackets.
3302b15cb3dSCy SchubertVersions 1-4 are the choices, with version 4 the
3312b15cb3dSCy Schubertdefault.
3324990d495SXin LI@item @code{xleave}
3334990d495SXin LIValid in
3344990d495SXin LI@code{peer}
3354990d495SXin LIand
3364990d495SXin LI@code{broadcast}
3374990d495SXin LImodes only, this flag enables interleave mode.
3382d4e511cSCy Schubert@item @code{xmtnonce}
3392d4e511cSCy SchubertValid only for
3402d4e511cSCy Schubert@code{server}
3412d4e511cSCy Schubertand
3422d4e511cSCy Schubert@code{pool}
3432d4e511cSCy Schubertmodes, this flag puts a random number in the packet's transmit timestamp.
3442d4e511cSCy Schubert
3452b15cb3dSCy Schubert@end table
3462b15cb3dSCy Schubert@subsubsection Auxiliary Commands
3472b15cb3dSCy Schubert@table @asis
3482b15cb3dSCy Schubert@item @code{broadcastclient}
3492b15cb3dSCy SchubertThis command enables reception of broadcast server messages to
3502b15cb3dSCy Schubertany local interface (type b) address.
3512b15cb3dSCy SchubertUpon receiving a message for
3522b15cb3dSCy Schubertthe first time, the broadcast client measures the nominal server
3532b15cb3dSCy Schubertpropagation delay using a brief client/server exchange with the
3542b15cb3dSCy Schubertserver, then enters the broadcast client mode, in which it
3552b15cb3dSCy Schubertsynchronizes to succeeding broadcast messages.
3562b15cb3dSCy SchubertNote that, in order
3572b15cb3dSCy Schubertto avoid accidental or malicious disruption in this mode, both the
3582b15cb3dSCy Schubertserver and client should operate using symmetric-key or public-key
3592b15cb3dSCy Schubertauthentication as described in
3602b15cb3dSCy Schubert@ref{Authentication Options}.
3612b15cb3dSCy Schubert@item @code{manycastserver} @kbd{address} @kbd{...}
3622b15cb3dSCy SchubertThis command enables reception of manycast client messages to
3632b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
3642b15cb3dSCy SchubertAt least one
3652b15cb3dSCy Schubertaddress is required, but the NTP multicast address 224.0.1.1
3662b15cb3dSCy Schubertassigned by the IANA should NOT be used, unless specific means are
3672b15cb3dSCy Schuberttaken to limit the span of the reply and avoid a possibly massive
3682b15cb3dSCy Schubertimplosion at the original sender.
3692b15cb3dSCy SchubertNote that, in order to avoid
3702b15cb3dSCy Schubertaccidental or malicious disruption in this mode, both the server
3712b15cb3dSCy Schubertand client should operate using symmetric-key or public-key
3722b15cb3dSCy Schubertauthentication as described in
3732b15cb3dSCy Schubert@ref{Authentication Options}.
3742b15cb3dSCy Schubert@item @code{multicastclient} @kbd{address} @kbd{...}
3752b15cb3dSCy SchubertThis command enables reception of multicast server messages to
3762b15cb3dSCy Schubertthe multicast group address(es) (type m) specified.
3772b15cb3dSCy SchubertUpon receiving
3782b15cb3dSCy Schuberta message for the first time, the multicast client measures the
3792b15cb3dSCy Schubertnominal server propagation delay using a brief client/server
3802b15cb3dSCy Schubertexchange with the server, then enters the broadcast client mode, in
3812b15cb3dSCy Schubertwhich it synchronizes to succeeding multicast messages.
3822b15cb3dSCy SchubertNote that,
3832b15cb3dSCy Schubertin order to avoid accidental or malicious disruption in this mode,
3842b15cb3dSCy Schubertboth the server and client should operate using symmetric-key or
3852b15cb3dSCy Schubertpublic-key authentication as described in
3862b15cb3dSCy Schubert@ref{Authentication Options}.
3872b15cb3dSCy Schubert@item @code{mdnstries} @kbd{number}
3882b15cb3dSCy SchubertIf we are participating in mDNS,
3892b15cb3dSCy Schubertafter we have synched for the first time
3902b15cb3dSCy Schubertwe attempt to register with the mDNS system.
3912b15cb3dSCy SchubertIf that registration attempt fails,
3922b15cb3dSCy Schubertwe try again at one minute intervals for up to
3932b15cb3dSCy Schubert@code{mdnstries}
3942b15cb3dSCy Schuberttimes.
3952b15cb3dSCy SchubertAfter all,
3962b15cb3dSCy Schubert@code{ntpd}
3972b15cb3dSCy Schubertmay be starting before mDNS.
3982b15cb3dSCy SchubertThe default value for
3992b15cb3dSCy Schubert@code{mdnstries}
4002b15cb3dSCy Schubertis 5.
4012b15cb3dSCy Schubert@end table
4022b15cb3dSCy Schubert@node Authentication Support
4032b15cb3dSCy Schubert@subsection Authentication Support
4042b15cb3dSCy SchubertAuthentication support allows the NTP client to verify that the
4052b15cb3dSCy Schubertserver is in fact known and trusted and not an intruder intending
4062b15cb3dSCy Schubertaccidentally or on purpose to masquerade as that server.
4072b15cb3dSCy SchubertThe NTPv3
4082b15cb3dSCy Schubertspecification RFC-1305 defines a scheme which provides
4092b15cb3dSCy Schubertcryptographic authentication of received NTP packets.
4102b15cb3dSCy SchubertOriginally,
4112b15cb3dSCy Schubertthis was done using the Data Encryption Standard (DES) algorithm
4122b15cb3dSCy Schubertoperating in Cipher Block Chaining (CBC) mode, commonly called
4132b15cb3dSCy SchubertDES-CBC.
4142b15cb3dSCy SchubertSubsequently, this was replaced by the RSA Message Digest
4152b15cb3dSCy Schubert5 (MD5) algorithm using a private key, commonly called keyed-MD5.
4162b15cb3dSCy SchubertEither algorithm computes a message digest, or one-way hash, which
4172b15cb3dSCy Schubertcan be used to verify the server has the correct private key and
4182b15cb3dSCy Schubertkey identifier.
4192b15cb3dSCy Schubert
4202b15cb3dSCy SchubertNTPv4 retains the NTPv3 scheme, properly described as symmetric key
4212b15cb3dSCy Schubertcryptography and, in addition, provides a new Autokey scheme
4222b15cb3dSCy Schubertbased on public key cryptography.
4232b15cb3dSCy SchubertPublic key cryptography is generally considered more secure
4242b15cb3dSCy Schubertthan symmetric key cryptography, since the security is based
4252b15cb3dSCy Schuberton a private value which is generated by each server and
4262b15cb3dSCy Schubertnever revealed.
4272b15cb3dSCy SchubertWith Autokey all key distribution and
4282b15cb3dSCy Schubertmanagement functions involve only public values, which
4292b15cb3dSCy Schubertconsiderably simplifies key distribution and storage.
4302b15cb3dSCy SchubertPublic key management is based on X.509 certificates,
4312b15cb3dSCy Schubertwhich can be provided by commercial services or
4322b15cb3dSCy Schubertproduced by utility programs in the OpenSSL software library
4332b15cb3dSCy Schubertor the NTPv4 distribution.
4342b15cb3dSCy Schubert
4352b15cb3dSCy SchubertWhile the algorithms for symmetric key cryptography are
4362b15cb3dSCy Schubertincluded in the NTPv4 distribution, public key cryptography
4372b15cb3dSCy Schubertrequires the OpenSSL software library to be installed
4382b15cb3dSCy Schubertbefore building the NTP distribution.
4392b15cb3dSCy SchubertDirections for doing that
4402b15cb3dSCy Schubertare on the Building and Installing the Distribution page.
4412b15cb3dSCy Schubert
4422b15cb3dSCy SchubertAuthentication is configured separately for each association
4432b15cb3dSCy Schubertusing the
4442b15cb3dSCy Schubert@code{key}
4452b15cb3dSCy Schubertor
4462b15cb3dSCy Schubert@code{autokey}
4472b15cb3dSCy Schubertsubcommand on the
4482b15cb3dSCy Schubert@code{peer},
4492b15cb3dSCy Schubert@code{server},
4502b15cb3dSCy Schubert@code{broadcast}
4512b15cb3dSCy Schubertand
4522b15cb3dSCy Schubert@code{manycastclient}
4532b15cb3dSCy Schubertconfiguration commands as described in
4542b15cb3dSCy Schubert@ref{Configuration Options}
4552b15cb3dSCy Schubertpage.
4562b15cb3dSCy SchubertThe authentication
4572b15cb3dSCy Schubertoptions described below specify the locations of the key files,
4582b15cb3dSCy Schubertif other than default, which symmetric keys are trusted
4592b15cb3dSCy Schubertand the interval between various operations, if other than default.
4602b15cb3dSCy Schubert
4612b15cb3dSCy SchubertAuthentication is always enabled,
4622b15cb3dSCy Schubertalthough ineffective if not configured as
4632b15cb3dSCy Schubertdescribed below.
4642b15cb3dSCy SchubertIf a NTP packet arrives
4652b15cb3dSCy Schubertincluding a message authentication
4662b15cb3dSCy Schubertcode (MAC), it is accepted only if it
4672b15cb3dSCy Schubertpasses all cryptographic checks.
4682b15cb3dSCy SchubertThe
4692b15cb3dSCy Schubertchecks require correct key ID, key value
4702b15cb3dSCy Schubertand message digest.
4712b15cb3dSCy SchubertIf the packet has
4722b15cb3dSCy Schubertbeen modified in any way or replayed
4732b15cb3dSCy Schubertby an intruder, it will fail one or more
4742b15cb3dSCy Schubertof these checks and be discarded.
4752b15cb3dSCy SchubertFurthermore, the Autokey scheme requires a
4762b15cb3dSCy Schubertpreliminary protocol exchange to obtain
4772b15cb3dSCy Schubertthe server certificate, verify its
4782b15cb3dSCy Schubertcredentials and initialize the protocol
4792b15cb3dSCy Schubert
4802b15cb3dSCy SchubertThe
4812b15cb3dSCy Schubert@code{auth}
4822b15cb3dSCy Schubertflag controls whether new associations or
4832b15cb3dSCy Schubertremote configuration commands require cryptographic authentication.
4842b15cb3dSCy SchubertThis flag can be set or reset by the
4852b15cb3dSCy Schubert@code{enable}
4862b15cb3dSCy Schubertand
4872b15cb3dSCy Schubert@code{disable}
4882b15cb3dSCy Schubertcommands and also by remote
4892b15cb3dSCy Schubertconfiguration commands sent by a
4902b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
4914990d495SXin LIprogram running on
4922b15cb3dSCy Schubertanother machine.
4932b15cb3dSCy SchubertIf this flag is enabled, which is the default
4942b15cb3dSCy Schubertcase, new broadcast client and symmetric passive associations and
4952b15cb3dSCy Schubertremote configuration commands must be cryptographically
4962b15cb3dSCy Schubertauthenticated using either symmetric key or public key cryptography.
4972b15cb3dSCy SchubertIf this
4982b15cb3dSCy Schubertflag is disabled, these operations are effective
4992b15cb3dSCy Schuberteven if not cryptographic
5002b15cb3dSCy Schubertauthenticated.
5012b15cb3dSCy SchubertIt should be understood
5022b15cb3dSCy Schubertthat operating with the
5032b15cb3dSCy Schubert@code{auth}
5042b15cb3dSCy Schubertflag disabled invites a significant vulnerability
5052b15cb3dSCy Schubertwhere a rogue hacker can
5062b15cb3dSCy Schubertmasquerade as a falseticker and seriously
5072b15cb3dSCy Schubertdisrupt system timekeeping.
5082b15cb3dSCy SchubertIt is
5092b15cb3dSCy Schubertimportant to note that this flag has no purpose
5102b15cb3dSCy Schubertother than to allow or disallow
5112b15cb3dSCy Schuberta new association in response to new broadcast
5122b15cb3dSCy Schubertand symmetric active messages
5132b15cb3dSCy Schubertand remote configuration commands and, in particular,
5142b15cb3dSCy Schubertthe flag has no effect on
5152b15cb3dSCy Schubertthe authentication process itself.
5162b15cb3dSCy Schubert
5172b15cb3dSCy SchubertAn attractive alternative where multicast support is available
5182b15cb3dSCy Schubertis manycast mode, in which clients periodically troll
5192b15cb3dSCy Schubertfor servers as described in the
5202b15cb3dSCy Schubert@ref{Automatic NTP Configuration Options}
5212b15cb3dSCy Schubertpage.
5222b15cb3dSCy SchubertEither symmetric key or public key
5232b15cb3dSCy Schubertcryptographic authentication can be used in this mode.
5242b15cb3dSCy SchubertThe principle advantage
5252b15cb3dSCy Schubertof manycast mode is that potential servers need not be
5262b15cb3dSCy Schubertconfigured in advance,
5272b15cb3dSCy Schubertsince the client finds them during regular operation,
5282b15cb3dSCy Schubertand the configuration
5292b15cb3dSCy Schubertfiles for all clients can be identical.
5302b15cb3dSCy Schubert
5312b15cb3dSCy SchubertThe security model and protocol schemes for
5322b15cb3dSCy Schubertboth symmetric key and public key
5332b15cb3dSCy Schubertcryptography are summarized below;
5342b15cb3dSCy Schubertfurther details are in the briefings, papers
5352b15cb3dSCy Schubertand reports at the NTP project page linked from
5362b15cb3dSCy Schubert@code{http://www.ntp.org/}.
5372b15cb3dSCy Schubert@subsubsection Symmetric-Key Cryptography
5382b15cb3dSCy SchubertThe original RFC-1305 specification allows any one of possibly
5394e1ef62aSXin LI65,535 keys, each distinguished by a 32-bit key identifier, to
5402b15cb3dSCy Schubertauthenticate an association.
5412b15cb3dSCy SchubertThe servers and clients involved must
5422b15cb3dSCy Schubertagree on the key and key identifier to
5432b15cb3dSCy Schubertauthenticate NTP packets.
5442b15cb3dSCy SchubertKeys and
5452b15cb3dSCy Schubertrelated information are specified in a key
5462b15cb3dSCy Schubertfile, usually called
5472b15cb3dSCy Schubert@file{ntp.keys},
5482b15cb3dSCy Schubertwhich must be distributed and stored using
5492b15cb3dSCy Schubertsecure means beyond the scope of the NTP protocol itself.
5502b15cb3dSCy SchubertBesides the keys used
5512b15cb3dSCy Schubertfor ordinary NTP associations,
5522b15cb3dSCy Schubertadditional keys can be used as passwords for the
5532b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
5542b15cb3dSCy Schubertand
5552b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
5562b15cb3dSCy Schubertutility programs.
5572b15cb3dSCy Schubert
5582b15cb3dSCy SchubertWhen
5592b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
5602b15cb3dSCy Schubertis first started, it reads the key file specified in the
5612b15cb3dSCy Schubert@code{keys}
5622b15cb3dSCy Schubertconfiguration command and installs the keys
5632b15cb3dSCy Schubertin the key cache.
5642b15cb3dSCy SchubertHowever,
5652b15cb3dSCy Schubertindividual keys must be activated with the
5662b15cb3dSCy Schubert@code{trusted}
5672b15cb3dSCy Schubertcommand before use.
5682b15cb3dSCy SchubertThis
5692b15cb3dSCy Schubertallows, for instance, the installation of possibly
5702b15cb3dSCy Schubertseveral batches of keys and
5712b15cb3dSCy Schubertthen activating or deactivating each batch
5722b15cb3dSCy Schubertremotely using
5732b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}.
5742b15cb3dSCy SchubertThis also provides a revocation capability that can be used
5752b15cb3dSCy Schubertif a key becomes compromised.
5762b15cb3dSCy SchubertThe
5772b15cb3dSCy Schubert@code{requestkey}
5782b15cb3dSCy Schubertcommand selects the key used as the password for the
5792b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
5802b15cb3dSCy Schubertutility, while the
5812b15cb3dSCy Schubert@code{controlkey}
5822b15cb3dSCy Schubertcommand selects the key used as the password for the
5832b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
5842b15cb3dSCy Schubertutility.
5852b15cb3dSCy Schubert@subsubsection Public Key Cryptography
5862b15cb3dSCy SchubertNTPv4 supports the original NTPv3 symmetric key scheme
5872b15cb3dSCy Schubertdescribed in RFC-1305 and in addition the Autokey protocol,
5882b15cb3dSCy Schubertwhich is based on public key cryptography.
5892b15cb3dSCy SchubertThe Autokey Version 2 protocol described on the Autokey Protocol
5902b15cb3dSCy Schubertpage verifies packet integrity using MD5 message digests
5912b15cb3dSCy Schubertand verifies the source with digital signatures and any of several
5922b15cb3dSCy Schubertdigest/signature schemes.
5932b15cb3dSCy SchubertOptional identity schemes described on the Identity Schemes
5942b15cb3dSCy Schubertpage and based on cryptographic challenge/response algorithms
5952b15cb3dSCy Schubertare also available.
5962b15cb3dSCy SchubertUsing all of these schemes provides strong security against
5972b15cb3dSCy Schubertreplay with or without modification, spoofing, masquerade
5982b15cb3dSCy Schubertand most forms of clogging attacks.
5992b15cb3dSCy Schubert
6002b15cb3dSCy SchubertThe Autokey protocol has several modes of operation
6012b15cb3dSCy Schubertcorresponding to the various NTP modes supported.
6022b15cb3dSCy SchubertMost modes use a special cookie which can be
6032b15cb3dSCy Schubertcomputed independently by the client and server,
6042b15cb3dSCy Schubertbut encrypted in transmission.
6052b15cb3dSCy SchubertAll modes use in addition a variant of the S-KEY scheme,
6062b15cb3dSCy Schubertin which a pseudo-random key list is generated and used
6072b15cb3dSCy Schubertin reverse order.
6082b15cb3dSCy SchubertThese schemes are described along with an executive summary,
6092b15cb3dSCy Schubertcurrent status, briefing slides and reading list on the
6102b15cb3dSCy Schubert@ref{Autonomous Authentication}
6112b15cb3dSCy Schubertpage.
6122b15cb3dSCy Schubert
6132b15cb3dSCy SchubertThe specific cryptographic environment used by Autokey servers
6142b15cb3dSCy Schubertand clients is determined by a set of files
6152b15cb3dSCy Schubertand soft links generated by the
6162b15cb3dSCy Schubert@code{ntp-keygen(1ntpkeygenmdoc)}
6172b15cb3dSCy Schubertprogram.
6182b15cb3dSCy SchubertThis includes a required host key file,
6192b15cb3dSCy Schubertrequired certificate file and optional sign key file,
6202b15cb3dSCy Schubertleapsecond file and identity scheme files.
6212b15cb3dSCy SchubertThe
6222b15cb3dSCy Schubertdigest/signature scheme is specified in the X.509 certificate
6232b15cb3dSCy Schubertalong with the matching sign key.
6242b15cb3dSCy SchubertThere are several schemes
6252b15cb3dSCy Schubertavailable in the OpenSSL software library, each identified
6262b15cb3dSCy Schubertby a specific string such as
6272b15cb3dSCy Schubert@code{md5WithRSAEncryption},
6282b15cb3dSCy Schubertwhich stands for the MD5 message digest with RSA
6292b15cb3dSCy Schubertencryption scheme.
6302b15cb3dSCy SchubertThe current NTP distribution supports
6312b15cb3dSCy Schubertall the schemes in the OpenSSL library, including
6322b15cb3dSCy Schubertthose based on RSA and DSA digital signatures.
6332b15cb3dSCy Schubert
6342b15cb3dSCy SchubertNTP secure groups can be used to define cryptographic compartments
6352b15cb3dSCy Schubertand security hierarchies.
6362b15cb3dSCy SchubertIt is important that every host
6372b15cb3dSCy Schubertin the group be able to construct a certificate trail to one
6382b15cb3dSCy Schubertor more trusted hosts in the same group.
6392b15cb3dSCy SchubertEach group
6402b15cb3dSCy Schuberthost runs the Autokey protocol to obtain the certificates
6412b15cb3dSCy Schubertfor all hosts along the trail to one or more trusted hosts.
6422b15cb3dSCy SchubertThis requires the configuration file in all hosts to be
6432b15cb3dSCy Schubertengineered so that, even under anticipated failure conditions,
6442b15cb3dSCy Schubertthe NTP subnet will form such that every group host can find
6452b15cb3dSCy Schuberta trail to at least one trusted host.
6462b15cb3dSCy Schubert@subsubsection Naming and Addressing
6472b15cb3dSCy SchubertIt is important to note that Autokey does not use DNS to
6482b15cb3dSCy Schubertresolve addresses, since DNS can't be completely trusted
6492b15cb3dSCy Schubertuntil the name servers have synchronized clocks.
6502b15cb3dSCy SchubertThe cryptographic name used by Autokey to bind the host identity
6512b15cb3dSCy Schubertcredentials and cryptographic values must be independent
6522b15cb3dSCy Schubertof interface, network and any other naming convention.
6532b15cb3dSCy SchubertThe name appears in the host certificate in either or both
6542b15cb3dSCy Schubertthe subject and issuer fields, so protection against
6552b15cb3dSCy SchubertDNS compromise is essential.
6562b15cb3dSCy Schubert
6572b15cb3dSCy SchubertBy convention, the name of an Autokey host is the name returned
6582b15cb3dSCy Schubertby the Unix
6592b15cb3dSCy Schubert@code{gethostname(2)}
6602b15cb3dSCy Schubertsystem call or equivalent in other systems.
6612b15cb3dSCy SchubertBy the system design
6622b15cb3dSCy Schubertmodel, there are no provisions to allow alternate names or aliases.
6632b15cb3dSCy SchubertHowever, this is not to say that DNS aliases, different names
6642b15cb3dSCy Schubertfor each interface, etc., are constrained in any way.
6652b15cb3dSCy Schubert
6662b15cb3dSCy SchubertIt is also important to note that Autokey verifies authenticity
6672b15cb3dSCy Schubertusing the host name, network address and public keys,
6682b15cb3dSCy Schubertall of which are bound together by the protocol specifically
6692b15cb3dSCy Schubertto deflect masquerade attacks.
6702b15cb3dSCy SchubertFor this reason Autokey
6714990d495SXin LIincludes the source and destination IP addresses in message digest
6722b15cb3dSCy Schubertcomputations and so the same addresses must be available
6732b15cb3dSCy Schubertat both the server and client.
6742b15cb3dSCy SchubertFor this reason operation
6752b15cb3dSCy Schubertwith network address translation schemes is not possible.
6762b15cb3dSCy SchubertThis reflects the intended robust security model where government
6772b15cb3dSCy Schubertand corporate NTP servers are operated outside firewall perimeters.
6782b15cb3dSCy Schubert@subsubsection Operation
6792b15cb3dSCy SchubertA specific combination of authentication scheme (none,
6802b15cb3dSCy Schubertsymmetric key, public key) and identity scheme is called
6812b15cb3dSCy Schuberta cryptotype, although not all combinations are compatible.
6822b15cb3dSCy SchubertThere may be management configurations where the clients,
6832b15cb3dSCy Schubertservers and peers may not all support the same cryptotypes.
6842b15cb3dSCy SchubertA secure NTPv4 subnet can be configured in many ways while
6852b15cb3dSCy Schubertkeeping in mind the principles explained above and
6862b15cb3dSCy Schubertin this section.
6872b15cb3dSCy SchubertNote however that some cryptotype
6882b15cb3dSCy Schubertcombinations may successfully interoperate with each other,
6892b15cb3dSCy Schubertbut may not represent good security practice.
6902b15cb3dSCy Schubert
6912b15cb3dSCy SchubertThe cryptotype of an association is determined at the time
6922b15cb3dSCy Schubertof mobilization, either at configuration time or some time
6932b15cb3dSCy Schubertlater when a message of appropriate cryptotype arrives.
6942b15cb3dSCy SchubertWhen mobilized by a
6952b15cb3dSCy Schubert@code{server}
6962b15cb3dSCy Schubertor
6972b15cb3dSCy Schubert@code{peer}
6982b15cb3dSCy Schubertconfiguration command and no
6992b15cb3dSCy Schubert@code{key}
7002b15cb3dSCy Schubertor
7012b15cb3dSCy Schubert@code{autokey}
7022b15cb3dSCy Schubertsubcommands are present, the association is not
7032b15cb3dSCy Schubertauthenticated; if the
7042b15cb3dSCy Schubert@code{key}
7052b15cb3dSCy Schubertsubcommand is present, the association is authenticated
7062b15cb3dSCy Schubertusing the symmetric key ID specified; if the
7072b15cb3dSCy Schubert@code{autokey}
7082b15cb3dSCy Schubertsubcommand is present, the association is authenticated
7092b15cb3dSCy Schubertusing Autokey.
7102b15cb3dSCy Schubert
7112b15cb3dSCy SchubertWhen multiple identity schemes are supported in the Autokey
7122b15cb3dSCy Schubertprotocol, the first message exchange determines which one is used.
7132b15cb3dSCy SchubertThe client request message contains bits corresponding
7142b15cb3dSCy Schubertto which schemes it has available.
7152b15cb3dSCy SchubertThe server response message
7162b15cb3dSCy Schubertcontains bits corresponding to which schemes it has available.
7172b15cb3dSCy SchubertBoth server and client match the received bits with their own
7182b15cb3dSCy Schubertand select a common scheme.
7192b15cb3dSCy Schubert
7202b15cb3dSCy SchubertFollowing the principle that time is a public value,
7212b15cb3dSCy Schuberta server responds to any client packet that matches
7222b15cb3dSCy Schubertits cryptotype capabilities.
7232b15cb3dSCy SchubertThus, a server receiving
7242b15cb3dSCy Schubertan unauthenticated packet will respond with an unauthenticated
7252b15cb3dSCy Schubertpacket, while the same server receiving a packet of a cryptotype
7262b15cb3dSCy Schubertit supports will respond with packets of that cryptotype.
7272b15cb3dSCy SchubertHowever, unconfigured broadcast or manycast client
7282b15cb3dSCy Schubertassociations or symmetric passive associations will not be
7292b15cb3dSCy Schubertmobilized unless the server supports a cryptotype compatible
7302b15cb3dSCy Schubertwith the first packet received.
7312b15cb3dSCy SchubertBy default, unauthenticated associations will not be mobilized
7322b15cb3dSCy Schubertunless overridden in a decidedly dangerous way.
7332b15cb3dSCy Schubert
7342b15cb3dSCy SchubertSome examples may help to reduce confusion.
7352b15cb3dSCy SchubertClient Alice has no specific cryptotype selected.
7362b15cb3dSCy SchubertServer Bob has both a symmetric key file and minimal Autokey files.
7372b15cb3dSCy SchubertAlice's unauthenticated messages arrive at Bob, who replies with
7382b15cb3dSCy Schubertunauthenticated messages.
7392b15cb3dSCy SchubertCathy has a copy of Bob's symmetric
7402b15cb3dSCy Schubertkey file and has selected key ID 4 in messages to Bob.
7412b15cb3dSCy SchubertBob verifies the message with his key ID 4.
7422b15cb3dSCy SchubertIf it's the
7432b15cb3dSCy Schubertsame key and the message is verified, Bob sends Cathy a reply
7442b15cb3dSCy Schubertauthenticated with that key.
7452b15cb3dSCy SchubertIf verification fails,
7462b15cb3dSCy SchubertBob sends Cathy a thing called a crypto-NAK, which tells her
7472b15cb3dSCy Schubertsomething broke.
7482b15cb3dSCy SchubertShe can see the evidence using the
7492b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
7502b15cb3dSCy Schubertprogram.
7512b15cb3dSCy Schubert
7522b15cb3dSCy SchubertDenise has rolled her own host key and certificate.
7532b15cb3dSCy SchubertShe also uses one of the identity schemes as Bob.
7542b15cb3dSCy SchubertShe sends the first Autokey message to Bob and they
7552b15cb3dSCy Schubertboth dance the protocol authentication and identity steps.
7562b15cb3dSCy SchubertIf all comes out okay, Denise and Bob continue as described above.
7572b15cb3dSCy Schubert
7582b15cb3dSCy SchubertIt should be clear from the above that Bob can support
7592b15cb3dSCy Schubertall the girls at the same time, as long as he has compatible
7602b15cb3dSCy Schubertauthentication and identity credentials.
7612b15cb3dSCy SchubertNow, Bob can act just like the girls in his own choice of servers;
7622b15cb3dSCy Schuberthe can run multiple configured associations with multiple different
7632b15cb3dSCy Schubertservers (or the same server, although that might not be useful).
7642b15cb3dSCy SchubertBut, wise security policy might preclude some cryptotype
7652b15cb3dSCy Schubertcombinations; for instance, running an identity scheme
7662b15cb3dSCy Schubertwith one server and no authentication with another might not be wise.
7672b15cb3dSCy Schubert@subsubsection Key Management
7682b15cb3dSCy SchubertThe cryptographic values used by the Autokey protocol are
7692b15cb3dSCy Schubertincorporated as a set of files generated by the
7702b15cb3dSCy Schubert@code{ntp-keygen(1ntpkeygenmdoc)}
7712b15cb3dSCy Schubertutility program, including symmetric key, host key and
7722b15cb3dSCy Schubertpublic certificate files, as well as sign key, identity parameters
7732b15cb3dSCy Schubertand leapseconds files.
7742b15cb3dSCy SchubertAlternatively, host and sign keys and
7752b15cb3dSCy Schubertcertificate files can be generated by the OpenSSL utilities
7762b15cb3dSCy Schubertand certificates can be imported from public certificate
7772b15cb3dSCy Schubertauthorities.
7782b15cb3dSCy SchubertNote that symmetric keys are necessary for the
7792b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
7802b15cb3dSCy Schubertand
7812b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
7822b15cb3dSCy Schubertutility programs.
7832b15cb3dSCy SchubertThe remaining files are necessary only for the
7842b15cb3dSCy SchubertAutokey protocol.
7852b15cb3dSCy Schubert
7862b15cb3dSCy SchubertCertificates imported from OpenSSL or public certificate
7872b15cb3dSCy Schubertauthorities have certian limitations.
7882b15cb3dSCy SchubertThe certificate should be in ASN.1 syntax, X.509 Version 3
7892b15cb3dSCy Schubertformat and encoded in PEM, which is the same format
7902b15cb3dSCy Schubertused by OpenSSL.
7912b15cb3dSCy SchubertThe overall length of the certificate encoded
7922b15cb3dSCy Schubertin ASN.1 must not exceed 1024 bytes.
7932b15cb3dSCy SchubertThe subject distinguished
7942b15cb3dSCy Schubertname field (CN) is the fully qualified name of the host
7952b15cb3dSCy Schuberton which it is used; the remaining subject fields are ignored.
7962b15cb3dSCy SchubertThe certificate extension fields must not contain either
7972b15cb3dSCy Schuberta subject key identifier or a issuer key identifier field;
7982b15cb3dSCy Schuberthowever, an extended key usage field for a trusted host must
7992b15cb3dSCy Schubertcontain the value
8002b15cb3dSCy Schubert@code{trustRoot};.
8012b15cb3dSCy SchubertOther extension fields are ignored.
8022b15cb3dSCy Schubert@subsubsection Authentication Commands
8032b15cb3dSCy Schubert@table @asis
8042b15cb3dSCy Schubert@item @code{autokey} @code{[@kbd{logsec}]}
8052b15cb3dSCy SchubertSpecifies the interval between regenerations of the session key
8062b15cb3dSCy Schubertlist used with the Autokey protocol.
8072b15cb3dSCy SchubertNote that the size of the key
8082b15cb3dSCy Schubertlist for each association depends on this interval and the current
8092b15cb3dSCy Schubertpoll interval.
8102b15cb3dSCy SchubertThe default value is 12 (4096 s or about 1.1 hours).
8112b15cb3dSCy SchubertFor poll intervals above the specified interval, a session key list
8122b15cb3dSCy Schubertwith a single entry will be regenerated for every message
8132b15cb3dSCy Schubertsent.
8142b15cb3dSCy Schubert@item @code{controlkey} @kbd{key}
8152b15cb3dSCy SchubertSpecifies the key identifier to use with the
8162b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
8172b15cb3dSCy Schubertutility, which uses the standard
8182b15cb3dSCy Schubertprotocol defined in RFC-1305.
8192b15cb3dSCy SchubertThe
8202b15cb3dSCy Schubert@kbd{key}
8212b15cb3dSCy Schubertargument is
8222b15cb3dSCy Schubertthe key identifier for a trusted key, where the value can be in the
8234e1ef62aSXin LIrange 1 to 65,535, inclusive.
824*f5f40dd6SCy Schubert@item @code{crypto} @code{[@code{cert} @kbd{file}]} @code{[@code{leap} @kbd{file}]} @code{[@code{randfile} @kbd{file}]} @code{[@code{host} @kbd{file}]} @code{[@code{gq} @kbd{file}]} @code{[@code{gqpar} @kbd{file}]} @code{[@code{iffpar} @kbd{file}]} @code{[@code{mvpar} @kbd{file}]} @code{[@code{pw} @kbd{password}]}
8252b15cb3dSCy SchubertThis command requires the OpenSSL library.
8262b15cb3dSCy SchubertIt activates public key
8272b15cb3dSCy Schubertcryptography, selects the message digest and signature
8282b15cb3dSCy Schubertencryption scheme and loads the required private and public
8292b15cb3dSCy Schubertvalues described above.
8302b15cb3dSCy SchubertIf one or more files are left unspecified,
8312b15cb3dSCy Schubertthe default names are used as described above.
8322b15cb3dSCy SchubertUnless the complete path and name of the file are specified, the
8332b15cb3dSCy Schubertlocation of a file is relative to the keys directory specified
8342b15cb3dSCy Schubertin the
8352b15cb3dSCy Schubert@code{keysdir}
8362b15cb3dSCy Schubertcommand or default
8372b15cb3dSCy Schubert@file{/usr/local/etc}.
8382b15cb3dSCy SchubertFollowing are the subcommands:
8392b15cb3dSCy Schubert@table @asis
8402b15cb3dSCy Schubert@item @code{cert} @kbd{file}
8412b15cb3dSCy SchubertSpecifies the location of the required host public certificate file.
8422b15cb3dSCy SchubertThis overrides the link
8432b15cb3dSCy Schubert@file{ntpkey_cert_}@kbd{hostname}
8442b15cb3dSCy Schubertin the keys directory.
8452b15cb3dSCy Schubert@item @code{gqpar} @kbd{file}
8462b15cb3dSCy SchubertSpecifies the location of the optional GQ parameters file.
8472b15cb3dSCy SchubertThis
8482b15cb3dSCy Schubertoverrides the link
8492b15cb3dSCy Schubert@file{ntpkey_gq_}@kbd{hostname}
8502b15cb3dSCy Schubertin the keys directory.
8512b15cb3dSCy Schubert@item @code{host} @kbd{file}
8522b15cb3dSCy SchubertSpecifies the location of the required host key file.
8532b15cb3dSCy SchubertThis overrides
8542b15cb3dSCy Schubertthe link
8552b15cb3dSCy Schubert@file{ntpkey_key_}@kbd{hostname}
8562b15cb3dSCy Schubertin the keys directory.
8572b15cb3dSCy Schubert@item @code{iffpar} @kbd{file}
8584990d495SXin LISpecifies the location of the optional IFF parameters file.
8594990d495SXin LIThis overrides the link
8602b15cb3dSCy Schubert@file{ntpkey_iff_}@kbd{hostname}
8612b15cb3dSCy Schubertin the keys directory.
8622b15cb3dSCy Schubert@item @code{leap} @kbd{file}
8632b15cb3dSCy SchubertSpecifies the location of the optional leapsecond file.
8642b15cb3dSCy SchubertThis overrides the link
8652b15cb3dSCy Schubert@file{ntpkey_leap}
8662b15cb3dSCy Schubertin the keys directory.
8672b15cb3dSCy Schubert@item @code{mvpar} @kbd{file}
8682b15cb3dSCy SchubertSpecifies the location of the optional MV parameters file.
8694990d495SXin LIThis overrides the link
8702b15cb3dSCy Schubert@file{ntpkey_mv_}@kbd{hostname}
8712b15cb3dSCy Schubertin the keys directory.
8722b15cb3dSCy Schubert@item @code{pw} @kbd{password}
8732b15cb3dSCy SchubertSpecifies the password to decrypt files containing private keys and
8742b15cb3dSCy Schubertidentity parameters.
8752b15cb3dSCy SchubertThis is required only if these files have been
8762b15cb3dSCy Schubertencrypted.
8772b15cb3dSCy Schubert@item @code{randfile} @kbd{file}
8782b15cb3dSCy SchubertSpecifies the location of the random seed file used by the OpenSSL
8792b15cb3dSCy Schubertlibrary.
8802b15cb3dSCy SchubertThe defaults are described in the main text above.
8812b15cb3dSCy Schubert@end table
8822b15cb3dSCy Schubert@item @code{keys} @kbd{keyfile}
8832b15cb3dSCy SchubertSpecifies the complete path and location of the MD5 key file
8842b15cb3dSCy Schubertcontaining the keys and key identifiers used by
8852b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)},
8862b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
8872b15cb3dSCy Schubertand
8882b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
8892b15cb3dSCy Schubertwhen operating with symmetric key cryptography.
8902b15cb3dSCy SchubertThis is the same operation as the
8912b15cb3dSCy Schubert@code{-k}
8922b15cb3dSCy Schubertcommand line option.
8932b15cb3dSCy Schubert@item @code{keysdir} @kbd{path}
8942b15cb3dSCy SchubertThis command specifies the default directory path for
8952b15cb3dSCy Schubertcryptographic keys, parameters and certificates.
8962b15cb3dSCy SchubertThe default is
8972b15cb3dSCy Schubert@file{/usr/local/etc/}.
8982b15cb3dSCy Schubert@item @code{requestkey} @kbd{key}
8992b15cb3dSCy SchubertSpecifies the key identifier to use with the
9002b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
9012b15cb3dSCy Schubertutility program, which uses a
9022b15cb3dSCy Schubertproprietary protocol specific to this implementation of
9032b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}.
9042b15cb3dSCy SchubertThe
9052b15cb3dSCy Schubert@kbd{key}
9062b15cb3dSCy Schubertargument is a key identifier
9072b15cb3dSCy Schubertfor the trusted key, where the value can be in the range 1 to
9084e1ef62aSXin LI65,535, inclusive.
9092b15cb3dSCy Schubert@item @code{revoke} @kbd{logsec}
9102b15cb3dSCy SchubertSpecifies the interval between re-randomization of certain
9112b15cb3dSCy Schubertcryptographic values used by the Autokey scheme, as a power of 2 in
9122b15cb3dSCy Schubertseconds.
9132b15cb3dSCy SchubertThese values need to be updated frequently in order to
9142b15cb3dSCy Schubertdeflect brute-force attacks on the algorithms of the scheme;
9152b15cb3dSCy Schuberthowever, updating some values is a relatively expensive operation.
9162b15cb3dSCy SchubertThe default interval is 16 (65,536 s or about 18 hours).
9172b15cb3dSCy SchubertFor poll
9182b15cb3dSCy Schubertintervals above the specified interval, the values will be updated
9192b15cb3dSCy Schubertfor every message sent.
9202b15cb3dSCy Schubert@item @code{trustedkey} @kbd{key} @kbd{...}
9212b15cb3dSCy SchubertSpecifies the key identifiers which are trusted for the
9222b15cb3dSCy Schubertpurposes of authenticating peers with symmetric key cryptography,
9232b15cb3dSCy Schubertas well as keys used by the
9242b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
9252b15cb3dSCy Schubertand
9262b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
9272b15cb3dSCy Schubertprograms.
9282b15cb3dSCy SchubertThe authentication procedures require that both the local
9292b15cb3dSCy Schubertand remote servers share the same key and key identifier for this
9302b15cb3dSCy Schubertpurpose, although different keys can be used with different
9312b15cb3dSCy Schubertservers.
9322b15cb3dSCy SchubertThe
9332b15cb3dSCy Schubert@kbd{key}
9342b15cb3dSCy Schubertarguments are 32-bit unsigned
9354e1ef62aSXin LIintegers with values from 1 to 65,535.
9362b15cb3dSCy Schubert@end table
9372b15cb3dSCy Schubert@subsubsection Error Codes
9382b15cb3dSCy SchubertThe following error codes are reported via the NTP control
9392b15cb3dSCy Schubertand monitoring protocol trap mechanism.
9402b15cb3dSCy Schubert@table @asis
9412b15cb3dSCy Schubert@item 101
9422b15cb3dSCy Schubert(bad field format or length)
9432b15cb3dSCy SchubertThe packet has invalid version, length or format.
9442b15cb3dSCy Schubert@item 102
9452b15cb3dSCy Schubert(bad timestamp)
9462b15cb3dSCy SchubertThe packet timestamp is the same or older than the most recent received.
9472b15cb3dSCy SchubertThis could be due to a replay or a server clock time step.
9482b15cb3dSCy Schubert@item 103
9492b15cb3dSCy Schubert(bad filestamp)
9502b15cb3dSCy SchubertThe packet filestamp is the same or older than the most recent received.
9512b15cb3dSCy SchubertThis could be due to a replay or a key file generation error.
9522b15cb3dSCy Schubert@item 104
9532b15cb3dSCy Schubert(bad or missing public key)
9542b15cb3dSCy SchubertThe public key is missing, has incorrect format or is an unsupported type.
9552b15cb3dSCy Schubert@item 105
9562b15cb3dSCy Schubert(unsupported digest type)
9572b15cb3dSCy SchubertThe server requires an unsupported digest/signature scheme.
9582b15cb3dSCy Schubert@item 106
9592b15cb3dSCy Schubert(mismatched digest types)
9602b15cb3dSCy SchubertNot used.
9612b15cb3dSCy Schubert@item 107
9622b15cb3dSCy Schubert(bad signature length)
9632b15cb3dSCy SchubertThe signature length does not match the current public key.
9642b15cb3dSCy Schubert@item 108
9652b15cb3dSCy Schubert(signature not verified)
9662b15cb3dSCy SchubertThe message fails the signature check.
9672b15cb3dSCy SchubertIt could be bogus or signed by a
9682b15cb3dSCy Schubertdifferent private key.
9692b15cb3dSCy Schubert@item 109
9702b15cb3dSCy Schubert(certificate not verified)
9712b15cb3dSCy SchubertThe certificate is invalid or signed with the wrong key.
9722b15cb3dSCy Schubert@item 110
9732b15cb3dSCy Schubert(certificate not verified)
9742b15cb3dSCy SchubertThe certificate is not yet valid or has expired or the signature could not
9752b15cb3dSCy Schubertbe verified.
9762b15cb3dSCy Schubert@item 111
9772b15cb3dSCy Schubert(bad or missing cookie)
9782b15cb3dSCy SchubertThe cookie is missing, corrupted or bogus.
9792b15cb3dSCy Schubert@item 112
9802b15cb3dSCy Schubert(bad or missing leapseconds table)
9812b15cb3dSCy SchubertThe leapseconds table is missing, corrupted or bogus.
9822b15cb3dSCy Schubert@item 113
9832b15cb3dSCy Schubert(bad or missing certificate)
9842b15cb3dSCy SchubertThe certificate is missing, corrupted or bogus.
9852b15cb3dSCy Schubert@item 114
9862b15cb3dSCy Schubert(bad or missing identity)
9872b15cb3dSCy SchubertThe identity key is missing, corrupt or bogus.
9882b15cb3dSCy Schubert@end table
9892b15cb3dSCy Schubert@node Monitoring Support
9902b15cb3dSCy Schubert@subsection Monitoring Support
9912b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
9922b15cb3dSCy Schubertincludes a comprehensive monitoring facility suitable
9932b15cb3dSCy Schubertfor continuous, long term recording of server and client
9942b15cb3dSCy Schuberttimekeeping performance.
9952b15cb3dSCy SchubertSee the
9962b15cb3dSCy Schubert@code{statistics}
9972b15cb3dSCy Schubertcommand below
9982b15cb3dSCy Schubertfor a listing and example of each type of statistics currently
9992b15cb3dSCy Schubertsupported.
10002b15cb3dSCy SchubertStatistic files are managed using file generation sets
10012b15cb3dSCy Schubertand scripts in the
10022b15cb3dSCy Schubert@file{./scripts}
10034990d495SXin LIdirectory of the source code distribution.
10042b15cb3dSCy SchubertUsing
10052b15cb3dSCy Schubertthese facilities and
10062b15cb3dSCy Schubert@sc{unix}
10072b15cb3dSCy Schubert@code{cron(8)}
10082b15cb3dSCy Schubertjobs, the data can be
10092b15cb3dSCy Schubertautomatically summarized and archived for retrospective analysis.
10102b15cb3dSCy Schubert@subsubsection Monitoring Commands
10112b15cb3dSCy Schubert@table @asis
10122b15cb3dSCy Schubert@item @code{statistics} @kbd{name} @kbd{...}
10132b15cb3dSCy SchubertEnables writing of statistics records.
10142b15cb3dSCy SchubertCurrently, eight kinds of
10152b15cb3dSCy Schubert@kbd{name}
10162b15cb3dSCy Schubertstatistics are supported.
10172b15cb3dSCy Schubert@table @asis
10182b15cb3dSCy Schubert@item @code{clockstats}
10192b15cb3dSCy SchubertEnables recording of clock driver statistics information.
10202b15cb3dSCy SchubertEach update
10212b15cb3dSCy Schubertreceived from a clock driver appends a line of the following form to
10222b15cb3dSCy Schubertthe file generation set named
10232b15cb3dSCy Schubert@code{clockstats}:
10242b15cb3dSCy Schubert@verbatim
10252b15cb3dSCy Schubert49213 525.624 127.127.4.1 93 226 00:08:29.606 D
10262b15cb3dSCy Schubert@end verbatim
10272b15cb3dSCy Schubert
10282b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and time
10292b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
10302b15cb3dSCy SchubertThe next field shows the
10312b15cb3dSCy Schubertclock address in dotted-quad notation.
10322b15cb3dSCy SchubertThe final field shows the last
10332b15cb3dSCy Schuberttimecode received from the clock in decoded ASCII format, where
10342b15cb3dSCy Schubertmeaningful.
10352b15cb3dSCy SchubertIn some clock drivers a good deal of additional information
10362b15cb3dSCy Schubertcan be gathered and displayed as well.
10372b15cb3dSCy SchubertSee information specific to each
10382b15cb3dSCy Schubertclock for further details.
10392b15cb3dSCy Schubert@item @code{cryptostats}
10402b15cb3dSCy SchubertThis option requires the OpenSSL cryptographic software library.
10412b15cb3dSCy SchubertIt
10422b15cb3dSCy Schubertenables recording of cryptographic public key protocol information.
10432b15cb3dSCy SchubertEach message received by the protocol module appends a line of the
10442b15cb3dSCy Schubertfollowing form to the file generation set named
10452b15cb3dSCy Schubert@code{cryptostats}:
10462b15cb3dSCy Schubert@verbatim
10472b15cb3dSCy Schubert49213 525.624 127.127.4.1 message
10482b15cb3dSCy Schubert@end verbatim
10492b15cb3dSCy Schubert
10502b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and time
10512b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
10522b15cb3dSCy SchubertThe next field shows the peer
10532b15cb3dSCy Schubertaddress in dotted-quad notation, The final message field includes the
10542b15cb3dSCy Schubertmessage type and certain ancillary information.
10552b15cb3dSCy SchubertSee the
10562b15cb3dSCy Schubert@ref{Authentication Options}
10572b15cb3dSCy Schubertsection for further information.
10582b15cb3dSCy Schubert@item @code{loopstats}
10592b15cb3dSCy SchubertEnables recording of loop filter statistics information.
10602b15cb3dSCy SchubertEach
10612b15cb3dSCy Schubertupdate of the local clock outputs a line of the following form to
10622b15cb3dSCy Schubertthe file generation set named
10632b15cb3dSCy Schubert@code{loopstats}:
10642b15cb3dSCy Schubert@verbatim
10652b15cb3dSCy Schubert50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
10662b15cb3dSCy Schubert@end verbatim
10672b15cb3dSCy Schubert
10682b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and
10692b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
10702b15cb3dSCy SchubertThe next five fields
10712b15cb3dSCy Schubertshow time offset (seconds), frequency offset (parts per million -
10722b15cb3dSCy SchubertPPM), RMS jitter (seconds), Allan deviation (PPM) and clock
10732b15cb3dSCy Schubertdiscipline time constant.
10742b15cb3dSCy Schubert@item @code{peerstats}
10752b15cb3dSCy SchubertEnables recording of peer statistics information.
10762b15cb3dSCy SchubertThis includes
10772b15cb3dSCy Schubertstatistics records of all peers of a NTP server and of special
10782b15cb3dSCy Schubertsignals, where present and configured.
10792b15cb3dSCy SchubertEach valid update appends a
10802b15cb3dSCy Schubertline of the following form to the current element of a file
10812b15cb3dSCy Schubertgeneration set named
10822b15cb3dSCy Schubert@code{peerstats}:
10832b15cb3dSCy Schubert@verbatim
10842b15cb3dSCy Schubert48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674
10852b15cb3dSCy Schubert@end verbatim
10862b15cb3dSCy Schubert
10872b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and
10882b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
10892b15cb3dSCy SchubertThe next two fields
10902b15cb3dSCy Schubertshow the peer address in dotted-quad notation and status,
10912b15cb3dSCy Schubertrespectively.
10922b15cb3dSCy SchubertThe status field is encoded in hex in the format
10932b15cb3dSCy Schubertdescribed in Appendix A of the NTP specification RFC 1305.
10942b15cb3dSCy SchubertThe final four fields show the offset,
10952b15cb3dSCy Schubertdelay, dispersion and RMS jitter, all in seconds.
10962b15cb3dSCy Schubert@item @code{rawstats}
10972b15cb3dSCy SchubertEnables recording of raw-timestamp statistics information.
10982b15cb3dSCy SchubertThis
10992b15cb3dSCy Schubertincludes statistics records of all peers of a NTP server and of
11002b15cb3dSCy Schubertspecial signals, where present and configured.
11012b15cb3dSCy SchubertEach NTP message
11022b15cb3dSCy Schubertreceived from a peer or clock driver appends a line of the
11032b15cb3dSCy Schubertfollowing form to the file generation set named
11042b15cb3dSCy Schubert@code{rawstats}:
11052b15cb3dSCy Schubert@verbatim
11062b15cb3dSCy Schubert50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
11072b15cb3dSCy Schubert@end verbatim
11082b15cb3dSCy Schubert
11092b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and
11102b15cb3dSCy Schuberttime (seconds and fraction past UTC midnight).
11112b15cb3dSCy SchubertThe next two fields
11122b15cb3dSCy Schubertshow the remote peer or clock address followed by the local address
11132b15cb3dSCy Schubertin dotted-quad notation.
11142b15cb3dSCy SchubertThe final four fields show the originate,
11152b15cb3dSCy Schubertreceive, transmit and final NTP timestamps in order.
11162b15cb3dSCy SchubertThe timestamp
11172b15cb3dSCy Schubertvalues are as received and before processing by the various data
11182b15cb3dSCy Schubertsmoothing and mitigation algorithms.
11192b15cb3dSCy Schubert@item @code{sysstats}
11202b15cb3dSCy SchubertEnables recording of ntpd statistics counters on a periodic basis.
11212b15cb3dSCy SchubertEach
11222b15cb3dSCy Schuberthour a line of the following form is appended to the file generation
11232b15cb3dSCy Schubertset named
11242b15cb3dSCy Schubert@code{sysstats}:
11252b15cb3dSCy Schubert@verbatim
11262b15cb3dSCy Schubert50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
11272b15cb3dSCy Schubert@end verbatim
11282b15cb3dSCy Schubert
11292b15cb3dSCy SchubertThe first two fields show the date (Modified Julian Day) and time
11302b15cb3dSCy Schubert(seconds and fraction past UTC midnight).
11312b15cb3dSCy SchubertThe remaining ten fields show
11322b15cb3dSCy Schubertthe statistics counter values accumulated since the last generated
11332b15cb3dSCy Schubertline.
11342b15cb3dSCy Schubert@table @asis
11352b15cb3dSCy Schubert@item Time since restart @code{36000}
11362b15cb3dSCy SchubertTime in hours since the system was last rebooted.
11372b15cb3dSCy Schubert@item Packets received @code{81965}
11382b15cb3dSCy SchubertTotal number of packets received.
11392b15cb3dSCy Schubert@item Packets processed @code{0}
11402b15cb3dSCy SchubertNumber of packets received in response to previous packets sent
11412b15cb3dSCy Schubert@item Current version @code{9546}
11422b15cb3dSCy SchubertNumber of packets matching the current NTP version.
11432b15cb3dSCy Schubert@item Previous version @code{56}
11442b15cb3dSCy SchubertNumber of packets matching the previous NTP version.
11452b15cb3dSCy Schubert@item Bad version @code{71793}
11462b15cb3dSCy SchubertNumber of packets matching neither NTP version.
11472b15cb3dSCy Schubert@item Access denied @code{512}
11482b15cb3dSCy SchubertNumber of packets denied access for any reason.
11492b15cb3dSCy Schubert@item Bad length or format @code{540}
11502b15cb3dSCy SchubertNumber of packets with invalid length, format or port number.
11512b15cb3dSCy Schubert@item Bad authentication @code{10}
11522b15cb3dSCy SchubertNumber of packets not verified as authentic.
11532b15cb3dSCy Schubert@item Rate exceeded @code{147}
11542b15cb3dSCy SchubertNumber of packets discarded due to rate limitation.
11552b15cb3dSCy Schubert@end table
11562b15cb3dSCy Schubert@item @code{statsdir} @kbd{directory_path}
11572b15cb3dSCy SchubertIndicates the full path of a directory where statistics files
11582b15cb3dSCy Schubertshould be created (see below).
11592b15cb3dSCy SchubertThis keyword allows
11602b15cb3dSCy Schubertthe (otherwise constant)
11612b15cb3dSCy Schubert@code{filegen}
11622b15cb3dSCy Schubertfilename prefix to be modified for file generation sets, which
11632b15cb3dSCy Schubertis useful for handling statistics logs.
11642b15cb3dSCy Schubert@item @code{filegen} @kbd{name} @code{[@code{file} @kbd{filename}]} @code{[@code{type} @kbd{typename}]} @code{[@code{link} | @code{nolink}]} @code{[@code{enable} | @code{disable}]}
11652b15cb3dSCy SchubertConfigures setting of generation file set name.
11662b15cb3dSCy SchubertGeneration
11672b15cb3dSCy Schubertfile sets provide a means for handling files that are
11682b15cb3dSCy Schubertcontinuously growing during the lifetime of a server.
11692b15cb3dSCy SchubertServer statistics are a typical example for such files.
11702b15cb3dSCy SchubertGeneration file sets provide access to a set of files used
11712b15cb3dSCy Schubertto store the actual data.
11722b15cb3dSCy SchubertAt any time at most one element
11732b15cb3dSCy Schubertof the set is being written to.
11742b15cb3dSCy SchubertThe type given specifies
11752b15cb3dSCy Schubertwhen and how data will be directed to a new element of the set.
11762b15cb3dSCy SchubertThis way, information stored in elements of a file set
11772b15cb3dSCy Schubertthat are currently unused are available for administrational
11782b15cb3dSCy Schubertoperations without the risk of disturbing the operation of ntpd.
11792b15cb3dSCy Schubert(Most important: they can be removed to free space for new data
11802b15cb3dSCy Schubertproduced.)
11812b15cb3dSCy Schubert
11822b15cb3dSCy SchubertNote that this command can be sent from the
11832b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
11842b15cb3dSCy Schubertprogram running at a remote location.
11852b15cb3dSCy Schubert@table @asis
11862b15cb3dSCy Schubert@item @code{name}
11872b15cb3dSCy SchubertThis is the type of the statistics records, as shown in the
11882b15cb3dSCy Schubert@code{statistics}
11892b15cb3dSCy Schubertcommand.
11902b15cb3dSCy Schubert@item @code{file} @kbd{filename}
11912b15cb3dSCy SchubertThis is the file name for the statistics records.
11922b15cb3dSCy SchubertFilenames of set
11932b15cb3dSCy Schubertmembers are built from three concatenated elements
11942b15cb3dSCy Schubert@code{prefix},
11952b15cb3dSCy Schubert@code{filename}
11962b15cb3dSCy Schubertand
11972b15cb3dSCy Schubert@code{suffix}:
11982b15cb3dSCy Schubert@table @asis
11992b15cb3dSCy Schubert@item @code{prefix}
12002b15cb3dSCy SchubertThis is a constant filename path.
12012b15cb3dSCy SchubertIt is not subject to
12022b15cb3dSCy Schubertmodifications via the
12032b15cb3dSCy Schubert@kbd{filegen}
12042b15cb3dSCy Schubertoption.
12052b15cb3dSCy SchubertIt is defined by the
12062b15cb3dSCy Schubertserver, usually specified as a compile-time constant.
12072b15cb3dSCy SchubertIt may,
12082b15cb3dSCy Schuberthowever, be configurable for individual file generation sets
12092b15cb3dSCy Schubertvia other commands.
12102b15cb3dSCy SchubertFor example, the prefix used with
12112b15cb3dSCy Schubert@kbd{loopstats}
12122b15cb3dSCy Schubertand
12132b15cb3dSCy Schubert@kbd{peerstats}
12142b15cb3dSCy Schubertgeneration can be configured using the
12152b15cb3dSCy Schubert@kbd{statsdir}
12162b15cb3dSCy Schubertoption explained above.
12172b15cb3dSCy Schubert@item @code{filename}
12182b15cb3dSCy SchubertThis string is directly concatenated to the prefix mentioned
12192b15cb3dSCy Schubertabove (no intervening
12202b15cb3dSCy Schubert@quoteleft{}/@quoteright{}).
12212b15cb3dSCy SchubertThis can be modified using
12222b15cb3dSCy Schubertthe file argument to the
12232b15cb3dSCy Schubert@kbd{filegen}
12242b15cb3dSCy Schubertstatement.
12252b15cb3dSCy SchubertNo
12262b15cb3dSCy Schubert@file{..}
12272b15cb3dSCy Schubertelements are
12282b15cb3dSCy Schubertallowed in this component to prevent filenames referring to
12292b15cb3dSCy Schubertparts outside the filesystem hierarchy denoted by
12302b15cb3dSCy Schubert@kbd{prefix}.
12312b15cb3dSCy Schubert@item @code{suffix}
12322b15cb3dSCy SchubertThis part is reflects individual elements of a file set.
12332b15cb3dSCy SchubertIt is
12342b15cb3dSCy Schubertgenerated according to the type of a file set.
12352b15cb3dSCy Schubert@end table
12362b15cb3dSCy Schubert@item @code{type} @kbd{typename}
12372b15cb3dSCy SchubertA file generation set is characterized by its type.
12382b15cb3dSCy SchubertThe following
12392b15cb3dSCy Schuberttypes are supported:
12402b15cb3dSCy Schubert@table @asis
12412b15cb3dSCy Schubert@item @code{none}
12422b15cb3dSCy SchubertThe file set is actually a single plain file.
12432b15cb3dSCy Schubert@item @code{pid}
12442b15cb3dSCy SchubertOne element of file set is used per incarnation of a ntpd
12452b15cb3dSCy Schubertserver.
12462b15cb3dSCy SchubertThis type does not perform any changes to file set
12472b15cb3dSCy Schubertmembers during runtime, however it provides an easy way of
12482b15cb3dSCy Schubertseparating files belonging to different
12492b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
12502b15cb3dSCy Schubertserver incarnations.
12512b15cb3dSCy SchubertThe set member filename is built by appending a
12522b15cb3dSCy Schubert@quoteleft{}.@quoteright{}
12532b15cb3dSCy Schubertto concatenated
12542b15cb3dSCy Schubert@kbd{prefix}
12552b15cb3dSCy Schubertand
12562b15cb3dSCy Schubert@kbd{filename}
12572b15cb3dSCy Schubertstrings, and
12582b15cb3dSCy Schubertappending the decimal representation of the process ID of the
12592b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
12602b15cb3dSCy Schubertserver process.
12612b15cb3dSCy Schubert@item @code{day}
12622b15cb3dSCy SchubertOne file generation set element is created per day.
12632b15cb3dSCy SchubertA day is
12642b15cb3dSCy Schubertdefined as the period between 00:00 and 24:00 UTC.
12652b15cb3dSCy SchubertThe file set
12662b15cb3dSCy Schubertmember suffix consists of a
12672b15cb3dSCy Schubert@quoteleft{}.@quoteright{}
12682b15cb3dSCy Schubertand a day specification in
12692b15cb3dSCy Schubertthe form
12702b15cb3dSCy Schubert@code{YYYYMMdd}.
12712b15cb3dSCy Schubert@code{YYYY}
12722b15cb3dSCy Schubertis a 4-digit year number (e.g., 1992).
12732b15cb3dSCy Schubert@code{MM}
12742b15cb3dSCy Schubertis a two digit month number.
12752b15cb3dSCy Schubert@code{dd}
12762b15cb3dSCy Schubertis a two digit day number.
12772b15cb3dSCy SchubertThus, all information written at 10 December 1992 would end up
12782b15cb3dSCy Schubertin a file named
12792b15cb3dSCy Schubert@kbd{prefix}
12802b15cb3dSCy Schubert@kbd{filename}.19921210.
12812b15cb3dSCy Schubert@item @code{week}
12822b15cb3dSCy SchubertAny file set member contains data related to a certain week of
12832b15cb3dSCy Schuberta year.
12842b15cb3dSCy SchubertThe term week is defined by computing day-of-year
12852b15cb3dSCy Schubertmodulo 7.
12862b15cb3dSCy SchubertElements of such a file generation set are
12872b15cb3dSCy Schubertdistinguished by appending the following suffix to the file set
12882b15cb3dSCy Schubertfilename base: A dot, a 4-digit year number, the letter
12892b15cb3dSCy Schubert@code{W},
12902b15cb3dSCy Schubertand a 2-digit week number.
12912b15cb3dSCy SchubertFor example, information from January,
12922b15cb3dSCy Schubert10th 1992 would end up in a file with suffix
12932b15cb3dSCy Schubert.No . Ns Ar 1992W1 .
12942b15cb3dSCy Schubert@item @code{month}
12952b15cb3dSCy SchubertOne generation file set element is generated per month.
12962b15cb3dSCy SchubertThe
12972b15cb3dSCy Schubertfile name suffix consists of a dot, a 4-digit year number, and
12982b15cb3dSCy Schuberta 2-digit month.
12992b15cb3dSCy Schubert@item @code{year}
13002b15cb3dSCy SchubertOne generation file element is generated per year.
13012b15cb3dSCy SchubertThe filename
13022b15cb3dSCy Schubertsuffix consists of a dot and a 4 digit year number.
13032b15cb3dSCy Schubert@item @code{age}
13042b15cb3dSCy SchubertThis type of file generation sets changes to a new element of
13052b15cb3dSCy Schubertthe file set every 24 hours of server operation.
13062b15cb3dSCy SchubertThe filename
13072b15cb3dSCy Schubertsuffix consists of a dot, the letter
13082b15cb3dSCy Schubert@code{a},
13092b15cb3dSCy Schubertand an 8-digit number.
13102b15cb3dSCy SchubertThis number is taken to be the number of seconds the server is
13112b15cb3dSCy Schubertrunning at the start of the corresponding 24-hour period.
13122b15cb3dSCy SchubertInformation is only written to a file generation by specifying
13132b15cb3dSCy Schubert@code{enable};
13142b15cb3dSCy Schubertoutput is prevented by specifying
13152b15cb3dSCy Schubert@code{disable}.
13162b15cb3dSCy Schubert@end table
13172b15cb3dSCy Schubert@item @code{link} | @code{nolink}
13182b15cb3dSCy SchubertIt is convenient to be able to access the current element of a file
13192b15cb3dSCy Schubertgeneration set by a fixed name.
13202b15cb3dSCy SchubertThis feature is enabled by
13212b15cb3dSCy Schubertspecifying
13222b15cb3dSCy Schubert@code{link}
13232b15cb3dSCy Schubertand disabled using
13242b15cb3dSCy Schubert@code{nolink}.
13252b15cb3dSCy SchubertIf link is specified, a
13262b15cb3dSCy Schuberthard link from the current file set element to a file without
13272b15cb3dSCy Schubertsuffix is created.
13282b15cb3dSCy SchubertWhen there is already a file with this name and
13292b15cb3dSCy Schubertthe number of links of this file is one, it is renamed appending a
13302b15cb3dSCy Schubertdot, the letter
13312b15cb3dSCy Schubert@code{C},
13324990d495SXin LIand the pid of the
13334990d495SXin LI@code{ntpd(1ntpdmdoc)}
13344990d495SXin LIserver process.
13352b15cb3dSCy SchubertWhen the
13362b15cb3dSCy Schubertnumber of links is greater than one, the file is unlinked.
13372b15cb3dSCy SchubertThis
13382b15cb3dSCy Schubertallows the current file to be accessed by a constant name.
13392b15cb3dSCy Schubert@item @code{enable} @code{|} @code{disable}
13402b15cb3dSCy SchubertEnables or disables the recording function.
13412b15cb3dSCy Schubert@end table
13422b15cb3dSCy Schubert@end table
13432b15cb3dSCy Schubert@end table
13442b15cb3dSCy Schubert@node Access Control Support
13452b15cb3dSCy Schubert@subsection Access Control Support
13462b15cb3dSCy SchubertThe
13472b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
13482b15cb3dSCy Schubertdaemon implements a general purpose address/mask based restriction
13492b15cb3dSCy Schubertlist.
13502b15cb3dSCy SchubertThe list contains address/match entries sorted first
13512b15cb3dSCy Schubertby increasing address values and and then by increasing mask values.
13522b15cb3dSCy SchubertA match occurs when the bitwise AND of the mask and the packet
13532b15cb3dSCy Schubertsource address is equal to the bitwise AND of the mask and
13542b15cb3dSCy Schubertaddress in the list.
13552b15cb3dSCy SchubertThe list is searched in order with the
13562b15cb3dSCy Schubertlast match found defining the restriction flags associated
13572b15cb3dSCy Schubertwith the entry.
13582b15cb3dSCy SchubertAdditional information and examples can be found in the
13592b15cb3dSCy Schubert"Notes on Configuring NTP and Setting up a NTP Subnet"
13602b15cb3dSCy Schubertpage
13612b15cb3dSCy Schubert(available as part of the HTML documentation
13622b15cb3dSCy Schubertprovided in
13632b15cb3dSCy Schubert@file{/usr/share/doc/ntp}).
13642b15cb3dSCy Schubert
13652b15cb3dSCy SchubertThe restriction facility was implemented in conformance
13662b15cb3dSCy Schubertwith the access policies for the original NSFnet backbone
13672b15cb3dSCy Schuberttime servers.
13682b15cb3dSCy SchubertLater the facility was expanded to deflect
13692b15cb3dSCy Schubertcryptographic and clogging attacks.
13702b15cb3dSCy SchubertWhile this facility may
13712b15cb3dSCy Schubertbe useful for keeping unwanted or broken or malicious clients
13722b15cb3dSCy Schubertfrom congesting innocent servers, it should not be considered
13732b15cb3dSCy Schubertan alternative to the NTP authentication facilities.
13742b15cb3dSCy SchubertSource address based restrictions are easily circumvented
13752b15cb3dSCy Schubertby a determined cracker.
13762b15cb3dSCy Schubert
13772b15cb3dSCy SchubertClients can be denied service because they are explicitly
13784990d495SXin LIincluded in the restrict list created by the
13794990d495SXin LI@code{restrict}
13804990d495SXin LIcommand
13812b15cb3dSCy Schubertor implicitly as the result of cryptographic or rate limit
13822b15cb3dSCy Schubertviolations.
13832b15cb3dSCy SchubertCryptographic violations include certificate
13842b15cb3dSCy Schubertor identity verification failure; rate limit violations generally
13852b15cb3dSCy Schubertresult from defective NTP implementations that send packets
13862b15cb3dSCy Schubertat abusive rates.
13872b15cb3dSCy SchubertSome violations cause denied service
13882b15cb3dSCy Schubertonly for the offending packet, others cause denied service
13892b15cb3dSCy Schubertfor a timed period and others cause the denied service for
13904990d495SXin LIan indefinite period.
13912b15cb3dSCy SchubertWhen a client or network is denied access
13924990d495SXin LIfor an indefinite period, the only way at present to remove
13932b15cb3dSCy Schubertthe restrictions is by restarting the server.
13942b15cb3dSCy Schubert@subsubsection The Kiss-of-Death Packet
13952b15cb3dSCy SchubertOrdinarily, packets denied service are simply dropped with no
13962b15cb3dSCy Schubertfurther action except incrementing statistics counters.
13972b15cb3dSCy SchubertSometimes a
13982b15cb3dSCy Schubertmore proactive response is needed, such as a server message that
13992b15cb3dSCy Schubertexplicitly requests the client to stop sending and leave a message
14002b15cb3dSCy Schubertfor the system operator.
14012b15cb3dSCy SchubertA special packet format has been created
14022b15cb3dSCy Schubertfor this purpose called the "kiss-of-death" (KoD) packet.
14032b15cb3dSCy SchubertKoD packets have the leap bits set unsynchronized and stratum set
14042b15cb3dSCy Schubertto zero and the reference identifier field set to a four-byte
14052b15cb3dSCy SchubertASCII code.
14062b15cb3dSCy SchubertIf the
14072b15cb3dSCy Schubert@code{noserve}
14082b15cb3dSCy Schubertor
14092b15cb3dSCy Schubert@code{notrust}
14102b15cb3dSCy Schubertflag of the matching restrict list entry is set,
14112b15cb3dSCy Schubertthe code is "DENY"; if the
14122b15cb3dSCy Schubert@code{limited}
14132b15cb3dSCy Schubertflag is set and the rate limit
14142b15cb3dSCy Schubertis exceeded, the code is "RATE".
14152b15cb3dSCy SchubertFinally, if a cryptographic violation occurs, the code is "CRYP".
14162b15cb3dSCy Schubert
14172b15cb3dSCy SchubertA client receiving a KoD performs a set of sanity checks to
14182b15cb3dSCy Schubertminimize security exposure, then updates the stratum and
14192b15cb3dSCy Schubertreference identifier peer variables, sets the access
14202b15cb3dSCy Schubertdenied (TEST4) bit in the peer flash variable and sends
14212b15cb3dSCy Schuberta message to the log.
14222b15cb3dSCy SchubertAs long as the TEST4 bit is set,
14232b15cb3dSCy Schubertthe client will send no further packets to the server.
14242b15cb3dSCy SchubertThe only way at present to recover from this condition is
14252b15cb3dSCy Schubertto restart the protocol at both the client and server.
14262b15cb3dSCy SchubertThis
14272b15cb3dSCy Schuberthappens automatically at the client when the association times out.
14282b15cb3dSCy SchubertIt will happen at the server only if the server operator cooperates.
14292b15cb3dSCy Schubert@subsubsection Access Control Commands
14302b15cb3dSCy Schubert@table @asis
14312b15cb3dSCy Schubert@item @code{discard} @code{[@code{average} @kbd{avg}]} @code{[@code{minimum} @kbd{min}]} @code{[@code{monitor} @kbd{prob}]}
14322b15cb3dSCy SchubertSet the parameters of the
14332b15cb3dSCy Schubert@code{limited}
14342b15cb3dSCy Schubertfacility which protects the server from
14352b15cb3dSCy Schubertclient abuse.
14362b15cb3dSCy SchubertThe
14372b15cb3dSCy Schubert@code{average}
14382b15cb3dSCy Schubertsubcommand specifies the minimum average packet
1439a466cc55SCy Schubertspacing in log2 seconds, defaulting to 3 (8s), while the
14402b15cb3dSCy Schubert@code{minimum}
1441a466cc55SCy Schubertsubcommand specifies the minimum packet spacing
1442a466cc55SCy Schubertin seconds, defaulting to 2.
14432b15cb3dSCy SchubertPackets that violate these minima are discarded
14442b15cb3dSCy Schubertand a kiss-o'-death packet returned if enabled.
14454990d495SXin LIThe
14464990d495SXin LI@code{monitor}
1447a466cc55SCy Schubertsubcommand indirectly specifies the probability of
1448a466cc55SCy Schubertreplacing the oldest entry from the monitor (MRU)
1449a466cc55SCy Schubertlist of recent requests used to enforce rate controls,
1450a466cc55SCy Schubertwhen that list is at its maximum size. The probability
1451a466cc55SCy Schubertof replacing the oldest entry is the age of that entry
1452a466cc55SCy Schubertin seconds divided by the
1453a466cc55SCy Schubert@code{monitor}
1454a466cc55SCy Schubertvalue, default 3000. For example, if the oldest entry
1455a466cc55SCy Schubertin the MRU list represents a request 300 seconds ago,
1456a466cc55SCy Schubertby default the probability of replacing it with an
1457a466cc55SCy Schubertentry representing the client request being processed
1458a466cc55SCy Schubertnow is 10%. Conversely, if the oldest entry is more
1459a466cc55SCy Schubertthan 3000 seconds old, the probability is 100%.
1460*f5f40dd6SCy Schubert@item @code{restrict} @kbd{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]}
14612b15cb3dSCy SchubertThe
14622b15cb3dSCy Schubert@kbd{address}
14632b15cb3dSCy Schubertargument expressed in
1464*f5f40dd6SCy Schubertnumeric form is the address of a host or network.
14652b15cb3dSCy SchubertAlternatively, the
14662b15cb3dSCy Schubert@kbd{address}
1467*f5f40dd6SCy Schubertargument can be a valid hostname.  When a hostname
1468*f5f40dd6SCy Schubertis provided, a restriction entry is created for each
1469*f5f40dd6SCy Schubertaddress the hostname resolves to, and any provided
1470*f5f40dd6SCy Schubert@kbd{mask}
1471*f5f40dd6SCy Schubertis ignored and an individual host mask is
1472*f5f40dd6SCy Schubertused for each entry.
14732b15cb3dSCy SchubertThe
14742b15cb3dSCy Schubert@kbd{mask}
1475*f5f40dd6SCy Schubertargument expressed in numeric form defaults to
1476*f5f40dd6SCy Schubertall bits lit, meaning that the
14772b15cb3dSCy Schubert@kbd{address}
14782b15cb3dSCy Schubertis treated as the address of an individual host.
1479*f5f40dd6SCy SchubertA default entry with address and mask all zeroes
14802b15cb3dSCy Schubertis always included and is always the first entry in the list.
14812b15cb3dSCy SchubertNote that text string
14822b15cb3dSCy Schubert@code{default},
14832b15cb3dSCy Schubertwith no mask option, may
14842b15cb3dSCy Schubertbe used to indicate the default entry.
148509100258SXin LIThe
148609100258SXin LI@code{ippeerlimit}
148709100258SXin LIdirective limits the number of peer requests for each IP to
148809100258SXin LI@kbd{int},
148909100258SXin LIwhere a value of -1 means "unlimited", the current default.
149009100258SXin LIA value of 0 means "none".
149109100258SXin LIThere would usually be at most 1 peering request per IP,
149209100258SXin LIbut if the remote peering requests are behind a proxy
149309100258SXin LIthere could well be more than 1 per IP.
14942b15cb3dSCy SchubertIn the current implementation,
14952b15cb3dSCy Schubert@code{flag}
14962b15cb3dSCy Schubertalways
14972b15cb3dSCy Schubertrestricts access, i.e., an entry with no flags indicates that free
14982b15cb3dSCy Schubertaccess to the server is to be given.
14992b15cb3dSCy SchubertThe flags are not orthogonal,
15002b15cb3dSCy Schubertin that more restrictive flags will often make less restrictive
15012b15cb3dSCy Schubertones redundant.
15022b15cb3dSCy SchubertThe flags can generally be classed into two
15032b15cb3dSCy Schubertcategories, those which restrict time service and those which
15042b15cb3dSCy Schubertrestrict informational queries and attempts to do run-time
15052b15cb3dSCy Schubertreconfiguration of the server.
15062b15cb3dSCy SchubertOne or more of the following flags
15072b15cb3dSCy Schubertmay be specified:
15082b15cb3dSCy Schubert@table @asis
15092b15cb3dSCy Schubert@item @code{ignore}
15102b15cb3dSCy SchubertDeny packets of all kinds, including
15112b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
15122b15cb3dSCy Schubertand
15132b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
15142b15cb3dSCy Schubertqueries.
15152b15cb3dSCy Schubert@item @code{kod}
1516*f5f40dd6SCy SchubertIf this flag is set when a rate violation occurs, a kiss-o'-death
1517*f5f40dd6SCy Schubert(KoD) packet is sometimes sent.
1518*f5f40dd6SCy SchubertKoD packets are rate limited to no more than one per minimum
1519*f5f40dd6SCy Schubertaverage interpacket spacing, set by
1520*f5f40dd6SCy Schubert@code{discard} @code{average}
1521*f5f40dd6SCy Schubertdefaulting to 8s.  Otherwise, no response is sent.
15222b15cb3dSCy Schubert@item @code{limited}
15232b15cb3dSCy SchubertDeny service if the packet spacing violates the lower limits specified
15244990d495SXin LIin the
15254990d495SXin LI@code{discard}
15264990d495SXin LIcommand.
15272b15cb3dSCy SchubertA history of clients is kept using the
15282b15cb3dSCy Schubertmonitoring capability of
15292b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}.
15302b15cb3dSCy SchubertThus, monitoring is always active as
15312b15cb3dSCy Schubertlong as there is a restriction entry with the
15322b15cb3dSCy Schubert@code{limited}
15332b15cb3dSCy Schubertflag.
15342b15cb3dSCy Schubert@item @code{lowpriotrap}
15352b15cb3dSCy SchubertDeclare traps set by matching hosts to be low priority.
15362b15cb3dSCy SchubertThe
15372b15cb3dSCy Schubertnumber of traps a server can maintain is limited (the current limit
15382b15cb3dSCy Schubertis 3).
15392b15cb3dSCy SchubertTraps are usually assigned on a first come, first served
15402b15cb3dSCy Schubertbasis, with later trap requestors being denied service.
15412b15cb3dSCy SchubertThis flag
15422b15cb3dSCy Schubertmodifies the assignment algorithm by allowing low priority traps to
15432b15cb3dSCy Schubertbe overridden by later requests for normal priority traps.
154409100258SXin LI@item @code{noepeer}
154509100258SXin LIDeny ephemeral peer requests,
154609100258SXin LIeven if they come from an authenticated source.
154709100258SXin LINote that the ability to use a symmetric key for authentication may be restricted to
154809100258SXin LIone or more IPs or subnets via the third field of the
154909100258SXin LI@file{ntp.keys}
155009100258SXin LIfile.
155109100258SXin LIThis restriction is not enabled by default,
155209100258SXin LIto maintain backward compatability.
155309100258SXin LIExpect
155409100258SXin LI@code{noepeer}
155509100258SXin LIto become the default in ntp-4.4.
15562b15cb3dSCy Schubert@item @code{nomodify}
15572b15cb3dSCy SchubertDeny
15582b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
15592b15cb3dSCy Schubertand
15602b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
15612b15cb3dSCy Schubertqueries which attempt to modify the state of the
15622b15cb3dSCy Schubertserver (i.e., run time reconfiguration).
15632b15cb3dSCy SchubertQueries which return
15642b15cb3dSCy Schubertinformation are permitted.
15652b15cb3dSCy Schubert@item @code{noquery}
15662b15cb3dSCy SchubertDeny
15672b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
15682b15cb3dSCy Schubertand
15692b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
15702b15cb3dSCy Schubertqueries.
15712b15cb3dSCy SchubertTime service is not affected.
15722b15cb3dSCy Schubert@item @code{nopeer}
157309100258SXin LIDeny unauthenticated packets which would result in mobilizing a new association.
157409100258SXin LIThis includes
157509100258SXin LIbroadcast and symmetric active packets
157609100258SXin LIwhen a configured association does not exist.
15772b15cb3dSCy SchubertIt also includes
15782b15cb3dSCy Schubert@code{pool}
15792b15cb3dSCy Schubertassociations, so if you want to use servers from a
15802b15cb3dSCy Schubert@code{pool}
15812b15cb3dSCy Schubertdirective and also want to use
15822b15cb3dSCy Schubert@code{nopeer}
15832b15cb3dSCy Schubertby default, you'll want a
158409100258SXin LI@code{restrict source ...}
158509100258SXin LIline as well that does
158609100258SXin LI@emph{not}
15872b15cb3dSCy Schubertinclude the
15882b15cb3dSCy Schubert@code{nopeer}
15892b15cb3dSCy Schubertdirective.
15902b15cb3dSCy Schubert@item @code{noserve}
15912b15cb3dSCy SchubertDeny all packets except
15922b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
15932b15cb3dSCy Schubertand
15942b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
15952b15cb3dSCy Schubertqueries.
15962b15cb3dSCy Schubert@item @code{notrap}
15972b15cb3dSCy SchubertDecline to provide mode 6 control message trap service to matching
15982b15cb3dSCy Schuberthosts.
15994990d495SXin LIThe trap service is a subsystem of the
16004990d495SXin LI@code{ntpq(1ntpqmdoc)}
16014990d495SXin LIcontrol message
16022b15cb3dSCy Schubertprotocol which is intended for use by remote event logging programs.
16032b15cb3dSCy Schubert@item @code{notrust}
16042b15cb3dSCy SchubertDeny service unless the packet is cryptographically authenticated.
16052b15cb3dSCy Schubert@item @code{ntpport}
16062b15cb3dSCy SchubertThis is actually a match algorithm modifier, rather than a
16072b15cb3dSCy Schubertrestriction flag.
16082b15cb3dSCy SchubertIts presence causes the restriction entry to be
16092b15cb3dSCy Schubertmatched only if the source port in the packet is the standard NTP
16102b15cb3dSCy SchubertUDP port (123).
1611*f5f40dd6SCy SchubertThere can be two restriction entries with the same IP address if
1612*f5f40dd6SCy Schubertone specifies
16132b15cb3dSCy Schubert@code{ntpport}
1614*f5f40dd6SCy Schubertand the other does not.
16152b15cb3dSCy SchubertThe
16162b15cb3dSCy Schubert@code{ntpport}
1617*f5f40dd6SCy Schubertentry is considered more specific and
16182b15cb3dSCy Schubertis sorted later in the list.
16192d4e511cSCy Schubert@item @code{serverresponse fuzz}
16202d4e511cSCy SchubertWhen reponding to server requests,
16212d4e511cSCy Schubertfuzz the low order bits of the
16222d4e511cSCy Schubert@code{reftime}.
16232b15cb3dSCy Schubert@item @code{version}
16242b15cb3dSCy SchubertDeny packets that do not match the current NTP version.
16252b15cb3dSCy Schubert@end table
16262b15cb3dSCy Schubert
16272b15cb3dSCy SchubertDefault restriction list entries with the flags ignore, interface,
16282b15cb3dSCy Schubertntpport, for each of the local host's interface addresses are
1629*f5f40dd6SCy Schubertinserted into the table at startup to prevent ntpd
1630*f5f40dd6SCy Schubertfrom attempting to synchronize to itself, such as with
1631*f5f40dd6SCy Schubert@code{manycastclient}
1632*f5f40dd6SCy Schubertwhen
1633*f5f40dd6SCy Schubert@code{manycast}
1634*f5f40dd6SCy Schubertis also specified with the same multicast address.
16352b15cb3dSCy SchubertA default entry is also always present, though if it is
16362b15cb3dSCy Schubertotherwise unconfigured; no flags are associated
16372b15cb3dSCy Schubertwith the default entry (i.e., everything besides your own
16382b15cb3dSCy SchubertNTP server is unrestricted).
1639*f5f40dd6SCy Schubert@item @code{delrestrict} @code{[source]} @kbd{address}
1640*f5f40dd6SCy SchubertRemove a previously-set restriction.  This is useful for
1641*f5f40dd6SCy Schubertruntime configuration via
1642*f5f40dd6SCy Schubert@code{ntpq(1ntpqmdoc)}
1643*f5f40dd6SCy Schubert.  If
1644*f5f40dd6SCy Schubert@code{source}
1645*f5f40dd6SCy Schubertis specified, a dynamic restriction created from the
1646*f5f40dd6SCy Schubert@code{restrict} @code{source}
1647*f5f40dd6SCy Schuberttemplate at the time
1648*f5f40dd6SCy Schubertan association was added is removed.  Without
1649*f5f40dd6SCy Schubert@code{source}
1650*f5f40dd6SCy Schuberta static restriction is removed.
16512b15cb3dSCy Schubert@end table
16522b15cb3dSCy Schubert@node Automatic NTP Configuration Options
16532b15cb3dSCy Schubert@subsection Automatic NTP Configuration Options
16542b15cb3dSCy Schubert@subsubsection Manycasting
16552b15cb3dSCy SchubertManycasting is a automatic discovery and configuration paradigm
16562b15cb3dSCy Schubertnew to NTPv4.
16572b15cb3dSCy SchubertIt is intended as a means for a multicast client
16582b15cb3dSCy Schubertto troll the nearby network neighborhood to find cooperating
16592b15cb3dSCy Schubertmanycast servers, validate them using cryptographic means
16602b15cb3dSCy Schubertand evaluate their time values with respect to other servers
16612b15cb3dSCy Schubertthat might be lurking in the vicinity.
16622b15cb3dSCy SchubertThe intended result is that each manycast client mobilizes
16632b15cb3dSCy Schubertclient associations with some number of the "best"
16642b15cb3dSCy Schubertof the nearby manycast servers, yet automatically reconfigures
16652b15cb3dSCy Schubertto sustain this number of servers should one or another fail.
16662b15cb3dSCy Schubert
16672b15cb3dSCy SchubertNote that the manycasting paradigm does not coincide
16682b15cb3dSCy Schubertwith the anycast paradigm described in RFC-1546,
16692b15cb3dSCy Schubertwhich is designed to find a single server from a clique
16702b15cb3dSCy Schubertof servers providing the same service.
16712b15cb3dSCy SchubertThe manycast paradigm is designed to find a plurality
16722b15cb3dSCy Schubertof redundant servers satisfying defined optimality criteria.
16732b15cb3dSCy Schubert
16742b15cb3dSCy SchubertManycasting can be used with either symmetric key
16752b15cb3dSCy Schubertor public key cryptography.
16762b15cb3dSCy SchubertThe public key infrastructure (PKI)
16772b15cb3dSCy Schubertoffers the best protection against compromised keys
16782b15cb3dSCy Schubertand is generally considered stronger, at least with relatively
16792b15cb3dSCy Schubertlarge key sizes.
16802b15cb3dSCy SchubertIt is implemented using the Autokey protocol and
16812b15cb3dSCy Schubertthe OpenSSL cryptographic library available from
16822b15cb3dSCy Schubert@code{http://www.openssl.org/}.
16832b15cb3dSCy SchubertThe library can also be used with other NTPv4 modes
16842b15cb3dSCy Schubertas well and is highly recommended, especially for broadcast modes.
16852b15cb3dSCy Schubert
16862b15cb3dSCy SchubertA persistent manycast client association is configured
16874990d495SXin LIusing the
16884990d495SXin LI@code{manycastclient}
16894990d495SXin LIcommand, which is similar to the
16904990d495SXin LI@code{server}
16914990d495SXin LIcommand but with a multicast (IPv4 class
16922b15cb3dSCy Schubert@code{D}
16932b15cb3dSCy Schubertor IPv6 prefix
16942b15cb3dSCy Schubert@code{FF})
16952b15cb3dSCy Schubertgroup address.
16962b15cb3dSCy SchubertThe IANA has designated IPv4 address 224.1.1.1
16972b15cb3dSCy Schubertand IPv6 address FF05::101 (site local) for NTP.
16982b15cb3dSCy SchubertWhen more servers are needed, it broadcasts manycast
16992b15cb3dSCy Schubertclient messages to this address at the minimum feasible rate
17002b15cb3dSCy Schubertand minimum feasible time-to-live (TTL) hops, depending
17012b15cb3dSCy Schuberton how many servers have already been found.
17022b15cb3dSCy SchubertThere can be as many manycast client associations
17032b15cb3dSCy Schubertas different group address, each one serving as a template
17042b15cb3dSCy Schubertfor a future ephemeral unicast client/server association.
17052b15cb3dSCy Schubert
17062b15cb3dSCy SchubertManycast servers configured with the
17072b15cb3dSCy Schubert@code{manycastserver}
17082b15cb3dSCy Schubertcommand listen on the specified group address for manycast
17092b15cb3dSCy Schubertclient messages.
17102b15cb3dSCy SchubertNote the distinction between manycast client,
17112b15cb3dSCy Schubertwhich actively broadcasts messages, and manycast server,
17122b15cb3dSCy Schubertwhich passively responds to them.
17132b15cb3dSCy SchubertIf a manycast server is
17142b15cb3dSCy Schubertin scope of the current TTL and is itself synchronized
17152b15cb3dSCy Schubertto a valid source and operating at a stratum level equal
17162b15cb3dSCy Schubertto or lower than the manycast client, it replies to the
17172b15cb3dSCy Schubertmanycast client message with an ordinary unicast server message.
17182b15cb3dSCy Schubert
17192b15cb3dSCy SchubertThe manycast client receiving this message mobilizes
17202b15cb3dSCy Schubertan ephemeral client/server association according to the
17212b15cb3dSCy Schubertmatching manycast client template, but only if cryptographically
17222b15cb3dSCy Schubertauthenticated and the server stratum is less than or equal
17232b15cb3dSCy Schubertto the client stratum.
17242b15cb3dSCy SchubertAuthentication is explicitly required
17252b15cb3dSCy Schubertand either symmetric key or public key (Autokey) can be used.
17262b15cb3dSCy SchubertThen, the client polls the server at its unicast address
17272b15cb3dSCy Schubertin burst mode in order to reliably set the host clock
17282b15cb3dSCy Schubertand validate the source.
17292b15cb3dSCy SchubertThis normally results
17302b15cb3dSCy Schubertin a volley of eight client/server at 2-s intervals
17312b15cb3dSCy Schubertduring which both the synchronization and cryptographic
17322b15cb3dSCy Schubertprotocols run concurrently.
17332b15cb3dSCy SchubertFollowing the volley,
17342b15cb3dSCy Schubertthe client runs the NTP intersection and clustering
17352b15cb3dSCy Schubertalgorithms, which act to discard all but the "best"
17362b15cb3dSCy Schubertassociations according to stratum and synchronization
17372b15cb3dSCy Schubertdistance.
17382b15cb3dSCy SchubertThe surviving associations then continue
17392b15cb3dSCy Schubertin ordinary client/server mode.
17402b15cb3dSCy Schubert
17412b15cb3dSCy SchubertThe manycast client polling strategy is designed to reduce
17422b15cb3dSCy Schubertas much as possible the volume of manycast client messages
17432b15cb3dSCy Schubertand the effects of implosion due to near-simultaneous
17442b15cb3dSCy Schubertarrival of manycast server messages.
17452b15cb3dSCy SchubertThe strategy is determined by the
17462b15cb3dSCy Schubert@code{manycastclient},
17472b15cb3dSCy Schubert@code{tos}
17482b15cb3dSCy Schubertand
17492b15cb3dSCy Schubert@code{ttl}
17502b15cb3dSCy Schubertconfiguration commands.
17512b15cb3dSCy SchubertThe manycast poll interval is
17522b15cb3dSCy Schubertnormally eight times the system poll interval,
17532b15cb3dSCy Schubertwhich starts out at the
17542b15cb3dSCy Schubert@code{minpoll}
17552b15cb3dSCy Schubertvalue specified in the
17562b15cb3dSCy Schubert@code{manycastclient},
17572b15cb3dSCy Schubertcommand and, under normal circumstances, increments to the
17582b15cb3dSCy Schubert@code{maxpolll}
17592b15cb3dSCy Schubertvalue specified in this command.
17602b15cb3dSCy SchubertInitially, the TTL is
17614990d495SXin LIset at the minimum hops specified by the
17624990d495SXin LI@code{ttl}
17634990d495SXin LIcommand.
17642b15cb3dSCy SchubertAt each retransmission the TTL is increased until reaching
17652b15cb3dSCy Schubertthe maximum hops specified by this command or a sufficient
17662b15cb3dSCy Schubertnumber client associations have been found.
17672b15cb3dSCy SchubertFurther retransmissions use the same TTL.
17682b15cb3dSCy Schubert
17692b15cb3dSCy SchubertThe quality and reliability of the suite of associations
17702b15cb3dSCy Schubertdiscovered by the manycast client is determined by the NTP
17712b15cb3dSCy Schubertmitigation algorithms and the
17722b15cb3dSCy Schubert@code{minclock}
17732b15cb3dSCy Schubertand
17742b15cb3dSCy Schubert@code{minsane}
17752b15cb3dSCy Schubertvalues specified in the
17762b15cb3dSCy Schubert@code{tos}
17772b15cb3dSCy Schubertconfiguration command.
17782b15cb3dSCy SchubertAt least
17792b15cb3dSCy Schubert@code{minsane}
17802b15cb3dSCy Schubertcandidate servers must be available and the mitigation
17812b15cb3dSCy Schubertalgorithms produce at least
17822b15cb3dSCy Schubert@code{minclock}
17832b15cb3dSCy Schubertsurvivors in order to synchronize the clock.
17842b15cb3dSCy SchubertByzantine agreement principles require at least four
17852b15cb3dSCy Schubertcandidates in order to correctly discard a single falseticker.
17862b15cb3dSCy SchubertFor legacy purposes,
17872b15cb3dSCy Schubert@code{minsane}
17882b15cb3dSCy Schubertdefaults to 1 and
17892b15cb3dSCy Schubert@code{minclock}
17902b15cb3dSCy Schubertdefaults to 3.
17912b15cb3dSCy SchubertFor manycast service
17922b15cb3dSCy Schubert@code{minsane}
17932b15cb3dSCy Schubertshould be explicitly set to 4, assuming at least that
17942b15cb3dSCy Schubertnumber of servers are available.
17952b15cb3dSCy Schubert
17962b15cb3dSCy SchubertIf at least
17972b15cb3dSCy Schubert@code{minclock}
17982b15cb3dSCy Schubertservers are found, the manycast poll interval is immediately
17992b15cb3dSCy Schubertset to eight times
18002b15cb3dSCy Schubert@code{maxpoll}.
18012b15cb3dSCy SchubertIf less than
18022b15cb3dSCy Schubert@code{minclock}
18032b15cb3dSCy Schubertservers are found when the TTL has reached the maximum hops,
18042b15cb3dSCy Schubertthe manycast poll interval is doubled.
18052b15cb3dSCy SchubertFor each transmission
18062b15cb3dSCy Schubertafter that, the poll interval is doubled again until
18072b15cb3dSCy Schubertreaching the maximum of eight times
18082b15cb3dSCy Schubert@code{maxpoll}.
18092b15cb3dSCy SchubertFurther transmissions use the same poll interval and
18102b15cb3dSCy SchubertTTL values.
18112b15cb3dSCy SchubertNote that while all this is going on,
18122b15cb3dSCy Schuberteach client/server association found is operating normally
18132b15cb3dSCy Schubertit the system poll interval.
18142b15cb3dSCy Schubert
18152b15cb3dSCy SchubertAdministratively scoped multicast boundaries are normally
18162b15cb3dSCy Schubertspecified by the network router configuration and,
18172b15cb3dSCy Schubertin the case of IPv6, the link/site scope prefix.
18182b15cb3dSCy SchubertBy default, the increment for TTL hops is 32 starting
18192b15cb3dSCy Schubertfrom 31; however, the
18202b15cb3dSCy Schubert@code{ttl}
18212b15cb3dSCy Schubertconfiguration command can be
18222b15cb3dSCy Schubertused to modify the values to match the scope rules.
18232b15cb3dSCy Schubert
18242b15cb3dSCy SchubertIt is often useful to narrow the range of acceptable
18252b15cb3dSCy Schubertservers which can be found by manycast client associations.
18262b15cb3dSCy SchubertBecause manycast servers respond only when the client
18272b15cb3dSCy Schubertstratum is equal to or greater than the server stratum,
18282b15cb3dSCy Schubertprimary (stratum 1) servers fill find only primary servers
18292b15cb3dSCy Schubertin TTL range, which is probably the most common objective.
18302b15cb3dSCy SchubertHowever, unless configured otherwise, all manycast clients
18312b15cb3dSCy Schubertin TTL range will eventually find all primary servers
18322b15cb3dSCy Schubertin TTL range, which is probably not the most common
18332b15cb3dSCy Schubertobjective in large networks.
18342b15cb3dSCy SchubertThe
18352b15cb3dSCy Schubert@code{tos}
18362b15cb3dSCy Schubertcommand can be used to modify this behavior.
18372b15cb3dSCy SchubertServers with stratum below
18382b15cb3dSCy Schubert@code{floor}
18392b15cb3dSCy Schubertor above
18402b15cb3dSCy Schubert@code{ceiling}
18412b15cb3dSCy Schubertspecified in the
18422b15cb3dSCy Schubert@code{tos}
18432b15cb3dSCy Schubertcommand are strongly discouraged during the selection
18442b15cb3dSCy Schubertprocess; however, these servers may be temporally
18452b15cb3dSCy Schubertaccepted if the number of servers within TTL range is
18462b15cb3dSCy Schubertless than
18472b15cb3dSCy Schubert@code{minclock}.
18482b15cb3dSCy Schubert
18492b15cb3dSCy SchubertThe above actions occur for each manycast client message,
18502b15cb3dSCy Schubertwhich repeats at the designated poll interval.
18512b15cb3dSCy SchubertHowever, once the ephemeral client association is mobilized,
18522b15cb3dSCy Schubertsubsequent manycast server replies are discarded,
18532b15cb3dSCy Schubertsince that would result in a duplicate association.
18542b15cb3dSCy SchubertIf during a poll interval the number of client associations
18552b15cb3dSCy Schubertfalls below
18562b15cb3dSCy Schubert@code{minclock},
18572b15cb3dSCy Schubertall manycast client prototype associations are reset
18582b15cb3dSCy Schubertto the initial poll interval and TTL hops and operation
18592b15cb3dSCy Schubertresumes from the beginning.
18602b15cb3dSCy SchubertIt is important to avoid
18612b15cb3dSCy Schubertfrequent manycast client messages, since each one requires
18622b15cb3dSCy Schubertall manycast servers in TTL range to respond.
18632b15cb3dSCy SchubertThe result could well be an implosion, either minor or major,
18642b15cb3dSCy Schubertdepending on the number of servers in range.
18652b15cb3dSCy SchubertThe recommended value for
18662b15cb3dSCy Schubert@code{maxpoll}
18672b15cb3dSCy Schubertis 12 (4,096 s).
18682b15cb3dSCy Schubert
18692b15cb3dSCy SchubertIt is possible and frequently useful to configure a host
18702b15cb3dSCy Schubertas both manycast client and manycast server.
18712b15cb3dSCy SchubertA number of hosts configured this way and sharing a common
18722b15cb3dSCy Schubertgroup address will automatically organize themselves
18732b15cb3dSCy Schubertin an optimum configuration based on stratum and
18742b15cb3dSCy Schubertsynchronization distance.
18752b15cb3dSCy SchubertFor example, consider an NTP
18762b15cb3dSCy Schubertsubnet of two primary servers and a hundred or more
18772b15cb3dSCy Schubertdependent clients.
18782b15cb3dSCy SchubertWith two exceptions, all servers
18792b15cb3dSCy Schubertand clients have identical configuration files including both
18802b15cb3dSCy Schubert@code{multicastclient}
18812b15cb3dSCy Schubertand
18822b15cb3dSCy Schubert@code{multicastserver}
18832b15cb3dSCy Schubertcommands using, for instance, multicast group address
18842b15cb3dSCy Schubert239.1.1.1.
18852b15cb3dSCy SchubertThe only exception is that each primary server
18862b15cb3dSCy Schubertconfiguration file must include commands for the primary
18872b15cb3dSCy Schubertreference source such as a GPS receiver.
18882b15cb3dSCy Schubert
18892b15cb3dSCy SchubertThe remaining configuration files for all secondary
18902b15cb3dSCy Schubertservers and clients have the same contents, except for the
18912b15cb3dSCy Schubert@code{tos}
18922b15cb3dSCy Schubertcommand, which is specific for each stratum level.
18932b15cb3dSCy SchubertFor stratum 1 and stratum 2 servers, that command is
18942b15cb3dSCy Schubertnot necessary.
18952b15cb3dSCy SchubertFor stratum 3 and above servers the
18962b15cb3dSCy Schubert@code{floor}
18972b15cb3dSCy Schubertvalue is set to the intended stratum number.
18982b15cb3dSCy SchubertThus, all stratum 3 configuration files are identical,
18992b15cb3dSCy Schubertall stratum 4 files are identical and so forth.
19002b15cb3dSCy Schubert
19012b15cb3dSCy SchubertOnce operations have stabilized in this scenario,
19022b15cb3dSCy Schubertthe primary servers will find the primary reference source
19032b15cb3dSCy Schubertand each other, since they both operate at the same
19042b15cb3dSCy Schubertstratum (1), but not with any secondary server or client,
19052b15cb3dSCy Schubertsince these operate at a higher stratum.
19062b15cb3dSCy SchubertThe secondary
19072b15cb3dSCy Schubertservers will find the servers at the same stratum level.
19082b15cb3dSCy SchubertIf one of the primary servers loses its GPS receiver,
19092b15cb3dSCy Schubertit will continue to operate as a client and other clients
19102b15cb3dSCy Schubertwill time out the corresponding association and
19112b15cb3dSCy Schubertre-associate accordingly.
19122b15cb3dSCy Schubert
19132b15cb3dSCy SchubertSome administrators prefer to avoid running
19142b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
19152b15cb3dSCy Schubertcontinuously and run either
19169034852cSGleb Smirnoff@code{sntp(1sntpmdoc)}
19172b15cb3dSCy Schubertor
19182b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
19192b15cb3dSCy Schubert@code{-q}
19202b15cb3dSCy Schubertas a cron job.
19212b15cb3dSCy SchubertIn either case the servers must be
19222b15cb3dSCy Schubertconfigured in advance and the program fails if none are
19232b15cb3dSCy Schubertavailable when the cron job runs.
19242b15cb3dSCy SchubertA really slick
19252b15cb3dSCy Schubertapplication of manycast is with
19262b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
19272b15cb3dSCy Schubert@code{-q}.
19282b15cb3dSCy SchubertThe program wakes up, scans the local landscape looking
19292b15cb3dSCy Schubertfor the usual suspects, selects the best from among
19302b15cb3dSCy Schubertthe rascals, sets the clock and then departs.
19312b15cb3dSCy SchubertServers do not have to be configured in advance and
19322b15cb3dSCy Schubertall clients throughout the network can have the same
19332b15cb3dSCy Schubertconfiguration file.
19342b15cb3dSCy Schubert@subsubsection Manycast Interactions with Autokey
19352b15cb3dSCy SchubertEach time a manycast client sends a client mode packet
19362b15cb3dSCy Schubertto a multicast group address, all manycast servers
19372b15cb3dSCy Schubertin scope generate a reply including the host name
19382b15cb3dSCy Schubertand status word.
19392b15cb3dSCy SchubertThe manycast clients then run
19402b15cb3dSCy Schubertthe Autokey protocol, which collects and verifies
19412b15cb3dSCy Schubertall certificates involved.
19422b15cb3dSCy SchubertFollowing the burst interval
19432b15cb3dSCy Schubertall but three survivors are cast off,
19442b15cb3dSCy Schubertbut the certificates remain in the local cache.
19452b15cb3dSCy SchubertIt often happens that several complete signing trails
19462b15cb3dSCy Schubertfrom the client to the primary servers are collected in this way.
19472b15cb3dSCy Schubert
19482b15cb3dSCy SchubertAbout once an hour or less often if the poll interval
19492b15cb3dSCy Schubertexceeds this, the client regenerates the Autokey key list.
19502b15cb3dSCy SchubertThis is in general transparent in client/server mode.
19512b15cb3dSCy SchubertHowever, about once per day the server private value
19522b15cb3dSCy Schubertused to generate cookies is refreshed along with all
19532b15cb3dSCy Schubertmanycast client associations.
19542b15cb3dSCy SchubertIn this case all
19552b15cb3dSCy Schubertcryptographic values including certificates is refreshed.
19562b15cb3dSCy SchubertIf a new certificate has been generated since
19572b15cb3dSCy Schubertthe last refresh epoch, it will automatically revoke
19582b15cb3dSCy Schubertall prior certificates that happen to be in the
19592b15cb3dSCy Schubertcertificate cache.
19602b15cb3dSCy SchubertAt the same time, the manycast
19612b15cb3dSCy Schubertscheme starts all over from the beginning and
19622b15cb3dSCy Schubertthe expanding ring shrinks to the minimum and increments
19632b15cb3dSCy Schubertfrom there while collecting all servers in scope.
1964f391d6bcSXin LI@subsubsection Broadcast Options
1965f391d6bcSXin LI@table @asis
1966f391d6bcSXin LI@item @code{tos} @code{[@code{bcpollbstep} @kbd{gate}]}
1967f391d6bcSXin LIThis command provides a way to delay,
1968f391d6bcSXin LIby the specified number of broadcast poll intervals,
1969f391d6bcSXin LIbelieving backward time steps from a broadcast server.
1970f391d6bcSXin LIBroadcast time networks are expected to be trusted.
1971f391d6bcSXin LIIn the event a broadcast server's time is stepped backwards,
1972f391d6bcSXin LIthere is clear benefit to having the clients notice this change
1973f391d6bcSXin LIas soon as possible.
1974f391d6bcSXin LIAttacks such as replay attacks can happen, however,
1975f391d6bcSXin LIand even though there are a number of protections built in to
1976f391d6bcSXin LIbroadcast mode, attempts to perform a replay attack are possible.
1977f391d6bcSXin LIThis value defaults to 0, but can be changed
1978f391d6bcSXin LIto any number of poll intervals between 0 and 4.
197909100258SXin LI@end table
19802b15cb3dSCy Schubert@subsubsection Manycast Options
19812b15cb3dSCy Schubert@table @asis
19822b15cb3dSCy Schubert@item @code{tos} @code{[@code{ceiling} @kbd{ceiling} | @code{cohort} @code{@{} @code{0} | @code{1} @code{@}} | @code{floor} @kbd{floor} | @code{minclock} @kbd{minclock} | @code{minsane} @kbd{minsane}]}
19832b15cb3dSCy SchubertThis command affects the clock selection and clustering
19842b15cb3dSCy Schubertalgorithms.
19852b15cb3dSCy SchubertIt can be used to select the quality and
19862b15cb3dSCy Schubertquantity of peers used to synchronize the system clock
19872b15cb3dSCy Schubertand is most useful in manycast mode.
19882b15cb3dSCy SchubertThe variables operate
19892b15cb3dSCy Schubertas follows:
19902b15cb3dSCy Schubert@table @asis
19912b15cb3dSCy Schubert@item @code{ceiling} @kbd{ceiling}
19922b15cb3dSCy SchubertPeers with strata above
19932b15cb3dSCy Schubert@code{ceiling}
19942b15cb3dSCy Schubertwill be discarded if there are at least
19952b15cb3dSCy Schubert@code{minclock}
19962b15cb3dSCy Schubertpeers remaining.
19972b15cb3dSCy SchubertThis value defaults to 15, but can be changed
19982b15cb3dSCy Schubertto any number from 1 to 15.
19992b15cb3dSCy Schubert@item @code{cohort} @code{@{0 | 1@}}
20002b15cb3dSCy SchubertThis is a binary flag which enables (0) or disables (1)
20012b15cb3dSCy Schubertmanycast server replies to manycast clients with the same
20022b15cb3dSCy Schubertstratum level.
20032b15cb3dSCy SchubertThis is useful to reduce implosions where
20042b15cb3dSCy Schubertlarge numbers of clients with the same stratum level
20052b15cb3dSCy Schubertare present.
20062b15cb3dSCy SchubertThe default is to enable these replies.
20072b15cb3dSCy Schubert@item @code{floor} @kbd{floor}
20082b15cb3dSCy SchubertPeers with strata below
20092b15cb3dSCy Schubert@code{floor}
20102b15cb3dSCy Schubertwill be discarded if there are at least
20112b15cb3dSCy Schubert@code{minclock}
20122b15cb3dSCy Schubertpeers remaining.
20132b15cb3dSCy SchubertThis value defaults to 1, but can be changed
20142b15cb3dSCy Schubertto any number from 1 to 15.
20152b15cb3dSCy Schubert@item @code{minclock} @kbd{minclock}
20169034852cSGleb SmirnoffThe clustering algorithm repeatedly casts out outlier
20172b15cb3dSCy Schubertassociations until no more than
20182b15cb3dSCy Schubert@code{minclock}
20192b15cb3dSCy Schubertassociations remain.
20202b15cb3dSCy SchubertThis value defaults to 3,
20212b15cb3dSCy Schubertbut can be changed to any number from 1 to the number of
20222b15cb3dSCy Schubertconfigured sources.
20232b15cb3dSCy Schubert@item @code{minsane} @kbd{minsane}
20242b15cb3dSCy SchubertThis is the minimum number of candidates available
20252b15cb3dSCy Schubertto the clock selection algorithm in order to produce
20262b15cb3dSCy Schubertone or more truechimers for the clustering algorithm.
20272b15cb3dSCy SchubertIf fewer than this number are available, the clock is
20282b15cb3dSCy Schubertundisciplined and allowed to run free.
20292b15cb3dSCy SchubertThe default is 1
20302b15cb3dSCy Schubertfor legacy purposes.
20312b15cb3dSCy SchubertHowever, according to principles of
20322b15cb3dSCy SchubertByzantine agreement,
20332b15cb3dSCy Schubert@code{minsane}
20342b15cb3dSCy Schubertshould be at least 4 in order to detect and discard
20352b15cb3dSCy Schuberta single falseticker.
20362b15cb3dSCy Schubert@end table
20372b15cb3dSCy Schubert@item @code{ttl} @kbd{hop} @kbd{...}
20382b15cb3dSCy SchubertThis command specifies a list of TTL values in increasing
20392b15cb3dSCy Schubertorder, up to 8 values can be specified.
20402b15cb3dSCy SchubertIn manycast mode these values are used in turn
20412b15cb3dSCy Schubertin an expanding-ring search.
20422b15cb3dSCy SchubertThe default is eight
20432b15cb3dSCy Schubertmultiples of 32 starting at 31.
20442b15cb3dSCy Schubert@end table
20452b15cb3dSCy Schubert@node Reference Clock Support
20462b15cb3dSCy Schubert@subsection Reference Clock Support
20472b15cb3dSCy SchubertThe NTP Version 4 daemon supports some three dozen different radio,
20482b15cb3dSCy Schubertsatellite and modem reference clocks plus a special pseudo-clock
20492b15cb3dSCy Schubertused for backup or when no other clock source is available.
20502b15cb3dSCy SchubertDetailed descriptions of individual device drivers and options can
20512b15cb3dSCy Schubertbe found in the
20522b15cb3dSCy Schubert"Reference Clock Drivers"
20532b15cb3dSCy Schubertpage
20542b15cb3dSCy Schubert(available as part of the HTML documentation
20552b15cb3dSCy Schubertprovided in
20562b15cb3dSCy Schubert@file{/usr/share/doc/ntp}).
20572b15cb3dSCy SchubertAdditional information can be found in the pages linked
20582b15cb3dSCy Schubertthere, including the
20592b15cb3dSCy Schubert"Debugging Hints for Reference Clock Drivers"
20602b15cb3dSCy Schubertand
20612b15cb3dSCy Schubert"How To Write a Reference Clock Driver"
20622b15cb3dSCy Schubertpages
20632b15cb3dSCy Schubert(available as part of the HTML documentation
20642b15cb3dSCy Schubertprovided in
20652b15cb3dSCy Schubert@file{/usr/share/doc/ntp}).
20662b15cb3dSCy SchubertIn addition, support for a PPS
20672b15cb3dSCy Schubertsignal is available as described in the
20682b15cb3dSCy Schubert"Pulse-per-second (PPS) Signal Interfacing"
20692b15cb3dSCy Schubertpage
20702b15cb3dSCy Schubert(available as part of the HTML documentation
20712b15cb3dSCy Schubertprovided in
20722b15cb3dSCy Schubert@file{/usr/share/doc/ntp}).
20732b15cb3dSCy SchubertMany
20742b15cb3dSCy Schubertdrivers support special line discipline/streams modules which can
20752b15cb3dSCy Schubertsignificantly improve the accuracy using the driver.
20762b15cb3dSCy SchubertThese are
20772b15cb3dSCy Schubertdescribed in the
20782b15cb3dSCy Schubert"Line Disciplines and Streams Drivers"
20792b15cb3dSCy Schubertpage
20802b15cb3dSCy Schubert(available as part of the HTML documentation
20812b15cb3dSCy Schubertprovided in
20822b15cb3dSCy Schubert@file{/usr/share/doc/ntp}).
20832b15cb3dSCy Schubert
20842b15cb3dSCy SchubertA reference clock will generally (though not always) be a radio
20852b15cb3dSCy Schuberttimecode receiver which is synchronized to a source of standard
20862b15cb3dSCy Schuberttime such as the services offered by the NRC in Canada and NIST and
20872b15cb3dSCy SchubertUSNO in the US.
20882b15cb3dSCy SchubertThe interface between the computer and the timecode
20892b15cb3dSCy Schubertreceiver is device dependent, but is usually a serial port.
20902b15cb3dSCy SchubertA
20912b15cb3dSCy Schubertdevice driver specific to each reference clock must be selected and
20922b15cb3dSCy Schubertcompiled in the distribution; however, most common radio, satellite
20932b15cb3dSCy Schubertand modem clocks are included by default.
20942b15cb3dSCy SchubertNote that an attempt to
20952b15cb3dSCy Schubertconfigure a reference clock when the driver has not been compiled
20962b15cb3dSCy Schubertor the hardware port has not been appropriately configured results
20972b15cb3dSCy Schubertin a scalding remark to the system log file, but is otherwise non
20982b15cb3dSCy Schuberthazardous.
20992b15cb3dSCy Schubert
21002b15cb3dSCy SchubertFor the purposes of configuration,
21012b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
21022b15cb3dSCy Schuberttreats
21032b15cb3dSCy Schubertreference clocks in a manner analogous to normal NTP peers as much
21042b15cb3dSCy Schubertas possible.
21052b15cb3dSCy SchubertReference clocks are identified by a syntactically
21062b15cb3dSCy Schubertcorrect but invalid IP address, in order to distinguish them from
21072b15cb3dSCy Schubertnormal NTP peers.
21082b15cb3dSCy SchubertReference clock addresses are of the form
21092b15cb3dSCy Schubert@code{127.127.}@kbd{t}.@kbd{u},
21102b15cb3dSCy Schubertwhere
21112b15cb3dSCy Schubert@kbd{t}
21122b15cb3dSCy Schubertis an integer
21132b15cb3dSCy Schubertdenoting the clock type and
21142b15cb3dSCy Schubert@kbd{u}
21152b15cb3dSCy Schubertindicates the unit
21162b15cb3dSCy Schubertnumber in the range 0-3.
21172b15cb3dSCy SchubertWhile it may seem overkill, it is in fact
21182b15cb3dSCy Schubertsometimes useful to configure multiple reference clocks of the same
21192b15cb3dSCy Schuberttype, in which case the unit numbers must be unique.
21202b15cb3dSCy Schubert
21212b15cb3dSCy SchubertThe
21222b15cb3dSCy Schubert@code{server}
21232b15cb3dSCy Schubertcommand is used to configure a reference
21242b15cb3dSCy Schubertclock, where the
21252b15cb3dSCy Schubert@kbd{address}
21262b15cb3dSCy Schubertargument in that command
21272b15cb3dSCy Schubertis the clock address.
21282b15cb3dSCy SchubertThe
21292b15cb3dSCy Schubert@code{key},
21302b15cb3dSCy Schubert@code{version}
21312b15cb3dSCy Schubertand
21322b15cb3dSCy Schubert@code{ttl}
21332b15cb3dSCy Schubertoptions are not used for reference clock support.
21342b15cb3dSCy SchubertThe
21352b15cb3dSCy Schubert@code{mode}
21362b15cb3dSCy Schubertoption is added for reference clock support, as
21372b15cb3dSCy Schubertdescribed below.
21382b15cb3dSCy SchubertThe
21392b15cb3dSCy Schubert@code{prefer}
21402b15cb3dSCy Schubertoption can be useful to
21412b15cb3dSCy Schubertpersuade the server to cherish a reference clock with somewhat more
21422b15cb3dSCy Schubertenthusiasm than other reference clocks or peers.
21432b15cb3dSCy SchubertFurther
21442b15cb3dSCy Schubertinformation on this option can be found in the
21452b15cb3dSCy Schubert"Mitigation Rules and the prefer Keyword"
21462b15cb3dSCy Schubert(available as part of the HTML documentation
21472b15cb3dSCy Schubertprovided in
21482b15cb3dSCy Schubert@file{/usr/share/doc/ntp})
21492b15cb3dSCy Schubertpage.
21502b15cb3dSCy SchubertThe
21512b15cb3dSCy Schubert@code{minpoll}
21522b15cb3dSCy Schubertand
21532b15cb3dSCy Schubert@code{maxpoll}
21542b15cb3dSCy Schubertoptions have
21552b15cb3dSCy Schubertmeaning only for selected clock drivers.
21562b15cb3dSCy SchubertSee the individual clock
21572b15cb3dSCy Schubertdriver document pages for additional information.
21582b15cb3dSCy Schubert
21592b15cb3dSCy SchubertThe
21602b15cb3dSCy Schubert@code{fudge}
21612b15cb3dSCy Schubertcommand is used to provide additional
21622b15cb3dSCy Schubertinformation for individual clock drivers and normally follows
21632b15cb3dSCy Schubertimmediately after the
21642b15cb3dSCy Schubert@code{server}
21652b15cb3dSCy Schubertcommand.
21662b15cb3dSCy SchubertThe
21672b15cb3dSCy Schubert@kbd{address}
21682b15cb3dSCy Schubertargument specifies the clock address.
21692b15cb3dSCy SchubertThe
21702b15cb3dSCy Schubert@code{refid}
21712b15cb3dSCy Schubertand
21722b15cb3dSCy Schubert@code{stratum}
21732b15cb3dSCy Schubertoptions can be used to
21742b15cb3dSCy Schubertoverride the defaults for the device.
21752b15cb3dSCy SchubertThere are two optional
21762b15cb3dSCy Schubertdevice-dependent time offsets and four flags that can be included
21772b15cb3dSCy Schubertin the
21782b15cb3dSCy Schubert@code{fudge}
21792b15cb3dSCy Schubertcommand as well.
21802b15cb3dSCy Schubert
21812b15cb3dSCy SchubertThe stratum number of a reference clock is by default zero.
21822b15cb3dSCy SchubertSince the
21832b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
21842b15cb3dSCy Schubertdaemon adds one to the stratum of each
21852b15cb3dSCy Schubertpeer, a primary server ordinarily displays an external stratum of
21862b15cb3dSCy Schubertone.
21872b15cb3dSCy SchubertIn order to provide engineered backups, it is often useful to
21882b15cb3dSCy Schubertspecify the reference clock stratum as greater than zero.
21892b15cb3dSCy SchubertThe
21902b15cb3dSCy Schubert@code{stratum}
21912b15cb3dSCy Schubertoption is used for this purpose.
21922b15cb3dSCy SchubertAlso, in cases
21932b15cb3dSCy Schubertinvolving both a reference clock and a pulse-per-second (PPS)
21942b15cb3dSCy Schubertdiscipline signal, it is useful to specify the reference clock
21952b15cb3dSCy Schubertidentifier as other than the default, depending on the driver.
21962b15cb3dSCy SchubertThe
21972b15cb3dSCy Schubert@code{refid}
21982b15cb3dSCy Schubertoption is used for this purpose.
21992b15cb3dSCy SchubertExcept where noted,
22002b15cb3dSCy Schubertthese options apply to all clock drivers.
22012b15cb3dSCy Schubert@subsubsection Reference Clock Commands
22022b15cb3dSCy Schubert@table @asis
22032b15cb3dSCy Schubert@item @code{server} @code{127.127.}@kbd{t}.@kbd{u} @code{[@code{prefer}]} @code{[@code{mode} @kbd{int}]} @code{[@code{minpoll} @kbd{int}]} @code{[@code{maxpoll} @kbd{int}]}
22042b15cb3dSCy SchubertThis command can be used to configure reference clocks in
22052b15cb3dSCy Schubertspecial ways.
22062b15cb3dSCy SchubertThe options are interpreted as follows:
22072b15cb3dSCy Schubert@table @asis
22082b15cb3dSCy Schubert@item @code{prefer}
22092b15cb3dSCy SchubertMarks the reference clock as preferred.
22102b15cb3dSCy SchubertAll other things being
22112b15cb3dSCy Schubertequal, this host will be chosen for synchronization among a set of
22122b15cb3dSCy Schubertcorrectly operating hosts.
22132b15cb3dSCy SchubertSee the
22142b15cb3dSCy Schubert"Mitigation Rules and the prefer Keyword"
22152b15cb3dSCy Schubertpage
22162b15cb3dSCy Schubert(available as part of the HTML documentation
22172b15cb3dSCy Schubertprovided in
22182b15cb3dSCy Schubert@file{/usr/share/doc/ntp})
22192b15cb3dSCy Schubertfor further information.
22202b15cb3dSCy Schubert@item @code{mode} @kbd{int}
22212b15cb3dSCy SchubertSpecifies a mode number which is interpreted in a
22222b15cb3dSCy Schubertdevice-specific fashion.
22232b15cb3dSCy SchubertFor instance, it selects a dialing
22242b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
22252b15cb3dSCy Schubertparse
22262b15cb3dSCy Schubertdrivers.
22272b15cb3dSCy Schubert@item @code{minpoll} @kbd{int}
22282b15cb3dSCy Schubert@item @code{maxpoll} @kbd{int}
22292b15cb3dSCy SchubertThese options specify the minimum and maximum polling interval
22302b15cb3dSCy Schubertfor reference clock messages, as a power of 2 in seconds
22312b15cb3dSCy SchubertFor
22322b15cb3dSCy Schubertmost directly connected reference clocks, both
22332b15cb3dSCy Schubert@code{minpoll}
22342b15cb3dSCy Schubertand
22352b15cb3dSCy Schubert@code{maxpoll}
22362b15cb3dSCy Schubertdefault to 6 (64 s).
22372b15cb3dSCy SchubertFor modem reference clocks,
22382b15cb3dSCy Schubert@code{minpoll}
22392b15cb3dSCy Schubertdefaults to 10 (17.1 m) and
22402b15cb3dSCy Schubert@code{maxpoll}
22412b15cb3dSCy Schubertdefaults to 14 (4.5 h).
22422b15cb3dSCy SchubertThe allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
22432b15cb3dSCy Schubert@end table
22442b15cb3dSCy Schubert@item @code{fudge} @code{127.127.}@kbd{t}.@kbd{u} @code{[@code{time1} @kbd{sec}]} @code{[@code{time2} @kbd{sec}]} @code{[@code{stratum} @kbd{int}]} @code{[@code{refid} @kbd{string}]} @code{[@code{mode} @kbd{int}]} @code{[@code{flag1} @code{0} @code{|} @code{1}]} @code{[@code{flag2} @code{0} @code{|} @code{1}]} @code{[@code{flag3} @code{0} @code{|} @code{1}]} @code{[@code{flag4} @code{0} @code{|} @code{1}]}
22452b15cb3dSCy SchubertThis command can be used to configure reference clocks in
22462b15cb3dSCy Schubertspecial ways.
22472b15cb3dSCy SchubertIt must immediately follow the
22482b15cb3dSCy Schubert@code{server}
22492b15cb3dSCy Schubertcommand which configures the driver.
22502b15cb3dSCy SchubertNote that the same capability
22512b15cb3dSCy Schubertis possible at run time using the
22522b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
22532b15cb3dSCy Schubertprogram.
22542b15cb3dSCy SchubertThe options are interpreted as
22552b15cb3dSCy Schubertfollows:
22562b15cb3dSCy Schubert@table @asis
22572b15cb3dSCy Schubert@item @code{time1} @kbd{sec}
22582b15cb3dSCy SchubertSpecifies a constant to be added to the time offset produced by
22592b15cb3dSCy Schubertthe driver, a fixed-point decimal number in seconds.
22602b15cb3dSCy SchubertThis is used
22612b15cb3dSCy Schubertas a calibration constant to adjust the nominal time offset of a
22622b15cb3dSCy Schubertparticular clock to agree with an external standard, such as a
22632b15cb3dSCy Schubertprecision PPS signal.
22642b15cb3dSCy SchubertIt also provides a way to correct a
22652b15cb3dSCy Schubertsystematic error or bias due to serial port or operating system
22662b15cb3dSCy Schubertlatencies, different cable lengths or receiver internal delay.
22672b15cb3dSCy SchubertThe
22682b15cb3dSCy Schubertspecified offset is in addition to the propagation delay provided
22692b15cb3dSCy Schubertby other means, such as internal DIPswitches.
22702b15cb3dSCy SchubertWhere a calibration
22712b15cb3dSCy Schubertfor an individual system and driver is available, an approximate
22722b15cb3dSCy Schubertcorrection is noted in the driver documentation pages.
22732b15cb3dSCy SchubertNote: in order to facilitate calibration when more than one
22742b15cb3dSCy Schubertradio clock or PPS signal is supported, a special calibration
22752b15cb3dSCy Schubertfeature is available.
22762b15cb3dSCy SchubertIt takes the form of an argument to the
22772b15cb3dSCy Schubert@code{enable}
22782b15cb3dSCy Schubertcommand described in
22792b15cb3dSCy Schubert@ref{Miscellaneous Options}
22802b15cb3dSCy Schubertpage and operates as described in the
22812b15cb3dSCy Schubert"Reference Clock Drivers"
22822b15cb3dSCy Schubertpage
22832b15cb3dSCy Schubert(available as part of the HTML documentation
22842b15cb3dSCy Schubertprovided in
22852b15cb3dSCy Schubert@file{/usr/share/doc/ntp}).
22862b15cb3dSCy Schubert@item @code{time2} @kbd{secs}
22872b15cb3dSCy SchubertSpecifies a fixed-point decimal number in seconds, which is
22882b15cb3dSCy Schubertinterpreted in a driver-dependent way.
22892b15cb3dSCy SchubertSee the descriptions of
22902b15cb3dSCy Schubertspecific drivers in the
22912b15cb3dSCy Schubert"Reference Clock Drivers"
22922b15cb3dSCy Schubertpage
22932b15cb3dSCy Schubert(available as part of the HTML documentation
22942b15cb3dSCy Schubertprovided in
229509100258SXin LI@file{/usr/share/doc/ntp} @file{).}
22962b15cb3dSCy Schubert@item @code{stratum} @kbd{int}
22972b15cb3dSCy SchubertSpecifies the stratum number assigned to the driver, an integer
22982b15cb3dSCy Schubertbetween 0 and 15.
22992b15cb3dSCy SchubertThis number overrides the default stratum number
23002b15cb3dSCy Schubertordinarily assigned by the driver itself, usually zero.
23012b15cb3dSCy Schubert@item @code{refid} @kbd{string}
23022b15cb3dSCy SchubertSpecifies an ASCII string of from one to four characters which
23032b15cb3dSCy Schubertdefines the reference identifier used by the driver.
23042b15cb3dSCy SchubertThis string
23052b15cb3dSCy Schubertoverrides the default identifier ordinarily assigned by the driver
23062b15cb3dSCy Schubertitself.
23072b15cb3dSCy Schubert@item @code{mode} @kbd{int}
23082b15cb3dSCy SchubertSpecifies a mode number which is interpreted in a
23092b15cb3dSCy Schubertdevice-specific fashion.
23102b15cb3dSCy SchubertFor instance, it selects a dialing
23112b15cb3dSCy Schubertprotocol in the ACTS driver and a device subtype in the
23122b15cb3dSCy Schubertparse
23132b15cb3dSCy Schubertdrivers.
23142b15cb3dSCy Schubert@item @code{flag1} @code{0} @code{|} @code{1}
23152b15cb3dSCy Schubert@item @code{flag2} @code{0} @code{|} @code{1}
23162b15cb3dSCy Schubert@item @code{flag3} @code{0} @code{|} @code{1}
23172b15cb3dSCy Schubert@item @code{flag4} @code{0} @code{|} @code{1}
23182b15cb3dSCy SchubertThese four flags are used for customizing the clock driver.
23192b15cb3dSCy SchubertThe
23202b15cb3dSCy Schubertinterpretation of these values, and whether they are used at all,
23212b15cb3dSCy Schubertis a function of the particular clock driver.
23222b15cb3dSCy SchubertHowever, by
23232b15cb3dSCy Schubertconvention
23242b15cb3dSCy Schubert@code{flag4}
23252b15cb3dSCy Schubertis used to enable recording monitoring
23262b15cb3dSCy Schubertdata to the
23272b15cb3dSCy Schubert@code{clockstats}
23282b15cb3dSCy Schubertfile configured with the
23292b15cb3dSCy Schubert@code{filegen}
23302b15cb3dSCy Schubertcommand.
23312b15cb3dSCy SchubertFurther information on the
23322b15cb3dSCy Schubert@code{filegen}
23332b15cb3dSCy Schubertcommand can be found in
23342b15cb3dSCy Schubert@ref{Monitoring Options}.
23352b15cb3dSCy Schubert@end table
23362b15cb3dSCy Schubert@end table
23372b15cb3dSCy Schubert@node Miscellaneous Options
23382b15cb3dSCy Schubert@subsection Miscellaneous Options
23392b15cb3dSCy Schubert@table @asis
23402b15cb3dSCy Schubert@item @code{broadcastdelay} @kbd{seconds}
23412b15cb3dSCy SchubertThe broadcast and multicast modes require a special calibration
23422b15cb3dSCy Schubertto determine the network delay between the local and remote
23432b15cb3dSCy Schubertservers.
23442b15cb3dSCy SchubertOrdinarily, this is done automatically by the initial
23452b15cb3dSCy Schubertprotocol exchanges between the client and server.
23462b15cb3dSCy SchubertIn some cases,
23472b15cb3dSCy Schubertthe calibration procedure may fail due to network or server access
23482b15cb3dSCy Schubertcontrols, for example.
23492b15cb3dSCy SchubertThis command specifies the default delay to
23502b15cb3dSCy Schubertbe used under these circumstances.
23512b15cb3dSCy SchubertTypically (for Ethernet), a
23522b15cb3dSCy Schubertnumber between 0.003 and 0.007 seconds is appropriate.
23532b15cb3dSCy SchubertThe default
23542b15cb3dSCy Schubertwhen this command is not used is 0.004 seconds.
23552b15cb3dSCy Schubert@item @code{driftfile} @kbd{driftfile}
23562b15cb3dSCy SchubertThis command specifies the complete path and name of the file used to
23572b15cb3dSCy Schubertrecord the frequency of the local clock oscillator.
23582b15cb3dSCy SchubertThis is the same
23592b15cb3dSCy Schubertoperation as the
23602b15cb3dSCy Schubert@code{-f}
23612b15cb3dSCy Schubertcommand line option.
23622b15cb3dSCy SchubertIf the file exists, it is read at
23632b15cb3dSCy Schubertstartup in order to set the initial frequency and then updated once per
23642b15cb3dSCy Schuberthour with the current frequency computed by the daemon.
23652b15cb3dSCy SchubertIf the file name is
23662b15cb3dSCy Schubertspecified, but the file itself does not exist, the starts with an initial
23672b15cb3dSCy Schubertfrequency of zero and creates the file when writing it for the first time.
23682b15cb3dSCy SchubertIf this command is not given, the daemon will always start with an initial
23692b15cb3dSCy Schubertfrequency of zero.
23702b15cb3dSCy Schubert
23712b15cb3dSCy SchubertThe file format consists of a single line containing a single
23722b15cb3dSCy Schubertfloating point number, which records the frequency offset measured
23732b15cb3dSCy Schubertin parts-per-million (PPM).
23742b15cb3dSCy SchubertThe file is updated by first writing
23752b15cb3dSCy Schubertthe current drift value into a temporary file and then renaming
23762b15cb3dSCy Schubertthis file to replace the old version.
23772b15cb3dSCy SchubertThis implies that
23782b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
23792b15cb3dSCy Schubertmust have write permission for the directory the
23802b15cb3dSCy Schubertdrift file is located in, and that file system links, symbolic or
23812b15cb3dSCy Schubertotherwise, should be avoided.
2382276da39aSCy Schubert@item @code{dscp} @kbd{value}
2383276da39aSCy SchubertThis option specifies the Differentiated Services Control Point (DSCP) value,
23844990d495SXin LIa 6-bit code.
23854990d495SXin LIThe default value is 46, signifying Expedited Forwarding.
2386e27abb66SXin LI@item @code{enable} @code{[@code{auth} | @code{bclient} | @code{calibrate} | @code{kernel} | @code{mode7} | @code{monitor} | @code{ntp} | @code{stats} | @code{peer_clear_digest_early} | @code{unpeer_crypto_early} | @code{unpeer_crypto_nak_early} | @code{unpeer_digest_early}]}
2387e27abb66SXin LI@item @code{disable} @code{[@code{auth} | @code{bclient} | @code{calibrate} | @code{kernel} | @code{mode7} | @code{monitor} | @code{ntp} | @code{stats} | @code{peer_clear_digest_early} | @code{unpeer_crypto_early} | @code{unpeer_crypto_nak_early} | @code{unpeer_digest_early}]}
23882b15cb3dSCy SchubertProvides a way to enable or disable various server options.
23892b15cb3dSCy SchubertFlags not mentioned are unaffected.
23902b15cb3dSCy SchubertNote that all of these flags
23912b15cb3dSCy Schubertcan be controlled remotely using the
23922b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
23932b15cb3dSCy Schubertutility program.
23942b15cb3dSCy Schubert@table @asis
23952b15cb3dSCy Schubert@item @code{auth}
23962b15cb3dSCy SchubertEnables the server to synchronize with unconfigured peers only if the
23972b15cb3dSCy Schubertpeer has been correctly authenticated using either public key or
23982b15cb3dSCy Schubertprivate key cryptography.
23992b15cb3dSCy SchubertThe default for this flag is
24002b15cb3dSCy Schubert@code{enable}.
24012b15cb3dSCy Schubert@item @code{bclient}
24022b15cb3dSCy SchubertEnables the server to listen for a message from a broadcast or
24032b15cb3dSCy Schubertmulticast server, as in the
24042b15cb3dSCy Schubert@code{multicastclient}
24052b15cb3dSCy Schubertcommand with default
24062b15cb3dSCy Schubertaddress.
24072b15cb3dSCy SchubertThe default for this flag is
24082b15cb3dSCy Schubert@code{disable}.
24092b15cb3dSCy Schubert@item @code{calibrate}
24102b15cb3dSCy SchubertEnables the calibrate feature for reference clocks.
24112b15cb3dSCy SchubertThe default for
24122b15cb3dSCy Schubertthis flag is
24132b15cb3dSCy Schubert@code{disable}.
24142b15cb3dSCy Schubert@item @code{kernel}
24152b15cb3dSCy SchubertEnables the kernel time discipline, if available.
24162b15cb3dSCy SchubertThe default for this
24172b15cb3dSCy Schubertflag is
24182b15cb3dSCy Schubert@code{enable}
24192b15cb3dSCy Schubertif support is available, otherwise
24202b15cb3dSCy Schubert@code{disable}.
24212b15cb3dSCy Schubert@item @code{mode7}
24222b15cb3dSCy SchubertEnables processing of NTP mode 7 implementation-specific requests
24232b15cb3dSCy Schubertwhich are used by the deprecated
24242b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
24252b15cb3dSCy Schubertprogram.
24262b15cb3dSCy SchubertThe default for this flag is disable.
24272b15cb3dSCy SchubertThis flag is excluded from runtime configuration using
24282b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}.
24292b15cb3dSCy SchubertThe
24302b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
24312b15cb3dSCy Schubertprogram provides the same capabilities as
24322b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
24332b15cb3dSCy Schubertusing standard mode 6 requests.
24342b15cb3dSCy Schubert@item @code{monitor}
24352b15cb3dSCy SchubertEnables the monitoring facility.
24362b15cb3dSCy SchubertSee the
24372b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)}
24382b15cb3dSCy Schubertprogram
24392b15cb3dSCy Schubertand the
24402b15cb3dSCy Schubert@code{monlist}
24412b15cb3dSCy Schubertcommand or further information.
24422b15cb3dSCy SchubertThe
24432b15cb3dSCy Schubertdefault for this flag is
24442b15cb3dSCy Schubert@code{enable}.
24452b15cb3dSCy Schubert@item @code{ntp}
24462b15cb3dSCy SchubertEnables time and frequency discipline.
24472b15cb3dSCy SchubertIn effect, this switch opens and
24482b15cb3dSCy Schubertcloses the feedback loop, which is useful for testing.
24492b15cb3dSCy SchubertThe default for
24502b15cb3dSCy Schubertthis flag is
24512b15cb3dSCy Schubert@code{enable}.
2452e27abb66SXin LI@item @code{peer_clear_digest_early}
2453e27abb66SXin LIBy default, if
2454e27abb66SXin LI@code{ntpd(1ntpdmdoc)}
2455e27abb66SXin LIis using autokey and it
2456e27abb66SXin LIreceives a crypto-NAK packet that
2457e27abb66SXin LIpasses the duplicate packet and origin timestamp checks
2458e27abb66SXin LIthe peer variables are immediately cleared.
2459e27abb66SXin LIWhile this is generally a feature
2460e27abb66SXin LIas it allows for quick recovery if a server key has changed,
2461e27abb66SXin LIa properly forged and appropriately delivered crypto-NAK packet
2462e27abb66SXin LIcan be used in a DoS attack.
2463e27abb66SXin LIIf you have active noticable problems with this type of DoS attack
2464e27abb66SXin LIthen you should consider
2465e27abb66SXin LIdisabling this option.
2466e27abb66SXin LIYou can check your
2467e27abb66SXin LI@code{peerstats}
2468e27abb66SXin LIfile for evidence of any of these attacks.
2469e27abb66SXin LIThe
2470e27abb66SXin LIdefault for this flag is
2471e27abb66SXin LI@code{enable}.
24722b15cb3dSCy Schubert@item @code{stats}
24732b15cb3dSCy SchubertEnables the statistics facility.
24742b15cb3dSCy SchubertSee the
24752b15cb3dSCy Schubert@ref{Monitoring Options}
24762b15cb3dSCy Schubertsection for further information.
24772b15cb3dSCy SchubertThe default for this flag is
24782b15cb3dSCy Schubert@code{disable}.
247968ba7e87SXin LI@item @code{unpeer_crypto_early}
248068ba7e87SXin LIBy default, if
248168ba7e87SXin LI@code{ntpd(1ntpdmdoc)}
248268ba7e87SXin LIreceives an autokey packet that fails TEST9,
248368ba7e87SXin LIa crypto failure,
248468ba7e87SXin LIthe association is immediately cleared.
248568ba7e87SXin LIThis is almost certainly a feature,
248668ba7e87SXin LIbut if, in spite of the current recommendation of not using autokey,
248768ba7e87SXin LIyou are
248868ba7e87SXin LI.B still
248968ba7e87SXin LIusing autokey
249068ba7e87SXin LI.B and
249168ba7e87SXin LIyou are seeing this sort of DoS attack
249268ba7e87SXin LIdisabling this flag will delay
249368ba7e87SXin LItearing down the association until the reachability counter
249468ba7e87SXin LIbecomes zero.
249568ba7e87SXin LIYou can check your
249668ba7e87SXin LI@code{peerstats}
249768ba7e87SXin LIfile for evidence of any of these attacks.
249868ba7e87SXin LIThe
249968ba7e87SXin LIdefault for this flag is
250068ba7e87SXin LI@code{enable}.
250168ba7e87SXin LI@item @code{unpeer_crypto_nak_early}
250268ba7e87SXin LIBy default, if
250368ba7e87SXin LI@code{ntpd(1ntpdmdoc)}
250468ba7e87SXin LIreceives a crypto-NAK packet that
250568ba7e87SXin LIpasses the duplicate packet and origin timestamp checks
250668ba7e87SXin LIthe association is immediately cleared.
250768ba7e87SXin LIWhile this is generally a feature
250868ba7e87SXin LIas it allows for quick recovery if a server key has changed,
250968ba7e87SXin LIa properly forged and appropriately delivered crypto-NAK packet
251068ba7e87SXin LIcan be used in a DoS attack.
251168ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
251268ba7e87SXin LIthen you should consider
251368ba7e87SXin LIdisabling this option.
251468ba7e87SXin LIYou can check your
251568ba7e87SXin LI@code{peerstats}
251668ba7e87SXin LIfile for evidence of any of these attacks.
251768ba7e87SXin LIThe
251868ba7e87SXin LIdefault for this flag is
251968ba7e87SXin LI@code{enable}.
252068ba7e87SXin LI@item @code{unpeer_digest_early}
252168ba7e87SXin LIBy default, if
252268ba7e87SXin LI@code{ntpd(1ntpdmdoc)}
252368ba7e87SXin LIreceives what should be an authenticated packet
252468ba7e87SXin LIthat passes other packet sanity checks but
252568ba7e87SXin LIcontains an invalid digest
252668ba7e87SXin LIthe association is immediately cleared.
252768ba7e87SXin LIWhile this is generally a feature
252868ba7e87SXin LIas it allows for quick recovery,
252968ba7e87SXin LIif this type of packet is carefully forged and sent
253068ba7e87SXin LIduring an appropriate window it can be used for a DoS attack.
253168ba7e87SXin LIIf you have active noticable problems with this type of DoS attack
253268ba7e87SXin LIthen you should consider
253368ba7e87SXin LIdisabling this option.
253468ba7e87SXin LIYou can check your
253568ba7e87SXin LI@code{peerstats}
253668ba7e87SXin LIfile for evidence of any of these attacks.
253768ba7e87SXin LIThe
253868ba7e87SXin LIdefault for this flag is
253968ba7e87SXin LI@code{enable}.
25402b15cb3dSCy Schubert@end table
25412b15cb3dSCy Schubert@item @code{includefile} @kbd{includefile}
25422b15cb3dSCy SchubertThis command allows additional configuration commands
25432b15cb3dSCy Schubertto be included from a separate file.
25442b15cb3dSCy SchubertInclude files may
25452b15cb3dSCy Schubertbe nested to a depth of five; upon reaching the end of any
25462b15cb3dSCy Schubertinclude file, command processing resumes in the previous
25472b15cb3dSCy Schubertconfiguration file.
25482b15cb3dSCy SchubertThis option is useful for sites that run
25492b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
25502b15cb3dSCy Schuberton multiple hosts, with (mostly) common options (e.g., a
25512b15cb3dSCy Schubertrestriction list).
255209100258SXin LI@item @code{interface} @code{[@code{listen} | @code{ignore} | @code{drop}]} @code{[@code{all} | @code{ipv4} | @code{ipv6} | @code{wildcard} @kbd{name} | @kbd{address} @code{[@code{/} @kbd{prefixlen}]}]}
255309100258SXin LIThe
255409100258SXin LI@code{interface}
255509100258SXin LIdirective controls which network addresses
255609100258SXin LI@code{ntpd(1ntpdmdoc)}
255709100258SXin LIopens, and whether input is dropped without processing.
255809100258SXin LIThe first parameter determines the action for addresses
255909100258SXin LIwhich match the second parameter.
256009100258SXin LIThe second parameter specifies a class of addresses,
256109100258SXin LIor a specific interface name,
256209100258SXin LIor an address.
256309100258SXin LIIn the address case,
256409100258SXin LI@kbd{prefixlen}
256509100258SXin LIdetermines how many bits must match for this rule to apply.
256609100258SXin LI@code{ignore}
256709100258SXin LIprevents opening matching addresses,
256809100258SXin LI@code{drop}
256909100258SXin LIcauses
257009100258SXin LI@code{ntpd(1ntpdmdoc)}
257109100258SXin LIto open the address and drop all received packets without examination.
257209100258SXin LIMultiple
257309100258SXin LI@code{interface}
257409100258SXin LIdirectives can be used.
257509100258SXin LIThe last rule which matches a particular address determines the action for it.
257609100258SXin LI@code{interface}
257709100258SXin LIdirectives are disabled if any
257809100258SXin LI@code{-I},
257909100258SXin LI@code{--interface},
258009100258SXin LI@code{-L},
258109100258SXin LIor
258209100258SXin LI@code{--novirtualips}
258309100258SXin LIcommand-line options are specified in the configuration file,
258409100258SXin LIall available network addresses are opened.
258509100258SXin LIThe
258609100258SXin LI@code{nic}
258709100258SXin LIdirective is an alias for
258809100258SXin LI@code{interface}.
258909100258SXin LI@item @code{leapfile} @kbd{leapfile}
259009100258SXin LIThis command loads the IERS leapseconds file and initializes the
259109100258SXin LIleapsecond values for the next leapsecond event, leapfile expiration
259209100258SXin LItime, and TAI offset.
259309100258SXin LIThe file can be obtained directly from the IERS at
259409100258SXin LI@code{https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list}
259509100258SXin LIor
259609100258SXin LI@code{ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list}.
259709100258SXin LIThe
259809100258SXin LI@code{leapfile}
259909100258SXin LIis scanned when
260009100258SXin LI@code{ntpd(1ntpdmdoc)}
260109100258SXin LIprocesses the
260209100258SXin LI@code{leapfile} @code{directive} @code{or} @code{when}
260309100258SXin LI@code{ntpd} @code{detects} @code{that} @code{the}
260409100258SXin LI@kbd{leapfile}
260509100258SXin LIhas changed.
260609100258SXin LI@code{ntpd}
260709100258SXin LIchecks once a day to see if the
260809100258SXin LI@kbd{leapfile}
260909100258SXin LIhas changed.
261009100258SXin LIThe
261109100258SXin LI@code{update-leap(1update_leapmdoc)}
261209100258SXin LIscript can be run to see if the
261309100258SXin LI@kbd{leapfile}
261409100258SXin LIshould be updated.
2615276da39aSCy Schubert@item @code{leapsmearinterval} @kbd{seconds}
2616276da39aSCy SchubertThis EXPERIMENTAL option is only available if
2617276da39aSCy Schubert@code{ntpd(1ntpdmdoc)}
2618276da39aSCy Schubertwas built with the
2619276da39aSCy Schubert@code{--enable-leap-smear}
2620276da39aSCy Schubertoption to the
2621276da39aSCy Schubert@code{configure}
2622276da39aSCy Schubertscript.
2623276da39aSCy SchubertIt specifies the interval over which a leap second correction will be applied.
2624276da39aSCy SchubertRecommended values for this option are between
2625276da39aSCy Schubert7200 (2 hours) and 86400 (24 hours).
2626276da39aSCy Schubert.Sy DO NOT USE THIS OPTION ON PUBLIC-ACCESS SERVERS!
2627276da39aSCy SchubertSee http://bugs.ntp.org/2855 for more information.
26282b15cb3dSCy Schubert@item @code{logconfig} @kbd{configkeyword}
26292b15cb3dSCy SchubertThis command controls the amount and type of output written to
26302b15cb3dSCy Schubertthe system
26312b15cb3dSCy Schubert@code{syslog(3)}
26322b15cb3dSCy Schubertfacility or the alternate
26332b15cb3dSCy Schubert@code{logfile}
26342b15cb3dSCy Schubertlog file.
26352b15cb3dSCy SchubertBy default, all output is turned on.
26362b15cb3dSCy SchubertAll
26372b15cb3dSCy Schubert@kbd{configkeyword}
26382b15cb3dSCy Schubertkeywords can be prefixed with
26392b15cb3dSCy Schubert@quoteleft{}=@quoteright{},
26402b15cb3dSCy Schubert@quoteleft{}+@quoteright{}
26412b15cb3dSCy Schubertand
26422b15cb3dSCy Schubert@quoteleft{}-@quoteright{},
26432b15cb3dSCy Schubertwhere
26442b15cb3dSCy Schubert@quoteleft{}=@quoteright{}
26452b15cb3dSCy Schubertsets the
26462b15cb3dSCy Schubert@code{syslog(3)}
26472b15cb3dSCy Schubertpriority mask,
26482b15cb3dSCy Schubert@quoteleft{}+@quoteright{}
26492b15cb3dSCy Schubertadds and
26502b15cb3dSCy Schubert@quoteleft{}-@quoteright{}
26512b15cb3dSCy Schubertremoves
26522b15cb3dSCy Schubertmessages.
26532b15cb3dSCy Schubert@code{syslog(3)}
26542b15cb3dSCy Schubertmessages can be controlled in four
26552b15cb3dSCy Schubertclasses
26562b15cb3dSCy Schubert(@code{clock}, @code{peer}, @code{sys} and @code{sync}).
26572b15cb3dSCy SchubertWithin these classes four types of messages can be
26582b15cb3dSCy Schubertcontrolled: informational messages
26592b15cb3dSCy Schubert(@code{info}),
26602b15cb3dSCy Schubertevent messages
26612b15cb3dSCy Schubert(@code{events}),
26622b15cb3dSCy Schubertstatistics messages
26632b15cb3dSCy Schubert(@code{statistics})
26642b15cb3dSCy Schubertand
26652b15cb3dSCy Schubertstatus messages
26662b15cb3dSCy Schubert(@code{status}).
26672b15cb3dSCy Schubert
26682b15cb3dSCy SchubertConfiguration keywords are formed by concatenating the message class with
26692b15cb3dSCy Schubertthe event class.
26702b15cb3dSCy SchubertThe
26712b15cb3dSCy Schubert@code{all}
26722b15cb3dSCy Schubertprefix can be used instead of a message class.
26732b15cb3dSCy SchubertA
26742b15cb3dSCy Schubertmessage class may also be followed by the
26752b15cb3dSCy Schubert@code{all}
26762b15cb3dSCy Schubertkeyword to enable/disable all
26774990d495SXin LImessages of the respective message class.
26784990d495SXin LIThus, a minimal log configuration
26792b15cb3dSCy Schubertcould look like this:
26802b15cb3dSCy Schubert@verbatim
26812b15cb3dSCy Schubertlogconfig =syncstatus +sysevents
26822b15cb3dSCy Schubert@end verbatim
26832b15cb3dSCy Schubert
26842b15cb3dSCy SchubertThis would just list the synchronizations state of
26852b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)}
26862b15cb3dSCy Schubertand the major system events.
26872b15cb3dSCy SchubertFor a simple reference server, the
26882b15cb3dSCy Schubertfollowing minimum message configuration could be useful:
26892b15cb3dSCy Schubert@verbatim
26902b15cb3dSCy Schubertlogconfig =syncall +clockall
26912b15cb3dSCy Schubert@end verbatim
26922b15cb3dSCy Schubert
26932b15cb3dSCy SchubertThis configuration will list all clock information and
26942b15cb3dSCy Schubertsynchronization information.
26952b15cb3dSCy SchubertAll other events and messages about
26962b15cb3dSCy Schubertpeers, system events and so on is suppressed.
26972b15cb3dSCy Schubert@item @code{logfile} @kbd{logfile}
26982b15cb3dSCy SchubertThis command specifies the location of an alternate log file to
26992b15cb3dSCy Schubertbe used instead of the default system
27002b15cb3dSCy Schubert@code{syslog(3)}
27012b15cb3dSCy Schubertfacility.
27024990d495SXin LIThis is the same operation as the
27034990d495SXin LI@code{-l}
27044990d495SXin LIcommand line option.
270509100258SXin LI@item @code{mru} @code{[@code{maxdepth} @kbd{count} | @code{maxmem} @kbd{kilobytes} | @code{mindepth} @kbd{count} | @code{maxage} @kbd{seconds} | @code{initialloc} @kbd{count} | @code{initmem} @kbd{kilobytes} | @code{incalloc} @kbd{count} | @code{incmem} @kbd{kilobytes}]}
270609100258SXin LIControls size limite of the monitoring facility's Most Recently Used
270709100258SXin LI(MRU) list
270809100258SXin LIof client addresses, which is also used by the
270909100258SXin LIrate control facility.
271009100258SXin LI@table @asis
271109100258SXin LI@item @code{maxdepth} @kbd{count}
271209100258SXin LI@item @code{maxmem} @kbd{kilobytes}
271309100258SXin LIEquivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
271409100258SXin LIThe acutal limit will be up to
271509100258SXin LI@code{incalloc}
271609100258SXin LIentries or
271709100258SXin LI@code{incmem}
271809100258SXin LIkilobytes larger.
271909100258SXin LIAs with all of the
272009100258SXin LI@code{mru}
272109100258SXin LIoptions offered in units of entries or kilobytes, if both
272209100258SXin LI@code{maxdepth}
272309100258SXin LIand
272409100258SXin LI@code{maxmem} @code{are} @code{used,} @code{the} @code{last} @code{one} @code{used} @code{controls.}
272509100258SXin LIThe default is 1024 kilobytes.
272609100258SXin LI@item @code{mindepth} @kbd{count}
272709100258SXin LILower limit on the MRU list size.
272809100258SXin LIWhen the MRU list has fewer than
272909100258SXin LI@code{mindepth}
273009100258SXin LIentries, existing entries are never removed to make room for newer ones,
273109100258SXin LIregardless of their age.
273209100258SXin LIThe default is 600 entries.
273309100258SXin LI@item @code{maxage} @kbd{seconds}
273409100258SXin LIOnce the MRU list has
273509100258SXin LI@code{mindepth}
273609100258SXin LIentries and an additional client is to ba added to the list,
273709100258SXin LIif the oldest entry was updated more than
273809100258SXin LI@code{maxage}
273909100258SXin LIseconds ago, that entry is removed and its storage is reused.
274009100258SXin LIIf the oldest entry was updated more recently the MRU list is grown,
274109100258SXin LIsubject to
274209100258SXin LI@code{maxdepth} @code{/} @code{moxmem}.
274309100258SXin LIThe default is 64 seconds.
274409100258SXin LI@item @code{initalloc} @kbd{count}
274509100258SXin LI@item @code{initmem} @kbd{kilobytes}
274609100258SXin LIInitial memory allocation at the time the monitoringfacility is first enabled,
274709100258SXin LIin terms of the number of entries or kilobytes.
274809100258SXin LIThe default is 4 kilobytes.
274909100258SXin LI@item @code{incalloc} @kbd{count}
275009100258SXin LI@item @code{incmem} @kbd{kilobytes}
275109100258SXin LISize of additional memory allocations when growing the MRU list, in entries or kilobytes.
275209100258SXin LIThe default is 4 kilobytes.
275309100258SXin LI@end table
275409100258SXin LI@item @code{nonvolatile} @kbd{threshold}
275509100258SXin LISpecify the
275609100258SXin LI@kbd{threshold}
275709100258SXin LIdelta in seconds before an hourly change to the
275809100258SXin LI@code{driftfile}
275909100258SXin LI(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
276009100258SXin LIThe frequency file is inspected each hour.
276109100258SXin LIIf the difference between the current frequency and the last value written
276209100258SXin LIexceeds the threshold, the file is written and the
276309100258SXin LI@code{threshold}
276409100258SXin LIbecomes the new threshold value.
276509100258SXin LIIf the threshold is not exceeeded, it is reduced by half.
276609100258SXin LIThis is intended to reduce the number of file writes
276709100258SXin LIfor embedded systems with nonvolatile memory.
276809100258SXin LI@item @code{phone} @kbd{dial} @kbd{...}
276909100258SXin LIThis command is used in conjunction with
277009100258SXin LIthe ACTS modem driver (type 18)
277109100258SXin LIor the JJY driver (type 40, mode 100 - 180).
277209100258SXin LIFor the ACTS modem driver (type 18), the arguments consist of
277309100258SXin LIa maximum of 10 telephone numbers used to dial USNO, NIST, or European
277409100258SXin LItime service.
277509100258SXin LIFor the JJY driver (type 40 mode 100 - 180), the argument is
277609100258SXin LIone telephone number used to dial the telephone JJY service.
277709100258SXin LIThe Hayes command ATDT is normally prepended to the number.
277809100258SXin LIThe number can contain other modem control codes as well.
2779a466cc55SCy Schubert@item @code{pollskewlist} @code{[@kbd{poll} @kbd{early} @kbd{late}]} @kbd{...} @code{[@code{default} @kbd{early} @kbd{late}]}
27802d4e511cSCy SchubertEnable skewing of our poll requests to our servers.
27812d4e511cSCy Schubert@kbd{poll}
27822d4e511cSCy Schubertis a number between 3 and 17 inclusive, identifying a specific poll interval.
27832d4e511cSCy SchubertA poll interval is 2^n seconds in duration,
27842d4e511cSCy Schubertso a poll value of 3 corresponds to 8 seconds
27852d4e511cSCy Schubertand
27862d4e511cSCy Schuberta poll interval of 17 corresponds to
27872d4e511cSCy Schubert131,072 seconds, or about a day and a half.
27882d4e511cSCy SchubertThe next two numbers must be between 0 and one-half of the poll interval,
27892d4e511cSCy Schubertinclusive.
2790a466cc55SCy SchubertAr early
2791a466cc55SCy Schubertspecifies how early the poll may start,
27922d4e511cSCy Schubertwhile
2793a466cc55SCy SchubertAr late
2794a466cc55SCy Schubertspecifies how late the poll may be delayed.
27952d4e511cSCy SchubertWith no arguments, internally specified default values are chosen.
279609100258SXin LI@item @code{reset} @code{[@code{allpeers}]} @code{[@code{auth}]} @code{[@code{ctl}]} @code{[@code{io}]} @code{[@code{mem}]} @code{[@code{sys}]} @code{[@code{timer}]}
279709100258SXin LIReset one or more groups of counters maintained by
279809100258SXin LI@code{ntpd}
279909100258SXin LIand exposed by
280009100258SXin LI@code{ntpq}
280109100258SXin LIand
280209100258SXin LI@code{ntpdc}.
280309100258SXin LI@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
280409100258SXin LI@table @asis
280509100258SXin LI@item @code{memlock} @kbd{Nmegabytes}
280609100258SXin LISpecify the number of megabytes of memory that should be
280709100258SXin LIallocated and locked.
280809100258SXin LIProbably only available under Linux, this option may be useful
280909100258SXin LIwhen dropping root (the
281009100258SXin LI@code{-i}
281109100258SXin LIoption).
281209100258SXin LIThe default is 32 megabytes on non-Linux machines, and -1 under Linux.
281309100258SXin LI-1 means "do not lock the process into memory".
281409100258SXin LI0 means "lock whatever memory the process wants into memory".
281509100258SXin LI@item @code{stacksize} @kbd{N4kPages}
281609100258SXin LISpecifies the maximum size of the process stack on systems with the
281709100258SXin LI@code{mlockall()}
281809100258SXin LIfunction.
281909100258SXin LIDefaults to 50 4k pages (200 4k pages in OpenBSD).
282009100258SXin LI@item @code{filenum} @kbd{Nfiledescriptors}
282109100258SXin LISpecifies the maximum number of file descriptors ntpd may have open at once.
282209100258SXin LIDefaults to the system default.
282309100258SXin LI@end table
282409100258SXin LI@item @code{saveconfigdir} @kbd{directory_path}
282509100258SXin LISpecify the directory in which to write configuration snapshots
282609100258SXin LIrequested with
282709100258SXin LI.Cm ntpq 's
282809100258SXin LI@code{saveconfig}
282909100258SXin LIcommand.
283009100258SXin LIIf
283109100258SXin LI@code{saveconfigdir}
283209100258SXin LIdoes not appear in the configuration file,
283309100258SXin LI@code{saveconfig}
283409100258SXin LIrequests are rejected by
283509100258SXin LI@code{ntpd}.
283609100258SXin LI@item @code{saveconfig} @kbd{filename}
283709100258SXin LIWrite the current configuration, including any runtime
283809100258SXin LImodifications given with
283909100258SXin LI@code{:config}
284009100258SXin LIor
284109100258SXin LI@code{config-from-file}
284209100258SXin LIto the
284309100258SXin LI@code{ntpd}
284409100258SXin LIhost's
284509100258SXin LI@kbd{filename}
284609100258SXin LIin the
284709100258SXin LI@code{saveconfigdir}.
284809100258SXin LIThis command will be rejected unless the
284909100258SXin LI@code{saveconfigdir}
285009100258SXin LIdirective appears in
285109100258SXin LI.Cm ntpd 's
285209100258SXin LIconfiguration file.
285309100258SXin LI@kbd{filename}
285409100258SXin LIcan use
285509100258SXin LI@code{strftime(3)}
285609100258SXin LIformat directives to substitute the current date and time,
285709100258SXin LIfor example,
285809100258SXin LI@code{saveconfig\ ntp-%Y%m%d-%H%M%S.conf}.
285909100258SXin LIThe filename used is stored in the system variable
286009100258SXin LI@code{savedconfig}.
286109100258SXin LIAuthentication is required.
28622b15cb3dSCy Schubert@item @code{setvar} @kbd{variable} @code{[@code{default}]}
28632b15cb3dSCy SchubertThis command adds an additional system variable.
28642b15cb3dSCy SchubertThese
28652b15cb3dSCy Schubertvariables can be used to distribute additional information such as
28662b15cb3dSCy Schubertthe access policy.
28672b15cb3dSCy SchubertIf the variable of the form
28682b15cb3dSCy Schubert@code{name}@code{=}@kbd{value}
28692b15cb3dSCy Schubertis followed by the
28702b15cb3dSCy Schubert@code{default}
28712b15cb3dSCy Schubertkeyword, the
28722b15cb3dSCy Schubertvariable will be listed as part of the default system variables
28732b15cb3dSCy Schubert(@code{rv} command)).
28742b15cb3dSCy SchubertThese additional variables serve
28752b15cb3dSCy Schubertinformational purposes only.
28762b15cb3dSCy SchubertThey are not related to the protocol
28772b15cb3dSCy Schubertother that they can be listed.
28782b15cb3dSCy SchubertThe known protocol variables will
28792b15cb3dSCy Schubertalways override any variables defined via the
28802b15cb3dSCy Schubert@code{setvar}
28812b15cb3dSCy Schubertmechanism.
28822b15cb3dSCy SchubertThere are three special variables that contain the names
28832b15cb3dSCy Schubertof all variable of the same group.
28842b15cb3dSCy SchubertThe
28852b15cb3dSCy Schubert@code{sys_var_list}
28862b15cb3dSCy Schubertholds
28872b15cb3dSCy Schubertthe names of all system variables.
28882b15cb3dSCy SchubertThe
28892b15cb3dSCy Schubert@code{peer_var_list}
28902b15cb3dSCy Schubertholds
28912b15cb3dSCy Schubertthe names of all peer variables and the
28922b15cb3dSCy Schubert@code{clock_var_list}
28932b15cb3dSCy Schubertholds the names of the reference clock variables.
289409100258SXin LI@item @code{sysinfo}
289509100258SXin LIDisplay operational summary.
289609100258SXin LI@item @code{sysstats}
289709100258SXin LIShow statistics counters maintained in the protocol module.
2898a25439b6SCy Schubert@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{step} | @code{stepback} @kbd{stepback} | @code{stepfwd} @kbd{stepfwd} | @code{stepout} @kbd{stepout}]}
28992b15cb3dSCy SchubertThis command can be used to alter several system variables in
29002b15cb3dSCy Schubertvery exceptional circumstances.
29012b15cb3dSCy SchubertIt should occur in the
29022b15cb3dSCy Schubertconfiguration file before any other configuration options.
29032b15cb3dSCy SchubertThe
29042b15cb3dSCy Schubertdefault values of these variables have been carefully optimized for
29052b15cb3dSCy Schuberta wide range of network speeds and reliability expectations.
29062b15cb3dSCy SchubertIn
29072b15cb3dSCy Schubertgeneral, they interact in intricate ways that are hard to predict
29082b15cb3dSCy Schubertand some combinations can result in some very nasty behavior.
29092b15cb3dSCy SchubertVery
29102b15cb3dSCy Schubertrarely is it necessary to change the default values; but, some
29112b15cb3dSCy Schubertfolks cannot resist twisting the knobs anyway and this command is
29122b15cb3dSCy Schubertfor them.
29132b15cb3dSCy SchubertEmphasis added: twisters are on their own and can expect
29142b15cb3dSCy Schubertno help from the support group.
29152b15cb3dSCy Schubert
29162b15cb3dSCy SchubertThe variables operate as follows:
29172b15cb3dSCy Schubert@table @asis
29182b15cb3dSCy Schubert@item @code{allan} @kbd{allan}
29192b15cb3dSCy SchubertThe argument becomes the new value for the minimum Allan
29202b15cb3dSCy Schubertintercept, which is a parameter of the PLL/FLL clock discipline
29212b15cb3dSCy Schubertalgorithm.
29222b15cb3dSCy SchubertThe value in log2 seconds defaults to 7 (1024 s), which is also the lower
29232b15cb3dSCy Schubertlimit.
29242b15cb3dSCy Schubert@item @code{dispersion} @kbd{dispersion}
29252b15cb3dSCy SchubertThe argument becomes the new value for the dispersion increase rate,
29262b15cb3dSCy Schubertnormally .000015 s/s.
29272b15cb3dSCy Schubert@item @code{freq} @kbd{freq}
29282b15cb3dSCy SchubertThe argument becomes the initial value of the frequency offset in
29292b15cb3dSCy Schubertparts-per-million.
29302b15cb3dSCy SchubertThis overrides the value in the frequency file, if
29312b15cb3dSCy Schubertpresent, and avoids the initial training state if it is not.
29322b15cb3dSCy Schubert@item @code{huffpuff} @kbd{huffpuff}
29332b15cb3dSCy SchubertThe argument becomes the new value for the experimental
29342b15cb3dSCy Schuberthuff-n'-puff filter span, which determines the most recent interval
29352b15cb3dSCy Schubertthe algorithm will search for a minimum delay.
29362b15cb3dSCy SchubertThe lower limit is
29372b15cb3dSCy Schubert900 s (15 m), but a more reasonable value is 7200 (2 hours).
29382b15cb3dSCy SchubertThere
29392b15cb3dSCy Schubertis no default, since the filter is not enabled unless this command
29402b15cb3dSCy Schubertis given.
29412b15cb3dSCy Schubert@item @code{panic} @kbd{panic}
29422b15cb3dSCy SchubertThe argument is the panic threshold, normally 1000 s.
29432b15cb3dSCy SchubertIf set to zero,
29442b15cb3dSCy Schubertthe panic sanity check is disabled and a clock offset of any value will
29452b15cb3dSCy Schubertbe accepted.
29462b15cb3dSCy Schubert@item @code{step} @kbd{step}
29472b15cb3dSCy SchubertThe argument is the step threshold, which by default is 0.128 s.
29482b15cb3dSCy SchubertIt can
29492b15cb3dSCy Schubertbe set to any positive number in seconds.
29502b15cb3dSCy SchubertIf set to zero, step
29512b15cb3dSCy Schubertadjustments will never occur.
29522b15cb3dSCy SchubertNote: The kernel time discipline is
29532b15cb3dSCy Schubertdisabled if the step threshold is set to zero or greater than the
29542b15cb3dSCy Schubertdefault.
2955a25439b6SCy Schubert@item @code{stepback} @kbd{stepback}
2956a25439b6SCy SchubertThe argument is the step threshold for the backward direction,
2957a25439b6SCy Schubertwhich by default is 0.128 s.
2958a25439b6SCy SchubertIt can
2959a25439b6SCy Schubertbe set to any positive number in seconds.
2960a25439b6SCy SchubertIf both the forward and backward step thresholds are set to zero, step
2961a25439b6SCy Schubertadjustments will never occur.
2962a25439b6SCy SchubertNote: The kernel time discipline is
2963a25439b6SCy Schubertdisabled if
2964a25439b6SCy Schuberteach direction of step threshold are either
2965a25439b6SCy Schubertset to zero or greater than .5 second.
2966a25439b6SCy Schubert@item @code{stepfwd} @kbd{stepfwd}
2967a25439b6SCy SchubertAs for stepback, but for the forward direction.
29682b15cb3dSCy Schubert@item @code{stepout} @kbd{stepout}
29692b15cb3dSCy SchubertThe argument is the stepout timeout, which by default is 900 s.
29702b15cb3dSCy SchubertIt can
29712b15cb3dSCy Schubertbe set to any positive number in seconds.
29722b15cb3dSCy SchubertIf set to zero, the stepout
29732b15cb3dSCy Schubertpulses will not be suppressed.
29742b15cb3dSCy Schubert@end table
297509100258SXin LI@item @code{writevar} @kbd{assocID\ name} @kbd{=} @kbd{value} @kbd{[,...]}
297609100258SXin LIWrite (create or update) the specified variables.
297709100258SXin LIIf the
297809100258SXin LI@code{assocID}
297909100258SXin LIis zero, the variablea re from the
298009100258SXin LIsystem variables
298109100258SXin LIname space, otherwise they are from the
298209100258SXin LIpeer variables
298309100258SXin LIname space.
298409100258SXin LIThe
298509100258SXin LI@code{assocID}
298609100258SXin LIis required, as the same name can occur in both name spaces.
29872b15cb3dSCy Schubert@item @code{trap} @kbd{host_address} @code{[@code{port} @kbd{port_number}]} @code{[@code{interface} @kbd{interface_address}]}
29882b15cb3dSCy SchubertThis command configures a trap receiver at the given host
29892b15cb3dSCy Schubertaddress and port number for sending messages with the specified
29902b15cb3dSCy Schubertlocal interface address.
29912b15cb3dSCy SchubertIf the port number is unspecified, a value
29922b15cb3dSCy Schubertof 18447 is used.
29932b15cb3dSCy SchubertIf the interface address is not specified, the
29942b15cb3dSCy Schubertmessage is sent with a source address of the local interface the
29952b15cb3dSCy Schubertmessage is sent through.
29962b15cb3dSCy SchubertNote that on a multihomed host the
29972b15cb3dSCy Schubertinterface used may vary from time to time with routing changes.
299809100258SXin LI@item @code{ttl} @kbd{hop} @kbd{...}
299909100258SXin LIThis command specifies a list of TTL values in increasing order.
300009100258SXin LIUp to 8 values can be specified.
300109100258SXin LIIn
300209100258SXin LI@code{manycast}
300309100258SXin LImode these values are used in-turn in an expanding-ring search.
300409100258SXin LIThe default is eight multiples of 32 starting at 31.
30052b15cb3dSCy Schubert
30062b15cb3dSCy SchubertThe trap receiver will generally log event messages and other
30072b15cb3dSCy Schubertinformation from the server in a log file.
30082b15cb3dSCy SchubertWhile such monitor
30092b15cb3dSCy Schubertprograms may also request their own trap dynamically, configuring a
30102b15cb3dSCy Schuberttrap receiver will ensure that no messages are lost when the server
30112b15cb3dSCy Schubertis started.
30122b15cb3dSCy Schubert@item @code{hop} @kbd{...}
30132b15cb3dSCy SchubertThis command specifies a list of TTL values in increasing order, up to 8
30142b15cb3dSCy Schubertvalues can be specified.
30152b15cb3dSCy SchubertIn manycast mode these values are used in turn in
30162b15cb3dSCy Schubertan expanding-ring search.
30172b15cb3dSCy SchubertThe default is eight multiples of 32 starting at
30182b15cb3dSCy Schubert31.
30192b15cb3dSCy Schubert@end table
30202b15cb3dSCy Schubert
30212b15cb3dSCy SchubertThis section was generated by @strong{AutoGen},
30222b15cb3dSCy Schubertusing the @code{agtexi-cmd} template and the option descriptions for the @code{ntp.conf} program.
30232b15cb3dSCy SchubertThis software is released under the NTP license, <http://ntp.org/license>.
30242b15cb3dSCy Schubert
30252b15cb3dSCy Schubert@menu
30262b15cb3dSCy Schubert* ntp.conf Files::                  Files
30272b15cb3dSCy Schubert* ntp.conf See Also::               See Also
30282b15cb3dSCy Schubert* ntp.conf Bugs::                   Bugs
30292b15cb3dSCy Schubert* ntp.conf Notes::                  Notes
30302b15cb3dSCy Schubert@end menu
30312b15cb3dSCy Schubert
30322b15cb3dSCy Schubert@node ntp.conf Files
30332b15cb3dSCy Schubert@subsection ntp.conf Files
30342b15cb3dSCy Schubert@table @asis
30352b15cb3dSCy Schubert@item @file{/etc/ntp.conf}
30362b15cb3dSCy Schubertthe default name of the configuration file
30372b15cb3dSCy Schubert@item @file{ntp.keys}
30382b15cb3dSCy Schubertprivate MD5 keys
30392b15cb3dSCy Schubert@item @file{ntpkey}
30402b15cb3dSCy SchubertRSA private key
30412b15cb3dSCy Schubert@item @file{ntpkey_}@kbd{host}
30422b15cb3dSCy SchubertRSA public key
30432b15cb3dSCy Schubert@item @file{ntp_dh}
30442b15cb3dSCy SchubertDiffie-Hellman agreement parameters
30452b15cb3dSCy Schubert@end table
30462b15cb3dSCy Schubert@node ntp.conf See Also
30472b15cb3dSCy Schubert@subsection ntp.conf See Also
30482b15cb3dSCy Schubert@code{ntpd(1ntpdmdoc)},
30492b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)},
30502b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)}
30512b15cb3dSCy Schubert
30522b15cb3dSCy SchubertIn addition to the manual pages provided,
30532b15cb3dSCy Schubertcomprehensive documentation is available on the world wide web
30542b15cb3dSCy Schubertat
30552b15cb3dSCy Schubert@code{http://www.ntp.org/}.
30562b15cb3dSCy SchubertA snapshot of this documentation is available in HTML format in
30572b15cb3dSCy Schubert@file{/usr/share/doc/ntp}.
30582b15cb3dSCy Schubert@*
30592b15cb3dSCy Schubert
30602b15cb3dSCy Schubert@*
30612b15cb3dSCy SchubertDavid L. Mills, @emph{Network Time Protocol (Version 4)}, RFC5905
30622b15cb3dSCy Schubert@node ntp.conf Bugs
30632b15cb3dSCy Schubert@subsection ntp.conf Bugs
30642b15cb3dSCy SchubertThe syntax checking is not picky; some combinations of
30652b15cb3dSCy Schubertridiculous and even hilarious options and modes may not be
30662b15cb3dSCy Schubertdetected.
30672b15cb3dSCy Schubert
30682b15cb3dSCy SchubertThe
30692b15cb3dSCy Schubert@file{ntpkey_}@kbd{host}
30702b15cb3dSCy Schubertfiles are really digital
30712b15cb3dSCy Schubertcertificates.
30722b15cb3dSCy SchubertThese should be obtained via secure directory
30732b15cb3dSCy Schubertservices when they become universally available.
30742b15cb3dSCy Schubert@node ntp.conf Notes
30752b15cb3dSCy Schubert@subsection ntp.conf Notes
30762b15cb3dSCy SchubertThis document was derived from FreeBSD.
3077