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