+(4.3.97) 2019/06/06 Released by Harlan Stenn <stenn@ntp.org>
From 4.2.8p11:
---
(4.2.8p11) 2018/02/27 Released by Harlan Stenn <stenn@ntp.org>
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 07:24:57 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:18:54 PM by AutoGen 5.18.5
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@code{monitor}
subcommand specifies the probability of discard
for packets that overflow the rate-control window.
-@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@kbd{flag} @kbd{...}]}
+@item @code{restrict} @code{address} @code{[@code{mask} @kbd{mask}]} @code{[@code{ippeerlimit} @kbd{int}]} @code{[@kbd{flag} @kbd{...}]}
The
@kbd{address}
argument expressed in
@code{default},
with no mask option, may
be used to indicate the default entry.
+The
+@code{ippeerlimit}
+directive limits the number of peer requests for each IP to
+@kbd{int},
+where a value of -1 means "unlimited", the current default.
+A value of 0 means "none".
+There would usually be at most 1 peering request per IP,
+but if the remote peering requests are behind a proxy
+there could well be more than 1 per IP.
In the current implementation,
@code{flag}
always
This flag
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
+@item @code{noepeer}
+Deny ephemeral peer requests,
+even if they come from an authenticated source.
+Note that the ability to use a symmetric key for authentication may be restricted to
+one or more IPs or subnets via the third field of the
+@file{ntp.keys}
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+@code{noepeer}
+to become the default in ntp-4.4.
@item @code{nomodify}
Deny
@code{ntpq(1ntpqmdoc)}
queries.
Time service is not affected.
@item @code{nopeer}
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+Deny unauthenticated packets which would result in mobilizing a new association.
+This includes
+broadcast and symmetric active packets
+when a configured association does not exist.
It also includes
@code{pool}
associations, so if you want to use servers from a
directive and also want to use
@code{nopeer}
by default, you'll want a
-@code{restrict source ...} @code{line} @code{as} @code{well} @code{that} @code{does}
-@item not
+@code{restrict source ...}
+line as well that does
+@emph{not}
include the
@code{nopeer}
directive.
as soon as possible.
Attacks such as replay attacks can happen, however,
and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
+broadcast mode, attempts to perform a replay attack are possible.
This value defaults to 0, but can be changed
to any number of poll intervals between 0 and 4.
+@end table
@subsubsection Manycast Options
@table @asis
@item @code{tos} @code{[@code{ceiling} @kbd{ceiling} | @code{cohort} @code{@{} @code{0} | @code{1} @code{@}} | @code{floor} @kbd{floor} | @code{minclock} @kbd{minclock} | @code{minsane} @kbd{minsane}]}
page
(available as part of the HTML documentation
provided in
-@file{/usr/share/doc/ntp}).
+@file{/usr/share/doc/ntp} @file{).}
@item @code{stratum} @kbd{int}
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
@code{ntpd(1ntpdmdoc)}
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+@item @code{interface} @code{[@code{listen} | @code{ignore} | @code{drop}]} @code{[@code{all} | @code{ipv4} | @code{ipv6} | @code{wildcard} @kbd{name} | @kbd{address} @code{[@code{/} @kbd{prefixlen}]}]}
+The
+@code{interface}
+directive controls which network addresses
+@code{ntpd(1ntpdmdoc)}
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+@kbd{prefixlen}
+determines how many bits must match for this rule to apply.
+@code{ignore}
+prevents opening matching addresses,
+@code{drop}
+causes
+@code{ntpd(1ntpdmdoc)}
+to open the address and drop all received packets without examination.
+Multiple
+@code{interface}
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+@code{interface}
+directives are disabled if any
+@code{-I},
+@code{--interface},
+@code{-L},
+or
+@code{--novirtualips}
+command-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+@code{nic}
+directive is an alias for
+@code{interface}.
+@item @code{leapfile} @kbd{leapfile}
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+@code{https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list}
+or
+@code{ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list}.
+The
+@code{leapfile}
+is scanned when
+@code{ntpd(1ntpdmdoc)}
+processes the
+@code{leapfile} @code{directive} @code{or} @code{when}
+@code{ntpd} @code{detects} @code{that} @code{the}
+@kbd{leapfile}
+has changed.
+@code{ntpd}
+checks once a day to see if the
+@kbd{leapfile}
+has changed.
+The
+@code{update-leap(1update_leapmdoc)}
+script can be run to see if the
+@kbd{leapfile}
+should be updated.
@item @code{leapsmearinterval} @kbd{seconds}
This EXPERIMENTAL option is only available if
@code{ntpd(1ntpdmdoc)}
This is the same operation as the
@code{-l}
command line option.
+@item @code{mru} @code{[@code{maxdepth} @kbd{count} | @code{maxmem} @kbd{kilobytes} | @code{mindepth} @kbd{count} | @code{maxage} @kbd{seconds} | @code{initialloc} @kbd{count} | @code{initmem} @kbd{kilobytes} | @code{incalloc} @kbd{count} | @code{incmem} @kbd{kilobytes}]}
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+@table @asis
+@item @code{maxdepth} @kbd{count}
+@item @code{maxmem} @kbd{kilobytes}
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+@code{incalloc}
+entries or
+@code{incmem}
+kilobytes larger.
+As with all of the
+@code{mru}
+options offered in units of entries or kilobytes, if both
+@code{maxdepth}
+and
+@code{maxmem} @code{are} @code{used,} @code{the} @code{last} @code{one} @code{used} @code{controls.}
+The default is 1024 kilobytes.
+@item @code{mindepth} @kbd{count}
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+@code{mindepth}
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+@item @code{maxage} @kbd{seconds}
+Once the MRU list has
+@code{mindepth}
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+@code{maxage}
+seconds ago, that entry is removed and its storage is reused.
+If the oldest entry was updated more recently the MRU list is grown,
+subject to
+@code{maxdepth} @code{/} @code{moxmem}.
+The default is 64 seconds.
+@item @code{initalloc} @kbd{count}
+@item @code{initmem} @kbd{kilobytes}
+Initial memory allocation at the time the monitoringfacility is first enabled,
+in terms of the number of entries or kilobytes.
+The default is 4 kilobytes.
+@item @code{incalloc} @kbd{count}
+@item @code{incmem} @kbd{kilobytes}
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+@end table
+@item @code{nonvolatile} @kbd{threshold}
+Specify the
+@kbd{threshold}
+delta in seconds before an hourly change to the
+@code{driftfile}
+(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
+The frequency file is inspected each hour.
+If the difference between the current frequency and the last value written
+exceeds the threshold, the file is written and the
+@code{threshold}
+becomes the new threshold value.
+If the threshold is not exceeeded, it is reduced by half.
+This is intended to reduce the number of file writes
+for embedded systems with nonvolatile memory.
+@item @code{phone} @kbd{dial} @kbd{...}
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+or the JJY driver (type 40, mode 100 - 180).
+For the ACTS modem driver (type 18), the arguments consist of
+a maximum of 10 telephone numbers used to dial USNO, NIST, or European
+time service.
+For the JJY driver (type 40 mode 100 - 180), the argument is
+one telephone number used to dial the telephone JJY service.
+The Hayes command ATDT is normally prepended to the number.
+The number can contain other modem control codes as well.
+@item @code{reset} @code{[@code{allpeers}]} @code{[@code{auth}]} @code{[@code{ctl}]} @code{[@code{io}]} @code{[@code{mem}]} @code{[@code{sys}]} @code{[@code{timer}]}
+Reset one or more groups of counters maintained by
+@code{ntpd}
+and exposed by
+@code{ntpq}
+and
+@code{ntpdc}.
+@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
+@table @asis
+@item @code{memlock} @kbd{Nmegabytes}
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
+when dropping root (the
+@code{-i}
+option).
+The default is 32 megabytes on non-Linux machines, and -1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
+@item @code{stacksize} @kbd{N4kPages}
+Specifies the maximum size of the process stack on systems with the
+@code{mlockall()}
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+@item @code{filenum} @kbd{Nfiledescriptors}
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+@end table
+@item @code{saveconfigdir} @kbd{directory_path}
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+@code{saveconfig}
+command.
+If
+@code{saveconfigdir}
+does not appear in the configuration file,
+@code{saveconfig}
+requests are rejected by
+@code{ntpd}.
+@item @code{saveconfig} @kbd{filename}
+Write the current configuration, including any runtime
+modifications given with
+@code{:config}
+or
+@code{config-from-file}
+to the
+@code{ntpd}
+host's
+@kbd{filename}
+in the
+@code{saveconfigdir}.
+This command will be rejected unless the
+@code{saveconfigdir}
+directive appears in
+.Cm ntpd 's
+configuration file.
+@kbd{filename}
+can use
+@code{strftime(3)}
+format directives to substitute the current date and time,
+for example,
+@code{saveconfig\ ntp-%Y%m%d-%H%M%S.conf}.
+The filename used is stored in the system variable
+@code{savedconfig}.
+Authentication is required.
@item @code{setvar} @kbd{variable} @code{[@code{default}]}
This command adds an additional system variable.
These
the names of all peer variables and the
@code{clock_var_list}
holds the names of the reference clock variables.
+@item @code{sysinfo}
+Display operational summary.
+@item @code{sysstats}
+Show statistics counters maintained in the protocol module.
@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{step} | @code{stepback} @kbd{stepback} | @code{stepfwd} @kbd{stepfwd} | @code{stepout} @kbd{stepout}]}
This command can be used to alter several system variables in
very exceptional circumstances.
If set to zero, the stepout
pulses will not be suppressed.
@end table
-@item @code{rlimit} @code{[@code{memlock} @kbd{Nmegabytes} | @code{stacksize} @kbd{N4kPages} @code{filenum} @kbd{Nfiledescriptors}]}
-@table @asis
-@item @code{memlock} @kbd{Nmegabytes}
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-@code{-i}
-option).
-The default is 32 megabytes on non-Linux machines, and -1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-@item @code{stacksize} @kbd{N4kPages}
-Specifies the maximum size of the process stack on systems with the
-@code{mlockall()}
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-@item @code{filenum} @kbd{Nfiledescriptors}
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-@end table
+@item @code{writevar} @kbd{assocID\ name} @kbd{=} @kbd{value} @kbd{[,...]}
+Write (create or update) the specified variables.
+If the
+@code{assocID}
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+@code{assocID}
+is required, as the same name can occur in both name spaces.
@item @code{trap} @kbd{host_address} @code{[@code{port} @kbd{port_number}]} @code{[@code{interface} @kbd{interface_address}]}
This command configures a trap receiver at the given host
address and port number for sending messages with the specified
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+@item @code{ttl} @kbd{hop} @kbd{...}
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+@code{manycast}
+mode these values are used in-turn in an expanding-ring search.
+The default is eight multiples of 32 starting at 31.
The trap receiver will generally log event messages and other
information from the server in a log file.
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:48 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:18:56 PM by AutoGen 5.18.5
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
is a positive integer (between 1 and 65534),
@kbd{type}
is the message digest algorithm,
-and
@kbd{key}
is the key itself, and
@kbd{opt_IP_list}
is an optional comma-separated list of IPs
+where the
+@kbd{keyno}
+should be trusted.
that are allowed to serve time.
+Each IP in
+@kbd{opt_IP_list}
+may contain an optional
+@code{/subnetbits}
+specification which identifies the number of bits for
+the desired subnet of trust.
If
@kbd{opt_IP_list}
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
The
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:48 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:18:57 PM by AutoGen 5.18.5
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.8p11
+ntpd - NTP daemon program - Ver. 4.3.97
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "06 Jun 2019" "4.3.96" "File Formats"
+.TH ntp.conf 5man "06 Jun 2019" "4.3.97" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 07:24:58 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:58 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
subcommand specifies the probability of discard
for packets that overflow the rate-control window.
.TP 7
-.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
\f\*[I-Font]address\f[]
argument expressed in
\f\*[B-Font]default\f[],
with no mask option, may
be used to indicate the default entry.
+The
+\f\*[B-Font]ippeerlimit\f[]
+directive limits the number of peer requests for each IP to
+\f\*[I-Font]int\f[],
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+There would usually be at most 1 peering request per IP,
+but if the remote peering requests are behind a proxy
+there could well be more than 1 per IP.
In the current implementation,
\f\*[B-Font]flag\f[]
always
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
.TP 7
+.NOP \f\*[B-Font]noepeer\f[]
+Deny ephemeral peer requests,
+even if they come from an authenticated source.
+Note that the ability to use a symmetric key for authentication may be restricted to
+one or more IPs or subnets via the third field of the
+\fIntp.keys\f[]
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+\f\*[B-Font]noepeer\f[]
+to become the default in ntp-4.4.
+.TP 7
.NOP \f\*[B-Font]nomodify\f[]
Deny
\fCntpq\f[]\fR(1ntpqmdoc)\f[]
Time service is not affected.
.TP 7
.NOP \f\*[B-Font]nopeer\f[]
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+Deny unauthenticated packets which would result in mobilizing a new association.
+This includes
+broadcast and symmetric active packets
+when a configured association does not exist.
It also includes
\f\*[B-Font]pool\f[]
associations, so if you want to use servers from a
directive and also want to use
\f\*[B-Font]nopeer\f[]
by default, you'll want a
-\f\*[B-Font]restrict source ...\f[] \f\*[B-Font]line\f[] \f\*[B-Font]as\f[] \f\*[B-Font]well\f[] \f\*[B-Font]that\f[] \f\*[B-Font]does\f[]
-.TP 7
-.NOP not
+\f\*[B-Font]restrict source ...\f[]
+line as well that does
+\fInot\f[]
include the
\f\*[B-Font]nopeer\f[]
directive.
as soon as possible.
Attacks such as replay attacks can happen, however,
and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
+broadcast mode, attempts to perform a replay attack are possible.
This value defaults to 0, but can be changed
to any number of poll intervals between 0 and 4.
+.PP
.SS Manycast Options
-.RS
.TP 7
.NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[] | \f\*[B-Font]cohort\f[] { \f\*[B-Font]0\f[] | \f\*[B-Font]1\f[] } | \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[] | \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[] | \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]]
This command affects the clock selection and clustering
in an expanding-ring search.
The default is eight
multiples of 32 starting at 31.
-.RE
+.PP
.SH Reference Clock Support
The NTP Version 4 daemon supports some three dozen different radio,
satellite and modem reference clocks plus a special pseudo-clock
Except where noted,
these options apply to all clock drivers.
.SS Reference Clock Commands
-.RS
.TP 7
.NOP \f\*[B-Font]server\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]]
This command can be used to configure reference clocks in
page
(available as part of the HTML documentation
provided in
-\fI/usr/share/doc/ntp\f[]).
+\fI/usr/share/doc/ntp\f[] \fI).\f[]
.TP 7
.NOP \f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]
Specifies the stratum number assigned to the driver, an integer
command can be found in
\fIMonitoring\f[] \fIOptions\f[].
.RE
-.RE
+.PP
.SH Miscellaneous Options
-.RS
.TP 7
.NOP \f\*[B-Font]broadcastdelay\f[] \f\*[I-Font]seconds\f[]
The broadcast and multicast modes require a special calibration
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
.TP 7
+.NOP \f\*[B-Font]interface\f[] [\f\*[B-Font]listen\f[] | \f\*[B-Font]ignore\f[] | \f\*[B-Font]drop\f[]] [\f\*[B-Font]all\f[] | \f\*[B-Font]ipv4\f[] | \f\*[B-Font]ipv6\f[] | \f\*[B-Font]wildcard\f[] \f\*[I-Font]name\f[] | \f\*[I-Font]address\f[] [\f\*[B-Font]/\f[] \f\*[I-Font]prefixlen\f[]]]
+The
+\f\*[B-Font]interface\f[]
+directive controls which network addresses
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+\f\*[I-Font]prefixlen\f[]
+determines how many bits must match for this rule to apply.
+\f\*[B-Font]ignore\f[]
+prevents opening matching addresses,
+\f\*[B-Font]drop\f[]
+causes
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+to open the address and drop all received packets without examination.
+Multiple
+\f\*[B-Font]interface\f[]
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+\f\*[B-Font]interface\f[]
+directives are disabled if any
+\f\*[B-Font]\-I\f[],
+\f\*[B-Font]\-\-interface\f[],
+\f\*[B-Font]\-L\f[],
+or
+\f\*[B-Font]\-\-novirtualips\f[]
+command-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+\f\*[B-Font]nic\f[]
+directive is an alias for
+\f\*[B-Font]interface\f[].
+.TP 7
+.NOP \f\*[B-Font]leapfile\f[] \f\*[I-Font]leapfile\f[]
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+\f[C]https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[]
+or
+\f[C]ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[].
+The
+\f\*[B-Font]leapfile\f[]
+is scanned when
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+processes the
+\f\*[B-Font]leapfile\f[] \f\*[B-Font]directive\f[] \f\*[B-Font]or\f[] \f\*[B-Font]when\f[]
+\f\*[B-Font]ntpd\f[] \f\*[B-Font]detects\f[] \f\*[B-Font]that\f[] \f\*[B-Font]the\f[]
+\f\*[I-Font]leapfile\f[]
+has changed.
+\f\*[B-Font]ntpd\f[]
+checks once a day to see if the
+\f\*[I-Font]leapfile\f[]
+has changed.
+The
+\fCupdate-leap\f[]\fR(1update_leapmdoc)\f[]
+script can be run to see if the
+\f\*[I-Font]leapfile\f[]
+should be updated.
+.TP 7
.NOP \f\*[B-Font]leapsmearinterval\f[] \f\*[I-Font]seconds\f[]
This EXPERIMENTAL option is only available if
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
\f\*[B-Font]\-l\f[]
command line option.
.TP 7
+.NOP \f\*[B-Font]mru\f[] [\f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[] | \f\*[B-Font]initialloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]]
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.RS
+.TP 7
+.NOP \f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[]
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+\f\*[B-Font]incalloc\f[]
+entries or
+\f\*[B-Font]incmem\f[]
+kilobytes larger.
+As with all of the
+\f\*[B-Font]mru\f[]
+options offered in units of entries or kilobytes, if both
+\f\*[B-Font]maxdepth\f[]
+and
+\f\*[B-Font]maxmem\f[] \f\*[B-Font]are\f[] \f\*[B-Font]used,\f[] \f\*[B-Font]the\f[] \f\*[B-Font]last\f[] \f\*[B-Font]one\f[] \f\*[B-Font]used\f[] \f\*[B-Font]controls.\f[]
+The default is 1024 kilobytes.
+.TP 7
+.NOP \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[]
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+\f\*[B-Font]mindepth\f[]
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.TP 7
+.NOP \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[]
+Once the MRU list has
+\f\*[B-Font]mindepth\f[]
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+\f\*[B-Font]maxage\f[]
+seconds ago, that entry is removed and its storage is reused.
+If the oldest entry was updated more recently the MRU list is grown,
+subject to
+\f\*[B-Font]maxdepth\f[] \f\*[B-Font]/\f[] \f\*[B-Font]moxmem\f[].
+The default is 64 seconds.
+.TP 7
+.NOP \f\*[B-Font]initalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[]
+Initial memory allocation at the time the monitoringfacility is first enabled,
+in terms of the number of entries or kilobytes.
+The default is 4 kilobytes.
+.TP 7
+.NOP \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.RE
+.TP 7
+.NOP \f\*[B-Font]nonvolatile\f[] \f\*[I-Font]threshold\f[]
+Specify the
+\f\*[I-Font]threshold\f[]
+delta in seconds before an hourly change to the
+\f\*[B-Font]driftfile\f[]
+(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
+The frequency file is inspected each hour.
+If the difference between the current frequency and the last value written
+exceeds the threshold, the file is written and the
+\f\*[B-Font]threshold\f[]
+becomes the new threshold value.
+If the threshold is not exceeeded, it is reduced by half.
+This is intended to reduce the number of file writes
+for embedded systems with nonvolatile memory.
+.TP 7
+.NOP \f\*[B-Font]phone\f[] \f\*[I-Font]dial\f[] \f\*[I-Font]...\f[]
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+or the JJY driver (type 40, mode 100 \- 180).
+For the ACTS modem driver (type 18), the arguments consist of
+a maximum of 10 telephone numbers used to dial USNO, NIST, or European
+time service.
+For the JJY driver (type 40 mode 100 \- 180), the argument is
+one telephone number used to dial the telephone JJY service.
+The Hayes command ATDT is normally prepended to the number.
+The number can contain other modem control codes as well.
+.TP 7
+.NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
+Reset one or more groups of counters maintained by
+\f\*[B-Font]ntpd\f[]
+and exposed by
+\f\*[B-Font]ntpq\f[]
+and
+\f\*[B-Font]ntpdc\f[].
+.TP 7
+.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
+.RS
+.TP 7
+.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
+when dropping root (the
+\f\*[B-Font]\-i\f[]
+option).
+The default is 32 megabytes on non-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
+.TP 7
+.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
+Specifies the maximum size of the process stack on systems with the
+\fBmlockall\f[]\fR()\f[]
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.TP 7
+.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.RE
+.TP 7
+.NOP \f\*[B-Font]saveconfigdir\f[] \f\*[I-Font]directory_path\f[]
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+\f\*[B-Font]saveconfig\f[]
+command.
+If
+\f\*[B-Font]saveconfigdir\f[]
+does not appear in the configuration file,
+\f\*[B-Font]saveconfig\f[]
+requests are rejected by
+\f\*[B-Font]ntpd\f[].
+.TP 7
+.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
+Write the current configuration, including any runtime
+modifications given with
+\f\*[B-Font]:config\f[]
+or
+\f\*[B-Font]config-from-file\f[]
+to the
+\f\*[B-Font]ntpd\f[]
+host's
+\f\*[I-Font]filename\f[]
+in the
+\f\*[B-Font]saveconfigdir\f[].
+This command will be rejected unless the
+\f\*[B-Font]saveconfigdir\f[]
+directive appears in
+.Cm ntpd 's
+configuration file.
+\f\*[I-Font]filename\f[]
+can use
+\fCstrftime\f[]\fR(3)\f[]
+format directives to substitute the current date and time,
+for example,
+\f\*[B-Font]saveconfig\ ntp-%Y%m%d-%H%M%S.conf\f[].
+The filename used is stored in the system variable
+\f\*[B-Font]savedconfig\f[].
+Authentication is required.
+.TP 7
.NOP \f\*[B-Font]setvar\f[] \f\*[I-Font]variable\f[] [\f\*[B-Font]default\f[]]
This command adds an additional system variable.
These
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
+.NOP \f\*[B-Font]sysinfo\f[]
+Display operational summary.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Show statistics counters maintained in the protocol module.
+.TP 7
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
pulses will not be suppressed.
.RE
.TP 7
-.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
-.RS
-.TP 7
-.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-\f\*[B-Font]\-i\f[]
-option).
-The default is 32 megabytes on non-Linux machines, and \-1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-.TP 7
-.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
-Specifies the maximum size of the process stack on systems with the
-\fBmlockall\f[]\fR()\f[]
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.TP 7
-.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.RE
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\ name\f[] \f\*[I-Font]=\f[] \f\*[I-Font]value\f[] \f\*[I-Font][,...]\f[]
+Write (create or update) the specified variables.
+If the
+\f\*[B-Font]assocID\f[]
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+\f\*[B-Font]assocID\f[]
+is required, as the same name can occur in both name spaces.
.TP 7
.NOP \f\*[B-Font]trap\f[] \f\*[I-Font]host_address\f[] [\f\*[B-Font]port\f[] \f\*[I-Font]port_number\f[]] [\f\*[B-Font]interface\f[] \f\*[I-Font]interface_address\f[]]
This command configures a trap receiver at the given host
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+\f\*[B-Font]manycast\f[]
+mode these values are used in-turn in an expanding-ring search.
+The default is eight multiples of 32 starting at 31.
.sp \n(Ppu
.ne 2
an expanding-ring search.
The default is eight multiples of 32 starting at
31.
-.RE
+.PP
.SH "OPTIONS"
-.RS
.TP
.NOP \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
-.RE
+.PP
.SH "OPTION PRESETS"
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from environment variables named:
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH FILES
-.RS
.TP 15
.NOP \fI/etc/ntp.conf\f[]
the default name of the configuration file
.TP 15
.NOP \fIntp_dh\f[]
Diffie-Hellman agreement parameters
-.RE
+.PP
.SH "EXIT STATUS"
One of the following exit values will be returned:
-.RS
.TP
.NOP 0 " (EXIT_SUCCESS)"
Successful program execution.
.NOP 70 " (EX_SOFTWARE)"
libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
-.RE
+.PP
.SH "SEE ALSO"
\fCntpd\f[]\fR(1ntpdmdoc)\f[],
\fCntpdc\f[]\fR(1ntpdcmdoc)\f[],
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 07:24:55 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:49 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
for packets that overflow the rate\-control window.
.It Xo Ic restrict address
.Op Cm mask Ar mask
+.Op Cm ippeerlimit Ar int
.Op Ar flag ...
.Xc
The
.Cm default ,
with no mask option, may
be used to indicate the default entry.
+The
+.Cm ippeerlimit
+directive limits the number of peer requests for each IP to
+.Ar int ,
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+There would usually be at most 1 peering request per IP,
+but if the remote peering requests are behind a proxy
+there could well be more than 1 per IP.
In the current implementation,
.Cm flag
always
This flag
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
+.It Cm noepeer
+Deny ephemeral peer requests,
+even if they come from an authenticated source.
+Note that the ability to use a symmetric key for authentication may be restricted to
+one or more IPs or subnets via the third field of the
+.Pa ntp.keys
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+.Cm noepeer
+to become the default in ntp\-4.4.
.It Cm nomodify
Deny
.Xr ntpq 1ntpqmdoc
queries.
Time service is not affected.
.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+Deny unauthenticated packets which would result in mobilizing a new association.
+This includes
+broadcast and symmetric active packets
+when a configured association does not exist.
It also includes
.Cm pool
associations, so if you want to use servers from a
directive and also want to use
.Cm nopeer
by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
+.Cm "restrict source ..."
+line as well that does
+.Em not
include the
.Cm nopeer
directive.
as soon as possible.
Attacks such as replay attacks can happen, however,
and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
+broadcast mode, attempts to perform a replay attack are possible.
This value defaults to 0, but can be changed
to any number of poll intervals between 0 and 4.
+.El
.Ss Manycast Options
.Bl -tag -width indent
.It Xo Ic tos
page
(available as part of the HTML documentation
provided in
-.Pa /usr/share/doc/ntp ) .
+.Pa /usr/share/doc/ntp ).
.It Cm stratum Ar int
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
.Xr ntpd 1ntpdmdoc
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+.It Xo Ic interface
+.Oo
+.Cm listen | Cm ignore | Cm drop
+.Oc
+.Oo
+.Cm all | Cm ipv4 | Cm ipv6 | Cm wildcard
+.Ar name | Ar address
+.Oo Cm / Ar prefixlen
+.Oc
+.Oc
+.Xc
+The
+.Cm interface
+directive controls which network addresses
+.Xr ntpd 1ntpdmdoc
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+.Ar prefixlen
+determines how many bits must match for this rule to apply.
+.Cm ignore
+prevents opening matching addresses,
+.Cm drop
+causes
+.Xr ntpd 1ntpdmdoc
+to open the address and drop all received packets without examination.
+Multiple
+.Cm interface
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+.Cm interface
+directives are disabled if any
+.Fl I ,
+.Fl \-interface ,
+.Fl L ,
+or
+.Fl \-novirtualips
+command\-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+.Cm nic
+directive is an alias for
+.Cm interface .
+.It Ic leapfile Ar leapfile
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+.Li https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list
+or
+.Li ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list .
+The
+.Cm leapfile
+is scanned when
+.Xr ntpd 1ntpdmdoc
+processes the
+.Cm leapfile directive or when
+.Cm ntpd detects that the
+.Ar leapfile
+has changed.
+.Cm ntpd
+checks once a day to see if the
+.Ar leapfile
+has changed.
+The
+.Xr update\-leap 1update_leapmdoc
+script can be run to see if the
+.Ar leapfile
+should be updated.
.It Ic leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd 1ntpdmdoc
This is the same operation as the
.Fl l
command line option.
+.It Xo Ic mru
+.Oo
+.Cm maxdepth Ar count | Cm maxmem Ar kilobytes |
+.Cm mindepth Ar count | Cm maxage Ar seconds |
+.Cm initialloc Ar count | Cm initmem Ar kilobytes |
+.Cm incalloc Ar count | Cm incmem Ar kilobytes
+.Oc
+.Xc
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.Bl -tag -width indent
+.It Ic maxdepth Ar count
+.It Ic maxmem Ar kilobytes
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+.Cm incalloc
+entries or
+.Cm incmem
+kilobytes larger.
+As with all of the
+.Cm mru
+options offered in units of entries or kilobytes, if both
+.Cm maxdepth
+and
+.Cm maxmem are used, the last one used controls.
+The default is 1024 kilobytes.
+.It Cm mindepth Ar count
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+.Cm mindepth
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.It Cm maxage Ar seconds
+Once the MRU list has
+.Cm mindepth
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+.Cm maxage
+seconds ago, that entry is removed and its storage is reused.
+If the oldest entry was updated more recently the MRU list is grown,
+subject to
+.Cm maxdepth / moxmem .
+The default is 64 seconds.
+.It Cm initalloc Ar count
+.It Cm initmem Ar kilobytes
+Initial memory allocation at the time the monitoringfacility is first enabled,
+in terms of the number of entries or kilobytes.
+The default is 4 kilobytes.
+.It Cm incalloc Ar count
+.It Cm incmem Ar kilobytes
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.El
+.It Ic nonvolatile Ar threshold
+Specify the
+.Ar threshold
+delta in seconds before an hourly change to the
+.Cm driftfile
+(frequency file) will be written, with a default value of 1e\-7 (0.1 PPM).
+The frequency file is inspected each hour.
+If the difference between the current frequency and the last value written
+exceeds the threshold, the file is written and the
+.Cm threshold
+becomes the new threshold value.
+If the threshold is not exceeeded, it is reduced by half.
+This is intended to reduce the number of file writes
+for embedded systems with nonvolatile memory.
+.It Ic phone Ar dial ...
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+or the JJY driver (type 40, mode 100 \- 180).
+For the ACTS modem driver (type 18), the arguments consist of
+a maximum of 10 telephone numbers used to dial USNO, NIST, or European
+time service.
+For the JJY driver (type 40 mode 100 \- 180), the argument is
+one telephone number used to dial the telephone JJY service.
+The Hayes command ATDT is normally prepended to the number.
+The number can contain other modem control codes as well.
+.It Xo Ic reset
+.Oo
+.Ic allpeers
+.Oc
+.Oo
+.Ic auth
+.Oc
+.Oo
+.Ic ctl
+.Oc
+.Oo
+.Ic io
+.Oc
+.Oo
+.Ic mem
+.Oc
+.Oo
+.Ic sys
+.Oc
+.Oo
+.Ic timer
+.Oc
+.Xc
+Reset one or more groups of counters maintained by
+.Cm ntpd
+and exposed by
+.Cm ntpq
+and
+.Cm ntpdc .
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
+when dropping root (the
+.Fl i
+option).
+The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.El
+.It Ic saveconfigdir Ar directory_path
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+.Cm saveconfig
+command.
+If
+.Cm saveconfigdir
+does not appear in the configuration file,
+.Cm saveconfig
+requests are rejected by
+.Cm ntpd .
+.It Ic saveconfig Ar filename
+Write the current configuration, including any runtime
+modifications given with
+.Cm :config
+or
+.Cm config\-from\-file
+to the
+.Cm ntpd
+host's
+.Ar filename
+in the
+.Cm saveconfigdir .
+This command will be rejected unless the
+.Cm saveconfigdir
+directive appears in
+.Cm ntpd 's
+configuration file.
+.Ar filename
+can use
+.Xr strftime 3
+format directives to substitute the current date and time,
+for example,
+.Cm saveconfig\ ntp\-%Y%m%d\-%H%M%S.conf .
+The filename used is stored in the system variable
+.Cm savedconfig .
+Authentication is required.
.It Ic setvar Ar variable Op Cm default
This command adds an additional system variable.
These
the names of all peer variables and the
.Va clock_var_list
holds the names of the reference clock variables.
+.It Cm sysinfo
+Display operational summary.
+.It Cm sysstats
+Show statistics counters maintained in the protocol module.
.It Xo Ic tinker
.Oo
.Cm allan Ar allan |
If set to zero, the stepout
pulses will not be suppressed.
.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-.Fl i
-option).
-The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
+.It Cm writevar Ar assocID\ name = value [,...]
+Write (create or update) the specified variables.
+If the
+.Cm assocID
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+.Cm assocID
+is required, as the same name can occur in both name spaces.
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number
.Op Cm interface Ar interface_address
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.It Cm ttl Ar hop ...
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+.Cm manycast
+mode these values are used in\-turn in an expanding\-ring search.
+The default is eight multiples of 32 starting at 31.
.Pp
The trap receiver will generally log event messages and other
information from the server in a log file.
<p>This document describes the configuration file for the NTP Project’s
<code>ntpd</code> program.
</p>
-<p>This document applies to version 4.3.96 of <code>ntp.conf</code>.
+<p>This document applies to version 4.3.97 of <code>ntp.conf</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "06 Jun 2019" "4.3.96" "File Formats"
+.TH ntp.conf 5 "06 Jun 2019" "4.3.97" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 07:24:58 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:58 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
subcommand specifies the probability of discard
for packets that overflow the rate-control window.
.TP 7
-.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
+.NOP \f\*[B-Font]restrict\f[] \f\*[B-Font]address\f[] [\f\*[B-Font]mask\f[] \f\*[I-Font]mask\f[]] [\f\*[B-Font]ippeerlimit\f[] \f\*[I-Font]int\f[]] [\f\*[I-Font]flag\f[] \f\*[I-Font]...\f[]]
The
\f\*[I-Font]address\f[]
argument expressed in
\f\*[B-Font]default\f[],
with no mask option, may
be used to indicate the default entry.
+The
+\f\*[B-Font]ippeerlimit\f[]
+directive limits the number of peer requests for each IP to
+\f\*[I-Font]int\f[],
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+There would usually be at most 1 peering request per IP,
+but if the remote peering requests are behind a proxy
+there could well be more than 1 per IP.
In the current implementation,
\f\*[B-Font]flag\f[]
always
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
.TP 7
+.NOP \f\*[B-Font]noepeer\f[]
+Deny ephemeral peer requests,
+even if they come from an authenticated source.
+Note that the ability to use a symmetric key for authentication may be restricted to
+one or more IPs or subnets via the third field of the
+\fIntp.keys\f[]
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+\f\*[B-Font]noepeer\f[]
+to become the default in ntp-4.4.
+.TP 7
.NOP \f\*[B-Font]nomodify\f[]
Deny
\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
Time service is not affected.
.TP 7
.NOP \f\*[B-Font]nopeer\f[]
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+Deny unauthenticated packets which would result in mobilizing a new association.
+This includes
+broadcast and symmetric active packets
+when a configured association does not exist.
It also includes
\f\*[B-Font]pool\f[]
associations, so if you want to use servers from a
directive and also want to use
\f\*[B-Font]nopeer\f[]
by default, you'll want a
-\f\*[B-Font]restrict source ...\f[] \f\*[B-Font]line\f[] \f\*[B-Font]as\f[] \f\*[B-Font]well\f[] \f\*[B-Font]that\f[] \f\*[B-Font]does\f[]
-.TP 7
-.NOP not
+\f\*[B-Font]restrict source ...\f[]
+line as well that does
+\fInot\f[]
include the
\f\*[B-Font]nopeer\f[]
directive.
as soon as possible.
Attacks such as replay attacks can happen, however,
and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
+broadcast mode, attempts to perform a replay attack are possible.
This value defaults to 0, but can be changed
to any number of poll intervals between 0 and 4.
+.PP
.SS Manycast Options
-.RS
.TP 7
.NOP \f\*[B-Font]tos\f[] [\f\*[B-Font]ceiling\f[] \f\*[I-Font]ceiling\f[] | \f\*[B-Font]cohort\f[] { \f\*[B-Font]0\f[] | \f\*[B-Font]1\f[] } | \f\*[B-Font]floor\f[] \f\*[I-Font]floor\f[] | \f\*[B-Font]minclock\f[] \f\*[I-Font]minclock\f[] | \f\*[B-Font]minsane\f[] \f\*[I-Font]minsane\f[]]
This command affects the clock selection and clustering
in an expanding-ring search.
The default is eight
multiples of 32 starting at 31.
-.RE
+.PP
.SH Reference Clock Support
The NTP Version 4 daemon supports some three dozen different radio,
satellite and modem reference clocks plus a special pseudo-clock
Except where noted,
these options apply to all clock drivers.
.SS Reference Clock Commands
-.RS
.TP 7
.NOP \f\*[B-Font]server\f[] \f[C]127.127.\f[]\f\*[I-Font]t\f[].\f\*[I-Font]u\f[] [\f\*[B-Font]prefer\f[]] [\f\*[B-Font]mode\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]minpoll\f[] \f\*[I-Font]int\f[]] [\f\*[B-Font]maxpoll\f[] \f\*[I-Font]int\f[]]
This command can be used to configure reference clocks in
page
(available as part of the HTML documentation
provided in
-\fI/usr/share/doc/ntp\f[]).
+\fI/usr/share/doc/ntp\f[] \fI).\f[]
.TP 7
.NOP \f\*[B-Font]stratum\f[] \f\*[I-Font]int\f[]
Specifies the stratum number assigned to the driver, an integer
command can be found in
\fIMonitoring\f[] \fIOptions\f[].
.RE
-.RE
+.PP
.SH Miscellaneous Options
-.RS
.TP 7
.NOP \f\*[B-Font]broadcastdelay\f[] \f\*[I-Font]seconds\f[]
The broadcast and multicast modes require a special calibration
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
.TP 7
+.NOP \f\*[B-Font]interface\f[] [\f\*[B-Font]listen\f[] | \f\*[B-Font]ignore\f[] | \f\*[B-Font]drop\f[]] [\f\*[B-Font]all\f[] | \f\*[B-Font]ipv4\f[] | \f\*[B-Font]ipv6\f[] | \f\*[B-Font]wildcard\f[] \f\*[I-Font]name\f[] | \f\*[I-Font]address\f[] [\f\*[B-Font]/\f[] \f\*[I-Font]prefixlen\f[]]]
+The
+\f\*[B-Font]interface\f[]
+directive controls which network addresses
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+\f\*[I-Font]prefixlen\f[]
+determines how many bits must match for this rule to apply.
+\f\*[B-Font]ignore\f[]
+prevents opening matching addresses,
+\f\*[B-Font]drop\f[]
+causes
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+to open the address and drop all received packets without examination.
+Multiple
+\f\*[B-Font]interface\f[]
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+\f\*[B-Font]interface\f[]
+directives are disabled if any
+\f\*[B-Font]\-I\f[],
+\f\*[B-Font]\-\-interface\f[],
+\f\*[B-Font]\-L\f[],
+or
+\f\*[B-Font]\-\-novirtualips\f[]
+command-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+\f\*[B-Font]nic\f[]
+directive is an alias for
+\f\*[B-Font]interface\f[].
+.TP 7
+.NOP \f\*[B-Font]leapfile\f[] \f\*[I-Font]leapfile\f[]
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+\f[C]https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[]
+or
+\f[C]ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list\f[].
+The
+\f\*[B-Font]leapfile\f[]
+is scanned when
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+processes the
+\f\*[B-Font]leapfile\f[] \f\*[B-Font]directive\f[] \f\*[B-Font]or\f[] \f\*[B-Font]when\f[]
+\f\*[B-Font]ntpd\f[] \f\*[B-Font]detects\f[] \f\*[B-Font]that\f[] \f\*[B-Font]the\f[]
+\f\*[I-Font]leapfile\f[]
+has changed.
+\f\*[B-Font]ntpd\f[]
+checks once a day to see if the
+\f\*[I-Font]leapfile\f[]
+has changed.
+The
+\fCupdate-leap\f[]\fR(1update_leapmdoc)\f[]
+script can be run to see if the
+\f\*[I-Font]leapfile\f[]
+should be updated.
+.TP 7
.NOP \f\*[B-Font]leapsmearinterval\f[] \f\*[I-Font]seconds\f[]
This EXPERIMENTAL option is only available if
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
\f\*[B-Font]\-l\f[]
command line option.
.TP 7
+.NOP \f\*[B-Font]mru\f[] [\f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[] | \f\*[B-Font]initialloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[] | \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[] | \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]]
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.RS
+.TP 7
+.NOP \f\*[B-Font]maxdepth\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]maxmem\f[] \f\*[I-Font]kilobytes\f[]
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+\f\*[B-Font]incalloc\f[]
+entries or
+\f\*[B-Font]incmem\f[]
+kilobytes larger.
+As with all of the
+\f\*[B-Font]mru\f[]
+options offered in units of entries or kilobytes, if both
+\f\*[B-Font]maxdepth\f[]
+and
+\f\*[B-Font]maxmem\f[] \f\*[B-Font]are\f[] \f\*[B-Font]used,\f[] \f\*[B-Font]the\f[] \f\*[B-Font]last\f[] \f\*[B-Font]one\f[] \f\*[B-Font]used\f[] \f\*[B-Font]controls.\f[]
+The default is 1024 kilobytes.
+.TP 7
+.NOP \f\*[B-Font]mindepth\f[] \f\*[I-Font]count\f[]
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+\f\*[B-Font]mindepth\f[]
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.TP 7
+.NOP \f\*[B-Font]maxage\f[] \f\*[I-Font]seconds\f[]
+Once the MRU list has
+\f\*[B-Font]mindepth\f[]
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+\f\*[B-Font]maxage\f[]
+seconds ago, that entry is removed and its storage is reused.
+If the oldest entry was updated more recently the MRU list is grown,
+subject to
+\f\*[B-Font]maxdepth\f[] \f\*[B-Font]/\f[] \f\*[B-Font]moxmem\f[].
+The default is 64 seconds.
+.TP 7
+.NOP \f\*[B-Font]initalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]initmem\f[] \f\*[I-Font]kilobytes\f[]
+Initial memory allocation at the time the monitoringfacility is first enabled,
+in terms of the number of entries or kilobytes.
+The default is 4 kilobytes.
+.TP 7
+.NOP \f\*[B-Font]incalloc\f[] \f\*[I-Font]count\f[]
+.TP 7
+.NOP \f\*[B-Font]incmem\f[] \f\*[I-Font]kilobytes\f[]
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.RE
+.TP 7
+.NOP \f\*[B-Font]nonvolatile\f[] \f\*[I-Font]threshold\f[]
+Specify the
+\f\*[I-Font]threshold\f[]
+delta in seconds before an hourly change to the
+\f\*[B-Font]driftfile\f[]
+(frequency file) will be written, with a default value of 1e-7 (0.1 PPM).
+The frequency file is inspected each hour.
+If the difference between the current frequency and the last value written
+exceeds the threshold, the file is written and the
+\f\*[B-Font]threshold\f[]
+becomes the new threshold value.
+If the threshold is not exceeeded, it is reduced by half.
+This is intended to reduce the number of file writes
+for embedded systems with nonvolatile memory.
+.TP 7
+.NOP \f\*[B-Font]phone\f[] \f\*[I-Font]dial\f[] \f\*[I-Font]...\f[]
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+or the JJY driver (type 40, mode 100 \- 180).
+For the ACTS modem driver (type 18), the arguments consist of
+a maximum of 10 telephone numbers used to dial USNO, NIST, or European
+time service.
+For the JJY driver (type 40 mode 100 \- 180), the argument is
+one telephone number used to dial the telephone JJY service.
+The Hayes command ATDT is normally prepended to the number.
+The number can contain other modem control codes as well.
+.TP 7
+.NOP \f\*[B-Font]reset\f[] [\f\*[B-Font]allpeers\f[]] [\f\*[B-Font]auth\f[]] [\f\*[B-Font]ctl\f[]] [\f\*[B-Font]io\f[]] [\f\*[B-Font]mem\f[]] [\f\*[B-Font]sys\f[]] [\f\*[B-Font]timer\f[]]
+Reset one or more groups of counters maintained by
+\f\*[B-Font]ntpd\f[]
+and exposed by
+\f\*[B-Font]ntpq\f[]
+and
+\f\*[B-Font]ntpdc\f[].
+.TP 7
+.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
+.RS
+.TP 7
+.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
+when dropping root (the
+\f\*[B-Font]\-i\f[]
+option).
+The default is 32 megabytes on non-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
+.TP 7
+.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
+Specifies the maximum size of the process stack on systems with the
+\fBmlockall\f[]\fR()\f[]
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.TP 7
+.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.RE
+.TP 7
+.NOP \f\*[B-Font]saveconfigdir\f[] \f\*[I-Font]directory_path\f[]
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+\f\*[B-Font]saveconfig\f[]
+command.
+If
+\f\*[B-Font]saveconfigdir\f[]
+does not appear in the configuration file,
+\f\*[B-Font]saveconfig\f[]
+requests are rejected by
+\f\*[B-Font]ntpd\f[].
+.TP 7
+.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
+Write the current configuration, including any runtime
+modifications given with
+\f\*[B-Font]:config\f[]
+or
+\f\*[B-Font]config-from-file\f[]
+to the
+\f\*[B-Font]ntpd\f[]
+host's
+\f\*[I-Font]filename\f[]
+in the
+\f\*[B-Font]saveconfigdir\f[].
+This command will be rejected unless the
+\f\*[B-Font]saveconfigdir\f[]
+directive appears in
+.Cm ntpd 's
+configuration file.
+\f\*[I-Font]filename\f[]
+can use
+\fCstrftime\f[]\fR(3)\f[]
+format directives to substitute the current date and time,
+for example,
+\f\*[B-Font]saveconfig\ ntp-%Y%m%d-%H%M%S.conf\f[].
+The filename used is stored in the system variable
+\f\*[B-Font]savedconfig\f[].
+Authentication is required.
+.TP 7
.NOP \f\*[B-Font]setvar\f[] \f\*[I-Font]variable\f[] [\f\*[B-Font]default\f[]]
This command adds an additional system variable.
These
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
+.NOP \f\*[B-Font]sysinfo\f[]
+Display operational summary.
+.TP 7
+.NOP \f\*[B-Font]sysstats\f[]
+Show statistics counters maintained in the protocol module.
+.TP 7
.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
pulses will not be suppressed.
.RE
.TP 7
-.NOP \f\*[B-Font]rlimit\f[] [\f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[] | \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[] \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]]
-.RS
-.TP 7
-.NOP \f\*[B-Font]memlock\f[] \f\*[I-Font]Nmegabytes\f[]
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-\f\*[B-Font]\-i\f[]
-option).
-The default is 32 megabytes on non-Linux machines, and \-1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-.TP 7
-.NOP \f\*[B-Font]stacksize\f[] \f\*[I-Font]N4kPages\f[]
-Specifies the maximum size of the process stack on systems with the
-\fBmlockall\f[]\fR()\f[]
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.TP 7
-.NOP \f\*[B-Font]filenum\f[] \f\*[I-Font]Nfiledescriptors\f[]
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.RE
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\ name\f[] \f\*[I-Font]=\f[] \f\*[I-Font]value\f[] \f\*[I-Font][,...]\f[]
+Write (create or update) the specified variables.
+If the
+\f\*[B-Font]assocID\f[]
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+\f\*[B-Font]assocID\f[]
+is required, as the same name can occur in both name spaces.
.TP 7
.NOP \f\*[B-Font]trap\f[] \f\*[I-Font]host_address\f[] [\f\*[B-Font]port\f[] \f\*[I-Font]port_number\f[]] [\f\*[B-Font]interface\f[] \f\*[I-Font]interface_address\f[]]
This command configures a trap receiver at the given host
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.TP 7
+.NOP \f\*[B-Font]ttl\f[] \f\*[I-Font]hop\f[] \f\*[I-Font]...\f[]
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+\f\*[B-Font]manycast\f[]
+mode these values are used in-turn in an expanding-ring search.
+The default is eight multiples of 32 starting at 31.
.sp \n(Ppu
.ne 2
an expanding-ring search.
The default is eight multiples of 32 starting at
31.
-.RE
+.PP
.SH "OPTIONS"
-.RS
.TP
.NOP \f\*[B-Font]\-\-help\f[]
Display usage information and exit.
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
-.RE
+.PP
.SH "OPTION PRESETS"
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from environment variables named:
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH FILES
-.RS
.TP 15
.NOP \fI/etc/ntp.conf\f[]
the default name of the configuration file
.TP 15
.NOP \fIntp_dh\f[]
Diffie-Hellman agreement parameters
-.RE
+.PP
.SH "EXIT STATUS"
One of the following exit values will be returned:
-.RS
.TP
.NOP 0 " (EXIT_SUCCESS)"
Successful program execution.
.NOP 70 " (EX_SOFTWARE)"
libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
-.RE
+.PP
.SH "SEE ALSO"
\fCntpd\f[]\fR(@NTPD_MS@)\f[],
\fCntpdc\f[]\fR(@NTPDC_MS@)\f[],
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 07:24:55 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:49 PM by AutoGen 5.18.5
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
for packets that overflow the rate\-control window.
.It Xo Ic restrict address
.Op Cm mask Ar mask
+.Op Cm ippeerlimit Ar int
.Op Ar flag ...
.Xc
The
.Cm default ,
with no mask option, may
be used to indicate the default entry.
+The
+.Cm ippeerlimit
+directive limits the number of peer requests for each IP to
+.Ar int ,
+where a value of \-1 means "unlimited", the current default.
+A value of 0 means "none".
+There would usually be at most 1 peering request per IP,
+but if the remote peering requests are behind a proxy
+there could well be more than 1 per IP.
In the current implementation,
.Cm flag
always
This flag
modifies the assignment algorithm by allowing low priority traps to
be overridden by later requests for normal priority traps.
+.It Cm noepeer
+Deny ephemeral peer requests,
+even if they come from an authenticated source.
+Note that the ability to use a symmetric key for authentication may be restricted to
+one or more IPs or subnets via the third field of the
+.Pa ntp.keys
+file.
+This restriction is not enabled by default,
+to maintain backward compatability.
+Expect
+.Cm noepeer
+to become the default in ntp\-4.4.
.It Cm nomodify
Deny
.Xr ntpq @NTPQ_MS@
queries.
Time service is not affected.
.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
+Deny unauthenticated packets which would result in mobilizing a new association.
+This includes
+broadcast and symmetric active packets
+when a configured association does not exist.
It also includes
.Cm pool
associations, so if you want to use servers from a
directive and also want to use
.Cm nopeer
by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
+.Cm "restrict source ..."
+line as well that does
+.Em not
include the
.Cm nopeer
directive.
as soon as possible.
Attacks such as replay attacks can happen, however,
and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
+broadcast mode, attempts to perform a replay attack are possible.
This value defaults to 0, but can be changed
to any number of poll intervals between 0 and 4.
+.El
.Ss Manycast Options
.Bl -tag -width indent
.It Xo Ic tos
page
(available as part of the HTML documentation
provided in
-.Pa /usr/share/doc/ntp ) .
+.Pa /usr/share/doc/ntp ).
.It Cm stratum Ar int
Specifies the stratum number assigned to the driver, an integer
between 0 and 15.
.Xr ntpd @NTPD_MS@
on multiple hosts, with (mostly) common options (e.g., a
restriction list).
+.It Xo Ic interface
+.Oo
+.Cm listen | Cm ignore | Cm drop
+.Oc
+.Oo
+.Cm all | Cm ipv4 | Cm ipv6 | Cm wildcard
+.Ar name | Ar address
+.Oo Cm / Ar prefixlen
+.Oc
+.Oc
+.Xc
+The
+.Cm interface
+directive controls which network addresses
+.Xr ntpd @NTPD_MS@
+opens, and whether input is dropped without processing.
+The first parameter determines the action for addresses
+which match the second parameter.
+The second parameter specifies a class of addresses,
+or a specific interface name,
+or an address.
+In the address case,
+.Ar prefixlen
+determines how many bits must match for this rule to apply.
+.Cm ignore
+prevents opening matching addresses,
+.Cm drop
+causes
+.Xr ntpd @NTPD_MS@
+to open the address and drop all received packets without examination.
+Multiple
+.Cm interface
+directives can be used.
+The last rule which matches a particular address determines the action for it.
+.Cm interface
+directives are disabled if any
+.Fl I ,
+.Fl \-interface ,
+.Fl L ,
+or
+.Fl \-novirtualips
+command\-line options are specified in the configuration file,
+all available network addresses are opened.
+The
+.Cm nic
+directive is an alias for
+.Cm interface .
+.It Ic leapfile Ar leapfile
+This command loads the IERS leapseconds file and initializes the
+leapsecond values for the next leapsecond event, leapfile expiration
+time, and TAI offset.
+The file can be obtained directly from the IERS at
+.Li https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list
+or
+.Li ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap\-seconds.list .
+The
+.Cm leapfile
+is scanned when
+.Xr ntpd @NTPD_MS@
+processes the
+.Cm leapfile directive or when
+.Cm ntpd detects that the
+.Ar leapfile
+has changed.
+.Cm ntpd
+checks once a day to see if the
+.Ar leapfile
+has changed.
+The
+.Xr update\-leap 1update_leapmdoc
+script can be run to see if the
+.Ar leapfile
+should be updated.
.It Ic leapsmearinterval Ar seconds
This EXPERIMENTAL option is only available if
.Xr ntpd @NTPD_MS@
This is the same operation as the
.Fl l
command line option.
+.It Xo Ic mru
+.Oo
+.Cm maxdepth Ar count | Cm maxmem Ar kilobytes |
+.Cm mindepth Ar count | Cm maxage Ar seconds |
+.Cm initialloc Ar count | Cm initmem Ar kilobytes |
+.Cm incalloc Ar count | Cm incmem Ar kilobytes
+.Oc
+.Xc
+Controls size limite of the monitoring facility's Most Recently Used
+(MRU) list
+of client addresses, which is also used by the
+rate control facility.
+.Bl -tag -width indent
+.It Ic maxdepth Ar count
+.It Ic maxmem Ar kilobytes
+Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes.
+The acutal limit will be up to
+.Cm incalloc
+entries or
+.Cm incmem
+kilobytes larger.
+As with all of the
+.Cm mru
+options offered in units of entries or kilobytes, if both
+.Cm maxdepth
+and
+.Cm maxmem are used, the last one used controls.
+The default is 1024 kilobytes.
+.It Cm mindepth Ar count
+Lower limit on the MRU list size.
+When the MRU list has fewer than
+.Cm mindepth
+entries, existing entries are never removed to make room for newer ones,
+regardless of their age.
+The default is 600 entries.
+.It Cm maxage Ar seconds
+Once the MRU list has
+.Cm mindepth
+entries and an additional client is to ba added to the list,
+if the oldest entry was updated more than
+.Cm maxage
+seconds ago, that entry is removed and its storage is reused.
+If the oldest entry was updated more recently the MRU list is grown,
+subject to
+.Cm maxdepth / moxmem .
+The default is 64 seconds.
+.It Cm initalloc Ar count
+.It Cm initmem Ar kilobytes
+Initial memory allocation at the time the monitoringfacility is first enabled,
+in terms of the number of entries or kilobytes.
+The default is 4 kilobytes.
+.It Cm incalloc Ar count
+.It Cm incmem Ar kilobytes
+Size of additional memory allocations when growing the MRU list, in entries or kilobytes.
+The default is 4 kilobytes.
+.El
+.It Ic nonvolatile Ar threshold
+Specify the
+.Ar threshold
+delta in seconds before an hourly change to the
+.Cm driftfile
+(frequency file) will be written, with a default value of 1e\-7 (0.1 PPM).
+The frequency file is inspected each hour.
+If the difference between the current frequency and the last value written
+exceeds the threshold, the file is written and the
+.Cm threshold
+becomes the new threshold value.
+If the threshold is not exceeeded, it is reduced by half.
+This is intended to reduce the number of file writes
+for embedded systems with nonvolatile memory.
+.It Ic phone Ar dial ...
+This command is used in conjunction with
+the ACTS modem driver (type 18)
+or the JJY driver (type 40, mode 100 \- 180).
+For the ACTS modem driver (type 18), the arguments consist of
+a maximum of 10 telephone numbers used to dial USNO, NIST, or European
+time service.
+For the JJY driver (type 40 mode 100 \- 180), the argument is
+one telephone number used to dial the telephone JJY service.
+The Hayes command ATDT is normally prepended to the number.
+The number can contain other modem control codes as well.
+.It Xo Ic reset
+.Oo
+.Ic allpeers
+.Oc
+.Oo
+.Ic auth
+.Oc
+.Oo
+.Ic ctl
+.Oc
+.Oo
+.Ic io
+.Oc
+.Oo
+.Ic mem
+.Oc
+.Oo
+.Ic sys
+.Oc
+.Oo
+.Ic timer
+.Oc
+.Xc
+Reset one or more groups of counters maintained by
+.Cm ntpd
+and exposed by
+.Cm ntpq
+and
+.Cm ntpdc .
+.It Xo Ic rlimit
+.Oo
+.Cm memlock Ar Nmegabytes |
+.Cm stacksize Ar N4kPages
+.Cm filenum Ar Nfiledescriptors
+.Oc
+.Xc
+.Bl -tag -width indent
+.It Cm memlock Ar Nmegabytes
+Specify the number of megabytes of memory that should be
+allocated and locked.
+Probably only available under Linux, this option may be useful
+when dropping root (the
+.Fl i
+option).
+The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
+-1 means "do not lock the process into memory".
+0 means "lock whatever memory the process wants into memory".
+.It Cm stacksize Ar N4kPages
+Specifies the maximum size of the process stack on systems with the
+.Fn mlockall
+function.
+Defaults to 50 4k pages (200 4k pages in OpenBSD).
+.It Cm filenum Ar Nfiledescriptors
+Specifies the maximum number of file descriptors ntpd may have open at once.
+Defaults to the system default.
+.El
+.It Ic saveconfigdir Ar directory_path
+Specify the directory in which to write configuration snapshots
+requested with
+.Cm ntpq 's
+.Cm saveconfig
+command.
+If
+.Cm saveconfigdir
+does not appear in the configuration file,
+.Cm saveconfig
+requests are rejected by
+.Cm ntpd .
+.It Ic saveconfig Ar filename
+Write the current configuration, including any runtime
+modifications given with
+.Cm :config
+or
+.Cm config\-from\-file
+to the
+.Cm ntpd
+host's
+.Ar filename
+in the
+.Cm saveconfigdir .
+This command will be rejected unless the
+.Cm saveconfigdir
+directive appears in
+.Cm ntpd 's
+configuration file.
+.Ar filename
+can use
+.Xr strftime 3
+format directives to substitute the current date and time,
+for example,
+.Cm saveconfig\ ntp\-%Y%m%d\-%H%M%S.conf .
+The filename used is stored in the system variable
+.Cm savedconfig .
+Authentication is required.
.It Ic setvar Ar variable Op Cm default
This command adds an additional system variable.
These
the names of all peer variables and the
.Va clock_var_list
holds the names of the reference clock variables.
+.It Cm sysinfo
+Display operational summary.
+.It Cm sysstats
+Show statistics counters maintained in the protocol module.
.It Xo Ic tinker
.Oo
.Cm allan Ar allan |
If set to zero, the stepout
pulses will not be suppressed.
.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-.Fl i
-option).
-The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
+.It Cm writevar Ar assocID\ name = value [,...]
+Write (create or update) the specified variables.
+If the
+.Cm assocID
+is zero, the variablea re from the
+system variables
+name space, otherwise they are from the
+peer variables
+name space.
+The
+.Cm assocID
+is required, as the same name can occur in both name spaces.
.It Xo Ic trap Ar host_address
.Op Cm port Ar port_number
.Op Cm interface Ar interface_address
message is sent through.
Note that on a multihomed host the
interface used may vary from time to time with routing changes.
+.It Cm ttl Ar hop ...
+This command specifies a list of TTL values in increasing order.
+Up to 8 values can be specified.
+In
+.Cm manycast
+mode these values are used in\-turn in an expanding\-ring search.
+The default is eight multiples of 32 starting at 31.
.Pp
The trap receiver will generally log event messages and other
information from the server in a log file.
-.TH ntp.keys 5man "06 Jun 2019" "4.3.96" "File Formats"
+.TH ntp.keys 5man "06 Jun 2019" "4.3.97" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:49 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:59 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
is a positive integer (between 1 and 65534),
\f\*[I-Font]type\f[]
is the message digest algorithm,
-and
\f\*[I-Font]key\f[]
is the key itself, and
\f\*[I-Font]opt_IP_list\f[]
is an optional comma-separated list of IPs
+where the
+\f\*[I-Font]keyno\f[]
+should be trusted.
that are allowed to serve time.
+Each IP in
+\f\*[I-Font]opt_IP_list\f[]
+may contain an optional
+\f\*[B-Font]/subnetbits\f[]
+specification which identifies the number of bits for
+the desired subnet of trust.
If
\f\*[I-Font]opt_IP_list\f[]
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
.sp \n(Ppu
.ne 2
.Dd June 6 2019
-.Dt NTP_CONF 5mdoc File Formats
-.Os
+.Dt NTP_KEYS 5mdoc File Formats
+.Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:46 PM by AutoGen 5.18.5
-.\" From the definitions ntp.conf.def
-.\" and the template file agmdoc-cmd.tpl
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:50 PM by AutoGen 5.18.5
+.\" From the definitions ntp.keys.def
+.\" and the template file agmdoc-file.tpl
.Sh NAME
-.Nm ntp.conf
-.Nd Network Time Protocol (NTP) daemon configuration file format
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
.Sh SYNOPSIS
.Nm
.Op Fl \-option\-name
All arguments must be options.
.Pp
.Sh DESCRIPTION
-The
-.Nm
-configuration file is read at initial startup by the
-.Xr ntpd 1ntpdmdoc
-daemon in order to specify the synchronization sources,
-modes and other related information.
-Usually, it is installed in the
-.Pa /etc
-directory,
-but could be installed elsewhere
-(see the daemon's
-.Fl c
-command line option).
-.Pp
-The file format is similar to other
-.Ux
-configuration files.
-Comments begin with a
-.Ql #
-character and extend to the end of the line;
-blank lines are ignored.
-Configuration commands consist of an initial keyword
-followed by a list of arguments,
-some of which may be optional, separated by whitespace.
-Commands may not be continued over multiple lines.
-Arguments may be host names,
-host addresses written in numeric, dotted\-quad form,
-integers, floating point numbers (when specifying times in seconds)
-and text strings.
-.Pp
-The rest of this page describes the configuration and control options.
-The
-.Qq Notes on Configuring NTP and Setting up an NTP Subnet
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-contains an extended discussion of these options.
-In addition to the discussion of general
-.Sx Configuration Options ,
-there are sections describing the following supported functionality
-and the options used to control it:
-.Bl -bullet -offset indent
-.It
-.Sx Authentication Support
-.It
-.Sx Monitoring Support
-.It
-.Sx Access Control Support
-.It
-.Sx Automatic NTP Configuration Options
-.It
-.Sx Reference Clock Support
-.It
-.Sx Miscellaneous Options
-.El
-.Pp
-Following these is a section describing
-.Sx Miscellaneous Options .
-While there is a rich set of options available,
-the only required option is one or more
-.Ic pool ,
-.Ic server ,
-.Ic peer ,
-.Ic broadcast
-or
-.Ic manycastclient
-commands.
-.Sh Configuration Support
-Following is a description of the configuration commands in
-NTPv4.
-These commands have the same basic functions as in NTPv3 and
-in some cases new functions and new arguments.
-There are two
-classes of commands, configuration commands that configure a
-persistent association with a remote server or peer or reference
-clock, and auxiliary commands that specify environmental variables
-that control various related operations.
-.Ss Configuration Commands
-The various modes are determined by the command keyword and the
-type of the required IP address.
-Addresses are classed by type as
-(s) a remote server or peer (IPv4 class A, B and C), (b) the
-broadcast address of a local interface, (m) a multicast address (IPv4
-class D), or (r) a reference clock address (127.127.x.x).
-Note that
-only those options applicable to each command are listed below.
-Use
-of options not listed may not be caught as an error, but may result
-in some weird and even destructive behavior.
-.Pp
-If the Basic Socket Interface Extensions for IPv6 (RFC\-2553)
-is detected, support for the IPv6 address family is generated
-in addition to the default support of the IPv4 address family.
-In a few cases, including the
-.Cm reslist
-billboard generated
-by
-.Xr ntpq 1ntpqmdoc
-or
-.Xr ntpdc 1ntpdcmdoc ,
-IPv6 addresses are automatically generated.
-IPv6 addresses can be identified by the presence of colons
-.Dq \&:
-in the address field.
-IPv6 addresses can be used almost everywhere where
-IPv4 addresses can be used,
-with the exception of reference clock addresses,
-which are always IPv4.
-.Pp
-Note that in contexts where a host name is expected, a
-.Fl 4
-qualifier preceding
-the host name forces DNS resolution to the IPv4 namespace,
-while a
-.Fl 6
-qualifier forces DNS resolution to the IPv6 namespace.
-See IPv6 references for the
-equivalent classes for that address family.
-.Bl -tag -width indent
-.It Xo Ic pool Ar address
-.Op Cm burst
-.Op Cm iburst
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Xc
-.It Xo Ic server Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm burst
-.Op Cm iburst
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Op Cm true
-.Xc
-.It Xo Ic peer Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Op Cm true
-.Op Cm xleave
-.Xc
-.It Xo Ic broadcast Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm ttl Ar ttl
-.Op Cm xleave
-.Xc
-.It Xo Ic manycastclient Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Op Cm ttl Ar ttl
-.Xc
-.El
-.Pp
-These five commands specify the time server name or address to
-be used and the mode in which to operate.
-The
-.Ar address
-can be
-either a DNS name or an IP address in dotted\-quad notation.
-Additional information on association behavior can be found in the
-.Qq Association Management
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.Bl -tag -width indent
-.It Ic pool
-For type s addresses, this command mobilizes a persistent
-client mode association with a number of remote servers.
-In this mode the local clock can synchronized to the
-remote server, but the remote server can never be synchronized to
-the local clock.
-.It Ic server
-For type s and r addresses, this command mobilizes a persistent
-client mode association with the specified remote server or local
-radio clock.
-In this mode the local clock can synchronized to the
-remote server, but the remote server can never be synchronized to
-the local clock.
-This command should
-.Em not
-be used for type
-b or m addresses.
-.It Ic peer
-For type s addresses (only), this command mobilizes a
-persistent symmetric\-active mode association with the specified
-remote peer.
-In this mode the local clock can be synchronized to
-the remote peer or the remote peer can be synchronized to the local
-clock.
-This is useful in a network of servers where, depending on
-various failure scenarios, either the local or remote peer may be
-the better source of time.
-This command should NOT be used for type
-b, m or r addresses.
-.It Ic broadcast
-For type b and m addresses (only), this
-command mobilizes a persistent broadcast mode association.
-Multiple
-commands can be used to specify multiple local broadcast interfaces
-(subnets) and/or multiple multicast groups.
-Note that local
-broadcast messages go only to the interface associated with the
-subnet specified, but multicast messages go to all interfaces.
-In broadcast mode the local server sends periodic broadcast
-messages to a client population at the
-.Ar address
-specified, which is usually the broadcast address on (one of) the
-local network(s) or a multicast address assigned to NTP.
-The IANA
-has assigned the multicast group address IPv4 224.0.1.1 and
-IPv6 ff05::101 (site local) exclusively to
-NTP, but other nonconflicting addresses can be used to contain the
-messages within administrative boundaries.
-Ordinarily, this
-specification applies only to the local server operating as a
-sender; for operation as a broadcast client, see the
-.Ic broadcastclient
-or
-.Ic multicastclient
-commands
-below.
-.It Ic manycastclient
-For type m addresses (only), this command mobilizes a
-manycast client mode association for the multicast address
-specified.
-In this case a specific address must be supplied which
-matches the address used on the
-.Ic manycastserver
-command for
-the designated manycast servers.
-The NTP multicast address
-224.0.1.1 assigned by the IANA should NOT be used, unless specific
-means are taken to avoid spraying large areas of the Internet with
-these messages and causing a possibly massive implosion of replies
-at the sender.
-The
-.Ic manycastserver
-command specifies that the local server
-is to operate in client mode with the remote servers that are
-discovered as the result of broadcast/multicast messages.
-The
-client broadcasts a request message to the group address associated
-with the specified
-.Ar address
-and specifically enabled
-servers respond to these messages.
-The client selects the servers
-providing the best time and continues as with the
-.Ic server
-command.
-The remaining servers are discarded as if never
-heard.
-.El
-.Pp
-Options:
-.Bl -tag -width indent
-.It Cm autokey
-All packets sent to and received from the server or peer are to
-include authentication fields encrypted using the autokey scheme
-described in
-.Sx Authentication Options .
-.It Cm burst
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
-.Ic server
-command and s addresses.
-.It Cm iburst
-When the server is unreachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to speed the initial synchronization
-acquisition with the
-.Ic server
-command and s addresses and when
-.Xr ntpd 1ntpdmdoc
-is started with the
-.Fl q
-option.
-.It Cm key Ar key
-All packets sent to and received from the server or peer are to
-include authentication fields encrypted using the specified
-.Ar key
-identifier with values from 1 to 65534, inclusive.
-The
-default is to include no encryption field.
-.It Cm minpoll Ar minpoll
-.It Cm maxpoll Ar maxpoll
-These options specify the minimum and maximum poll intervals
-for NTP messages, as a power of 2 in seconds
-The maximum poll
-interval defaults to 10 (1,024 s), but can be increased by the
-.Cm maxpoll
-option to an upper limit of 17 (36.4 h).
-The
-minimum poll interval defaults to 6 (64 s), but can be decreased by
-the
-.Cm minpoll
-option to a lower limit of 4 (16 s).
-.It Cm noselect
-Marks the server as unused, except for display purposes.
-The server is discarded by the selection algroithm.
-.It Cm preempt
-Says the association can be preempted.
-.It Cm true
-Marks the server as a truechimer.
-Use this option only for testing.
-.It Cm prefer
-Marks the server as preferred.
-All other things being equal,
-this host will be chosen for synchronization among a set of
-correctly operating hosts.
-See the
-.Qq Mitigation Rules and the prefer Keyword
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-for further information.
-.It Cm true
-Forces the association to always survive the selection and clustering algorithms.
-This option should almost certainly
-.Em only
-be used while testing an association.
-.It Cm ttl Ar ttl
-This option is used only with broadcast server and manycast
-client modes.
-It specifies the time\-to\-live
-.Ar ttl
-to
-use on broadcast server and multicast server and the maximum
-.Ar ttl
-for the expanding ring search with manycast
-client packets.
-Selection of the proper value, which defaults to
-127, is something of a black art and should be coordinated with the
-network administrator.
-.It Cm version Ar version
-Specifies the version number to be used for outgoing NTP
-packets.
-Versions 1\-4 are the choices, with version 4 the
-default.
-.It Cm xleave
-Valid in
-.Cm peer
-and
-.Cm broadcast
-modes only, this flag enables interleave mode.
-.El
-.Ss Auxiliary Commands
-.Bl -tag -width indent
-.It Ic broadcastclient
-This command enables reception of broadcast server messages to
-any local interface (type b) address.
-Upon receiving a message for
-the first time, the broadcast client measures the nominal server
-propagation delay using a brief client/server exchange with the
-server, then enters the broadcast client mode, in which it
-synchronizes to succeeding broadcast messages.
-Note that, in order
-to avoid accidental or malicious disruption in this mode, both the
-server and client should operate using symmetric\-key or public\-key
-authentication as described in
-.Sx Authentication Options .
-.It Ic manycastserver Ar address ...
-This command enables reception of manycast client messages to
-the multicast group address(es) (type m) specified.
-At least one
-address is required, but the NTP multicast address 224.0.1.1
-assigned by the IANA should NOT be used, unless specific means are
-taken to limit the span of the reply and avoid a possibly massive
-implosion at the original sender.
-Note that, in order to avoid
-accidental or malicious disruption in this mode, both the server
-and client should operate using symmetric\-key or public\-key
-authentication as described in
-.Sx Authentication Options .
-.It Ic multicastclient Ar address ...
-This command enables reception of multicast server messages to
-the multicast group address(es) (type m) specified.
-Upon receiving
-a message for the first time, the multicast client measures the
-nominal server propagation delay using a brief client/server
-exchange with the server, then enters the broadcast client mode, in
-which it synchronizes to succeeding multicast messages.
-Note that,
-in order to avoid accidental or malicious disruption in this mode,
-both the server and client should operate using symmetric\-key or
-public\-key authentication as described in
-.Sx Authentication Options .
-.It Ic mdnstries Ar number
-If we are participating in mDNS,
-after we have synched for the first time
-we attempt to register with the mDNS system.
-If that registration attempt fails,
-we try again at one minute intervals for up to
-.Ic mdnstries
-times.
-After all,
-.Ic ntpd
-may be starting before mDNS.
-The default value for
-.Ic mdnstries
-is 5.
-.El
-.Sh Authentication Support
-Authentication support allows the NTP client to verify that the
-server is in fact known and trusted and not an intruder intending
-accidentally or on purpose to masquerade as that server.
-The NTPv3
-specification RFC\-1305 defines a scheme which provides
-cryptographic authentication of received NTP packets.
-Originally,
-this was done using the Data Encryption Standard (DES) algorithm
-operating in Cipher Block Chaining (CBC) mode, commonly called
-DES\-CBC.
-Subsequently, this was replaced by the RSA Message Digest
-5 (MD5) algorithm using a private key, commonly called keyed\-MD5.
-Either algorithm computes a message digest, or one\-way hash, which
-can be used to verify the server has the correct private key and
-key identifier.
-.Pp
-NTPv4 retains the NTPv3 scheme, properly described as symmetric key
-cryptography and, in addition, provides a new Autokey scheme
-based on public key cryptography.
-Public key cryptography is generally considered more secure
-than symmetric key cryptography, since the security is based
-on a private value which is generated by each server and
-never revealed.
-With Autokey all key distribution and
-management functions involve only public values, which
-considerably simplifies key distribution and storage.
-Public key management is based on X.509 certificates,
-which can be provided by commercial services or
-produced by utility programs in the OpenSSL software library
-or the NTPv4 distribution.
-.Pp
-While the algorithms for symmetric key cryptography are
-included in the NTPv4 distribution, public key cryptography
-requires the OpenSSL software library to be installed
-before building the NTP distribution.
-Directions for doing that
-are on the Building and Installing the Distribution page.
-.Pp
-Authentication is configured separately for each association
-using the
-.Cm key
-or
-.Cm autokey
-subcommand on the
-.Ic peer ,
-.Ic server ,
-.Ic broadcast
-and
-.Ic manycastclient
-configuration commands as described in
-.Sx Configuration Options
-page.
-The authentication
-options described below specify the locations of the key files,
-if other than default, which symmetric keys are trusted
-and the interval between various operations, if other than default.
-.Pp
-Authentication is always enabled,
-although ineffective if not configured as
-described below.
-If a NTP packet arrives
-including a message authentication
-code (MAC), it is accepted only if it
-passes all cryptographic checks.
-The
-checks require correct key ID, key value
-and message digest.
-If the packet has
-been modified in any way or replayed
-by an intruder, it will fail one or more
-of these checks and be discarded.
-Furthermore, the Autokey scheme requires a
-preliminary protocol exchange to obtain
-the server certificate, verify its
-credentials and initialize the protocol
-.Pp
-The
-.Cm auth
-flag controls whether new associations or
-remote configuration commands require cryptographic authentication.
-This flag can be set or reset by the
-.Ic enable
-and
-.Ic disable
-commands and also by remote
-configuration commands sent by a
-.Xr ntpdc 1ntpdcmdoc
-program running on
-another machine.
-If this flag is enabled, which is the default
-case, new broadcast client and symmetric passive associations and
-remote configuration commands must be cryptographically
-authenticated using either symmetric key or public key cryptography.
-If this
-flag is disabled, these operations are effective
-even if not cryptographic
-authenticated.
-It should be understood
-that operating with the
-.Ic auth
-flag disabled invites a significant vulnerability
-where a rogue hacker can
-masquerade as a falseticker and seriously
-disrupt system timekeeping.
-It is
-important to note that this flag has no purpose
-other than to allow or disallow
-a new association in response to new broadcast
-and symmetric active messages
-and remote configuration commands and, in particular,
-the flag has no effect on
-the authentication process itself.
-.Pp
-An attractive alternative where multicast support is available
-is manycast mode, in which clients periodically troll
-for servers as described in the
-.Sx Automatic NTP Configuration Options
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+.Qq Authentication Support
+section of the
+.Xr ntp.conf 5
page.
-Either symmetric key or public key
-cryptographic authentication can be used in this mode.
-The principle advantage
-of manycast mode is that potential servers need not be
-configured in advance,
-since the client finds them during regular operation,
-and the configuration
-files for all clients can be identical.
.Pp
-The security model and protocol schemes for
-both symmetric key and public key
-cryptography are summarized below;
-further details are in the briefings, papers
-and reports at the NTP project page linked from
-.Li http://www.ntp.org/ .
-.Ss Symmetric\-Key Cryptography
-The original RFC\-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32\-bit key identifier, to
-authenticate an association.
-The servers and clients involved must
-agree on the key and key identifier to
-authenticate NTP packets.
-Keys and
-related information are specified in a key
-file, usually called
-.Pa ntp.keys ,
-which must be distributed and stored using
-secure means beyond the scope of the NTP protocol itself.
-Besides the keys used
-for ordinary NTP associations,
-additional keys can be used as passwords for the
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-utility programs.
-.Pp
-When
-.Xr ntpd 1ntpdmdoc
-is first started, it reads the key file specified in the
+.Xr ntpd 8
+reads its keys from a file specified using the
+.Fl k
+command line option or the
.Ic keys
-configuration command and installs the keys
-in the key cache.
-However,
-individual keys must be activated with the
-.Ic trusted
-command before use.
-This
-allows, for instance, the installation of possibly
-several batches of keys and
-then activating or deactivating each batch
-remotely using
-.Xr ntpdc 1ntpdcmdoc .
-This also provides a revocation capability that can be used
-if a key becomes compromised.
-The
-.Ic requestkey
-command selects the key used as the password for the
-.Xr ntpdc 1ntpdcmdoc
-utility, while the
-.Ic controlkey
-command selects the key used as the password for the
-.Xr ntpq 1ntpqmdoc
-utility.
-.Ss Public Key Cryptography
-NTPv4 supports the original NTPv3 symmetric key scheme
-described in RFC\-1305 and in addition the Autokey protocol,
-which is based on public key cryptography.
-The Autokey Version 2 protocol described on the Autokey Protocol
-page verifies packet integrity using MD5 message digests
-and verifies the source with digital signatures and any of several
-digest/signature schemes.
-Optional identity schemes described on the Identity Schemes
-page and based on cryptographic challenge/response algorithms
-are also available.
-Using all of these schemes provides strong security against
-replay with or without modification, spoofing, masquerade
-and most forms of clogging attacks.
-.\" .Pp
-.\" The cryptographic means necessary for all Autokey operations
-.\" is provided by the OpenSSL software library.
-.\" This library is available from http://www.openssl.org/
-.\" and can be installed using the procedures outlined
-.\" in the Building and Installing the Distribution page.
-.\" Once installed,
-.\" the configure and build
-.\" process automatically detects the library and links
-.\" the library routines required.
+statement in the configuration file.
+While key number 0 is fixed by the NTP standard
+(as 56 zero bits)
+and may not be changed,
+one or more keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
.Pp
-The Autokey protocol has several modes of operation
-corresponding to the various NTP modes supported.
-Most modes use a special cookie which can be
-computed independently by the client and server,
-but encrypted in transmission.
-All modes use in addition a variant of the S\-KEY scheme,
-in which a pseudo\-random key list is generated and used
-in reverse order.
-These schemes are described along with an executive summary,
-current status, briefing slides and reading list on the
-.Sx Autonomous Authentication
-page.
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
.Pp
-The specific cryptographic environment used by Autokey servers
-and clients is determined by a set of files
-and soft links generated by the
-.Xr ntp\-keygen 1ntpkeygenmdoc
-program.
-This includes a required host key file,
-required certificate file and optional sign key file,
-leapsecond file and identity scheme files.
-The
-digest/signature scheme is specified in the X.509 certificate
-along with the matching sign key.
-There are several schemes
-available in the OpenSSL software library, each identified
-by a specific string such as
-.Cm md5WithRSAEncryption ,
-which stands for the MD5 message digest with RSA
-encryption scheme.
-The current NTP distribution supports
-all the schemes in the OpenSSL library, including
-those based on RSA and DSA digital signatures.
+.D1 Ar keyno type key opt_IP_list
.Pp
-NTP secure groups can be used to define cryptographic compartments
-and security hierarchies.
-It is important that every host
-in the group be able to construct a certificate trail to one
-or more trusted hosts in the same group.
-Each group
-host runs the Autokey protocol to obtain the certificates
-for all hosts along the trail to one or more trusted hosts.
-This requires the configuration file in all hosts to be
-engineered so that, even under anticipated failure conditions,
-the NTP subnet will form such that every group host can find
-a trail to at least one trusted host.
-.Ss Naming and Addressing
-It is important to note that Autokey does not use DNS to
-resolve addresses, since DNS can't be completely trusted
-until the name servers have synchronized clocks.
-The cryptographic name used by Autokey to bind the host identity
-credentials and cryptographic values must be independent
-of interface, network and any other naming convention.
-The name appears in the host certificate in either or both
-the subject and issuer fields, so protection against
-DNS compromise is essential.
-.Pp
-By convention, the name of an Autokey host is the name returned
-by the Unix
-.Xr gethostname 2
-system call or equivalent in other systems.
-By the system design
-model, there are no provisions to allow alternate names or aliases.
-However, this is not to say that DNS aliases, different names
-for each interface, etc., are constrained in any way.
-.Pp
-It is also important to note that Autokey verifies authenticity
-using the host name, network address and public keys,
-all of which are bound together by the protocol specifically
-to deflect masquerade attacks.
-For this reason Autokey
-includes the source and destination IP addresses in message digest
-computations and so the same addresses must be available
-at both the server and client.
-For this reason operation
-with network address translation schemes is not possible.
-This reflects the intended robust security model where government
-and corporate NTP servers are operated outside firewall perimeters.
-.Ss Operation
-A specific combination of authentication scheme (none,
-symmetric key, public key) and identity scheme is called
-a cryptotype, although not all combinations are compatible.
-There may be management configurations where the clients,
-servers and peers may not all support the same cryptotypes.
-A secure NTPv4 subnet can be configured in many ways while
-keeping in mind the principles explained above and
-in this section.
-Note however that some cryptotype
-combinations may successfully interoperate with each other,
-but may not represent good security practice.
-.Pp
-The cryptotype of an association is determined at the time
-of mobilization, either at configuration time or some time
-later when a message of appropriate cryptotype arrives.
-When mobilized by a
-.Ic server
-or
-.Ic peer
-configuration command and no
-.Ic key
-or
-.Ic autokey
-subcommands are present, the association is not
-authenticated; if the
-.Ic key
-subcommand is present, the association is authenticated
-using the symmetric key ID specified; if the
-.Ic autokey
-subcommand is present, the association is authenticated
-using Autokey.
-.Pp
-When multiple identity schemes are supported in the Autokey
-protocol, the first message exchange determines which one is used.
-The client request message contains bits corresponding
-to which schemes it has available.
-The server response message
-contains bits corresponding to which schemes it has available.
-Both server and client match the received bits with their own
-and select a common scheme.
-.Pp
-Following the principle that time is a public value,
-a server responds to any client packet that matches
-its cryptotype capabilities.
-Thus, a server receiving
-an unauthenticated packet will respond with an unauthenticated
-packet, while the same server receiving a packet of a cryptotype
-it supports will respond with packets of that cryptotype.
-However, unconfigured broadcast or manycast client
-associations or symmetric passive associations will not be
-mobilized unless the server supports a cryptotype compatible
-with the first packet received.
-By default, unauthenticated associations will not be mobilized
-unless overridden in a decidedly dangerous way.
-.Pp
-Some examples may help to reduce confusion.
-Client Alice has no specific cryptotype selected.
-Server Bob has both a symmetric key file and minimal Autokey files.
-Alice's unauthenticated messages arrive at Bob, who replies with
-unauthenticated messages.
-Cathy has a copy of Bob's symmetric
-key file and has selected key ID 4 in messages to Bob.
-Bob verifies the message with his key ID 4.
-If it's the
-same key and the message is verified, Bob sends Cathy a reply
-authenticated with that key.
-If verification fails,
-Bob sends Cathy a thing called a crypto\-NAK, which tells her
-something broke.
-She can see the evidence using the
-.Xr ntpq 1ntpqmdoc
-program.
-.Pp
-Denise has rolled her own host key and certificate.
-She also uses one of the identity schemes as Bob.
-She sends the first Autokey message to Bob and they
-both dance the protocol authentication and identity steps.
-If all comes out okay, Denise and Bob continue as described above.
-.Pp
-It should be clear from the above that Bob can support
-all the girls at the same time, as long as he has compatible
-authentication and identity credentials.
-Now, Bob can act just like the girls in his own choice of servers;
-he can run multiple configured associations with multiple different
-servers (or the same server, although that might not be useful).
-But, wise security policy might preclude some cryptotype
-combinations; for instance, running an identity scheme
-with one server and no authentication with another might not be wise.
-.Ss Key Management
-The cryptographic values used by the Autokey protocol are
-incorporated as a set of files generated by the
-.Xr ntp\-keygen 1ntpkeygenmdoc
-utility program, including symmetric key, host key and
-public certificate files, as well as sign key, identity parameters
-and leapseconds files.
-Alternatively, host and sign keys and
-certificate files can be generated by the OpenSSL utilities
-and certificates can be imported from public certificate
-authorities.
-Note that symmetric keys are necessary for the
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-utility programs.
-The remaining files are necessary only for the
-Autokey protocol.
-.Pp
-Certificates imported from OpenSSL or public certificate
-authorities have certian limitations.
-The certificate should be in ASN.1 syntax, X.509 Version 3
-format and encoded in PEM, which is the same format
-used by OpenSSL.
-The overall length of the certificate encoded
-in ASN.1 must not exceed 1024 bytes.
-The subject distinguished
-name field (CN) is the fully qualified name of the host
-on which it is used; the remaining subject fields are ignored.
-The certificate extension fields must not contain either
-a subject key identifier or a issuer key identifier field;
-however, an extended key usage field for a trusted host must
-contain the value
-.Cm trustRoot ; .
-Other extension fields are ignored.
-.Ss Authentication Commands
-.Bl -tag -width indent
-.It Ic autokey Op Ar logsec
-Specifies the interval between regenerations of the session key
-list used with the Autokey protocol.
-Note that the size of the key
-list for each association depends on this interval and the current
-poll interval.
-The default value is 12 (4096 s or about 1.1 hours).
-For poll intervals above the specified interval, a session key list
-with a single entry will be regenerated for every message
-sent.
-.It Ic controlkey Ar key
-Specifies the key identifier to use with the
-.Xr ntpq 1ntpqmdoc
-utility, which uses the standard
-protocol defined in RFC\-1305.
-The
-.Ar key
-argument is
-the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
-.It Xo Ic crypto
-.Op Cm cert Ar file
-.Op Cm leap Ar file
-.Op Cm randfile Ar file
-.Op Cm host Ar file
-.Op Cm sign Ar file
-.Op Cm gq Ar file
-.Op Cm gqpar Ar file
-.Op Cm iffpar Ar file
-.Op Cm mvpar Ar file
-.Op Cm pw Ar password
-.Xc
-This command requires the OpenSSL library.
-It activates public key
-cryptography, selects the message digest and signature
-encryption scheme and loads the required private and public
-values described above.
-If one or more files are left unspecified,
-the default names are used as described above.
-Unless the complete path and name of the file are specified, the
-location of a file is relative to the keys directory specified
-in the
-.Ic keysdir
-command or default
-.Pa /usr/local/etc .
-Following are the subcommands:
-.Bl -tag -width indent
-.It Cm cert Ar file
-Specifies the location of the required host public certificate file.
-This overrides the link
-.Pa ntpkey_cert_ Ns Ar hostname
-in the keys directory.
-.It Cm gqpar Ar file
-Specifies the location of the optional GQ parameters file.
-This
-overrides the link
-.Pa ntpkey_gq_ Ns Ar hostname
-in the keys directory.
-.It Cm host Ar file
-Specifies the location of the required host key file.
-This overrides
-the link
-.Pa ntpkey_key_ Ns Ar hostname
-in the keys directory.
-.It Cm iffpar Ar file
-Specifies the location of the optional IFF parameters file.
-This overrides the link
-.Pa ntpkey_iff_ Ns Ar hostname
-in the keys directory.
-.It Cm leap Ar file
-Specifies the location of the optional leapsecond file.
-This overrides the link
-.Pa ntpkey_leap
-in the keys directory.
-.It Cm mvpar Ar file
-Specifies the location of the optional MV parameters file.
-This overrides the link
-.Pa ntpkey_mv_ Ns Ar hostname
-in the keys directory.
-.It Cm pw Ar password
-Specifies the password to decrypt files containing private keys and
-identity parameters.
-This is required only if these files have been
-encrypted.
-.It Cm randfile Ar file
-Specifies the location of the random seed file used by the OpenSSL
-library.
-The defaults are described in the main text above.
-.It Cm sign Ar file
-Specifies the location of the optional sign key file.
-This overrides
-the link
-.Pa ntpkey_sign_ Ns Ar hostname
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
-.El
-.It Ic keys Ar keyfile
-Specifies the complete path and location of the MD5 key file
-containing the keys and key identifiers used by
-.Xr ntpd 1ntpdmdoc ,
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-when operating with symmetric key cryptography.
-This is the same operation as the
-.Fl k
-command line option.
-.It Ic keysdir Ar path
-This command specifies the default directory path for
-cryptographic keys, parameters and certificates.
-The default is
-.Pa /usr/local/etc/ .
-.It Ic requestkey Ar key
-Specifies the key identifier to use with the
-.Xr ntpdc 1ntpdcmdoc
-utility program, which uses a
-proprietary protocol specific to this implementation of
-.Xr ntpd 1ntpdmdoc .
-The
-.Ar key
-argument is a key identifier
-for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
-.It Ic revoke Ar logsec
-Specifies the interval between re\-randomization of certain
-cryptographic values used by the Autokey scheme, as a power of 2 in
-seconds.
-These values need to be updated frequently in order to
-deflect brute\-force attacks on the algorithms of the scheme;
-however, updating some values is a relatively expensive operation.
-The default interval is 16 (65,536 s or about 18 hours).
-For poll
-intervals above the specified interval, the values will be updated
-for every message sent.
-.It Ic trustedkey Ar key ...
-Specifies the key identifiers which are trusted for the
-purposes of authenticating peers with symmetric key cryptography,
-as well as keys used by the
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-programs.
-The authentication procedures require that both the local
-and remote servers share the same key and key identifier for this
-purpose, although different keys can be used with different
-servers.
-The
+where
+.Ar keyno
+is a positive integer (between 1 and 65534),
+.Ar type
+is the message digest algorithm,
.Ar key
-arguments are 32\-bit unsigned
-integers with values from 1 to 65,534.
-.El
-.Ss Error Codes
-The following error codes are reported via the NTP control
-and monitoring protocol trap mechanism.
-.Bl -tag -width indent
-.It 101
-.Pq bad field format or length
-The packet has invalid version, length or format.
-.It 102
-.Pq bad timestamp
-The packet timestamp is the same or older than the most recent received.
-This could be due to a replay or a server clock time step.
-.It 103
-.Pq bad filestamp
-The packet filestamp is the same or older than the most recent received.
-This could be due to a replay or a key file generation error.
-.It 104
-.Pq bad or missing public key
-The public key is missing, has incorrect format or is an unsupported type.
-.It 105
-.Pq unsupported digest type
-The server requires an unsupported digest/signature scheme.
-.It 106
-.Pq mismatched digest types
-Not used.
-.It 107
-.Pq bad signature length
-The signature length does not match the current public key.
-.It 108
-.Pq signature not verified
-The message fails the signature check.
-It could be bogus or signed by a
-different private key.
-.It 109
-.Pq certificate not verified
-The certificate is invalid or signed with the wrong key.
-.It 110
-.Pq certificate not verified
-The certificate is not yet valid or has expired or the signature could not
-be verified.
-.It 111
-.Pq bad or missing cookie
-The cookie is missing, corrupted or bogus.
-.It 112
-.Pq bad or missing leapseconds table
-The leapseconds table is missing, corrupted or bogus.
-.It 113
-.Pq bad or missing certificate
-The certificate is missing, corrupted or bogus.
-.It 114
-.Pq bad or missing identity
-The identity key is missing, corrupt or bogus.
-.El
-.Sh Monitoring Support
-.Xr ntpd 1ntpdmdoc
-includes a comprehensive monitoring facility suitable
-for continuous, long term recording of server and client
-timekeeping performance.
-See the
-.Ic statistics
-command below
-for a listing and example of each type of statistics currently
-supported.
-Statistic files are managed using file generation sets
-and scripts in the
-.Pa ./scripts
-directory of the source code distribution.
-Using
-these facilities and
-.Ux
-.Xr cron 8
-jobs, the data can be
-automatically summarized and archived for retrospective analysis.
-.Ss Monitoring Commands
-.Bl -tag -width indent
-.It Ic statistics Ar name ...
-Enables writing of statistics records.
-Currently, eight kinds of
-.Ar name
-statistics are supported.
-.Bl -tag -width indent
-.It Cm clockstats
-Enables recording of clock driver statistics information.
-Each update
-received from a clock driver appends a line of the following form to
-the file generation set named
-.Cm clockstats :
-.Bd -literal
-49213 525.624 127.127.4.1 93 226 00:08:29.606 D
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
-The next field shows the
-clock address in dotted\-quad notation.
-The final field shows the last
-timecode received from the clock in decoded ASCII format, where
-meaningful.
-In some clock drivers a good deal of additional information
-can be gathered and displayed as well.
-See information specific to each
-clock for further details.
-.It Cm cryptostats
-This option requires the OpenSSL cryptographic software library.
-It
-enables recording of cryptographic public key protocol information.
-Each message received by the protocol module appends a line of the
-following form to the file generation set named
-.Cm cryptostats :
-.Bd -literal
-49213 525.624 127.127.4.1 message
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
-The next field shows the peer
-address in dotted\-quad notation, The final message field includes the
-message type and certain ancillary information.
-See the
-.Sx Authentication Options
-section for further information.
-.It Cm loopstats
-Enables recording of loop filter statistics information.
-Each
-update of the local clock outputs a line of the following form to
-the file generation set named
-.Cm loopstats :
-.Bd -literal
-50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
-The next five fields
-show time offset (seconds), frequency offset (parts per million \-
-PPM), RMS jitter (seconds), Allan deviation (PPM) and clock
-discipline time constant.
-.It Cm peerstats
-Enables recording of peer statistics information.
-This includes
-statistics records of all peers of a NTP server and of special
-signals, where present and configured.
-Each valid update appends a
-line of the following form to the current element of a file
-generation set named
-.Cm peerstats :
-.Bd -literal
-48773 10847.650 127.127.4.1 9714 \-0.001605376 0.000000000 0.001424877 0.000958674
-.Ed
+is the key itself, and
+.Ar opt_IP_list
+is an optional comma\-separated list of IPs
+where the
+.Ar keyno
+should be trusted.
+that are allowed to serve time.
+Each IP in
+.Ar opt_IP_list
+may contain an optional
+.Cm /subnetbits
+specification which identifies the number of bits for
+the desired subnet of trust.
+If
+.Ar opt_IP_list
+is empty,
+any properly\-authenticated message will be
+accepted.
.Pp
-The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
-The next two fields
-show the peer address in dotted\-quad notation and status,
-respectively.
-The status field is encoded in hex in the format
-described in Appendix A of the NTP specification RFC 1305.
-The final four fields show the offset,
-delay, dispersion and RMS jitter, all in seconds.
-.It Cm rawstats
-Enables recording of raw\-timestamp statistics information.
-This
-includes statistics records of all peers of a NTP server and of
-special signals, where present and configured.
-Each NTP message
-received from a peer or clock driver appends a line of the
-following form to the file generation set named
-.Cm rawstats :
-.Bd -literal
-50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
-The next two fields
-show the remote peer or clock address followed by the local address
-in dotted\-quad notation.
-The final four fields show the originate,
-receive, transmit and final NTP timestamps in order.
-The timestamp
-values are as received and before processing by the various data
-smoothing and mitigation algorithms.
-.It Cm sysstats
-Enables recording of ntpd statistics counters on a periodic basis.
-Each
-hour a line of the following form is appended to the file generation
-set named
-.Cm sysstats :
-.Bd -literal
-50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
-The remaining ten fields show
-the statistics counter values accumulated since the last generated
-line.
-.Bl -tag -width indent
-.It Time since restart Cm 36000
-Time in hours since the system was last rebooted.
-.It Packets received Cm 81965
-Total number of packets received.
-.It Packets processed Cm 0
-Number of packets received in response to previous packets sent
-.It Current version Cm 9546
-Number of packets matching the current NTP version.
-.It Previous version Cm 56
-Number of packets matching the previous NTP version.
-.It Bad version Cm 71793
-Number of packets matching neither NTP version.
-.It Access denied Cm 512
-Number of packets denied access for any reason.
-.It Bad length or format Cm 540
-Number of packets with invalid length, format or port number.
-.It Bad authentication Cm 10
-Number of packets not verified as authentic.
-.It Rate exceeded Cm 147
-Number of packets discarded due to rate limitation.
-.El
-.It Cm statsdir Ar directory_path
-Indicates the full path of a directory where statistics files
-should be created (see below).
-This keyword allows
-the (otherwise constant)
-.Cm filegen
-filename prefix to be modified for file generation sets, which
-is useful for handling statistics logs.
-.It Cm filegen Ar name Xo
-.Op Cm file Ar filename
-.Op Cm type Ar typename
-.Op Cm link | nolink
-.Op Cm enable | disable
-.Xc
-Configures setting of generation file set name.
-Generation
-file sets provide a means for handling files that are
-continuously growing during the lifetime of a server.
-Server statistics are a typical example for such files.
-Generation file sets provide access to a set of files used
-to store the actual data.
-At any time at most one element
-of the set is being written to.
-The type given specifies
-when and how data will be directed to a new element of the set.
-This way, information stored in elements of a file set
-that are currently unused are available for administrational
-operations without the risk of disturbing the operation of ntpd.
-(Most important: they can be removed to free space for new data
-produced.)
-.Pp
-Note that this command can be sent from the
-.Xr ntpdc 1ntpdcmdoc
-program running at a remote location.
-.Bl -tag -width indent
-.It Cm name
-This is the type of the statistics records, as shown in the
-.Cm statistics
-command.
-.It Cm file Ar filename
-This is the file name for the statistics records.
-Filenames of set
-members are built from three concatenated elements
-.Ar Cm prefix ,
-.Ar Cm filename
-and
-.Ar Cm suffix :
-.Bl -tag -width indent
-.It Cm prefix
-This is a constant filename path.
-It is not subject to
-modifications via the
-.Ar filegen
-option.
-It is defined by the
-server, usually specified as a compile\-time constant.
-It may,
-however, be configurable for individual file generation sets
-via other commands.
-For example, the prefix used with
-.Ar loopstats
-and
-.Ar peerstats
-generation can be configured using the
-.Ar statsdir
-option explained above.
-.It Cm filename
-This string is directly concatenated to the prefix mentioned
-above (no intervening
-.Ql / ) .
-This can be modified using
-the file argument to the
-.Ar filegen
-statement.
-No
-.Pa ..
-elements are
-allowed in this component to prevent filenames referring to
-parts outside the filesystem hierarchy denoted by
-.Ar prefix .
-.It Cm suffix
-This part is reflects individual elements of a file set.
-It is
-generated according to the type of a file set.
-.El
-.It Cm type Ar typename
-A file generation set is characterized by its type.
-The following
-types are supported:
-.Bl -tag -width indent
-.It Cm none
-The file set is actually a single plain file.
-.It Cm pid
-One element of file set is used per incarnation of a ntpd
-server.
-This type does not perform any changes to file set
-members during runtime, however it provides an easy way of
-separating files belonging to different
-.Xr ntpd 1ntpdmdoc
-server incarnations.
-The set member filename is built by appending a
-.Ql \&.
-to concatenated
-.Ar prefix
-and
-.Ar filename
-strings, and
-appending the decimal representation of the process ID of the
-.Xr ntpd 1ntpdmdoc
-server process.
-.It Cm day
-One file generation set element is created per day.
-A day is
-defined as the period between 00:00 and 24:00 UTC.
-The file set
-member suffix consists of a
-.Ql \&.
-and a day specification in
-the form
-.Cm YYYYMMdd .
-.Cm YYYY
-is a 4\-digit year number (e.g., 1992).
-.Cm MM
-is a two digit month number.
-.Cm dd
-is a two digit day number.
-Thus, all information written at 10 December 1992 would end up
-in a file named
-.Ar prefix
-.Ar filename Ns .19921210 .
-.It Cm week
-Any file set member contains data related to a certain week of
-a year.
-The term week is defined by computing day\-of\-year
-modulo 7.
-Elements of such a file generation set are
-distinguished by appending the following suffix to the file set
-filename base: A dot, a 4\-digit year number, the letter
-.Cm W ,
-and a 2\-digit week number.
-For example, information from January,
-10th 1992 would end up in a file with suffix
-.No . Ns Ar 1992W1 .
-.It Cm month
-One generation file set element is generated per month.
The
-file name suffix consists of a dot, a 4\-digit year number, and
-a 2\-digit month.
-.It Cm year
-One generation file element is generated per year.
-The filename
-suffix consists of a dot and a 4 digit year number.
-.It Cm age
-This type of file generation sets changes to a new element of
-the file set every 24 hours of server operation.
-The filename
-suffix consists of a dot, the letter
-.Cm a ,
-and an 8\-digit number.
-This number is taken to be the number of seconds the server is
-running at the start of the corresponding 24\-hour period.
-Information is only written to a file generation by specifying
-.Cm enable ;
-output is prevented by specifying
-.Cm disable .
-.El
-.It Cm link | nolink
-It is convenient to be able to access the current element of a file
-generation set by a fixed name.
-This feature is enabled by
-specifying
-.Cm link
-and disabled using
-.Cm nolink .
-If link is specified, a
-hard link from the current file set element to a file without
-suffix is created.
-When there is already a file with this name and
-the number of links of this file is one, it is renamed appending a
-dot, the letter
-.Cm C ,
-and the pid of the
-.Xr ntpd 1ntpdmdoc
-server process.
-When the
-number of links is greater than one, the file is unlinked.
-This
-allows the current file to be accessed by a constant name.
-.It Cm enable \&| Cm disable
-Enables or disables the recording function.
-.El
-.El
-.El
-.Sh Access Control Support
-The
-.Xr ntpd 1ntpdmdoc
-daemon implements a general purpose address/mask based restriction
-list.
-The list contains address/match entries sorted first
-by increasing address values and and then by increasing mask values.
-A match occurs when the bitwise AND of the mask and the packet
-source address is equal to the bitwise AND of the mask and
-address in the list.
-The list is searched in order with the
-last match found defining the restriction flags associated
-with the entry.
-Additional information and examples can be found in the
-.Qq Notes on Configuring NTP and Setting up a NTP Subnet
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.Pp
-The restriction facility was implemented in conformance
-with the access policies for the original NSFnet backbone
-time servers.
-Later the facility was expanded to deflect
-cryptographic and clogging attacks.
-While this facility may
-be useful for keeping unwanted or broken or malicious clients
-from congesting innocent servers, it should not be considered
-an alternative to the NTP authentication facilities.
-Source address based restrictions are easily circumvented
-by a determined cracker.
-.Pp
-Clients can be denied service because they are explicitly
-included in the restrict list created by the
-.Ic restrict
-command
-or implicitly as the result of cryptographic or rate limit
-violations.
-Cryptographic violations include certificate
-or identity verification failure; rate limit violations generally
-result from defective NTP implementations that send packets
-at abusive rates.
-Some violations cause denied service
-only for the offending packet, others cause denied service
-for a timed period and others cause the denied service for
-an indefinite period.
-When a client or network is denied access
-for an indefinite period, the only way at present to remove
-the restrictions is by restarting the server.
-.Ss The Kiss\-of\-Death Packet
-Ordinarily, packets denied service are simply dropped with no
-further action except incrementing statistics counters.
-Sometimes a
-more proactive response is needed, such as a server message that
-explicitly requests the client to stop sending and leave a message
-for the system operator.
-A special packet format has been created
-for this purpose called the "kiss\-of\-death" (KoD) packet.
-KoD packets have the leap bits set unsynchronized and stratum set
-to zero and the reference identifier field set to a four\-byte
-ASCII code.
-If the
-.Cm noserve
+.Ar key
+may be given in a format
+controlled by the
+.Ar type
+field.
+The
+.Ar type
+.Li MD5
+is always supported.
+If
+.Li ntpd
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140\-2 is required the
+.Ar type
+must be either
+.Li SHA
or
-.Cm notrust
-flag of the matching restrict list entry is set,
-the code is "DENY"; if the
-.Cm limited
-flag is set and the rate limit
-is exceeded, the code is "RATE".
-Finally, if a cryptographic violation occurs, the code is "CRYP".
+.Li SHA1 .
.Pp
-A client receiving a KoD performs a set of sanity checks to
-minimize security exposure, then updates the stratum and
-reference identifier peer variables, sets the access
-denied (TEST4) bit in the peer flash variable and sends
-a message to the log.
-As long as the TEST4 bit is set,
-the client will send no further packets to the server.
-The only way at present to recover from this condition is
-to restart the protocol at both the client and server.
-This
-happens automatically at the client when the association times out.
-It will happen at the server only if the server operator cooperates.
-.Ss Access Control Commands
-.Bl -tag -width indent
-.It Xo Ic discard
-.Op Cm average Ar avg
-.Op Cm minimum Ar min
-.Op Cm monitor Ar prob
-.Xc
-Set the parameters of the
-.Cm limited
-facility which protects the server from
-client abuse.
-The
-.Cm average
-subcommand specifies the minimum average packet
-spacing, while the
-.Cm minimum
-subcommand specifies the minimum packet spacing.
-Packets that violate these minima are discarded
-and a kiss\-o'\-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
-The
-.Ic monitor
-subcommand specifies the probability of discard
-for packets that overflow the rate\-control window.
-.It Xo Ic restrict address
-.Op Cm mask Ar mask
-.Op Ar flag ...
-.Xc
-The
-.Ar address
-argument expressed in
-dotted\-quad form is the address of a host or network.
-Alternatively, the
-.Ar address
-argument can be a valid host DNS name.
-The
-.Ar mask
-argument expressed in dotted\-quad form defaults to
-.Cm 255.255.255.255 ,
-meaning that the
-.Ar address
-is treated as the address of an individual host.
-A default entry (address
-.Cm 0.0.0.0 ,
-mask
-.Cm 0.0.0.0 )
-is always included and is always the first entry in the list.
-Note that text string
-.Cm default ,
-with no mask option, may
-be used to indicate the default entry.
-In the current implementation,
-.Cm flag
-always
-restricts access, i.e., an entry with no flags indicates that free
-access to the server is to be given.
-The flags are not orthogonal,
-in that more restrictive flags will often make less restrictive
-ones redundant.
-The flags can generally be classed into two
-categories, those which restrict time service and those which
-restrict informational queries and attempts to do run\-time
-reconfiguration of the server.
-One or more of the following flags
-may be specified:
-.Bl -tag -width indent
-.It Cm ignore
-Deny packets of all kinds, including
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-queries.
-.It Cm kod
-If this flag is set when an access violation occurs, a kiss\-o'\-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
-.It Cm limited
-Deny service if the packet spacing violates the lower limits specified
-in the
-.Ic discard
-command.
-A history of clients is kept using the
-monitoring capability of
-.Xr ntpd 1ntpdmdoc .
-Thus, monitoring is always active as
-long as there is a restriction entry with the
-.Cm limited
-flag.
-.It Cm lowpriotrap
-Declare traps set by matching hosts to be low priority.
-The
-number of traps a server can maintain is limited (the current limit
-is 3).
-Traps are usually assigned on a first come, first served
-basis, with later trap requestors being denied service.
-This flag
-modifies the assignment algorithm by allowing low priority traps to
-be overridden by later requests for normal priority traps.
-.It Cm nomodify
-Deny
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-queries which attempt to modify the state of the
-server (i.e., run time reconfiguration).
-Queries which return
-information are permitted.
-.It Cm noquery
-Deny
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-queries.
-Time service is not affected.
-.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
-It also includes
-.Cm pool
-associations, so if you want to use servers from a
-.Cm pool
-directive and also want to use
-.Cm nopeer
-by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
-include the
-.Cm nopeer
-directive.
-.It Cm noserve
-Deny all packets except
-.Xr ntpq 1ntpqmdoc
-and
-.Xr ntpdc 1ntpdcmdoc
-queries.
-.It Cm notrap
-Decline to provide mode 6 control message trap service to matching
-hosts.
-The trap service is a subsystem of the
-.Xr ntpq 1ntpqmdoc
-control message
-protocol which is intended for use by remote event logging programs.
-.It Cm notrust
-Deny service unless the packet is cryptographically authenticated.
-.It Cm ntpport
-This is actually a match algorithm modifier, rather than a
-restriction flag.
-Its presence causes the restriction entry to be
-matched only if the source port in the packet is the standard NTP
-UDP port (123).
-Both
-.Cm ntpport
-and
-.Cm non\-ntpport
-may
-be specified.
-The
-.Cm ntpport
-is considered more specific and
-is sorted later in the list.
-.It Cm version
-Deny packets that do not match the current NTP version.
-.El
-.Pp
-Default restriction list entries with the flags ignore, interface,
-ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
-A default entry is also always present, though if it is
-otherwise unconfigured; no flags are associated
-with the default entry (i.e., everything besides your own
-NTP server is unrestricted).
-.El
-.Sh Automatic NTP Configuration Options
-.Ss Manycasting
-Manycasting is a automatic discovery and configuration paradigm
-new to NTPv4.
-It is intended as a means for a multicast client
-to troll the nearby network neighborhood to find cooperating
-manycast servers, validate them using cryptographic means
-and evaluate their time values with respect to other servers
-that might be lurking in the vicinity.
-The intended result is that each manycast client mobilizes
-client associations with some number of the "best"
-of the nearby manycast servers, yet automatically reconfigures
-to sustain this number of servers should one or another fail.
-.Pp
-Note that the manycasting paradigm does not coincide
-with the anycast paradigm described in RFC\-1546,
-which is designed to find a single server from a clique
-of servers providing the same service.
-The manycast paradigm is designed to find a plurality
-of redundant servers satisfying defined optimality criteria.
-.Pp
-Manycasting can be used with either symmetric key
-or public key cryptography.
-The public key infrastructure (PKI)
-offers the best protection against compromised keys
-and is generally considered stronger, at least with relatively
-large key sizes.
-It is implemented using the Autokey protocol and
-the OpenSSL cryptographic library available from
-.Li http://www.openssl.org/ .
-The library can also be used with other NTPv4 modes
-as well and is highly recommended, especially for broadcast modes.
-.Pp
-A persistent manycast client association is configured
-using the
-.Ic manycastclient
-command, which is similar to the
-.Ic server
-command but with a multicast (IPv4 class
-.Cm D
-or IPv6 prefix
-.Cm FF )
-group address.
-The IANA has designated IPv4 address 224.1.1.1
-and IPv6 address FF05::101 (site local) for NTP.
-When more servers are needed, it broadcasts manycast
-client messages to this address at the minimum feasible rate
-and minimum feasible time\-to\-live (TTL) hops, depending
-on how many servers have already been found.
-There can be as many manycast client associations
-as different group address, each one serving as a template
-for a future ephemeral unicast client/server association.
-.Pp
-Manycast servers configured with the
-.Ic manycastserver
-command listen on the specified group address for manycast
-client messages.
-Note the distinction between manycast client,
-which actively broadcasts messages, and manycast server,
-which passively responds to them.
-If a manycast server is
-in scope of the current TTL and is itself synchronized
-to a valid source and operating at a stratum level equal
-to or lower than the manycast client, it replies to the
-manycast client message with an ordinary unicast server message.
-.Pp
-The manycast client receiving this message mobilizes
-an ephemeral client/server association according to the
-matching manycast client template, but only if cryptographically
-authenticated and the server stratum is less than or equal
-to the client stratum.
-Authentication is explicitly required
-and either symmetric key or public key (Autokey) can be used.
-Then, the client polls the server at its unicast address
-in burst mode in order to reliably set the host clock
-and validate the source.
-This normally results
-in a volley of eight client/server at 2\-s intervals
-during which both the synchronization and cryptographic
-protocols run concurrently.
-Following the volley,
-the client runs the NTP intersection and clustering
-algorithms, which act to discard all but the "best"
-associations according to stratum and synchronization
-distance.
-The surviving associations then continue
-in ordinary client/server mode.
-.Pp
-The manycast client polling strategy is designed to reduce
-as much as possible the volume of manycast client messages
-and the effects of implosion due to near\-simultaneous
-arrival of manycast server messages.
-The strategy is determined by the
-.Ic manycastclient ,
-.Ic tos
-and
-.Ic ttl
-configuration commands.
-The manycast poll interval is
-normally eight times the system poll interval,
-which starts out at the
-.Cm minpoll
-value specified in the
-.Ic manycastclient ,
-command and, under normal circumstances, increments to the
-.Cm maxpolll
-value specified in this command.
-Initially, the TTL is
-set at the minimum hops specified by the
-.Ic ttl
-command.
-At each retransmission the TTL is increased until reaching
-the maximum hops specified by this command or a sufficient
-number client associations have been found.
-Further retransmissions use the same TTL.
-.Pp
-The quality and reliability of the suite of associations
-discovered by the manycast client is determined by the NTP
-mitigation algorithms and the
-.Cm minclock
-and
-.Cm minsane
-values specified in the
-.Ic tos
-configuration command.
-At least
-.Cm minsane
-candidate servers must be available and the mitigation
-algorithms produce at least
-.Cm minclock
-survivors in order to synchronize the clock.
-Byzantine agreement principles require at least four
-candidates in order to correctly discard a single falseticker.
-For legacy purposes,
-.Cm minsane
-defaults to 1 and
-.Cm minclock
-defaults to 3.
-For manycast service
-.Cm minsane
-should be explicitly set to 4, assuming at least that
-number of servers are available.
-.Pp
-If at least
-.Cm minclock
-servers are found, the manycast poll interval is immediately
-set to eight times
-.Cm maxpoll .
-If less than
-.Cm minclock
-servers are found when the TTL has reached the maximum hops,
-the manycast poll interval is doubled.
-For each transmission
-after that, the poll interval is doubled again until
-reaching the maximum of eight times
-.Cm maxpoll .
-Further transmissions use the same poll interval and
-TTL values.
-Note that while all this is going on,
-each client/server association found is operating normally
-it the system poll interval.
-.Pp
-Administratively scoped multicast boundaries are normally
-specified by the network router configuration and,
-in the case of IPv6, the link/site scope prefix.
-By default, the increment for TTL hops is 32 starting
-from 31; however, the
-.Ic ttl
-configuration command can be
-used to modify the values to match the scope rules.
-.Pp
-It is often useful to narrow the range of acceptable
-servers which can be found by manycast client associations.
-Because manycast servers respond only when the client
-stratum is equal to or greater than the server stratum,
-primary (stratum 1) servers fill find only primary servers
-in TTL range, which is probably the most common objective.
-However, unless configured otherwise, all manycast clients
-in TTL range will eventually find all primary servers
-in TTL range, which is probably not the most common
-objective in large networks.
-The
-.Ic tos
-command can be used to modify this behavior.
-Servers with stratum below
-.Cm floor
-or above
-.Cm ceiling
-specified in the
-.Ic tos
-command are strongly discouraged during the selection
-process; however, these servers may be temporally
-accepted if the number of servers within TTL range is
-less than
-.Cm minclock .
-.Pp
-The above actions occur for each manycast client message,
-which repeats at the designated poll interval.
-However, once the ephemeral client association is mobilized,
-subsequent manycast server replies are discarded,
-since that would result in a duplicate association.
-If during a poll interval the number of client associations
-falls below
-.Cm minclock ,
-all manycast client prototype associations are reset
-to the initial poll interval and TTL hops and operation
-resumes from the beginning.
-It is important to avoid
-frequent manycast client messages, since each one requires
-all manycast servers in TTL range to respond.
-The result could well be an implosion, either minor or major,
-depending on the number of servers in range.
-The recommended value for
-.Cm maxpoll
-is 12 (4,096 s).
+What follows are some key types, and corresponding formats:
.Pp
-It is possible and frequently useful to configure a host
-as both manycast client and manycast server.
-A number of hosts configured this way and sharing a common
-group address will automatically organize themselves
-in an optimum configuration based on stratum and
-synchronization distance.
-For example, consider an NTP
-subnet of two primary servers and a hundred or more
-dependent clients.
-With two exceptions, all servers
-and clients have identical configuration files including both
-.Ic multicastclient
-and
-.Ic multicastserver
-commands using, for instance, multicast group address
-239.1.1.1.
-The only exception is that each primary server
-configuration file must include commands for the primary
-reference source such as a GPS receiver.
-.Pp
-The remaining configuration files for all secondary
-servers and clients have the same contents, except for the
-.Ic tos
-command, which is specific for each stratum level.
-For stratum 1 and stratum 2 servers, that command is
-not necessary.
-For stratum 3 and above servers the
-.Cm floor
-value is set to the intended stratum number.
-Thus, all stratum 3 configuration files are identical,
-all stratum 4 files are identical and so forth.
-.Pp
-Once operations have stabilized in this scenario,
-the primary servers will find the primary reference source
-and each other, since they both operate at the same
-stratum (1), but not with any secondary server or client,
-since these operate at a higher stratum.
-The secondary
-servers will find the servers at the same stratum level.
-If one of the primary servers loses its GPS receiver,
-it will continue to operate as a client and other clients
-will time out the corresponding association and
-re\-associate accordingly.
-.Pp
-Some administrators prefer to avoid running
-.Xr ntpd 1ntpdmdoc
-continuously and run either
-.Xr sntp 1sntpmdoc
+.Bl -tag -width RMD160 -compact
+.It Li MD5
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
or
-.Xr ntpd 1ntpdmdoc
-.Fl q
-as a cron job.
-In either case the servers must be
-configured in advance and the program fails if none are
-available when the cron job runs.
-A really slick
-application of manycast is with
-.Xr ntpd 1ntpdmdoc
-.Fl q .
-The program wakes up, scans the local landscape looking
-for the usual suspects, selects the best from among
-the rascals, sets the clock and then departs.
-Servers do not have to be configured in advance and
-all clients throughout the network can have the same
-configuration file.
-.Ss Manycast Interactions with Autokey
-Each time a manycast client sends a client mode packet
-to a multicast group address, all manycast servers
-in scope generate a reply including the host name
-and status word.
-The manycast clients then run
-the Autokey protocol, which collects and verifies
-all certificates involved.
-Following the burst interval
-all but three survivors are cast off,
-but the certificates remain in the local cache.
-It often happens that several complete signing trails
-from the client to the primary servers are collected in this way.
-.Pp
-About once an hour or less often if the poll interval
-exceeds this, the client regenerates the Autokey key list.
-This is in general transparent in client/server mode.
-However, about once per day the server private value
-used to generate cookies is refreshed along with all
-manycast client associations.
-In this case all
-cryptographic values including certificates is refreshed.
-If a new certificate has been generated since
-the last refresh epoch, it will automatically revoke
-all prior certificates that happen to be in the
-certificate cache.
-At the same time, the manycast
-scheme starts all over from the beginning and
-the expanding ring shrinks to the minimum and increments
-from there while collecting all servers in scope.
-.Ss Broadcast Options
-.Bl -tag -width indent
-.It Xo Ic tos
-.Oo
-.Cm bcpollbstep Ar gate
-.Oc
-.Xc
-This command provides a way to delay,
-by the specified number of broadcast poll intervals,
-believing backward time steps from a broadcast server.
-Broadcast time networks are expected to be trusted.
-In the event a broadcast server's time is stepped backwards,
-there is clear benefit to having the clients notice this change
-as soon as possible.
-Attacks such as replay attacks can happen, however,
-and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
-This value defaults to 0, but can be changed
-to any number of poll intervals between 0 and 4.
-.Ss Manycast Options
-.Bl -tag -width indent
-.It Xo Ic tos
-.Oo
-.Cm ceiling Ar ceiling |
-.Cm cohort { 0 | 1 } |
-.Cm floor Ar floor |
-.Cm minclock Ar minclock |
-.Cm minsane Ar minsane
-.Oc
-.Xc
-This command affects the clock selection and clustering
-algorithms.
-It can be used to select the quality and
-quantity of peers used to synchronize the system clock
-and is most useful in manycast mode.
-The variables operate
-as follows:
-.Bl -tag -width indent
-.It Cm ceiling Ar ceiling
-Peers with strata above
-.Cm ceiling
-will be discarded if there are at least
-.Cm minclock
-peers remaining.
-This value defaults to 15, but can be changed
-to any number from 1 to 15.
-.It Cm cohort Bro 0 | 1 Brc
-This is a binary flag which enables (0) or disables (1)
-manycast server replies to manycast clients with the same
-stratum level.
-This is useful to reduce implosions where
-large numbers of clients with the same stratum level
-are present.
-The default is to enable these replies.
-.It Cm floor Ar floor
-Peers with strata below
-.Cm floor
-will be discarded if there are at least
-.Cm minclock
-peers remaining.
-This value defaults to 1, but can be changed
-to any number from 1 to 15.
-.It Cm minclock Ar minclock
-The clustering algorithm repeatedly casts out outlier
-associations until no more than
-.Cm minclock
-associations remain.
-This value defaults to 3,
-but can be changed to any number from 1 to the number of
-configured sources.
-.It Cm minsane Ar minsane
-This is the minimum number of candidates available
-to the clock selection algorithm in order to produce
-one or more truechimers for the clustering algorithm.
-If fewer than this number are available, the clock is
-undisciplined and allowed to run free.
-The default is 1
-for legacy purposes.
-However, according to principles of
-Byzantine agreement,
-.Cm minsane
-should be at least 4 in order to detect and discard
-a single falseticker.
-.El
-.It Cm ttl Ar hop ...
-This command specifies a list of TTL values in increasing
-order, up to 8 values can be specified.
-In manycast mode these values are used in turn
-in an expanding\-ring search.
-The default is eight
-multiples of 32 starting at 31.
-.El
-.Sh Reference Clock Support
-The NTP Version 4 daemon supports some three dozen different radio,
-satellite and modem reference clocks plus a special pseudo\-clock
-used for backup or when no other clock source is available.
-Detailed descriptions of individual device drivers and options can
-be found in the
-.Qq Reference Clock Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-Additional information can be found in the pages linked
-there, including the
-.Qq Debugging Hints for Reference Clock Drivers
-and
-.Qq How To Write a Reference Clock Driver
-pages
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-In addition, support for a PPS
-signal is available as described in the
-.Qq Pulse\-per\-second (PPS) Signal Interfacing
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-Many
-drivers support special line discipline/streams modules which can
-significantly improve the accuracy using the driver.
-These are
-described in the
-.Qq Line Disciplines and Streams Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.Pp
-A reference clock will generally (though not always) be a radio
-timecode receiver which is synchronized to a source of standard
-time such as the services offered by the NRC in Canada and NIST and
-USNO in the US.
-The interface between the computer and the timecode
-receiver is device dependent, but is usually a serial port.
-A
-device driver specific to each reference clock must be selected and
-compiled in the distribution; however, most common radio, satellite
-and modem clocks are included by default.
-Note that an attempt to
-configure a reference clock when the driver has not been compiled
-or the hardware port has not been appropriately configured results
-in a scalding remark to the system log file, but is otherwise non
-hazardous.
-.Pp
-For the purposes of configuration,
-.Xr ntpd 1ntpdmdoc
-treats
-reference clocks in a manner analogous to normal NTP peers as much
-as possible.
-Reference clocks are identified by a syntactically
-correct but invalid IP address, in order to distinguish them from
-normal NTP peers.
-Reference clock addresses are of the form
-.Sm off
-.Li 127.127. Ar t . Ar u ,
-.Sm on
-where
-.Ar t
-is an integer
-denoting the clock type and
-.Ar u
-indicates the unit
-number in the range 0\-3.
-While it may seem overkill, it is in fact
-sometimes useful to configure multiple reference clocks of the same
-type, in which case the unit numbers must be unique.
-.Pp
-The
-.Ic server
-command is used to configure a reference
-clock, where the
-.Ar address
-argument in that command
-is the clock address.
-The
-.Cm key ,
-.Cm version
-and
-.Cm ttl
-options are not used for reference clock support.
-The
-.Cm mode
-option is added for reference clock support, as
-described below.
-The
-.Cm prefer
-option can be useful to
-persuade the server to cherish a reference clock with somewhat more
-enthusiasm than other reference clocks or peers.
-Further
-information on this option can be found in the
-.Qq Mitigation Rules and the prefer Keyword
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-page.
-The
-.Cm minpoll
-and
-.Cm maxpoll
-options have
-meaning only for selected clock drivers.
-See the individual clock
-driver document pages for additional information.
+a
+.Li #
+(which is the "start of comment" character).
.Pp
-The
-.Ic fudge
-command is used to provide additional
-information for individual clock drivers and normally follows
-immediately after the
-.Ic server
-command.
-The
-.Ar address
-argument specifies the clock address.
-The
-.Cm refid
-and
-.Cm stratum
-options can be used to
-override the defaults for the device.
-There are two optional
-device\-dependent time offsets and four flags that can be included
-in the
-.Ic fudge
-command as well.
-.Pp
-The stratum number of a reference clock is by default zero.
-Since the
-.Xr ntpd 1ntpdmdoc
-daemon adds one to the stratum of each
-peer, a primary server ordinarily displays an external stratum of
-one.
-In order to provide engineered backups, it is often useful to
-specify the reference clock stratum as greater than zero.
-The
-.Cm stratum
-option is used for this purpose.
-Also, in cases
-involving both a reference clock and a pulse\-per\-second (PPS)
-discipline signal, it is useful to specify the reference clock
-identifier as other than the default, depending on the driver.
-The
-.Cm refid
-option is used for this purpose.
-Except where noted,
-these options apply to all clock drivers.
-.Ss Reference Clock Commands
-.Bl -tag -width indent
-.It Xo Ic server
-.Sm off
-.Li 127.127. Ar t . Ar u
-.Sm on
-.Op Cm prefer
-.Op Cm mode Ar int
-.Op Cm minpoll Ar int
-.Op Cm maxpoll Ar int
-.Xc
-This command can be used to configure reference clocks in
-special ways.
-The options are interpreted as follows:
-.Bl -tag -width indent
-.It Cm prefer
-Marks the reference clock as preferred.
-All other things being
-equal, this host will be chosen for synchronization among a set of
-correctly operating hosts.
-See the
-.Qq Mitigation Rules and the prefer Keyword
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-for further information.
-.It Cm mode Ar int
-Specifies a mode number which is interpreted in a
-device\-specific fashion.
-For instance, it selects a dialing
-protocol in the ACTS driver and a device subtype in the
-parse
-drivers.
-.It Cm minpoll Ar int
-.It Cm maxpoll Ar int
-These options specify the minimum and maximum polling interval
-for reference clock messages, as a power of 2 in seconds
-For
-most directly connected reference clocks, both
-.Cm minpoll
-and
-.Cm maxpoll
-default to 6 (64 s).
-For modem reference clocks,
-.Cm minpoll
-defaults to 10 (17.1 m) and
-.Cm maxpoll
-defaults to 14 (4.5 h).
-The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
-.El
-.It Xo Ic fudge
-.Sm off
-.Li 127.127. Ar t . Ar u
-.Sm on
-.Op Cm time1 Ar sec
-.Op Cm time2 Ar sec
-.Op Cm stratum Ar int
-.Op Cm refid Ar string
-.Op Cm mode Ar int
-.Op Cm flag1 Cm 0 \&| Cm 1
-.Op Cm flag2 Cm 0 \&| Cm 1
-.Op Cm flag3 Cm 0 \&| Cm 1
-.Op Cm flag4 Cm 0 \&| Cm 1
-.Xc
-This command can be used to configure reference clocks in
-special ways.
-It must immediately follow the
-.Ic server
-command which configures the driver.
-Note that the same capability
-is possible at run time using the
-.Xr ntpdc 1ntpdcmdoc
-program.
-The options are interpreted as
-follows:
-.Bl -tag -width indent
-.It Cm time1 Ar sec
-Specifies a constant to be added to the time offset produced by
-the driver, a fixed\-point decimal number in seconds.
-This is used
-as a calibration constant to adjust the nominal time offset of a
-particular clock to agree with an external standard, such as a
-precision PPS signal.
-It also provides a way to correct a
-systematic error or bias due to serial port or operating system
-latencies, different cable lengths or receiver internal delay.
-The
-specified offset is in addition to the propagation delay provided
-by other means, such as internal DIPswitches.
-Where a calibration
-for an individual system and driver is available, an approximate
-correction is noted in the driver documentation pages.
-Note: in order to facilitate calibration when more than one
-radio clock or PPS signal is supported, a special calibration
-feature is available.
-It takes the form of an argument to the
-.Ic enable
-command described in
-.Sx Miscellaneous Options
-page and operates as described in the
-.Qq Reference Clock Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.It Cm time2 Ar secs
-Specifies a fixed\-point decimal number in seconds, which is
-interpreted in a driver\-dependent way.
-See the descriptions of
-specific drivers in the
-.Qq Reference Clock Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.It Cm stratum Ar int
-Specifies the stratum number assigned to the driver, an integer
-between 0 and 15.
-This number overrides the default stratum number
-ordinarily assigned by the driver itself, usually zero.
-.It Cm refid Ar string
-Specifies an ASCII string of from one to four characters which
-defines the reference identifier used by the driver.
-This string
-overrides the default identifier ordinarily assigned by the driver
-itself.
-.It Cm mode Ar int
-Specifies a mode number which is interpreted in a
-device\-specific fashion.
-For instance, it selects a dialing
-protocol in the ACTS driver and a device subtype in the
-parse
-drivers.
-.It Cm flag1 Cm 0 \&| Cm 1
-.It Cm flag2 Cm 0 \&| Cm 1
-.It Cm flag3 Cm 0 \&| Cm 1
-.It Cm flag4 Cm 0 \&| Cm 1
-These four flags are used for customizing the clock driver.
-The
-interpretation of these values, and whether they are used at all,
-is a function of the particular clock driver.
-However, by
-convention
-.Cm flag4
-is used to enable recording monitoring
-data to the
-.Cm clockstats
-file configured with the
-.Ic filegen
-command.
-Further information on the
-.Ic filegen
-command can be found in
-.Sx Monitoring Options .
-.El
+.It Li SHA
+.It Li SHA1
+.It Li RMD160
+The key is a hex\-encoded ASCII string of 40 characters,
+which is truncated as necessary.
.El
-.Sh Miscellaneous Options
-.Bl -tag -width indent
-.It Ic broadcastdelay Ar seconds
-The broadcast and multicast modes require a special calibration
-to determine the network delay between the local and remote
-servers.
-Ordinarily, this is done automatically by the initial
-protocol exchanges between the client and server.
-In some cases,
-the calibration procedure may fail due to network or server access
-controls, for example.
-This command specifies the default delay to
-be used under these circumstances.
-Typically (for Ethernet), a
-number between 0.003 and 0.007 seconds is appropriate.
-The default
-when this command is not used is 0.004 seconds.
-.It Ic calldelay Ar delay
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
-.It Ic driftfile Ar driftfile
-This command specifies the complete path and name of the file used to
-record the frequency of the local clock oscillator.
-This is the same
-operation as the
-.Fl f
-command line option.
-If the file exists, it is read at
-startup in order to set the initial frequency and then updated once per
-hour with the current frequency computed by the daemon.
-If the file name is
-specified, but the file itself does not exist, the starts with an initial
-frequency of zero and creates the file when writing it for the first time.
-If this command is not given, the daemon will always start with an initial
-frequency of zero.
.Pp
-The file format consists of a single line containing a single
-floating point number, which records the frequency offset measured
-in parts\-per\-million (PPM).
-The file is updated by first writing
-the current drift value into a temporary file and then renaming
-this file to replace the old version.
-This implies that
-.Xr ntpd 1ntpdmdoc
-must have write permission for the directory the
-drift file is located in, and that file system links, symbolic or
-otherwise, should be avoided.
-.It Ic dscp Ar value
-This option specifies the Differentiated Services Control Point (DSCP) value,
-a 6\-bit code.
-The default value is 46, signifying Expedited Forwarding.
-.It Xo Ic enable
-.Oo
-.Cm auth | Cm bclient |
-.Cm calibrate | Cm kernel |
-.Cm mode7 | Cm monitor |
-.Cm ntp | Cm stats |
-.Cm peer_clear_digest_early |
-.Cm unpeer_crypto_early | Cm unpeer_crypto_nak_early | Cm unpeer_digest_early
-.Oc
-.Xc
-.It Xo Ic disable
-.Oo
-.Cm auth | Cm bclient |
-.Cm calibrate | Cm kernel |
-.Cm mode7 | Cm monitor |
-.Cm ntp | Cm stats |
-.Cm peer_clear_digest_early |
-.Cm unpeer_crypto_early | Cm unpeer_crypto_nak_early | Cm unpeer_digest_early
-.Oc
-.Xc
-Provides a way to enable or disable various server options.
-Flags not mentioned are unaffected.
-Note that all of these flags
-can be controlled remotely using the
-.Xr ntpdc 1ntpdcmdoc
-utility program.
-.Bl -tag -width indent
-.It Cm auth
-Enables the server to synchronize with unconfigured peers only if the
-peer has been correctly authenticated using either public key or
-private key cryptography.
-The default for this flag is
-.Ic enable .
-.It Cm bclient
-Enables the server to listen for a message from a broadcast or
-multicast server, as in the
-.Ic multicastclient
-command with default
-address.
-The default for this flag is
-.Ic disable .
-.It Cm calibrate
-Enables the calibrate feature for reference clocks.
-The default for
-this flag is
-.Ic disable .
-.It Cm kernel
-Enables the kernel time discipline, if available.
-The default for this
-flag is
-.Ic enable
-if support is available, otherwise
-.Ic disable .
-.It Cm mode7
-Enables processing of NTP mode 7 implementation\-specific requests
-which are used by the deprecated
-.Xr ntpdc 1ntpdcmdoc
-program.
-The default for this flag is disable.
-This flag is excluded from runtime configuration using
-.Xr ntpq 1ntpqmdoc .
-The
-.Xr ntpq 1ntpqmdoc
-program provides the same capabilities as
-.Xr ntpdc 1ntpdcmdoc
-using standard mode 6 requests.
-.It Cm monitor
-Enables the monitoring facility.
-See the
-.Xr ntpdc 1ntpdcmdoc
-program
-and the
-.Ic monlist
-command or further information.
-The
-default for this flag is
-.Ic enable .
-.It Cm ntp
-Enables time and frequency discipline.
-In effect, this switch opens and
-closes the feedback loop, which is useful for testing.
-The default for
-this flag is
-.Ic enable .
-.It Cm peer_clear_digest_early
-By default, if
-.Xr ntpd 1ntpdmdoc
-is using autokey and it
-receives a crypto\-NAK packet that
-passes the duplicate packet and origin timestamp checks
-the peer variables are immediately cleared.
-While this is generally a feature
-as it allows for quick recovery if a server key has changed,
-a properly forged and appropriately delivered crypto\-NAK packet
-can be used in a DoS attack.
-If you have active noticable problems with this type of DoS attack
-then you should consider
-disabling this option.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.It Cm stats
-Enables the statistics facility.
-See the
-.Sx Monitoring Options
-section for further information.
-The default for this flag is
-.Ic disable .
-.It Cm unpeer_crypto_early
-By default, if
-.Xr ntpd 1ntpdmdoc
-receives an autokey packet that fails TEST9,
-a crypto failure,
-the association is immediately cleared.
-This is almost certainly a feature,
-but if, in spite of the current recommendation of not using autokey,
-you are
-.B still
-using autokey
-.B and
-you are seeing this sort of DoS attack
-disabling this flag will delay
-tearing down the association until the reachability counter
-becomes zero.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.It Cm unpeer_crypto_nak_early
-By default, if
-.Xr ntpd 1ntpdmdoc
-receives a crypto\-NAK packet that
-passes the duplicate packet and origin timestamp checks
-the association is immediately cleared.
-While this is generally a feature
-as it allows for quick recovery if a server key has changed,
-a properly forged and appropriately delivered crypto\-NAK packet
-can be used in a DoS attack.
-If you have active noticable problems with this type of DoS attack
-then you should consider
-disabling this option.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.It Cm unpeer_digest_early
-By default, if
-.Xr ntpd 1ntpdmdoc
-receives what should be an authenticated packet
-that passes other packet sanity checks but
-contains an invalid digest
-the association is immediately cleared.
-While this is generally a feature
-as it allows for quick recovery,
-if this type of packet is carefully forged and sent
-during an appropriate window it can be used for a DoS attack.
-If you have active noticable problems with this type of DoS attack
-then you should consider
-disabling this option.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.El
-.It Ic includefile Ar includefile
-This command allows additional configuration commands
-to be included from a separate file.
-Include files may
-be nested to a depth of five; upon reaching the end of any
-include file, command processing resumes in the previous
-configuration file.
-This option is useful for sites that run
-.Xr ntpd 1ntpdmdoc
-on multiple hosts, with (mostly) common options (e.g., a
-restriction list).
-.It Ic leapsmearinterval Ar seconds
-This EXPERIMENTAL option is only available if
-.Xr ntpd 1ntpdmdoc
-was built with the
-.Cm \-\-enable\-leap\-smear
-option to the
-.Cm configure
-script.
-It specifies the interval over which a leap second correction will be applied.
-Recommended values for this option are between
-7200 (2 hours) and 86400 (24 hours).
-.Sy DO NOT USE THIS OPTION ON PUBLIC\-ACCESS SERVERS!
-See http://bugs.ntp.org/2855 for more information.
-.It Ic logconfig Ar configkeyword
-This command controls the amount and type of output written to
-the system
-.Xr syslog 3
-facility or the alternate
-.Ic logfile
-log file.
-By default, all output is turned on.
-All
-.Ar configkeyword
-keywords can be prefixed with
-.Ql = ,
-.Ql +
-and
-.Ql \- ,
-where
-.Ql =
-sets the
-.Xr syslog 3
-priority mask,
-.Ql +
-adds and
-.Ql \-
-removes
-messages.
-.Xr syslog 3
-messages can be controlled in four
-classes
-.Po
-.Cm clock ,
-.Cm peer ,
-.Cm sys
-and
-.Cm sync
-.Pc .
-Within these classes four types of messages can be
-controlled: informational messages
-.Po
-.Cm info
-.Pc ,
-event messages
-.Po
-.Cm events
-.Pc ,
-statistics messages
-.Po
-.Cm statistics
-.Pc
+Note that the keys used by the
+.Xr ntpq 8
and
-status messages
-.Po
-.Cm status
-.Pc .
-.Pp
-Configuration keywords are formed by concatenating the message class with
-the event class.
-The
-.Cm all
-prefix can be used instead of a message class.
-A
-message class may also be followed by the
-.Cm all
-keyword to enable/disable all
-messages of the respective message class.
-Thus, a minimal log configuration
-could look like this:
-.Bd -literal
-logconfig =syncstatus +sysevents
-.Ed
-.Pp
-This would just list the synchronizations state of
-.Xr ntpd 1ntpdmdoc
-and the major system events.
-For a simple reference server, the
-following minimum message configuration could be useful:
-.Bd -literal
-logconfig =syncall +clockall
-.Ed
-.Pp
-This configuration will list all clock information and
-synchronization information.
-All other events and messages about
-peers, system events and so on is suppressed.
-.It Ic logfile Ar logfile
-This command specifies the location of an alternate log file to
-be used instead of the default system
-.Xr syslog 3
-facility.
-This is the same operation as the
-.Fl l
-command line option.
-.It Ic setvar Ar variable Op Cm default
-This command adds an additional system variable.
-These
-variables can be used to distribute additional information such as
-the access policy.
-If the variable of the form
-.Sm off
-.Va name = Ar value
-.Sm on
-is followed by the
-.Cm default
-keyword, the
-variable will be listed as part of the default system variables
-.Po
-.Xr ntpq 1ntpqmdoc
-.Ic rv
-command
-.Pc ) .
-These additional variables serve
-informational purposes only.
-They are not related to the protocol
-other that they can be listed.
-The known protocol variables will
-always override any variables defined via the
-.Ic setvar
-mechanism.
-There are three special variables that contain the names
-of all variable of the same group.
-The
-.Va sys_var_list
-holds
-the names of all system variables.
-The
-.Va peer_var_list
-holds
-the names of all peer variables and the
-.Va clock_var_list
-holds the names of the reference clock variables.
-.It Xo Ic tinker
-.Oo
-.Cm allan Ar allan |
-.Cm dispersion Ar dispersion |
-.Cm freq Ar freq |
-.Cm huffpuff Ar huffpuff |
-.Cm panic Ar panic |
-.Cm step Ar step |
-.Cm stepback Ar stepback |
-.Cm stepfwd Ar stepfwd |
-.Cm stepout Ar stepout
-.Oc
-.Xc
-This command can be used to alter several system variables in
-very exceptional circumstances.
-It should occur in the
-configuration file before any other configuration options.
-The
-default values of these variables have been carefully optimized for
-a wide range of network speeds and reliability expectations.
-In
-general, they interact in intricate ways that are hard to predict
-and some combinations can result in some very nasty behavior.
-Very
-rarely is it necessary to change the default values; but, some
-folks cannot resist twisting the knobs anyway and this command is
-for them.
-Emphasis added: twisters are on their own and can expect
-no help from the support group.
-.Pp
-The variables operate as follows:
-.Bl -tag -width indent
-.It Cm allan Ar allan
-The argument becomes the new value for the minimum Allan
-intercept, which is a parameter of the PLL/FLL clock discipline
-algorithm.
-The value in log2 seconds defaults to 7 (1024 s), which is also the lower
-limit.
-.It Cm dispersion Ar dispersion
-The argument becomes the new value for the dispersion increase rate,
-normally .000015 s/s.
-.It Cm freq Ar freq
-The argument becomes the initial value of the frequency offset in
-parts\-per\-million.
-This overrides the value in the frequency file, if
-present, and avoids the initial training state if it is not.
-.It Cm huffpuff Ar huffpuff
-The argument becomes the new value for the experimental
-huff\-n'\-puff filter span, which determines the most recent interval
-the algorithm will search for a minimum delay.
-The lower limit is
-900 s (15 m), but a more reasonable value is 7200 (2 hours).
-There
-is no default, since the filter is not enabled unless this command
-is given.
-.It Cm panic Ar panic
-The argument is the panic threshold, normally 1000 s.
-If set to zero,
-the panic sanity check is disabled and a clock offset of any value will
-be accepted.
-.It Cm step Ar step
-The argument is the step threshold, which by default is 0.128 s.
-It can
-be set to any positive number in seconds.
-If set to zero, step
-adjustments will never occur.
-Note: The kernel time discipline is
-disabled if the step threshold is set to zero or greater than the
-default.
-.It Cm stepback Ar stepback
-The argument is the step threshold for the backward direction,
-which by default is 0.128 s.
-It can
-be set to any positive number in seconds.
-If both the forward and backward step thresholds are set to zero, step
-adjustments will never occur.
-Note: The kernel time discipline is
-disabled if
-each direction of step threshold are either
-set to zero or greater than .5 second.
-.It Cm stepfwd Ar stepfwd
-As for stepback, but for the forward direction.
-.It Cm stepout Ar stepout
-The argument is the stepout timeout, which by default is 900 s.
-It can
-be set to any positive number in seconds.
-If set to zero, the stepout
-pulses will not be suppressed.
-.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-.Fl i
-option).
-The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
-.It Xo Ic trap Ar host_address
-.Op Cm port Ar port_number
-.Op Cm interface Ar interface_address
-.Xc
-This command configures a trap receiver at the given host
-address and port number for sending messages with the specified
-local interface address.
-If the port number is unspecified, a value
-of 18447 is used.
-If the interface address is not specified, the
-message is sent with a source address of the local interface the
-message is sent through.
-Note that on a multihomed host the
-interface used may vary from time to time with routing changes.
-.Pp
-The trap receiver will generally log event messages and other
-information from the server in a log file.
-While such monitor
-programs may also request their own trap dynamically, configuring a
-trap receiver will ensure that no messages are lost when the server
-is started.
-.It Cm hop Ar ...
-This command specifies a list of TTL values in increasing order, up to 8
-values can be specified.
-In manycast mode these values are used in turn in
-an expanding\-ring search.
-The default is eight multiples of 32 starting at
-31.
-.El
+.Xr ntpdc 8
+programs are checked against passwords
+requested by the programs and entered by hand,
+so it is generally appropriate to specify these keys in ASCII format.
.Sh "OPTIONS"
.Bl -tag
.It Fl \-help
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from environment variables named:
.nf
- \fBNTP_CONF_<option\-name>\fP or \fBNTP_CONF\fP
+ \fBNTP_KEYS_<option\-name>\fP or \fBNTP_KEYS\fP
.fi
.ad
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh FILES
-.Bl -tag -width /etc/ntp.drift -compact
-.It Pa /etc/ntp.conf
+.Bl -tag -width /etc/ntp.keys -compact
+.It Pa /etc/ntp.keys
the default name of the configuration file
-.It Pa ntp.keys
-private MD5 keys
-.It Pa ntpkey
-RSA private key
-.It Pa ntpkey_ Ns Ar host
-RSA public key
-.It Pa ntp_dh
-Diffie\-Hellman agreement parameters
.El
.Sh "EXIT STATUS"
One of the following exit values will be returned:
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
.Xr ntpd 1ntpdmdoc ,
+.Xr ntpdate 1ntpdatemdoc ,
.Xr ntpdc 1ntpdcmdoc ,
-.Xr ntpq 1ntpqmdoc
-.Pp
-In addition to the manual pages provided,
-comprehensive documentation is available on the world wide web
-at
-.Li http://www.ntp.org/ .
-A snapshot of this documentation is available in HTML format in
-.Pa /usr/share/doc/ntp .
-.Rs
-.%A David L. Mills
-.%T Network Time Protocol (Version 4)
-.%O RFC5905
-.Re
+.Xr sntp 1sntpmdoc
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
-.Sh BUGS
-The syntax checking is not picky; some combinations of
-ridiculous and even hilarious options and modes may not be
-detected.
-.Pp
-The
-.Pa ntpkey_ Ns Ar host
-files are really digital
-certificates.
-These should be obtained via secure directory
-services when they become universally available.
-.Pp
+.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
This document was derived from FreeBSD.
.Pp
-This manual page was \fIAutoGen\fP\-erated from the \fBntp.conf\fP
+This manual page was \fIAutoGen\fP\-erated from the \fBntp.keys\fP
option definitions.
<p>This document describes the symmetric key file for the NTP Project’s
<code>ntpd</code> program.
</p>
-<p>This document applies to version 4.3.96 of <code>ntp.keys</code>.
+<p>This document applies to version 4.3.97 of <code>ntp.keys</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
-.TH ntp.keys 5 "06 Jun 2019" "4.3.96" "File Formats"
+.TH ntp.keys 5 "06 Jun 2019" "4.3.97" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:49 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:59 PM by AutoGen 5.18.5
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
is a positive integer (between 1 and 65534),
\f\*[I-Font]type\f[]
is the message digest algorithm,
-and
\f\*[I-Font]key\f[]
is the key itself, and
\f\*[I-Font]opt_IP_list\f[]
is an optional comma-separated list of IPs
+where the
+\f\*[I-Font]keyno\f[]
+should be trusted.
that are allowed to serve time.
+Each IP in
+\f\*[I-Font]opt_IP_list\f[]
+may contain an optional
+\f\*[B-Font]/subnetbits\f[]
+specification which identifies the number of bits for
+the desired subnet of trust.
If
\f\*[I-Font]opt_IP_list\f[]
is empty,
-any properly-authenticated server message will be
+any properly-authenticated message will be
accepted.
.sp \n(Ppu
.ne 2
.Dd June 6 2019
-.Dt NTP_CONF 5 File Formats
-.Os
+.Dt NTP_KEYS 5 File Formats
+.Os FreeBSD 11.2-RELEASE_SI
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:46 PM by AutoGen 5.18.5
-.\" From the definitions ntp.conf.def
-.\" and the template file agmdoc-cmd.tpl
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:50 PM by AutoGen 5.18.5
+.\" From the definitions ntp.keys.def
+.\" and the template file agmdoc-file.tpl
.Sh NAME
-.Nm ntp.conf
-.Nd Network Time Protocol (NTP) daemon configuration file format
+.Nm ntp.keys
+.Nd NTP symmetric key file format
+
+.Sh NAME
+.Nm ntp.keys
+.Nd NTP symmetric key file format
.Sh SYNOPSIS
.Nm
.Op Fl \-option\-name
All arguments must be options.
.Pp
.Sh DESCRIPTION
-The
-.Nm
-configuration file is read at initial startup by the
-.Xr ntpd @NTPD_MS@
-daemon in order to specify the synchronization sources,
-modes and other related information.
-Usually, it is installed in the
-.Pa /etc
-directory,
-but could be installed elsewhere
-(see the daemon's
-.Fl c
-command line option).
-.Pp
-The file format is similar to other
-.Ux
-configuration files.
-Comments begin with a
-.Ql #
-character and extend to the end of the line;
-blank lines are ignored.
-Configuration commands consist of an initial keyword
-followed by a list of arguments,
-some of which may be optional, separated by whitespace.
-Commands may not be continued over multiple lines.
-Arguments may be host names,
-host addresses written in numeric, dotted\-quad form,
-integers, floating point numbers (when specifying times in seconds)
-and text strings.
-.Pp
-The rest of this page describes the configuration and control options.
-The
-.Qq Notes on Configuring NTP and Setting up an NTP Subnet
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-contains an extended discussion of these options.
-In addition to the discussion of general
-.Sx Configuration Options ,
-there are sections describing the following supported functionality
-and the options used to control it:
-.Bl -bullet -offset indent
-.It
-.Sx Authentication Support
-.It
-.Sx Monitoring Support
-.It
-.Sx Access Control Support
-.It
-.Sx Automatic NTP Configuration Options
-.It
-.Sx Reference Clock Support
-.It
-.Sx Miscellaneous Options
-.El
-.Pp
-Following these is a section describing
-.Sx Miscellaneous Options .
-While there is a rich set of options available,
-the only required option is one or more
-.Ic pool ,
-.Ic server ,
-.Ic peer ,
-.Ic broadcast
-or
-.Ic manycastclient
-commands.
-.Sh Configuration Support
-Following is a description of the configuration commands in
-NTPv4.
-These commands have the same basic functions as in NTPv3 and
-in some cases new functions and new arguments.
-There are two
-classes of commands, configuration commands that configure a
-persistent association with a remote server or peer or reference
-clock, and auxiliary commands that specify environmental variables
-that control various related operations.
-.Ss Configuration Commands
-The various modes are determined by the command keyword and the
-type of the required IP address.
-Addresses are classed by type as
-(s) a remote server or peer (IPv4 class A, B and C), (b) the
-broadcast address of a local interface, (m) a multicast address (IPv4
-class D), or (r) a reference clock address (127.127.x.x).
-Note that
-only those options applicable to each command are listed below.
-Use
-of options not listed may not be caught as an error, but may result
-in some weird and even destructive behavior.
-.Pp
-If the Basic Socket Interface Extensions for IPv6 (RFC\-2553)
-is detected, support for the IPv6 address family is generated
-in addition to the default support of the IPv4 address family.
-In a few cases, including the
-.Cm reslist
-billboard generated
-by
-.Xr ntpq @NTPQ_MS@
-or
-.Xr ntpdc @NTPDC_MS@ ,
-IPv6 addresses are automatically generated.
-IPv6 addresses can be identified by the presence of colons
-.Dq \&:
-in the address field.
-IPv6 addresses can be used almost everywhere where
-IPv4 addresses can be used,
-with the exception of reference clock addresses,
-which are always IPv4.
-.Pp
-Note that in contexts where a host name is expected, a
-.Fl 4
-qualifier preceding
-the host name forces DNS resolution to the IPv4 namespace,
-while a
-.Fl 6
-qualifier forces DNS resolution to the IPv6 namespace.
-See IPv6 references for the
-equivalent classes for that address family.
-.Bl -tag -width indent
-.It Xo Ic pool Ar address
-.Op Cm burst
-.Op Cm iburst
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Xc
-.It Xo Ic server Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm burst
-.Op Cm iburst
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Op Cm true
-.Xc
-.It Xo Ic peer Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Op Cm true
-.Op Cm xleave
-.Xc
-.It Xo Ic broadcast Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm ttl Ar ttl
-.Op Cm xleave
-.Xc
-.It Xo Ic manycastclient Ar address
-.Op Cm key Ar key \&| Cm autokey
-.Op Cm version Ar version
-.Op Cm prefer
-.Op Cm minpoll Ar minpoll
-.Op Cm maxpoll Ar maxpoll
-.Op Cm ttl Ar ttl
-.Xc
-.El
-.Pp
-These five commands specify the time server name or address to
-be used and the mode in which to operate.
-The
-.Ar address
-can be
-either a DNS name or an IP address in dotted\-quad notation.
-Additional information on association behavior can be found in the
-.Qq Association Management
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.Bl -tag -width indent
-.It Ic pool
-For type s addresses, this command mobilizes a persistent
-client mode association with a number of remote servers.
-In this mode the local clock can synchronized to the
-remote server, but the remote server can never be synchronized to
-the local clock.
-.It Ic server
-For type s and r addresses, this command mobilizes a persistent
-client mode association with the specified remote server or local
-radio clock.
-In this mode the local clock can synchronized to the
-remote server, but the remote server can never be synchronized to
-the local clock.
-This command should
-.Em not
-be used for type
-b or m addresses.
-.It Ic peer
-For type s addresses (only), this command mobilizes a
-persistent symmetric\-active mode association with the specified
-remote peer.
-In this mode the local clock can be synchronized to
-the remote peer or the remote peer can be synchronized to the local
-clock.
-This is useful in a network of servers where, depending on
-various failure scenarios, either the local or remote peer may be
-the better source of time.
-This command should NOT be used for type
-b, m or r addresses.
-.It Ic broadcast
-For type b and m addresses (only), this
-command mobilizes a persistent broadcast mode association.
-Multiple
-commands can be used to specify multiple local broadcast interfaces
-(subnets) and/or multiple multicast groups.
-Note that local
-broadcast messages go only to the interface associated with the
-subnet specified, but multicast messages go to all interfaces.
-In broadcast mode the local server sends periodic broadcast
-messages to a client population at the
-.Ar address
-specified, which is usually the broadcast address on (one of) the
-local network(s) or a multicast address assigned to NTP.
-The IANA
-has assigned the multicast group address IPv4 224.0.1.1 and
-IPv6 ff05::101 (site local) exclusively to
-NTP, but other nonconflicting addresses can be used to contain the
-messages within administrative boundaries.
-Ordinarily, this
-specification applies only to the local server operating as a
-sender; for operation as a broadcast client, see the
-.Ic broadcastclient
-or
-.Ic multicastclient
-commands
-below.
-.It Ic manycastclient
-For type m addresses (only), this command mobilizes a
-manycast client mode association for the multicast address
-specified.
-In this case a specific address must be supplied which
-matches the address used on the
-.Ic manycastserver
-command for
-the designated manycast servers.
-The NTP multicast address
-224.0.1.1 assigned by the IANA should NOT be used, unless specific
-means are taken to avoid spraying large areas of the Internet with
-these messages and causing a possibly massive implosion of replies
-at the sender.
-The
-.Ic manycastserver
-command specifies that the local server
-is to operate in client mode with the remote servers that are
-discovered as the result of broadcast/multicast messages.
-The
-client broadcasts a request message to the group address associated
-with the specified
-.Ar address
-and specifically enabled
-servers respond to these messages.
-The client selects the servers
-providing the best time and continues as with the
-.Ic server
-command.
-The remaining servers are discarded as if never
-heard.
-.El
-.Pp
-Options:
-.Bl -tag -width indent
-.It Cm autokey
-All packets sent to and received from the server or peer are to
-include authentication fields encrypted using the autokey scheme
-described in
-.Sx Authentication Options .
-.It Cm burst
-when the server is reachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first and second packets
-can be changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to improve timekeeping quality
-with the
-.Ic server
-command and s addresses.
-.It Cm iburst
-When the server is unreachable, send a burst of eight packets
-instead of the usual one.
-The packet spacing is normally 2 s;
-however, the spacing between the first two packets can be
-changed with the
-.Ic calldelay
-command to allow
-additional time for a modem or ISDN call to complete.
-This is designed to speed the initial synchronization
-acquisition with the
-.Ic server
-command and s addresses and when
-.Xr ntpd @NTPD_MS@
-is started with the
-.Fl q
-option.
-.It Cm key Ar key
-All packets sent to and received from the server or peer are to
-include authentication fields encrypted using the specified
-.Ar key
-identifier with values from 1 to 65534, inclusive.
-The
-default is to include no encryption field.
-.It Cm minpoll Ar minpoll
-.It Cm maxpoll Ar maxpoll
-These options specify the minimum and maximum poll intervals
-for NTP messages, as a power of 2 in seconds
-The maximum poll
-interval defaults to 10 (1,024 s), but can be increased by the
-.Cm maxpoll
-option to an upper limit of 17 (36.4 h).
-The
-minimum poll interval defaults to 6 (64 s), but can be decreased by
-the
-.Cm minpoll
-option to a lower limit of 4 (16 s).
-.It Cm noselect
-Marks the server as unused, except for display purposes.
-The server is discarded by the selection algroithm.
-.It Cm preempt
-Says the association can be preempted.
-.It Cm true
-Marks the server as a truechimer.
-Use this option only for testing.
-.It Cm prefer
-Marks the server as preferred.
-All other things being equal,
-this host will be chosen for synchronization among a set of
-correctly operating hosts.
-See the
-.Qq Mitigation Rules and the prefer Keyword
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-for further information.
-.It Cm true
-Forces the association to always survive the selection and clustering algorithms.
-This option should almost certainly
-.Em only
-be used while testing an association.
-.It Cm ttl Ar ttl
-This option is used only with broadcast server and manycast
-client modes.
-It specifies the time\-to\-live
-.Ar ttl
-to
-use on broadcast server and multicast server and the maximum
-.Ar ttl
-for the expanding ring search with manycast
-client packets.
-Selection of the proper value, which defaults to
-127, is something of a black art and should be coordinated with the
-network administrator.
-.It Cm version Ar version
-Specifies the version number to be used for outgoing NTP
-packets.
-Versions 1\-4 are the choices, with version 4 the
-default.
-.It Cm xleave
-Valid in
-.Cm peer
-and
-.Cm broadcast
-modes only, this flag enables interleave mode.
-.El
-.Ss Auxiliary Commands
-.Bl -tag -width indent
-.It Ic broadcastclient
-This command enables reception of broadcast server messages to
-any local interface (type b) address.
-Upon receiving a message for
-the first time, the broadcast client measures the nominal server
-propagation delay using a brief client/server exchange with the
-server, then enters the broadcast client mode, in which it
-synchronizes to succeeding broadcast messages.
-Note that, in order
-to avoid accidental or malicious disruption in this mode, both the
-server and client should operate using symmetric\-key or public\-key
-authentication as described in
-.Sx Authentication Options .
-.It Ic manycastserver Ar address ...
-This command enables reception of manycast client messages to
-the multicast group address(es) (type m) specified.
-At least one
-address is required, but the NTP multicast address 224.0.1.1
-assigned by the IANA should NOT be used, unless specific means are
-taken to limit the span of the reply and avoid a possibly massive
-implosion at the original sender.
-Note that, in order to avoid
-accidental or malicious disruption in this mode, both the server
-and client should operate using symmetric\-key or public\-key
-authentication as described in
-.Sx Authentication Options .
-.It Ic multicastclient Ar address ...
-This command enables reception of multicast server messages to
-the multicast group address(es) (type m) specified.
-Upon receiving
-a message for the first time, the multicast client measures the
-nominal server propagation delay using a brief client/server
-exchange with the server, then enters the broadcast client mode, in
-which it synchronizes to succeeding multicast messages.
-Note that,
-in order to avoid accidental or malicious disruption in this mode,
-both the server and client should operate using symmetric\-key or
-public\-key authentication as described in
-.Sx Authentication Options .
-.It Ic mdnstries Ar number
-If we are participating in mDNS,
-after we have synched for the first time
-we attempt to register with the mDNS system.
-If that registration attempt fails,
-we try again at one minute intervals for up to
-.Ic mdnstries
-times.
-After all,
-.Ic ntpd
-may be starting before mDNS.
-The default value for
-.Ic mdnstries
-is 5.
-.El
-.Sh Authentication Support
-Authentication support allows the NTP client to verify that the
-server is in fact known and trusted and not an intruder intending
-accidentally or on purpose to masquerade as that server.
-The NTPv3
-specification RFC\-1305 defines a scheme which provides
-cryptographic authentication of received NTP packets.
-Originally,
-this was done using the Data Encryption Standard (DES) algorithm
-operating in Cipher Block Chaining (CBC) mode, commonly called
-DES\-CBC.
-Subsequently, this was replaced by the RSA Message Digest
-5 (MD5) algorithm using a private key, commonly called keyed\-MD5.
-Either algorithm computes a message digest, or one\-way hash, which
-can be used to verify the server has the correct private key and
-key identifier.
-.Pp
-NTPv4 retains the NTPv3 scheme, properly described as symmetric key
-cryptography and, in addition, provides a new Autokey scheme
-based on public key cryptography.
-Public key cryptography is generally considered more secure
-than symmetric key cryptography, since the security is based
-on a private value which is generated by each server and
-never revealed.
-With Autokey all key distribution and
-management functions involve only public values, which
-considerably simplifies key distribution and storage.
-Public key management is based on X.509 certificates,
-which can be provided by commercial services or
-produced by utility programs in the OpenSSL software library
-or the NTPv4 distribution.
-.Pp
-While the algorithms for symmetric key cryptography are
-included in the NTPv4 distribution, public key cryptography
-requires the OpenSSL software library to be installed
-before building the NTP distribution.
-Directions for doing that
-are on the Building and Installing the Distribution page.
-.Pp
-Authentication is configured separately for each association
-using the
-.Cm key
-or
-.Cm autokey
-subcommand on the
-.Ic peer ,
-.Ic server ,
-.Ic broadcast
-and
-.Ic manycastclient
-configuration commands as described in
-.Sx Configuration Options
-page.
-The authentication
-options described below specify the locations of the key files,
-if other than default, which symmetric keys are trusted
-and the interval between various operations, if other than default.
-.Pp
-Authentication is always enabled,
-although ineffective if not configured as
-described below.
-If a NTP packet arrives
-including a message authentication
-code (MAC), it is accepted only if it
-passes all cryptographic checks.
-The
-checks require correct key ID, key value
-and message digest.
-If the packet has
-been modified in any way or replayed
-by an intruder, it will fail one or more
-of these checks and be discarded.
-Furthermore, the Autokey scheme requires a
-preliminary protocol exchange to obtain
-the server certificate, verify its
-credentials and initialize the protocol
-.Pp
-The
-.Cm auth
-flag controls whether new associations or
-remote configuration commands require cryptographic authentication.
-This flag can be set or reset by the
-.Ic enable
-and
-.Ic disable
-commands and also by remote
-configuration commands sent by a
-.Xr ntpdc @NTPDC_MS@
-program running on
-another machine.
-If this flag is enabled, which is the default
-case, new broadcast client and symmetric passive associations and
-remote configuration commands must be cryptographically
-authenticated using either symmetric key or public key cryptography.
-If this
-flag is disabled, these operations are effective
-even if not cryptographic
-authenticated.
-It should be understood
-that operating with the
-.Ic auth
-flag disabled invites a significant vulnerability
-where a rogue hacker can
-masquerade as a falseticker and seriously
-disrupt system timekeeping.
-It is
-important to note that this flag has no purpose
-other than to allow or disallow
-a new association in response to new broadcast
-and symmetric active messages
-and remote configuration commands and, in particular,
-the flag has no effect on
-the authentication process itself.
-.Pp
-An attractive alternative where multicast support is available
-is manycast mode, in which clients periodically troll
-for servers as described in the
-.Sx Automatic NTP Configuration Options
+This document describes the format of an NTP symmetric key file.
+For a description of the use of this type of file, see the
+.Qq Authentication Support
+section of the
+.Xr ntp.conf 5
page.
-Either symmetric key or public key
-cryptographic authentication can be used in this mode.
-The principle advantage
-of manycast mode is that potential servers need not be
-configured in advance,
-since the client finds them during regular operation,
-and the configuration
-files for all clients can be identical.
.Pp
-The security model and protocol schemes for
-both symmetric key and public key
-cryptography are summarized below;
-further details are in the briefings, papers
-and reports at the NTP project page linked from
-.Li http://www.ntp.org/ .
-.Ss Symmetric\-Key Cryptography
-The original RFC\-1305 specification allows any one of possibly
-65,534 keys, each distinguished by a 32\-bit key identifier, to
-authenticate an association.
-The servers and clients involved must
-agree on the key and key identifier to
-authenticate NTP packets.
-Keys and
-related information are specified in a key
-file, usually called
-.Pa ntp.keys ,
-which must be distributed and stored using
-secure means beyond the scope of the NTP protocol itself.
-Besides the keys used
-for ordinary NTP associations,
-additional keys can be used as passwords for the
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-utility programs.
-.Pp
-When
-.Xr ntpd @NTPD_MS@
-is first started, it reads the key file specified in the
+.Xr ntpd 8
+reads its keys from a file specified using the
+.Fl k
+command line option or the
.Ic keys
-configuration command and installs the keys
-in the key cache.
-However,
-individual keys must be activated with the
-.Ic trusted
-command before use.
-This
-allows, for instance, the installation of possibly
-several batches of keys and
-then activating or deactivating each batch
-remotely using
-.Xr ntpdc @NTPDC_MS@ .
-This also provides a revocation capability that can be used
-if a key becomes compromised.
-The
-.Ic requestkey
-command selects the key used as the password for the
-.Xr ntpdc @NTPDC_MS@
-utility, while the
-.Ic controlkey
-command selects the key used as the password for the
-.Xr ntpq @NTPQ_MS@
-utility.
-.Ss Public Key Cryptography
-NTPv4 supports the original NTPv3 symmetric key scheme
-described in RFC\-1305 and in addition the Autokey protocol,
-which is based on public key cryptography.
-The Autokey Version 2 protocol described on the Autokey Protocol
-page verifies packet integrity using MD5 message digests
-and verifies the source with digital signatures and any of several
-digest/signature schemes.
-Optional identity schemes described on the Identity Schemes
-page and based on cryptographic challenge/response algorithms
-are also available.
-Using all of these schemes provides strong security against
-replay with or without modification, spoofing, masquerade
-and most forms of clogging attacks.
-.\" .Pp
-.\" The cryptographic means necessary for all Autokey operations
-.\" is provided by the OpenSSL software library.
-.\" This library is available from http://www.openssl.org/
-.\" and can be installed using the procedures outlined
-.\" in the Building and Installing the Distribution page.
-.\" Once installed,
-.\" the configure and build
-.\" process automatically detects the library and links
-.\" the library routines required.
+statement in the configuration file.
+While key number 0 is fixed by the NTP standard
+(as 56 zero bits)
+and may not be changed,
+one or more keys numbered between 1 and 65534
+may be arbitrarily set in the keys file.
.Pp
-The Autokey protocol has several modes of operation
-corresponding to the various NTP modes supported.
-Most modes use a special cookie which can be
-computed independently by the client and server,
-but encrypted in transmission.
-All modes use in addition a variant of the S\-KEY scheme,
-in which a pseudo\-random key list is generated and used
-in reverse order.
-These schemes are described along with an executive summary,
-current status, briefing slides and reading list on the
-.Sx Autonomous Authentication
-page.
+The key file uses the same comment conventions
+as the configuration file.
+Key entries use a fixed format of the form
.Pp
-The specific cryptographic environment used by Autokey servers
-and clients is determined by a set of files
-and soft links generated by the
-.Xr ntp\-keygen 1ntpkeygenmdoc
-program.
-This includes a required host key file,
-required certificate file and optional sign key file,
-leapsecond file and identity scheme files.
-The
-digest/signature scheme is specified in the X.509 certificate
-along with the matching sign key.
-There are several schemes
-available in the OpenSSL software library, each identified
-by a specific string such as
-.Cm md5WithRSAEncryption ,
-which stands for the MD5 message digest with RSA
-encryption scheme.
-The current NTP distribution supports
-all the schemes in the OpenSSL library, including
-those based on RSA and DSA digital signatures.
+.D1 Ar keyno type key opt_IP_list
.Pp
-NTP secure groups can be used to define cryptographic compartments
-and security hierarchies.
-It is important that every host
-in the group be able to construct a certificate trail to one
-or more trusted hosts in the same group.
-Each group
-host runs the Autokey protocol to obtain the certificates
-for all hosts along the trail to one or more trusted hosts.
-This requires the configuration file in all hosts to be
-engineered so that, even under anticipated failure conditions,
-the NTP subnet will form such that every group host can find
-a trail to at least one trusted host.
-.Ss Naming and Addressing
-It is important to note that Autokey does not use DNS to
-resolve addresses, since DNS can't be completely trusted
-until the name servers have synchronized clocks.
-The cryptographic name used by Autokey to bind the host identity
-credentials and cryptographic values must be independent
-of interface, network and any other naming convention.
-The name appears in the host certificate in either or both
-the subject and issuer fields, so protection against
-DNS compromise is essential.
-.Pp
-By convention, the name of an Autokey host is the name returned
-by the Unix
-.Xr gethostname 2
-system call or equivalent in other systems.
-By the system design
-model, there are no provisions to allow alternate names or aliases.
-However, this is not to say that DNS aliases, different names
-for each interface, etc., are constrained in any way.
-.Pp
-It is also important to note that Autokey verifies authenticity
-using the host name, network address and public keys,
-all of which are bound together by the protocol specifically
-to deflect masquerade attacks.
-For this reason Autokey
-includes the source and destination IP addresses in message digest
-computations and so the same addresses must be available
-at both the server and client.
-For this reason operation
-with network address translation schemes is not possible.
-This reflects the intended robust security model where government
-and corporate NTP servers are operated outside firewall perimeters.
-.Ss Operation
-A specific combination of authentication scheme (none,
-symmetric key, public key) and identity scheme is called
-a cryptotype, although not all combinations are compatible.
-There may be management configurations where the clients,
-servers and peers may not all support the same cryptotypes.
-A secure NTPv4 subnet can be configured in many ways while
-keeping in mind the principles explained above and
-in this section.
-Note however that some cryptotype
-combinations may successfully interoperate with each other,
-but may not represent good security practice.
-.Pp
-The cryptotype of an association is determined at the time
-of mobilization, either at configuration time or some time
-later when a message of appropriate cryptotype arrives.
-When mobilized by a
-.Ic server
-or
-.Ic peer
-configuration command and no
-.Ic key
-or
-.Ic autokey
-subcommands are present, the association is not
-authenticated; if the
-.Ic key
-subcommand is present, the association is authenticated
-using the symmetric key ID specified; if the
-.Ic autokey
-subcommand is present, the association is authenticated
-using Autokey.
-.Pp
-When multiple identity schemes are supported in the Autokey
-protocol, the first message exchange determines which one is used.
-The client request message contains bits corresponding
-to which schemes it has available.
-The server response message
-contains bits corresponding to which schemes it has available.
-Both server and client match the received bits with their own
-and select a common scheme.
-.Pp
-Following the principle that time is a public value,
-a server responds to any client packet that matches
-its cryptotype capabilities.
-Thus, a server receiving
-an unauthenticated packet will respond with an unauthenticated
-packet, while the same server receiving a packet of a cryptotype
-it supports will respond with packets of that cryptotype.
-However, unconfigured broadcast or manycast client
-associations or symmetric passive associations will not be
-mobilized unless the server supports a cryptotype compatible
-with the first packet received.
-By default, unauthenticated associations will not be mobilized
-unless overridden in a decidedly dangerous way.
-.Pp
-Some examples may help to reduce confusion.
-Client Alice has no specific cryptotype selected.
-Server Bob has both a symmetric key file and minimal Autokey files.
-Alice's unauthenticated messages arrive at Bob, who replies with
-unauthenticated messages.
-Cathy has a copy of Bob's symmetric
-key file and has selected key ID 4 in messages to Bob.
-Bob verifies the message with his key ID 4.
-If it's the
-same key and the message is verified, Bob sends Cathy a reply
-authenticated with that key.
-If verification fails,
-Bob sends Cathy a thing called a crypto\-NAK, which tells her
-something broke.
-She can see the evidence using the
-.Xr ntpq @NTPQ_MS@
-program.
-.Pp
-Denise has rolled her own host key and certificate.
-She also uses one of the identity schemes as Bob.
-She sends the first Autokey message to Bob and they
-both dance the protocol authentication and identity steps.
-If all comes out okay, Denise and Bob continue as described above.
-.Pp
-It should be clear from the above that Bob can support
-all the girls at the same time, as long as he has compatible
-authentication and identity credentials.
-Now, Bob can act just like the girls in his own choice of servers;
-he can run multiple configured associations with multiple different
-servers (or the same server, although that might not be useful).
-But, wise security policy might preclude some cryptotype
-combinations; for instance, running an identity scheme
-with one server and no authentication with another might not be wise.
-.Ss Key Management
-The cryptographic values used by the Autokey protocol are
-incorporated as a set of files generated by the
-.Xr ntp\-keygen 1ntpkeygenmdoc
-utility program, including symmetric key, host key and
-public certificate files, as well as sign key, identity parameters
-and leapseconds files.
-Alternatively, host and sign keys and
-certificate files can be generated by the OpenSSL utilities
-and certificates can be imported from public certificate
-authorities.
-Note that symmetric keys are necessary for the
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-utility programs.
-The remaining files are necessary only for the
-Autokey protocol.
-.Pp
-Certificates imported from OpenSSL or public certificate
-authorities have certian limitations.
-The certificate should be in ASN.1 syntax, X.509 Version 3
-format and encoded in PEM, which is the same format
-used by OpenSSL.
-The overall length of the certificate encoded
-in ASN.1 must not exceed 1024 bytes.
-The subject distinguished
-name field (CN) is the fully qualified name of the host
-on which it is used; the remaining subject fields are ignored.
-The certificate extension fields must not contain either
-a subject key identifier or a issuer key identifier field;
-however, an extended key usage field for a trusted host must
-contain the value
-.Cm trustRoot ; .
-Other extension fields are ignored.
-.Ss Authentication Commands
-.Bl -tag -width indent
-.It Ic autokey Op Ar logsec
-Specifies the interval between regenerations of the session key
-list used with the Autokey protocol.
-Note that the size of the key
-list for each association depends on this interval and the current
-poll interval.
-The default value is 12 (4096 s or about 1.1 hours).
-For poll intervals above the specified interval, a session key list
-with a single entry will be regenerated for every message
-sent.
-.It Ic controlkey Ar key
-Specifies the key identifier to use with the
-.Xr ntpq @NTPQ_MS@
-utility, which uses the standard
-protocol defined in RFC\-1305.
-The
-.Ar key
-argument is
-the key identifier for a trusted key, where the value can be in the
-range 1 to 65,534, inclusive.
-.It Xo Ic crypto
-.Op Cm cert Ar file
-.Op Cm leap Ar file
-.Op Cm randfile Ar file
-.Op Cm host Ar file
-.Op Cm sign Ar file
-.Op Cm gq Ar file
-.Op Cm gqpar Ar file
-.Op Cm iffpar Ar file
-.Op Cm mvpar Ar file
-.Op Cm pw Ar password
-.Xc
-This command requires the OpenSSL library.
-It activates public key
-cryptography, selects the message digest and signature
-encryption scheme and loads the required private and public
-values described above.
-If one or more files are left unspecified,
-the default names are used as described above.
-Unless the complete path and name of the file are specified, the
-location of a file is relative to the keys directory specified
-in the
-.Ic keysdir
-command or default
-.Pa /usr/local/etc .
-Following are the subcommands:
-.Bl -tag -width indent
-.It Cm cert Ar file
-Specifies the location of the required host public certificate file.
-This overrides the link
-.Pa ntpkey_cert_ Ns Ar hostname
-in the keys directory.
-.It Cm gqpar Ar file
-Specifies the location of the optional GQ parameters file.
-This
-overrides the link
-.Pa ntpkey_gq_ Ns Ar hostname
-in the keys directory.
-.It Cm host Ar file
-Specifies the location of the required host key file.
-This overrides
-the link
-.Pa ntpkey_key_ Ns Ar hostname
-in the keys directory.
-.It Cm iffpar Ar file
-Specifies the location of the optional IFF parameters file.
-This overrides the link
-.Pa ntpkey_iff_ Ns Ar hostname
-in the keys directory.
-.It Cm leap Ar file
-Specifies the location of the optional leapsecond file.
-This overrides the link
-.Pa ntpkey_leap
-in the keys directory.
-.It Cm mvpar Ar file
-Specifies the location of the optional MV parameters file.
-This overrides the link
-.Pa ntpkey_mv_ Ns Ar hostname
-in the keys directory.
-.It Cm pw Ar password
-Specifies the password to decrypt files containing private keys and
-identity parameters.
-This is required only if these files have been
-encrypted.
-.It Cm randfile Ar file
-Specifies the location of the random seed file used by the OpenSSL
-library.
-The defaults are described in the main text above.
-.It Cm sign Ar file
-Specifies the location of the optional sign key file.
-This overrides
-the link
-.Pa ntpkey_sign_ Ns Ar hostname
-in the keys directory.
-If this file is
-not found, the host key is also the sign key.
-.El
-.It Ic keys Ar keyfile
-Specifies the complete path and location of the MD5 key file
-containing the keys and key identifiers used by
-.Xr ntpd @NTPD_MS@ ,
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-when operating with symmetric key cryptography.
-This is the same operation as the
-.Fl k
-command line option.
-.It Ic keysdir Ar path
-This command specifies the default directory path for
-cryptographic keys, parameters and certificates.
-The default is
-.Pa /usr/local/etc/ .
-.It Ic requestkey Ar key
-Specifies the key identifier to use with the
-.Xr ntpdc @NTPDC_MS@
-utility program, which uses a
-proprietary protocol specific to this implementation of
-.Xr ntpd @NTPD_MS@ .
-The
-.Ar key
-argument is a key identifier
-for the trusted key, where the value can be in the range 1 to
-65,534, inclusive.
-.It Ic revoke Ar logsec
-Specifies the interval between re\-randomization of certain
-cryptographic values used by the Autokey scheme, as a power of 2 in
-seconds.
-These values need to be updated frequently in order to
-deflect brute\-force attacks on the algorithms of the scheme;
-however, updating some values is a relatively expensive operation.
-The default interval is 16 (65,536 s or about 18 hours).
-For poll
-intervals above the specified interval, the values will be updated
-for every message sent.
-.It Ic trustedkey Ar key ...
-Specifies the key identifiers which are trusted for the
-purposes of authenticating peers with symmetric key cryptography,
-as well as keys used by the
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-programs.
-The authentication procedures require that both the local
-and remote servers share the same key and key identifier for this
-purpose, although different keys can be used with different
-servers.
-The
+where
+.Ar keyno
+is a positive integer (between 1 and 65534),
+.Ar type
+is the message digest algorithm,
.Ar key
-arguments are 32\-bit unsigned
-integers with values from 1 to 65,534.
-.El
-.Ss Error Codes
-The following error codes are reported via the NTP control
-and monitoring protocol trap mechanism.
-.Bl -tag -width indent
-.It 101
-.Pq bad field format or length
-The packet has invalid version, length or format.
-.It 102
-.Pq bad timestamp
-The packet timestamp is the same or older than the most recent received.
-This could be due to a replay or a server clock time step.
-.It 103
-.Pq bad filestamp
-The packet filestamp is the same or older than the most recent received.
-This could be due to a replay or a key file generation error.
-.It 104
-.Pq bad or missing public key
-The public key is missing, has incorrect format or is an unsupported type.
-.It 105
-.Pq unsupported digest type
-The server requires an unsupported digest/signature scheme.
-.It 106
-.Pq mismatched digest types
-Not used.
-.It 107
-.Pq bad signature length
-The signature length does not match the current public key.
-.It 108
-.Pq signature not verified
-The message fails the signature check.
-It could be bogus or signed by a
-different private key.
-.It 109
-.Pq certificate not verified
-The certificate is invalid or signed with the wrong key.
-.It 110
-.Pq certificate not verified
-The certificate is not yet valid or has expired or the signature could not
-be verified.
-.It 111
-.Pq bad or missing cookie
-The cookie is missing, corrupted or bogus.
-.It 112
-.Pq bad or missing leapseconds table
-The leapseconds table is missing, corrupted or bogus.
-.It 113
-.Pq bad or missing certificate
-The certificate is missing, corrupted or bogus.
-.It 114
-.Pq bad or missing identity
-The identity key is missing, corrupt or bogus.
-.El
-.Sh Monitoring Support
-.Xr ntpd @NTPD_MS@
-includes a comprehensive monitoring facility suitable
-for continuous, long term recording of server and client
-timekeeping performance.
-See the
-.Ic statistics
-command below
-for a listing and example of each type of statistics currently
-supported.
-Statistic files are managed using file generation sets
-and scripts in the
-.Pa ./scripts
-directory of the source code distribution.
-Using
-these facilities and
-.Ux
-.Xr cron 8
-jobs, the data can be
-automatically summarized and archived for retrospective analysis.
-.Ss Monitoring Commands
-.Bl -tag -width indent
-.It Ic statistics Ar name ...
-Enables writing of statistics records.
-Currently, eight kinds of
-.Ar name
-statistics are supported.
-.Bl -tag -width indent
-.It Cm clockstats
-Enables recording of clock driver statistics information.
-Each update
-received from a clock driver appends a line of the following form to
-the file generation set named
-.Cm clockstats :
-.Bd -literal
-49213 525.624 127.127.4.1 93 226 00:08:29.606 D
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
-The next field shows the
-clock address in dotted\-quad notation.
-The final field shows the last
-timecode received from the clock in decoded ASCII format, where
-meaningful.
-In some clock drivers a good deal of additional information
-can be gathered and displayed as well.
-See information specific to each
-clock for further details.
-.It Cm cryptostats
-This option requires the OpenSSL cryptographic software library.
-It
-enables recording of cryptographic public key protocol information.
-Each message received by the protocol module appends a line of the
-following form to the file generation set named
-.Cm cryptostats :
-.Bd -literal
-49213 525.624 127.127.4.1 message
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
-The next field shows the peer
-address in dotted\-quad notation, The final message field includes the
-message type and certain ancillary information.
-See the
-.Sx Authentication Options
-section for further information.
-.It Cm loopstats
-Enables recording of loop filter statistics information.
-Each
-update of the local clock outputs a line of the following form to
-the file generation set named
-.Cm loopstats :
-.Bd -literal
-50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
-The next five fields
-show time offset (seconds), frequency offset (parts per million \-
-PPM), RMS jitter (seconds), Allan deviation (PPM) and clock
-discipline time constant.
-.It Cm peerstats
-Enables recording of peer statistics information.
-This includes
-statistics records of all peers of a NTP server and of special
-signals, where present and configured.
-Each valid update appends a
-line of the following form to the current element of a file
-generation set named
-.Cm peerstats :
-.Bd -literal
-48773 10847.650 127.127.4.1 9714 \-0.001605376 0.000000000 0.001424877 0.000958674
-.Ed
+is the key itself, and
+.Ar opt_IP_list
+is an optional comma\-separated list of IPs
+where the
+.Ar keyno
+should be trusted.
+that are allowed to serve time.
+Each IP in
+.Ar opt_IP_list
+may contain an optional
+.Cm /subnetbits
+specification which identifies the number of bits for
+the desired subnet of trust.
+If
+.Ar opt_IP_list
+is empty,
+any properly\-authenticated message will be
+accepted.
.Pp
-The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
-The next two fields
-show the peer address in dotted\-quad notation and status,
-respectively.
-The status field is encoded in hex in the format
-described in Appendix A of the NTP specification RFC 1305.
-The final four fields show the offset,
-delay, dispersion and RMS jitter, all in seconds.
-.It Cm rawstats
-Enables recording of raw\-timestamp statistics information.
-This
-includes statistics records of all peers of a NTP server and of
-special signals, where present and configured.
-Each NTP message
-received from a peer or clock driver appends a line of the
-following form to the file generation set named
-.Cm rawstats :
-.Bd -literal
-50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and
-time (seconds and fraction past UTC midnight).
-The next two fields
-show the remote peer or clock address followed by the local address
-in dotted\-quad notation.
-The final four fields show the originate,
-receive, transmit and final NTP timestamps in order.
-The timestamp
-values are as received and before processing by the various data
-smoothing and mitigation algorithms.
-.It Cm sysstats
-Enables recording of ntpd statistics counters on a periodic basis.
-Each
-hour a line of the following form is appended to the file generation
-set named
-.Cm sysstats :
-.Bd -literal
-50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147
-.Ed
-.Pp
-The first two fields show the date (Modified Julian Day) and time
-(seconds and fraction past UTC midnight).
-The remaining ten fields show
-the statistics counter values accumulated since the last generated
-line.
-.Bl -tag -width indent
-.It Time since restart Cm 36000
-Time in hours since the system was last rebooted.
-.It Packets received Cm 81965
-Total number of packets received.
-.It Packets processed Cm 0
-Number of packets received in response to previous packets sent
-.It Current version Cm 9546
-Number of packets matching the current NTP version.
-.It Previous version Cm 56
-Number of packets matching the previous NTP version.
-.It Bad version Cm 71793
-Number of packets matching neither NTP version.
-.It Access denied Cm 512
-Number of packets denied access for any reason.
-.It Bad length or format Cm 540
-Number of packets with invalid length, format or port number.
-.It Bad authentication Cm 10
-Number of packets not verified as authentic.
-.It Rate exceeded Cm 147
-Number of packets discarded due to rate limitation.
-.El
-.It Cm statsdir Ar directory_path
-Indicates the full path of a directory where statistics files
-should be created (see below).
-This keyword allows
-the (otherwise constant)
-.Cm filegen
-filename prefix to be modified for file generation sets, which
-is useful for handling statistics logs.
-.It Cm filegen Ar name Xo
-.Op Cm file Ar filename
-.Op Cm type Ar typename
-.Op Cm link | nolink
-.Op Cm enable | disable
-.Xc
-Configures setting of generation file set name.
-Generation
-file sets provide a means for handling files that are
-continuously growing during the lifetime of a server.
-Server statistics are a typical example for such files.
-Generation file sets provide access to a set of files used
-to store the actual data.
-At any time at most one element
-of the set is being written to.
-The type given specifies
-when and how data will be directed to a new element of the set.
-This way, information stored in elements of a file set
-that are currently unused are available for administrational
-operations without the risk of disturbing the operation of ntpd.
-(Most important: they can be removed to free space for new data
-produced.)
-.Pp
-Note that this command can be sent from the
-.Xr ntpdc @NTPDC_MS@
-program running at a remote location.
-.Bl -tag -width indent
-.It Cm name
-This is the type of the statistics records, as shown in the
-.Cm statistics
-command.
-.It Cm file Ar filename
-This is the file name for the statistics records.
-Filenames of set
-members are built from three concatenated elements
-.Ar Cm prefix ,
-.Ar Cm filename
-and
-.Ar Cm suffix :
-.Bl -tag -width indent
-.It Cm prefix
-This is a constant filename path.
-It is not subject to
-modifications via the
-.Ar filegen
-option.
-It is defined by the
-server, usually specified as a compile\-time constant.
-It may,
-however, be configurable for individual file generation sets
-via other commands.
-For example, the prefix used with
-.Ar loopstats
-and
-.Ar peerstats
-generation can be configured using the
-.Ar statsdir
-option explained above.
-.It Cm filename
-This string is directly concatenated to the prefix mentioned
-above (no intervening
-.Ql / ) .
-This can be modified using
-the file argument to the
-.Ar filegen
-statement.
-No
-.Pa ..
-elements are
-allowed in this component to prevent filenames referring to
-parts outside the filesystem hierarchy denoted by
-.Ar prefix .
-.It Cm suffix
-This part is reflects individual elements of a file set.
-It is
-generated according to the type of a file set.
-.El
-.It Cm type Ar typename
-A file generation set is characterized by its type.
-The following
-types are supported:
-.Bl -tag -width indent
-.It Cm none
-The file set is actually a single plain file.
-.It Cm pid
-One element of file set is used per incarnation of a ntpd
-server.
-This type does not perform any changes to file set
-members during runtime, however it provides an easy way of
-separating files belonging to different
-.Xr ntpd @NTPD_MS@
-server incarnations.
-The set member filename is built by appending a
-.Ql \&.
-to concatenated
-.Ar prefix
-and
-.Ar filename
-strings, and
-appending the decimal representation of the process ID of the
-.Xr ntpd @NTPD_MS@
-server process.
-.It Cm day
-One file generation set element is created per day.
-A day is
-defined as the period between 00:00 and 24:00 UTC.
-The file set
-member suffix consists of a
-.Ql \&.
-and a day specification in
-the form
-.Cm YYYYMMdd .
-.Cm YYYY
-is a 4\-digit year number (e.g., 1992).
-.Cm MM
-is a two digit month number.
-.Cm dd
-is a two digit day number.
-Thus, all information written at 10 December 1992 would end up
-in a file named
-.Ar prefix
-.Ar filename Ns .19921210 .
-.It Cm week
-Any file set member contains data related to a certain week of
-a year.
-The term week is defined by computing day\-of\-year
-modulo 7.
-Elements of such a file generation set are
-distinguished by appending the following suffix to the file set
-filename base: A dot, a 4\-digit year number, the letter
-.Cm W ,
-and a 2\-digit week number.
-For example, information from January,
-10th 1992 would end up in a file with suffix
-.No . Ns Ar 1992W1 .
-.It Cm month
-One generation file set element is generated per month.
The
-file name suffix consists of a dot, a 4\-digit year number, and
-a 2\-digit month.
-.It Cm year
-One generation file element is generated per year.
-The filename
-suffix consists of a dot and a 4 digit year number.
-.It Cm age
-This type of file generation sets changes to a new element of
-the file set every 24 hours of server operation.
-The filename
-suffix consists of a dot, the letter
-.Cm a ,
-and an 8\-digit number.
-This number is taken to be the number of seconds the server is
-running at the start of the corresponding 24\-hour period.
-Information is only written to a file generation by specifying
-.Cm enable ;
-output is prevented by specifying
-.Cm disable .
-.El
-.It Cm link | nolink
-It is convenient to be able to access the current element of a file
-generation set by a fixed name.
-This feature is enabled by
-specifying
-.Cm link
-and disabled using
-.Cm nolink .
-If link is specified, a
-hard link from the current file set element to a file without
-suffix is created.
-When there is already a file with this name and
-the number of links of this file is one, it is renamed appending a
-dot, the letter
-.Cm C ,
-and the pid of the
-.Xr ntpd @NTPD_MS@
-server process.
-When the
-number of links is greater than one, the file is unlinked.
-This
-allows the current file to be accessed by a constant name.
-.It Cm enable \&| Cm disable
-Enables or disables the recording function.
-.El
-.El
-.El
-.Sh Access Control Support
-The
-.Xr ntpd @NTPD_MS@
-daemon implements a general purpose address/mask based restriction
-list.
-The list contains address/match entries sorted first
-by increasing address values and and then by increasing mask values.
-A match occurs when the bitwise AND of the mask and the packet
-source address is equal to the bitwise AND of the mask and
-address in the list.
-The list is searched in order with the
-last match found defining the restriction flags associated
-with the entry.
-Additional information and examples can be found in the
-.Qq Notes on Configuring NTP and Setting up a NTP Subnet
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.Pp
-The restriction facility was implemented in conformance
-with the access policies for the original NSFnet backbone
-time servers.
-Later the facility was expanded to deflect
-cryptographic and clogging attacks.
-While this facility may
-be useful for keeping unwanted or broken or malicious clients
-from congesting innocent servers, it should not be considered
-an alternative to the NTP authentication facilities.
-Source address based restrictions are easily circumvented
-by a determined cracker.
-.Pp
-Clients can be denied service because they are explicitly
-included in the restrict list created by the
-.Ic restrict
-command
-or implicitly as the result of cryptographic or rate limit
-violations.
-Cryptographic violations include certificate
-or identity verification failure; rate limit violations generally
-result from defective NTP implementations that send packets
-at abusive rates.
-Some violations cause denied service
-only for the offending packet, others cause denied service
-for a timed period and others cause the denied service for
-an indefinite period.
-When a client or network is denied access
-for an indefinite period, the only way at present to remove
-the restrictions is by restarting the server.
-.Ss The Kiss\-of\-Death Packet
-Ordinarily, packets denied service are simply dropped with no
-further action except incrementing statistics counters.
-Sometimes a
-more proactive response is needed, such as a server message that
-explicitly requests the client to stop sending and leave a message
-for the system operator.
-A special packet format has been created
-for this purpose called the "kiss\-of\-death" (KoD) packet.
-KoD packets have the leap bits set unsynchronized and stratum set
-to zero and the reference identifier field set to a four\-byte
-ASCII code.
-If the
-.Cm noserve
+.Ar key
+may be given in a format
+controlled by the
+.Ar type
+field.
+The
+.Ar type
+.Li MD5
+is always supported.
+If
+.Li ntpd
+was built with the OpenSSL library
+then any digest library supported by that library may be specified.
+However, if compliance with FIPS 140\-2 is required the
+.Ar type
+must be either
+.Li SHA
or
-.Cm notrust
-flag of the matching restrict list entry is set,
-the code is "DENY"; if the
-.Cm limited
-flag is set and the rate limit
-is exceeded, the code is "RATE".
-Finally, if a cryptographic violation occurs, the code is "CRYP".
+.Li SHA1 .
.Pp
-A client receiving a KoD performs a set of sanity checks to
-minimize security exposure, then updates the stratum and
-reference identifier peer variables, sets the access
-denied (TEST4) bit in the peer flash variable and sends
-a message to the log.
-As long as the TEST4 bit is set,
-the client will send no further packets to the server.
-The only way at present to recover from this condition is
-to restart the protocol at both the client and server.
-This
-happens automatically at the client when the association times out.
-It will happen at the server only if the server operator cooperates.
-.Ss Access Control Commands
-.Bl -tag -width indent
-.It Xo Ic discard
-.Op Cm average Ar avg
-.Op Cm minimum Ar min
-.Op Cm monitor Ar prob
-.Xc
-Set the parameters of the
-.Cm limited
-facility which protects the server from
-client abuse.
-The
-.Cm average
-subcommand specifies the minimum average packet
-spacing, while the
-.Cm minimum
-subcommand specifies the minimum packet spacing.
-Packets that violate these minima are discarded
-and a kiss\-o'\-death packet returned if enabled.
-The default
-minimum average and minimum are 5 and 2, respectively.
-The
-.Ic monitor
-subcommand specifies the probability of discard
-for packets that overflow the rate\-control window.
-.It Xo Ic restrict address
-.Op Cm mask Ar mask
-.Op Ar flag ...
-.Xc
-The
-.Ar address
-argument expressed in
-dotted\-quad form is the address of a host or network.
-Alternatively, the
-.Ar address
-argument can be a valid host DNS name.
-The
-.Ar mask
-argument expressed in dotted\-quad form defaults to
-.Cm 255.255.255.255 ,
-meaning that the
-.Ar address
-is treated as the address of an individual host.
-A default entry (address
-.Cm 0.0.0.0 ,
-mask
-.Cm 0.0.0.0 )
-is always included and is always the first entry in the list.
-Note that text string
-.Cm default ,
-with no mask option, may
-be used to indicate the default entry.
-In the current implementation,
-.Cm flag
-always
-restricts access, i.e., an entry with no flags indicates that free
-access to the server is to be given.
-The flags are not orthogonal,
-in that more restrictive flags will often make less restrictive
-ones redundant.
-The flags can generally be classed into two
-categories, those which restrict time service and those which
-restrict informational queries and attempts to do run\-time
-reconfiguration of the server.
-One or more of the following flags
-may be specified:
-.Bl -tag -width indent
-.It Cm ignore
-Deny packets of all kinds, including
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-queries.
-.It Cm kod
-If this flag is set when an access violation occurs, a kiss\-o'\-death
-(KoD) packet is sent.
-KoD packets are rate limited to no more than one
-per second.
-If another KoD packet occurs within one second after the
-last one, the packet is dropped.
-.It Cm limited
-Deny service if the packet spacing violates the lower limits specified
-in the
-.Ic discard
-command.
-A history of clients is kept using the
-monitoring capability of
-.Xr ntpd @NTPD_MS@ .
-Thus, monitoring is always active as
-long as there is a restriction entry with the
-.Cm limited
-flag.
-.It Cm lowpriotrap
-Declare traps set by matching hosts to be low priority.
-The
-number of traps a server can maintain is limited (the current limit
-is 3).
-Traps are usually assigned on a first come, first served
-basis, with later trap requestors being denied service.
-This flag
-modifies the assignment algorithm by allowing low priority traps to
-be overridden by later requests for normal priority traps.
-.It Cm nomodify
-Deny
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-queries which attempt to modify the state of the
-server (i.e., run time reconfiguration).
-Queries which return
-information are permitted.
-.It Cm noquery
-Deny
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-queries.
-Time service is not affected.
-.It Cm nopeer
-Deny packets which would result in mobilizing a new association.
-This
-includes broadcast and symmetric active packets when a configured
-association does not exist.
-It also includes
-.Cm pool
-associations, so if you want to use servers from a
-.Cm pool
-directive and also want to use
-.Cm nopeer
-by default, you'll want a
-.Cm "restrict source ..." line as well that does
-.It not
-include the
-.Cm nopeer
-directive.
-.It Cm noserve
-Deny all packets except
-.Xr ntpq @NTPQ_MS@
-and
-.Xr ntpdc @NTPDC_MS@
-queries.
-.It Cm notrap
-Decline to provide mode 6 control message trap service to matching
-hosts.
-The trap service is a subsystem of the
-.Xr ntpq @NTPQ_MS@
-control message
-protocol which is intended for use by remote event logging programs.
-.It Cm notrust
-Deny service unless the packet is cryptographically authenticated.
-.It Cm ntpport
-This is actually a match algorithm modifier, rather than a
-restriction flag.
-Its presence causes the restriction entry to be
-matched only if the source port in the packet is the standard NTP
-UDP port (123).
-Both
-.Cm ntpport
-and
-.Cm non\-ntpport
-may
-be specified.
-The
-.Cm ntpport
-is considered more specific and
-is sorted later in the list.
-.It Cm version
-Deny packets that do not match the current NTP version.
-.El
-.Pp
-Default restriction list entries with the flags ignore, interface,
-ntpport, for each of the local host's interface addresses are
-inserted into the table at startup to prevent the server
-from attempting to synchronize to its own time.
-A default entry is also always present, though if it is
-otherwise unconfigured; no flags are associated
-with the default entry (i.e., everything besides your own
-NTP server is unrestricted).
-.El
-.Sh Automatic NTP Configuration Options
-.Ss Manycasting
-Manycasting is a automatic discovery and configuration paradigm
-new to NTPv4.
-It is intended as a means for a multicast client
-to troll the nearby network neighborhood to find cooperating
-manycast servers, validate them using cryptographic means
-and evaluate their time values with respect to other servers
-that might be lurking in the vicinity.
-The intended result is that each manycast client mobilizes
-client associations with some number of the "best"
-of the nearby manycast servers, yet automatically reconfigures
-to sustain this number of servers should one or another fail.
-.Pp
-Note that the manycasting paradigm does not coincide
-with the anycast paradigm described in RFC\-1546,
-which is designed to find a single server from a clique
-of servers providing the same service.
-The manycast paradigm is designed to find a plurality
-of redundant servers satisfying defined optimality criteria.
-.Pp
-Manycasting can be used with either symmetric key
-or public key cryptography.
-The public key infrastructure (PKI)
-offers the best protection against compromised keys
-and is generally considered stronger, at least with relatively
-large key sizes.
-It is implemented using the Autokey protocol and
-the OpenSSL cryptographic library available from
-.Li http://www.openssl.org/ .
-The library can also be used with other NTPv4 modes
-as well and is highly recommended, especially for broadcast modes.
-.Pp
-A persistent manycast client association is configured
-using the
-.Ic manycastclient
-command, which is similar to the
-.Ic server
-command but with a multicast (IPv4 class
-.Cm D
-or IPv6 prefix
-.Cm FF )
-group address.
-The IANA has designated IPv4 address 224.1.1.1
-and IPv6 address FF05::101 (site local) for NTP.
-When more servers are needed, it broadcasts manycast
-client messages to this address at the minimum feasible rate
-and minimum feasible time\-to\-live (TTL) hops, depending
-on how many servers have already been found.
-There can be as many manycast client associations
-as different group address, each one serving as a template
-for a future ephemeral unicast client/server association.
-.Pp
-Manycast servers configured with the
-.Ic manycastserver
-command listen on the specified group address for manycast
-client messages.
-Note the distinction between manycast client,
-which actively broadcasts messages, and manycast server,
-which passively responds to them.
-If a manycast server is
-in scope of the current TTL and is itself synchronized
-to a valid source and operating at a stratum level equal
-to or lower than the manycast client, it replies to the
-manycast client message with an ordinary unicast server message.
-.Pp
-The manycast client receiving this message mobilizes
-an ephemeral client/server association according to the
-matching manycast client template, but only if cryptographically
-authenticated and the server stratum is less than or equal
-to the client stratum.
-Authentication is explicitly required
-and either symmetric key or public key (Autokey) can be used.
-Then, the client polls the server at its unicast address
-in burst mode in order to reliably set the host clock
-and validate the source.
-This normally results
-in a volley of eight client/server at 2\-s intervals
-during which both the synchronization and cryptographic
-protocols run concurrently.
-Following the volley,
-the client runs the NTP intersection and clustering
-algorithms, which act to discard all but the "best"
-associations according to stratum and synchronization
-distance.
-The surviving associations then continue
-in ordinary client/server mode.
-.Pp
-The manycast client polling strategy is designed to reduce
-as much as possible the volume of manycast client messages
-and the effects of implosion due to near\-simultaneous
-arrival of manycast server messages.
-The strategy is determined by the
-.Ic manycastclient ,
-.Ic tos
-and
-.Ic ttl
-configuration commands.
-The manycast poll interval is
-normally eight times the system poll interval,
-which starts out at the
-.Cm minpoll
-value specified in the
-.Ic manycastclient ,
-command and, under normal circumstances, increments to the
-.Cm maxpolll
-value specified in this command.
-Initially, the TTL is
-set at the minimum hops specified by the
-.Ic ttl
-command.
-At each retransmission the TTL is increased until reaching
-the maximum hops specified by this command or a sufficient
-number client associations have been found.
-Further retransmissions use the same TTL.
-.Pp
-The quality and reliability of the suite of associations
-discovered by the manycast client is determined by the NTP
-mitigation algorithms and the
-.Cm minclock
-and
-.Cm minsane
-values specified in the
-.Ic tos
-configuration command.
-At least
-.Cm minsane
-candidate servers must be available and the mitigation
-algorithms produce at least
-.Cm minclock
-survivors in order to synchronize the clock.
-Byzantine agreement principles require at least four
-candidates in order to correctly discard a single falseticker.
-For legacy purposes,
-.Cm minsane
-defaults to 1 and
-.Cm minclock
-defaults to 3.
-For manycast service
-.Cm minsane
-should be explicitly set to 4, assuming at least that
-number of servers are available.
-.Pp
-If at least
-.Cm minclock
-servers are found, the manycast poll interval is immediately
-set to eight times
-.Cm maxpoll .
-If less than
-.Cm minclock
-servers are found when the TTL has reached the maximum hops,
-the manycast poll interval is doubled.
-For each transmission
-after that, the poll interval is doubled again until
-reaching the maximum of eight times
-.Cm maxpoll .
-Further transmissions use the same poll interval and
-TTL values.
-Note that while all this is going on,
-each client/server association found is operating normally
-it the system poll interval.
-.Pp
-Administratively scoped multicast boundaries are normally
-specified by the network router configuration and,
-in the case of IPv6, the link/site scope prefix.
-By default, the increment for TTL hops is 32 starting
-from 31; however, the
-.Ic ttl
-configuration command can be
-used to modify the values to match the scope rules.
-.Pp
-It is often useful to narrow the range of acceptable
-servers which can be found by manycast client associations.
-Because manycast servers respond only when the client
-stratum is equal to or greater than the server stratum,
-primary (stratum 1) servers fill find only primary servers
-in TTL range, which is probably the most common objective.
-However, unless configured otherwise, all manycast clients
-in TTL range will eventually find all primary servers
-in TTL range, which is probably not the most common
-objective in large networks.
-The
-.Ic tos
-command can be used to modify this behavior.
-Servers with stratum below
-.Cm floor
-or above
-.Cm ceiling
-specified in the
-.Ic tos
-command are strongly discouraged during the selection
-process; however, these servers may be temporally
-accepted if the number of servers within TTL range is
-less than
-.Cm minclock .
-.Pp
-The above actions occur for each manycast client message,
-which repeats at the designated poll interval.
-However, once the ephemeral client association is mobilized,
-subsequent manycast server replies are discarded,
-since that would result in a duplicate association.
-If during a poll interval the number of client associations
-falls below
-.Cm minclock ,
-all manycast client prototype associations are reset
-to the initial poll interval and TTL hops and operation
-resumes from the beginning.
-It is important to avoid
-frequent manycast client messages, since each one requires
-all manycast servers in TTL range to respond.
-The result could well be an implosion, either minor or major,
-depending on the number of servers in range.
-The recommended value for
-.Cm maxpoll
-is 12 (4,096 s).
+What follows are some key types, and corresponding formats:
.Pp
-It is possible and frequently useful to configure a host
-as both manycast client and manycast server.
-A number of hosts configured this way and sharing a common
-group address will automatically organize themselves
-in an optimum configuration based on stratum and
-synchronization distance.
-For example, consider an NTP
-subnet of two primary servers and a hundred or more
-dependent clients.
-With two exceptions, all servers
-and clients have identical configuration files including both
-.Ic multicastclient
-and
-.Ic multicastserver
-commands using, for instance, multicast group address
-239.1.1.1.
-The only exception is that each primary server
-configuration file must include commands for the primary
-reference source such as a GPS receiver.
-.Pp
-The remaining configuration files for all secondary
-servers and clients have the same contents, except for the
-.Ic tos
-command, which is specific for each stratum level.
-For stratum 1 and stratum 2 servers, that command is
-not necessary.
-For stratum 3 and above servers the
-.Cm floor
-value is set to the intended stratum number.
-Thus, all stratum 3 configuration files are identical,
-all stratum 4 files are identical and so forth.
-.Pp
-Once operations have stabilized in this scenario,
-the primary servers will find the primary reference source
-and each other, since they both operate at the same
-stratum (1), but not with any secondary server or client,
-since these operate at a higher stratum.
-The secondary
-servers will find the servers at the same stratum level.
-If one of the primary servers loses its GPS receiver,
-it will continue to operate as a client and other clients
-will time out the corresponding association and
-re\-associate accordingly.
-.Pp
-Some administrators prefer to avoid running
-.Xr ntpd @NTPD_MS@
-continuously and run either
-.Xr sntp @SNTP_MS@
+.Bl -tag -width RMD160 -compact
+.It Li MD5
+The key is 1 to 16 printable characters terminated by
+an EOL,
+whitespace,
or
-.Xr ntpd @NTPD_MS@
-.Fl q
-as a cron job.
-In either case the servers must be
-configured in advance and the program fails if none are
-available when the cron job runs.
-A really slick
-application of manycast is with
-.Xr ntpd @NTPD_MS@
-.Fl q .
-The program wakes up, scans the local landscape looking
-for the usual suspects, selects the best from among
-the rascals, sets the clock and then departs.
-Servers do not have to be configured in advance and
-all clients throughout the network can have the same
-configuration file.
-.Ss Manycast Interactions with Autokey
-Each time a manycast client sends a client mode packet
-to a multicast group address, all manycast servers
-in scope generate a reply including the host name
-and status word.
-The manycast clients then run
-the Autokey protocol, which collects and verifies
-all certificates involved.
-Following the burst interval
-all but three survivors are cast off,
-but the certificates remain in the local cache.
-It often happens that several complete signing trails
-from the client to the primary servers are collected in this way.
-.Pp
-About once an hour or less often if the poll interval
-exceeds this, the client regenerates the Autokey key list.
-This is in general transparent in client/server mode.
-However, about once per day the server private value
-used to generate cookies is refreshed along with all
-manycast client associations.
-In this case all
-cryptographic values including certificates is refreshed.
-If a new certificate has been generated since
-the last refresh epoch, it will automatically revoke
-all prior certificates that happen to be in the
-certificate cache.
-At the same time, the manycast
-scheme starts all over from the beginning and
-the expanding ring shrinks to the minimum and increments
-from there while collecting all servers in scope.
-.Ss Broadcast Options
-.Bl -tag -width indent
-.It Xo Ic tos
-.Oo
-.Cm bcpollbstep Ar gate
-.Oc
-.Xc
-This command provides a way to delay,
-by the specified number of broadcast poll intervals,
-believing backward time steps from a broadcast server.
-Broadcast time networks are expected to be trusted.
-In the event a broadcast server's time is stepped backwards,
-there is clear benefit to having the clients notice this change
-as soon as possible.
-Attacks such as replay attacks can happen, however,
-and even though there are a number of protections built in to
-broadcast mode, attempts to perform a replay attack are possible.
-This value defaults to 0, but can be changed
-to any number of poll intervals between 0 and 4.
-.Ss Manycast Options
-.Bl -tag -width indent
-.It Xo Ic tos
-.Oo
-.Cm ceiling Ar ceiling |
-.Cm cohort { 0 | 1 } |
-.Cm floor Ar floor |
-.Cm minclock Ar minclock |
-.Cm minsane Ar minsane
-.Oc
-.Xc
-This command affects the clock selection and clustering
-algorithms.
-It can be used to select the quality and
-quantity of peers used to synchronize the system clock
-and is most useful in manycast mode.
-The variables operate
-as follows:
-.Bl -tag -width indent
-.It Cm ceiling Ar ceiling
-Peers with strata above
-.Cm ceiling
-will be discarded if there are at least
-.Cm minclock
-peers remaining.
-This value defaults to 15, but can be changed
-to any number from 1 to 15.
-.It Cm cohort Bro 0 | 1 Brc
-This is a binary flag which enables (0) or disables (1)
-manycast server replies to manycast clients with the same
-stratum level.
-This is useful to reduce implosions where
-large numbers of clients with the same stratum level
-are present.
-The default is to enable these replies.
-.It Cm floor Ar floor
-Peers with strata below
-.Cm floor
-will be discarded if there are at least
-.Cm minclock
-peers remaining.
-This value defaults to 1, but can be changed
-to any number from 1 to 15.
-.It Cm minclock Ar minclock
-The clustering algorithm repeatedly casts out outlier
-associations until no more than
-.Cm minclock
-associations remain.
-This value defaults to 3,
-but can be changed to any number from 1 to the number of
-configured sources.
-.It Cm minsane Ar minsane
-This is the minimum number of candidates available
-to the clock selection algorithm in order to produce
-one or more truechimers for the clustering algorithm.
-If fewer than this number are available, the clock is
-undisciplined and allowed to run free.
-The default is 1
-for legacy purposes.
-However, according to principles of
-Byzantine agreement,
-.Cm minsane
-should be at least 4 in order to detect and discard
-a single falseticker.
-.El
-.It Cm ttl Ar hop ...
-This command specifies a list of TTL values in increasing
-order, up to 8 values can be specified.
-In manycast mode these values are used in turn
-in an expanding\-ring search.
-The default is eight
-multiples of 32 starting at 31.
-.El
-.Sh Reference Clock Support
-The NTP Version 4 daemon supports some three dozen different radio,
-satellite and modem reference clocks plus a special pseudo\-clock
-used for backup or when no other clock source is available.
-Detailed descriptions of individual device drivers and options can
-be found in the
-.Qq Reference Clock Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-Additional information can be found in the pages linked
-there, including the
-.Qq Debugging Hints for Reference Clock Drivers
-and
-.Qq How To Write a Reference Clock Driver
-pages
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-In addition, support for a PPS
-signal is available as described in the
-.Qq Pulse\-per\-second (PPS) Signal Interfacing
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-Many
-drivers support special line discipline/streams modules which can
-significantly improve the accuracy using the driver.
-These are
-described in the
-.Qq Line Disciplines and Streams Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.Pp
-A reference clock will generally (though not always) be a radio
-timecode receiver which is synchronized to a source of standard
-time such as the services offered by the NRC in Canada and NIST and
-USNO in the US.
-The interface between the computer and the timecode
-receiver is device dependent, but is usually a serial port.
-A
-device driver specific to each reference clock must be selected and
-compiled in the distribution; however, most common radio, satellite
-and modem clocks are included by default.
-Note that an attempt to
-configure a reference clock when the driver has not been compiled
-or the hardware port has not been appropriately configured results
-in a scalding remark to the system log file, but is otherwise non
-hazardous.
-.Pp
-For the purposes of configuration,
-.Xr ntpd @NTPD_MS@
-treats
-reference clocks in a manner analogous to normal NTP peers as much
-as possible.
-Reference clocks are identified by a syntactically
-correct but invalid IP address, in order to distinguish them from
-normal NTP peers.
-Reference clock addresses are of the form
-.Sm off
-.Li 127.127. Ar t . Ar u ,
-.Sm on
-where
-.Ar t
-is an integer
-denoting the clock type and
-.Ar u
-indicates the unit
-number in the range 0\-3.
-While it may seem overkill, it is in fact
-sometimes useful to configure multiple reference clocks of the same
-type, in which case the unit numbers must be unique.
-.Pp
-The
-.Ic server
-command is used to configure a reference
-clock, where the
-.Ar address
-argument in that command
-is the clock address.
-The
-.Cm key ,
-.Cm version
-and
-.Cm ttl
-options are not used for reference clock support.
-The
-.Cm mode
-option is added for reference clock support, as
-described below.
-The
-.Cm prefer
-option can be useful to
-persuade the server to cherish a reference clock with somewhat more
-enthusiasm than other reference clocks or peers.
-Further
-information on this option can be found in the
-.Qq Mitigation Rules and the prefer Keyword
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-page.
-The
-.Cm minpoll
-and
-.Cm maxpoll
-options have
-meaning only for selected clock drivers.
-See the individual clock
-driver document pages for additional information.
+a
+.Li #
+(which is the "start of comment" character).
.Pp
-The
-.Ic fudge
-command is used to provide additional
-information for individual clock drivers and normally follows
-immediately after the
-.Ic server
-command.
-The
-.Ar address
-argument specifies the clock address.
-The
-.Cm refid
-and
-.Cm stratum
-options can be used to
-override the defaults for the device.
-There are two optional
-device\-dependent time offsets and four flags that can be included
-in the
-.Ic fudge
-command as well.
-.Pp
-The stratum number of a reference clock is by default zero.
-Since the
-.Xr ntpd @NTPD_MS@
-daemon adds one to the stratum of each
-peer, a primary server ordinarily displays an external stratum of
-one.
-In order to provide engineered backups, it is often useful to
-specify the reference clock stratum as greater than zero.
-The
-.Cm stratum
-option is used for this purpose.
-Also, in cases
-involving both a reference clock and a pulse\-per\-second (PPS)
-discipline signal, it is useful to specify the reference clock
-identifier as other than the default, depending on the driver.
-The
-.Cm refid
-option is used for this purpose.
-Except where noted,
-these options apply to all clock drivers.
-.Ss Reference Clock Commands
-.Bl -tag -width indent
-.It Xo Ic server
-.Sm off
-.Li 127.127. Ar t . Ar u
-.Sm on
-.Op Cm prefer
-.Op Cm mode Ar int
-.Op Cm minpoll Ar int
-.Op Cm maxpoll Ar int
-.Xc
-This command can be used to configure reference clocks in
-special ways.
-The options are interpreted as follows:
-.Bl -tag -width indent
-.It Cm prefer
-Marks the reference clock as preferred.
-All other things being
-equal, this host will be chosen for synchronization among a set of
-correctly operating hosts.
-See the
-.Qq Mitigation Rules and the prefer Keyword
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp )
-for further information.
-.It Cm mode Ar int
-Specifies a mode number which is interpreted in a
-device\-specific fashion.
-For instance, it selects a dialing
-protocol in the ACTS driver and a device subtype in the
-parse
-drivers.
-.It Cm minpoll Ar int
-.It Cm maxpoll Ar int
-These options specify the minimum and maximum polling interval
-for reference clock messages, as a power of 2 in seconds
-For
-most directly connected reference clocks, both
-.Cm minpoll
-and
-.Cm maxpoll
-default to 6 (64 s).
-For modem reference clocks,
-.Cm minpoll
-defaults to 10 (17.1 m) and
-.Cm maxpoll
-defaults to 14 (4.5 h).
-The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
-.El
-.It Xo Ic fudge
-.Sm off
-.Li 127.127. Ar t . Ar u
-.Sm on
-.Op Cm time1 Ar sec
-.Op Cm time2 Ar sec
-.Op Cm stratum Ar int
-.Op Cm refid Ar string
-.Op Cm mode Ar int
-.Op Cm flag1 Cm 0 \&| Cm 1
-.Op Cm flag2 Cm 0 \&| Cm 1
-.Op Cm flag3 Cm 0 \&| Cm 1
-.Op Cm flag4 Cm 0 \&| Cm 1
-.Xc
-This command can be used to configure reference clocks in
-special ways.
-It must immediately follow the
-.Ic server
-command which configures the driver.
-Note that the same capability
-is possible at run time using the
-.Xr ntpdc @NTPDC_MS@
-program.
-The options are interpreted as
-follows:
-.Bl -tag -width indent
-.It Cm time1 Ar sec
-Specifies a constant to be added to the time offset produced by
-the driver, a fixed\-point decimal number in seconds.
-This is used
-as a calibration constant to adjust the nominal time offset of a
-particular clock to agree with an external standard, such as a
-precision PPS signal.
-It also provides a way to correct a
-systematic error or bias due to serial port or operating system
-latencies, different cable lengths or receiver internal delay.
-The
-specified offset is in addition to the propagation delay provided
-by other means, such as internal DIPswitches.
-Where a calibration
-for an individual system and driver is available, an approximate
-correction is noted in the driver documentation pages.
-Note: in order to facilitate calibration when more than one
-radio clock or PPS signal is supported, a special calibration
-feature is available.
-It takes the form of an argument to the
-.Ic enable
-command described in
-.Sx Miscellaneous Options
-page and operates as described in the
-.Qq Reference Clock Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.It Cm time2 Ar secs
-Specifies a fixed\-point decimal number in seconds, which is
-interpreted in a driver\-dependent way.
-See the descriptions of
-specific drivers in the
-.Qq Reference Clock Drivers
-page
-(available as part of the HTML documentation
-provided in
-.Pa /usr/share/doc/ntp ) .
-.It Cm stratum Ar int
-Specifies the stratum number assigned to the driver, an integer
-between 0 and 15.
-This number overrides the default stratum number
-ordinarily assigned by the driver itself, usually zero.
-.It Cm refid Ar string
-Specifies an ASCII string of from one to four characters which
-defines the reference identifier used by the driver.
-This string
-overrides the default identifier ordinarily assigned by the driver
-itself.
-.It Cm mode Ar int
-Specifies a mode number which is interpreted in a
-device\-specific fashion.
-For instance, it selects a dialing
-protocol in the ACTS driver and a device subtype in the
-parse
-drivers.
-.It Cm flag1 Cm 0 \&| Cm 1
-.It Cm flag2 Cm 0 \&| Cm 1
-.It Cm flag3 Cm 0 \&| Cm 1
-.It Cm flag4 Cm 0 \&| Cm 1
-These four flags are used for customizing the clock driver.
-The
-interpretation of these values, and whether they are used at all,
-is a function of the particular clock driver.
-However, by
-convention
-.Cm flag4
-is used to enable recording monitoring
-data to the
-.Cm clockstats
-file configured with the
-.Ic filegen
-command.
-Further information on the
-.Ic filegen
-command can be found in
-.Sx Monitoring Options .
-.El
+.It Li SHA
+.It Li SHA1
+.It Li RMD160
+The key is a hex\-encoded ASCII string of 40 characters,
+which is truncated as necessary.
.El
-.Sh Miscellaneous Options
-.Bl -tag -width indent
-.It Ic broadcastdelay Ar seconds
-The broadcast and multicast modes require a special calibration
-to determine the network delay between the local and remote
-servers.
-Ordinarily, this is done automatically by the initial
-protocol exchanges between the client and server.
-In some cases,
-the calibration procedure may fail due to network or server access
-controls, for example.
-This command specifies the default delay to
-be used under these circumstances.
-Typically (for Ethernet), a
-number between 0.003 and 0.007 seconds is appropriate.
-The default
-when this command is not used is 0.004 seconds.
-.It Ic calldelay Ar delay
-This option controls the delay in seconds between the first and second
-packets sent in burst or iburst mode to allow additional time for a modem
-or ISDN call to complete.
-.It Ic driftfile Ar driftfile
-This command specifies the complete path and name of the file used to
-record the frequency of the local clock oscillator.
-This is the same
-operation as the
-.Fl f
-command line option.
-If the file exists, it is read at
-startup in order to set the initial frequency and then updated once per
-hour with the current frequency computed by the daemon.
-If the file name is
-specified, but the file itself does not exist, the starts with an initial
-frequency of zero and creates the file when writing it for the first time.
-If this command is not given, the daemon will always start with an initial
-frequency of zero.
.Pp
-The file format consists of a single line containing a single
-floating point number, which records the frequency offset measured
-in parts\-per\-million (PPM).
-The file is updated by first writing
-the current drift value into a temporary file and then renaming
-this file to replace the old version.
-This implies that
-.Xr ntpd @NTPD_MS@
-must have write permission for the directory the
-drift file is located in, and that file system links, symbolic or
-otherwise, should be avoided.
-.It Ic dscp Ar value
-This option specifies the Differentiated Services Control Point (DSCP) value,
-a 6\-bit code.
-The default value is 46, signifying Expedited Forwarding.
-.It Xo Ic enable
-.Oo
-.Cm auth | Cm bclient |
-.Cm calibrate | Cm kernel |
-.Cm mode7 | Cm monitor |
-.Cm ntp | Cm stats |
-.Cm peer_clear_digest_early |
-.Cm unpeer_crypto_early | Cm unpeer_crypto_nak_early | Cm unpeer_digest_early
-.Oc
-.Xc
-.It Xo Ic disable
-.Oo
-.Cm auth | Cm bclient |
-.Cm calibrate | Cm kernel |
-.Cm mode7 | Cm monitor |
-.Cm ntp | Cm stats |
-.Cm peer_clear_digest_early |
-.Cm unpeer_crypto_early | Cm unpeer_crypto_nak_early | Cm unpeer_digest_early
-.Oc
-.Xc
-Provides a way to enable or disable various server options.
-Flags not mentioned are unaffected.
-Note that all of these flags
-can be controlled remotely using the
-.Xr ntpdc @NTPDC_MS@
-utility program.
-.Bl -tag -width indent
-.It Cm auth
-Enables the server to synchronize with unconfigured peers only if the
-peer has been correctly authenticated using either public key or
-private key cryptography.
-The default for this flag is
-.Ic enable .
-.It Cm bclient
-Enables the server to listen for a message from a broadcast or
-multicast server, as in the
-.Ic multicastclient
-command with default
-address.
-The default for this flag is
-.Ic disable .
-.It Cm calibrate
-Enables the calibrate feature for reference clocks.
-The default for
-this flag is
-.Ic disable .
-.It Cm kernel
-Enables the kernel time discipline, if available.
-The default for this
-flag is
-.Ic enable
-if support is available, otherwise
-.Ic disable .
-.It Cm mode7
-Enables processing of NTP mode 7 implementation\-specific requests
-which are used by the deprecated
-.Xr ntpdc @NTPDC_MS@
-program.
-The default for this flag is disable.
-This flag is excluded from runtime configuration using
-.Xr ntpq @NTPQ_MS@ .
-The
-.Xr ntpq @NTPQ_MS@
-program provides the same capabilities as
-.Xr ntpdc @NTPDC_MS@
-using standard mode 6 requests.
-.It Cm monitor
-Enables the monitoring facility.
-See the
-.Xr ntpdc @NTPDC_MS@
-program
-and the
-.Ic monlist
-command or further information.
-The
-default for this flag is
-.Ic enable .
-.It Cm ntp
-Enables time and frequency discipline.
-In effect, this switch opens and
-closes the feedback loop, which is useful for testing.
-The default for
-this flag is
-.Ic enable .
-.It Cm peer_clear_digest_early
-By default, if
-.Xr ntpd @NTPD_MS@
-is using autokey and it
-receives a crypto\-NAK packet that
-passes the duplicate packet and origin timestamp checks
-the peer variables are immediately cleared.
-While this is generally a feature
-as it allows for quick recovery if a server key has changed,
-a properly forged and appropriately delivered crypto\-NAK packet
-can be used in a DoS attack.
-If you have active noticable problems with this type of DoS attack
-then you should consider
-disabling this option.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.It Cm stats
-Enables the statistics facility.
-See the
-.Sx Monitoring Options
-section for further information.
-The default for this flag is
-.Ic disable .
-.It Cm unpeer_crypto_early
-By default, if
-.Xr ntpd @NTPD_MS@
-receives an autokey packet that fails TEST9,
-a crypto failure,
-the association is immediately cleared.
-This is almost certainly a feature,
-but if, in spite of the current recommendation of not using autokey,
-you are
-.B still
-using autokey
-.B and
-you are seeing this sort of DoS attack
-disabling this flag will delay
-tearing down the association until the reachability counter
-becomes zero.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.It Cm unpeer_crypto_nak_early
-By default, if
-.Xr ntpd @NTPD_MS@
-receives a crypto\-NAK packet that
-passes the duplicate packet and origin timestamp checks
-the association is immediately cleared.
-While this is generally a feature
-as it allows for quick recovery if a server key has changed,
-a properly forged and appropriately delivered crypto\-NAK packet
-can be used in a DoS attack.
-If you have active noticable problems with this type of DoS attack
-then you should consider
-disabling this option.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.It Cm unpeer_digest_early
-By default, if
-.Xr ntpd @NTPD_MS@
-receives what should be an authenticated packet
-that passes other packet sanity checks but
-contains an invalid digest
-the association is immediately cleared.
-While this is generally a feature
-as it allows for quick recovery,
-if this type of packet is carefully forged and sent
-during an appropriate window it can be used for a DoS attack.
-If you have active noticable problems with this type of DoS attack
-then you should consider
-disabling this option.
-You can check your
-.Cm peerstats
-file for evidence of any of these attacks.
-The
-default for this flag is
-.Ic enable .
-.El
-.It Ic includefile Ar includefile
-This command allows additional configuration commands
-to be included from a separate file.
-Include files may
-be nested to a depth of five; upon reaching the end of any
-include file, command processing resumes in the previous
-configuration file.
-This option is useful for sites that run
-.Xr ntpd @NTPD_MS@
-on multiple hosts, with (mostly) common options (e.g., a
-restriction list).
-.It Ic leapsmearinterval Ar seconds
-This EXPERIMENTAL option is only available if
-.Xr ntpd @NTPD_MS@
-was built with the
-.Cm \-\-enable\-leap\-smear
-option to the
-.Cm configure
-script.
-It specifies the interval over which a leap second correction will be applied.
-Recommended values for this option are between
-7200 (2 hours) and 86400 (24 hours).
-.Sy DO NOT USE THIS OPTION ON PUBLIC\-ACCESS SERVERS!
-See http://bugs.ntp.org/2855 for more information.
-.It Ic logconfig Ar configkeyword
-This command controls the amount and type of output written to
-the system
-.Xr syslog 3
-facility or the alternate
-.Ic logfile
-log file.
-By default, all output is turned on.
-All
-.Ar configkeyword
-keywords can be prefixed with
-.Ql = ,
-.Ql +
-and
-.Ql \- ,
-where
-.Ql =
-sets the
-.Xr syslog 3
-priority mask,
-.Ql +
-adds and
-.Ql \-
-removes
-messages.
-.Xr syslog 3
-messages can be controlled in four
-classes
-.Po
-.Cm clock ,
-.Cm peer ,
-.Cm sys
-and
-.Cm sync
-.Pc .
-Within these classes four types of messages can be
-controlled: informational messages
-.Po
-.Cm info
-.Pc ,
-event messages
-.Po
-.Cm events
-.Pc ,
-statistics messages
-.Po
-.Cm statistics
-.Pc
+Note that the keys used by the
+.Xr ntpq 8
and
-status messages
-.Po
-.Cm status
-.Pc .
-.Pp
-Configuration keywords are formed by concatenating the message class with
-the event class.
-The
-.Cm all
-prefix can be used instead of a message class.
-A
-message class may also be followed by the
-.Cm all
-keyword to enable/disable all
-messages of the respective message class.
-Thus, a minimal log configuration
-could look like this:
-.Bd -literal
-logconfig =syncstatus +sysevents
-.Ed
-.Pp
-This would just list the synchronizations state of
-.Xr ntpd @NTPD_MS@
-and the major system events.
-For a simple reference server, the
-following minimum message configuration could be useful:
-.Bd -literal
-logconfig =syncall +clockall
-.Ed
-.Pp
-This configuration will list all clock information and
-synchronization information.
-All other events and messages about
-peers, system events and so on is suppressed.
-.It Ic logfile Ar logfile
-This command specifies the location of an alternate log file to
-be used instead of the default system
-.Xr syslog 3
-facility.
-This is the same operation as the
-.Fl l
-command line option.
-.It Ic setvar Ar variable Op Cm default
-This command adds an additional system variable.
-These
-variables can be used to distribute additional information such as
-the access policy.
-If the variable of the form
-.Sm off
-.Va name = Ar value
-.Sm on
-is followed by the
-.Cm default
-keyword, the
-variable will be listed as part of the default system variables
-.Po
-.Xr ntpq @NTPQ_MS@
-.Ic rv
-command
-.Pc ) .
-These additional variables serve
-informational purposes only.
-They are not related to the protocol
-other that they can be listed.
-The known protocol variables will
-always override any variables defined via the
-.Ic setvar
-mechanism.
-There are three special variables that contain the names
-of all variable of the same group.
-The
-.Va sys_var_list
-holds
-the names of all system variables.
-The
-.Va peer_var_list
-holds
-the names of all peer variables and the
-.Va clock_var_list
-holds the names of the reference clock variables.
-.It Xo Ic tinker
-.Oo
-.Cm allan Ar allan |
-.Cm dispersion Ar dispersion |
-.Cm freq Ar freq |
-.Cm huffpuff Ar huffpuff |
-.Cm panic Ar panic |
-.Cm step Ar step |
-.Cm stepback Ar stepback |
-.Cm stepfwd Ar stepfwd |
-.Cm stepout Ar stepout
-.Oc
-.Xc
-This command can be used to alter several system variables in
-very exceptional circumstances.
-It should occur in the
-configuration file before any other configuration options.
-The
-default values of these variables have been carefully optimized for
-a wide range of network speeds and reliability expectations.
-In
-general, they interact in intricate ways that are hard to predict
-and some combinations can result in some very nasty behavior.
-Very
-rarely is it necessary to change the default values; but, some
-folks cannot resist twisting the knobs anyway and this command is
-for them.
-Emphasis added: twisters are on their own and can expect
-no help from the support group.
-.Pp
-The variables operate as follows:
-.Bl -tag -width indent
-.It Cm allan Ar allan
-The argument becomes the new value for the minimum Allan
-intercept, which is a parameter of the PLL/FLL clock discipline
-algorithm.
-The value in log2 seconds defaults to 7 (1024 s), which is also the lower
-limit.
-.It Cm dispersion Ar dispersion
-The argument becomes the new value for the dispersion increase rate,
-normally .000015 s/s.
-.It Cm freq Ar freq
-The argument becomes the initial value of the frequency offset in
-parts\-per\-million.
-This overrides the value in the frequency file, if
-present, and avoids the initial training state if it is not.
-.It Cm huffpuff Ar huffpuff
-The argument becomes the new value for the experimental
-huff\-n'\-puff filter span, which determines the most recent interval
-the algorithm will search for a minimum delay.
-The lower limit is
-900 s (15 m), but a more reasonable value is 7200 (2 hours).
-There
-is no default, since the filter is not enabled unless this command
-is given.
-.It Cm panic Ar panic
-The argument is the panic threshold, normally 1000 s.
-If set to zero,
-the panic sanity check is disabled and a clock offset of any value will
-be accepted.
-.It Cm step Ar step
-The argument is the step threshold, which by default is 0.128 s.
-It can
-be set to any positive number in seconds.
-If set to zero, step
-adjustments will never occur.
-Note: The kernel time discipline is
-disabled if the step threshold is set to zero or greater than the
-default.
-.It Cm stepback Ar stepback
-The argument is the step threshold for the backward direction,
-which by default is 0.128 s.
-It can
-be set to any positive number in seconds.
-If both the forward and backward step thresholds are set to zero, step
-adjustments will never occur.
-Note: The kernel time discipline is
-disabled if
-each direction of step threshold are either
-set to zero or greater than .5 second.
-.It Cm stepfwd Ar stepfwd
-As for stepback, but for the forward direction.
-.It Cm stepout Ar stepout
-The argument is the stepout timeout, which by default is 900 s.
-It can
-be set to any positive number in seconds.
-If set to zero, the stepout
-pulses will not be suppressed.
-.El
-.It Xo Ic rlimit
-.Oo
-.Cm memlock Ar Nmegabytes |
-.Cm stacksize Ar N4kPages
-.Cm filenum Ar Nfiledescriptors
-.Oc
-.Xc
-.Bl -tag -width indent
-.It Cm memlock Ar Nmegabytes
-Specify the number of megabytes of memory that should be
-allocated and locked.
-Probably only available under Linux, this option may be useful
-when dropping root (the
-.Fl i
-option).
-The default is 32 megabytes on non\-Linux machines, and \-1 under Linux.
--1 means "do not lock the process into memory".
-0 means "lock whatever memory the process wants into memory".
-.It Cm stacksize Ar N4kPages
-Specifies the maximum size of the process stack on systems with the
-.Fn mlockall
-function.
-Defaults to 50 4k pages (200 4k pages in OpenBSD).
-.It Cm filenum Ar Nfiledescriptors
-Specifies the maximum number of file descriptors ntpd may have open at once.
-Defaults to the system default.
-.El
-.It Xo Ic trap Ar host_address
-.Op Cm port Ar port_number
-.Op Cm interface Ar interface_address
-.Xc
-This command configures a trap receiver at the given host
-address and port number for sending messages with the specified
-local interface address.
-If the port number is unspecified, a value
-of 18447 is used.
-If the interface address is not specified, the
-message is sent with a source address of the local interface the
-message is sent through.
-Note that on a multihomed host the
-interface used may vary from time to time with routing changes.
-.Pp
-The trap receiver will generally log event messages and other
-information from the server in a log file.
-While such monitor
-programs may also request their own trap dynamically, configuring a
-trap receiver will ensure that no messages are lost when the server
-is started.
-.It Cm hop Ar ...
-This command specifies a list of TTL values in increasing order, up to 8
-values can be specified.
-In manycast mode these values are used in turn in
-an expanding\-ring search.
-The default is eight multiples of 32 starting at
-31.
-.El
+.Xr ntpdc 8
+programs are checked against passwords
+requested by the programs and entered by hand,
+so it is generally appropriate to specify these keys in ASCII format.
.Sh "OPTIONS"
.Bl -tag
.It Fl \-help
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from environment variables named:
.nf
- \fBNTP_CONF_<option\-name>\fP or \fBNTP_CONF\fP
+ \fBNTP_KEYS_<option\-name>\fP or \fBNTP_KEYS\fP
.fi
.ad
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh FILES
-.Bl -tag -width /etc/ntp.drift -compact
-.It Pa /etc/ntp.conf
+.Bl -tag -width /etc/ntp.keys -compact
+.It Pa /etc/ntp.keys
the default name of the configuration file
-.It Pa ntp.keys
-private MD5 keys
-.It Pa ntpkey
-RSA private key
-.It Pa ntpkey_ Ns Ar host
-RSA public key
-.It Pa ntp_dh
-Diffie\-Hellman agreement parameters
.El
.Sh "EXIT STATUS"
One of the following exit values will be returned:
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "SEE ALSO"
+.Xr ntp.conf 5 ,
.Xr ntpd @NTPD_MS@ ,
+.Xr ntpdate @NTPDATE_MS@ ,
.Xr ntpdc @NTPDC_MS@ ,
-.Xr ntpq @NTPQ_MS@
-.Pp
-In addition to the manual pages provided,
-comprehensive documentation is available on the world wide web
-at
-.Li http://www.ntp.org/ .
-A snapshot of this documentation is available in HTML format in
-.Pa /usr/share/doc/ntp .
-.Rs
-.%A David L. Mills
-.%T Network Time Protocol (Version 4)
-.%O RFC5905
-.Re
+.Xr sntp @SNTP_MS@
.Sh "AUTHORS"
The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
-.Sh BUGS
-The syntax checking is not picky; some combinations of
-ridiculous and even hilarious options and modes may not be
-detected.
-.Pp
-The
-.Pa ntpkey_ Ns Ar host
-files are really digital
-certificates.
-These should be obtained via secure directory
-services when they become universally available.
-.Pp
+.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
.Sh NOTES
This document was derived from FreeBSD.
.Pp
-This manual page was \fIAutoGen\fP\-erated from the \fBntp.conf\fP
+This manual page was \fIAutoGen\fP\-erated from the \fBntp.keys\fP
option definitions.
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:34 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:18:26 PM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
* static const strings for ntpd options
*/
static char const ntpd_opt_strs[3126] =
-/* 0 */ "ntpd 4.3.96\n"
+/* 0 */ "ntpd 4.3.97\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
/* 2899 */ "output version information and exit\0"
/* 2935 */ "version\0"
/* 2943 */ "NTPD\0"
-/* 2948 */ "ntpd - NTP daemon program - Ver. 4.3.96\n"
+/* 2948 */ "ntpd - NTP daemon program - Ver. 4.3.97\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
/* 3078 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 3112 */ "\n\0"
-/* 3114 */ "ntpd 4.3.96";
+/* 3114 */ "ntpd 4.3.97";
/**
* ipv4 option description with
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.3.96\n\
+ puts(_("ntpd 4.3.97\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.3.96\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.3.97\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.3.96"));
+ puts(_("ntpd 4.3.97"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:34 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:18:26 PM by AutoGen 5.18.5
* From the definitions ntpd-opts.def
* and the template file options
*
/** count of all options for ntpd */
#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.3.96"
+#define NTPD_VERSION "4.3.97"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.3.96"
+#define NTPD_FULL_VERSION "ntpd 4.3.97"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpd 1ntpdman "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:49 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:01 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:46 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:51 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
</p>
-<p>This document applies to version 4.3.96 of <code>ntpd</code>.
+<p>This document applies to version 4.3.97 of <code>ntpd</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpd - NTP daemon program - Ver. 4.3.97
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p11
Usage: ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpd @NTPD_MS@ "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:49 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:01 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:46 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:51 PM by AutoGen 5.18.5
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:53 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:19:07 PM by AutoGen 5.18.5
# From the definitions ntpdc-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@exampleindent 0
@example
-ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p11
+ntpdc - vendor-specific NTPD control program - Ver. 4.3.97
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:51 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:03 PM by AutoGen 5.18.5
* From the definitions ntpdc-opts.def
* and the template file options
*
* static const strings for ntpdc options
*/
static char const ntpdc_opt_strs[1908] =
-/* 0 */ "ntpdc 4.3.96\n"
+/* 0 */ "ntpdc 4.3.97\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
/* 1693 */ "no-load-opts\0"
/* 1706 */ "no\0"
/* 1709 */ "NTPDC\0"
-/* 1715 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.3.96\n"
+/* 1715 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.3.97\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1844 */ "$HOME\0"
/* 1850 */ ".\0"
/* 1852 */ ".ntprc\0"
/* 1859 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 1893 */ "\n\0"
-/* 1895 */ "ntpdc 4.3.96";
+/* 1895 */ "ntpdc 4.3.97";
/**
* ipv4 option description with
translate option names.
*/
/* referenced via ntpdcOptions.pzCopyright */
- puts(_("ntpdc 4.3.96\n\
+ puts(_("ntpdc 4.3.97\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
puts(_("load options from a config file"));
/* referenced via ntpdcOptions.pzUsageTitle */
- puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.3.96\n\
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.3.97\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */
- puts(_("ntpdc 4.3.96"));
+ puts(_("ntpdc 4.3.97"));
/* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:51 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:03 PM by AutoGen 5.18.5
* From the definitions ntpdc-opts.def
* and the template file options
*
/** count of all options for ntpdc */
#define OPTION_CT 15
/** ntpdc version */
-#define NTPDC_VERSION "4.3.96"
+#define NTPDC_VERSION "4.3.97"
/** Full ntpdc version text */
-#define NTPDC_FULL_VERSION "ntpdc 4.3.96"
+#define NTPDC_FULL_VERSION "ntpdc 4.3.97"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc 1ntpdcman "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpdc 1ntpdcman "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:53 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:08 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:53 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:05 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
</p>
-<p>This document applies to version 4.3.96 of <code>ntpdc</code>.
+<p>This document applies to version 4.3.97 of <code>ntpdc</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p11
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.3.97
Usage: ntpdc [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc @NTPDC_MS@ "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpdc @NTPDC_MS@ "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:53 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:08 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:53 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:05 PM by AutoGen 5.18.5
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:58 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:19:16 PM by AutoGen 5.18.5
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
The
@code{ntpq}
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
the remote host is not heard from within a suitable timeout
time.
+Note that in contexts where a host name is expected, a
+@code{-4}
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+@code{-6}
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+@quotedblleft{}NTP Debugging Techniques@quotedblright{}
+page.
+
Specifying a
command line option other than
@code{-i}
@code{ntpq}
will attempt to read
interactive format commands from the standard input.
+
@subsubsection Internal Commands
+
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
number of interactive format commands are executed entirely within
the
@code{ntpq}
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
@table @asis
-@item @code{?} @code{[@kbd{command_keyword}]}
-@item @code{help} @code{[@kbd{command_keyword}]}
+@item @code{?} @code{[@kbd{command}]}
+@item @code{help} @code{[@kbd{command}]}
A
@quoteleft{}?@quoteright{}
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
@code{ntpq}
A
@quoteleft{}?@quoteright{}
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-@code{ntpq}
-than this manual
-page.
-@item @code{addvars} @kbd{variable_name}@code{[@code{=value}]} @code{...}
-@item @code{rmvars} @kbd{variable_name} @code{...}
+@item @code{addvars} @kbd{name}@code{[=@kbd{value}]}@code{[,...]}
+@item @code{rmvars} @kbd{name}@code{[,...]}
@item @code{clearvars}
@item @code{showvars}
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-@quoteleft{}variable_name=value@quoteright{},
+@kbd{name}@code{[=@kbd{value}]},
where the
-@quoteleft{}=value@quoteright{}
+.No = Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
@code{ntpq}
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
@code{readlist}
and
@code{writelist}
@code{rmvars}
command can be used to remove individual variables from the list,
while the
-@code{clearlist}
+@code{clearvars}
command removes all variables from the
list.
The
@code{showvars}
command displays the current list of optional variables.
-@item @code{authenticate} @code{[yes | no]}
+@item @code{authenticate} @code{[@code{yes}|@code{no}]}
Normally
@code{ntpq}
does not authenticate requests unless
they are write requests.
The command
-@quoteleft{}authenticate yes@quoteright{}
+@code{authenticate} @code{yes}
causes
@code{ntpq}
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-@code{peer}
-display.
+requests slightly differently.
The command
-@quoteleft{}authenticate@quoteright{}
+@code{authenticate}
causes
@code{ntpq}
to display whether or not
-@code{ntpq}
-is currently autheinticating requests.
+it is currently authenticating requests.
@item @code{cooked}
Causes output from query commands to be "cooked", so that
variables which are recognized by
values reformatted for human consumption.
Variables which
@code{ntpq}
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
@quoteleft{}?@quoteright{}.
-@item @code{debug} @code{[@code{more} | @code{less} | @code{off}]}
+@item @code{debug} @code{[@code{more}|@code{less}|@code{off}]}
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-@item @code{delay} @kbd{milliseconds}
+Otherwise, the debugging level is changed as indicated.
+@item @code{delay} @code{[@kbd{milliseconds}]}
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+@item @code{drefid} @code{[@code{hash}|@code{ipv4}]}
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
@item @code{exit}
Exit
@code{ntpq}
-@item @code{host} @kbd{hostname}
+@item @code{host} @code{[@kbd{name}]}
Set the host to which future queries will be sent.
-@kbd{hostname}
+The
+@kbd{name}
may be either a host name or a numeric address.
-@item @code{hostnames} @code{[@code{yes} | @code{no}]}
+Without any arguments, displays the current host.
+@item @code{hostnames} @code{[@code{yes}|@code{no}]}
If
@code{yes}
is specified, host names are printed in
modified using the command line
@code{-n}
switch.
-@item @code{keyid} @kbd{keyid}
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+@item @code{keyid} @code{[@kbd{keyid}]}
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
@code{controlkey}
key number the server has been configured to use for this
purpose.
-@item @code{keytype} @code{[@code{md5} | @code{OpenSSLDigestType}]}
-Specify the type of key to use for authenticating requests.
-@code{md5}
-is alway supported.
+Without any arguments, displays the current
+@kbd{keyid}.
+@item @code{keytype} @code{[@kbd{digest}]}
+Specify the digest algorithm to use for authenticating requests, with default
+@code{MD5}.
If
@code{ntpq}
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+@kbd{digest}
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-@code{keytype}
-is displayed.
-@item @code{ntpversion} @code{[@code{1} | @code{2} | @code{3} | @code{4}]}
+@code{keytype} @kbd{digest}
+algorithm used is displayed.
+@item @code{ntpversion} @code{[@code{1}|@code{2}|@code{3}|@code{4}]}
Sets the NTP version number which
@code{ntpq}
claims in
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-@code{poll}
+@item @code{poll} @code{[@kbd{n}]} @code{[@code{verbose}]}
+Poll an NTP server in client mode
@kbd{n}
-@code{verbose}
+times.
+Poll not implemented yet.
@item @code{quit}
Exit
@code{ntpq}
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-@item @code{timeout} @kbd{milliseconds}
+@item @code{timeout} @code{[@kbd{milliseconds}]}
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
@code{ntpq}
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
@item @code{version}
-Print the version of the
+Display the version of the
@code{ntpq}
program.
@end table
@subsubsection Control Message Commands
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
@code{peers}
command, which sends a series of messages,
@code{mreadvar}
commands, which iterate over a range of associations.
@table @asis
+@item @code{apeers}
+Display a list of peers in the form:
+@example
+[tally]remote refid assid st t when pool reach delay offset jitter
+@end example
+where the output is just like the
+@code{peers}
+command except that the
+@code{refid}
+is displayed in hex format and the association number is also displayed.
@item @code{associations}
Display a list of mobilized associations in the form:
@example
ind assid status conf reach auth condition last_event cnt
@end example
@table @asis
-@item Sy String Ta Sy Description
+@item Sy Variable Ta Sy Description
@item @code{ind} @code{Ta} @code{index} @code{on} @code{this} @code{list}
-@item @code{assid} @code{Ta} @code{association} @code{ID}
+@item @code{assid} @code{Ta} @code{association} @code{id}
@item @code{status} @code{Ta} @code{peer} @code{status} @code{word}
-@item @code{conf} @code{Ta} @code{yes}: @code{persistent,} @code{no}: @code{ephemeral}
-@item @code{reach} @code{Ta} @code{yes}: @code{reachable,} @code{no}: @code{unreachable}
-@item @code{auth} @code{Ta} @code{ok}, @code{yes}, @code{bad} @code{and} @code{none}
-@item @code{condition} @code{Ta} @code{selection} @code{status} @code{(see} @code{the} @code{select} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
-@item @code{last_event} @code{Ta} @code{event} @code{report} @code{(see} @code{the} @code{event} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
-@item @code{cnt} @code{Ta} @code{event} @code{count} @code{(see} @code{the} @code{count} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{conf} @code{Ta} @code{yes}: @code{No} @code{persistent,} @code{no}: @code{No} @code{ephemeral}
+@item @code{reach} @code{Ta} @code{yes}: @code{No} @code{reachable,} @code{no}: @code{No} @code{unreachable}
+@item @code{auth} @code{Ta} @code{ok}, @code{yes}, @code{bad} @code{No} @code{and} @code{none}
+@item @code{condition} @code{Ta} @code{selection} @code{status} @code{(see} @code{the} @code{select} @code{No} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{last_event} @code{Ta} @code{event} @code{report} @code{(see} @code{the} @code{event} @code{No} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
+@item @code{cnt} @code{Ta} @code{event} @code{count} @code{(see} @code{the} @code{count} @code{No} @code{field} @code{of} @code{the} @code{peer} @code{status} @code{word)}
@end table
@item @code{authinfo}
-Display the authentication statistics.
-@item @code{clockvar} @kbd{assocID} @code{[@kbd{name}@code{[@code{=}@kbd{value}]}]} @code{[...]}
-@item @code{cv} @kbd{assocID} @code{[@kbd{name}@code{[@code{=}@kbd{value}]}]} @code{[...]}
-Display a list of clock variables for those associations supporting a reference clock.
-@item @code{:config} @code{[...]}
-Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+@item @code{clocklist} @code{[@kbd{associd}]}
+@item @code{cl} @code{[@kbd{associd}]}
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+@item @code{clockvar} @code{[@kbd{associd}]} @code{[@kbd{name}@code{[=@kbd{value}]}]}@code{[,...]}
+@item @code{cv} @code{[@kbd{associd}]} @code{[@kbd{name}@code{[=@kbd{value}]}]}@code{[,...]}
+Display a list of clock variables for those associations supporting a
+reference clock.
+@item @code{:config} @kbd{configuration command line}
+Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
@item @code{config-from-file} @kbd{filename}
-Send the each line of
+Send each line of
@kbd{filename}
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
@item @code{ifstats}
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
@item @code{iostats}
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
@item @code{kerninfo}
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
@item @code{lassociations}
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-@item @code{lopeers} @code{[@code{-4} | @code{-6}]}
-Obtain and print a list of all peers and clients showing
-@kbd{dstadr}
-(associated with any given IP version).
-@item @code{lpeers} @code{[@code{-4} | @code{-6}]}
-Print a peer spreadsheet for the appropriate IP version(s).
-@kbd{dstadr}
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+@item @code{lopeers} @code{[@code{-4}|@code{-6}]}
+Display a list of all peers and clients showing
+@code{dstadr}
+(associated with the given IP version).
+@item @code{lpassociations}
+Display the last obtained list of associations, including all clients.
+@item @code{lpeers} @code{[@code{-4}|@code{-6}]}
+Display a list of all peers and clients (associated with the given IP version).
@item @code{monstats}
-Display monitor facility statistics.
-@item @code{mrulist} @code{[@code{limited} | @code{kod} | @code{mincount}=@kbd{count} | @code{laddr}=@kbd{localaddr} | @code{sort}=@kbd{sortorder} | @code{resany}=@kbd{hexmask} | @code{resall}=@kbd{hexmask}]}
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+@item @code{mreadlist} @kbd{associdlo} @kbd{associdhi}
+@item @code{mrl} @kbd{associdlo} @kbd{associdhi}
+Perform the same function as the
+@code{readlist}
+command for a range of association ids.
+@item @code{mreadvar} @kbd{associdlo} @kbd{associdhi} @code{[@kbd{name}]}@code{[,...]}
+This range may be determined from the list displayed by any
+command showing associations.
+@item @code{mrv} @kbd{associdlo} @kbd{associdhi} @code{[@kbd{name}]}@code{[,...]}
+Perform the same function as the
+@code{readvar}
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+@item @code{mrulist} @code{[@code{limited} | @code{kod} | @code{mincount}=@kbd{count} | @code{laddr}=@kbd{localaddr} | @code{sort}=@code{[-]}@kbd{sortorder} | @code{resany}=@kbd{hexmask} | @code{resall}=@kbd{hexmask}]}
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-@code{sort}=@kbd{sortorder},
+@code{sort}=@code{[-]}@kbd{sortorder},
the options filter the list returned by
-@code{ntpd.}
+@code{ntpd(8)}.
The
@code{limited}
and
@code{kod}
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
@code{mincount}=@kbd{count}
option filters entries representing less than
@kbd{sortorder}
defaults to
@code{lstint}
-and may be any of
+and may be
@code{addr},
-@code{count},
@code{avgint},
+@code{count},
@code{lstint},
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+@quoteleft{}-@quoteright{}
+to reverse the sort order.
The output columns are:
@table @asis
@item Column
Description
@item @code{lstint}
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
@code{ntpq}
@item @code{avgint}
Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
@code{restrict}
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
@item @code{r}
Rate control indicator, either
a period,
@item @code{rport}
Source port of last packet from this address.
@item @code{remote} @code{address}
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
@end table
-@item @code{mreadvar} @code{assocID} @code{assocID} @code{[@kbd{variable_name}@code{[=@kbd{value}]} ...]}
-@item @code{mrv} @code{assocID} @code{assocID} @code{[@kbd{variable_name}@code{[=@kbd{value}]} ...]}
-Perform the same function as the
-@code{readvar}
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-@code{associations}
-command.
@item @code{opeers} @code{[@code{-4} | @code{-6}]}
Obtain and print the old-style list of all peers and clients showing
-@kbd{dstadr}
-(associated with any given IP version),
+@code{dstadr}
+(associated with the given IP version),
rather than the
-@kbd{refid}.
+@code{refid}.
@item @code{passociations}
Perform the same function as the
@code{associations}
.Lk decode.html#peer "peer status word"
@item @code{remote}
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+@code{ntpq}
@code{-w}
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
@item @code{refid}
-association ID or
+source IP address or
.Lk decode.html#kiss "'kiss code"
@item @code{st}
-stratum
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
@item @code{t}
@code{u}:
unicast or manycast client,
@code{b}:
broadcast or multicast client,
+@code{p}:
+pool source,
@code{l}:
local (reference clock),
@code{s}:
@code{M}:
multicast server
@item @code{when}
-sec/min/hr since last received packet
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+@quoteleft{}-@quoteright{}
+if a packet has never been received
@item @code{poll}
-poll interval (log2 s)
+poll interval (s)
@item @code{reach}
reach shift register (octal)
@item @code{delay}
@item @code{offset}
offset of server relative to this host
@item @code{jitter}
-jitter
+offset RMS error estimate.
@end table
-@item @code{apeers}
-Display a list of peers in the form:
-@example
-[tally]remote refid assid st t when pool reach delay offset jitter
-@end example
-where the output is just like the
-@code{peers}
-command except that the
-@code{refid}
-is displayed in hex format and the association number is also displayed.
-@item @code{pstats} @kbd{assocID}
-Show the statistics for the peer with the given
-@kbd{assocID}.
-@item @code{readlist} @kbd{assocID}
-@item @code{rl} @kbd{assocID}
-Read the system or peer variables included in the variable list.
-@item @code{readvar} @kbd{assocID} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}
-@item @code{rv} @kbd{assocID} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}
-Display the specified variables.
+@item @code{pstats} @kbd{associd}
+Display the statistics for the peer with the given
+@kbd{associd}:
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+@item @code{readlist} @code{[@kbd{associd}]}
+@item @code{rl} @code{[@kbd{associd}]}
+Display all system or peer variables.
+If the
+@kbd{associd}
+is omitted, it is assumed to be zero.
+@item @code{readvar} @code{[@kbd{associd} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}]}
+@item @code{rv} @code{[@kbd{associd} @kbd{name}@code{[=@kbd{value}]} @code{[, ...]}]}
+Display the specified system or peer variables.
If
-@kbd{assocID}
+@kbd{associd}
is zero, the variables are from the
@ref{System Variables}
name space, otherwise they are from the
@ref{Peer Variables}
name space.
The
-@kbd{assocID}
+@kbd{associd}
is required, as the same name can occur in both spaces.
If no
@kbd{name}
is included, all operative variables in the name space are displayed.
-
In this case only, if the
-@kbd{assocID}
-is omitted, it is assumed zero.
+@kbd{associd}
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+@kbd{YYYY}@kbd{MM} @kbd{DD} @kbd{TTTT},
+where
+@kbd{YYYY}
+is the year,
+@kbd{MM}
+the month of year,
+@kbd{DD}
+the day of month and
+@kbd{TTTT}
+the time of day.
@item @code{reslist}
-Show the access control (restrict) list for
+Display the access control (restrict) list for
@code{ntpq}
-
+Authentication is required.
@item @code{saveconfig} @kbd{filename}
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
@code{:config}
or
@code{config-from-file},
-to the ntpd host's file
+to the NTP server host file
@kbd{filename}.
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-@code{ntpd}
+@code{ntpd(8)}
configuration file.
@kbd{filename}
can use
-@code{strftime()}
-format specifies to substitute the current date and time, for example,
-@code{q]saveconfig} @code{ntp-%Y%m%d-%H%M%S.confq]}.
+@code{date(1)}
+format specifiers to substitute the current date and time, for
+example,
+@example
+@code{saveconfig} @file{ntp-%Y%m%d-%H%M%S.conf}.
+@end example
The filename used is stored in system variable
@code{savedconfig}.
Authentication is required.
+@item @code{sysinfo}
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+@item @code{sysstats}
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
@item @code{timerstats}
-Display interval timer counters.
-@item @code{writelist} @kbd{assocID}
-Write the system or peer variables included in the variable list.
-@item @code{writevar} @kbd{assocID} @kbd{name}=@kbd{value} @code{[, ...]}
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+@item @code{writelist} @kbd{associd}
+Set all system or peer variables included in the variable list.
+@item @code{writevar} @kbd{associd} @kbd{name}=@kbd{value} @code{[, ...]}
+Set the specified variables in the variable list.
If the
-@kbd{assocID}
+@kbd{associd}
is zero, the variables are from the
@ref{System Variables}
name space, otherwise they are from the
@ref{Peer Variables}
name space.
The
-@kbd{assocID}
+@kbd{associd}
is required, as the same name can occur in both spaces.
-@item @code{sysinfo}
-Display operational summary.
-@item @code{sysstats}
-Print statistics counters maintained in the protocol module.
+Authentication is required.
@end table
@subsubsection Status Words and Kiss Codes
-
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-@code{rv}
+These words are displayed by the
+@code{readlist}
and
-@code{as}
+@code{associations}
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
@subsubsection System Variables
The following system variables appear in the
-@code{rv}
+@code{readlist}
billboard.
Not all variables are displayed in some configurations.
+
@table @asis
@item Variable
Description
total roundtrip delay to the primary reference clock
@item @code{rootdisp}
total dispersion to the primary reference clock
+@item @code{refid}
+reference id or
+.Lk decode.html#kiss "kiss code"
+@item @code{reftime}
+reference time
+@item @code{clock}
+date and time of day
@item @code{peer}
-system peer association ID
+system peer association id
@item @code{tc}
time constant and poll exponent (log2 s) (3-17)
@item @code{mintc}
minimum time constant (log2 s) (3-10)
-@item @code{clock}
-date and time of day
-@item @code{refid}
-reference ID or
-.Lk decode.html#kiss "kiss code"
-@item @code{reftime}
-reference time
@item @code{offset}
-combined offset of server relative to this host
+combined offset of server relative to this host
+@item @code{frequency}
+frequency drift (PPM) relative to hardware clock
@item @code{sys_jitter}
combined system jitter
-@item @code{frequency}
-frequency offset (PPM) relative to hardware clock
@item @code{clk_wander}
clock frequency wander (PPM)
@item @code{clk_jitter}
additional system variables are displayed,
including some or all of the following,
depending on the particular Autokey dance:
-
@table @asis
@item Variable
Description
@end table
@subsubsection Peer Variables
The following peer variables appear in the
-@code{rv}
+@code{readlist}
billboard for each association.
Not all variables are displayed in some configurations.
@item Variable
Description
@item @code{associd}
-association ID
+association id
@item @code{status}
.Lk decode.html#peer "peer status word"
@item @code{srcadr}
@item @code{rootdisp}
total root dispersion to the primary reference clock
@item @code{refid}
-reference ID or
+reference id or
.Lk decode.html#kiss "kiss code"
@item @code{reftime}
reference time
+@item @code{rec}
+last packet received time
@item @code{reach}
reach register (octal)
@item @code{unreach}
.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
@item @code{flash}
.Lk decode.html#flash "flash status word"
+@item @code{keyid}
+symmetric key id
@item @code{offset}
filter offset
@item @code{delay}
filter dispersion
@item @code{jitter}
filter jitter
-@item @code{ident}
-Autokey group name for this association
@item @code{bias}
unicast/broadcast bias
@item @code{xleave}
@code{bias}
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
@code{xleave}
variable appears only for the interleaved symmetric and interleaved modes.
@item @code{signature}
OpenSSL digest/signature scheme
@item @code{initsequence}
-initial key ID
+initial key id
@item @code{initkey}
initial key index
@item @code{timestamp}
Autokey signature timestamp
+@item @code{ident}
+Autokey group name for this association
@end table
@subsubsection Clock Variables
The following clock variables appear in the
-@code{cv}
+@code{clocklist}
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
@table @asis
@item Variable
Description
@item @code{associd}
-association ID
+association id
@item @code{status}
.Lk decode.html#clock "clock status word"
@item @code{device}
@item @code{stratum}
driver stratum
@item @code{refid}
-driver reference ID
+driver reference id
@item @code{flags}
driver flags
@end table
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.8p11
+ntpq - standard NTP query program - Ver. 4.3.97
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 name resolution
@subsection ipv4 option (-4)
@cindex ntpq-ipv4
-This is the ``force ipv4 dns name resolution'' option.
+This is the ``force ipv4 name resolution'' option.
@noindent
This option has some usage constraints. It:
ipv6.
@end itemize
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
@node ntpq ipv6
@subsection ipv6 option (-6)
@cindex ntpq-ipv6
-This is the ``force ipv6 dns name resolution'' option.
+This is the ``force ipv6 name resolution'' option.
@noindent
This option has some usage constraints. It:
ipv4.
@end itemize
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
@node ntpq command
@subsection command option (-c)
This is the ``numeric host addresses'' option.
Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
@node ntpq old-rv
@subsection old-rv option
@cindex ntpq-old-rv
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:55 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:09 PM by AutoGen 5.18.5
* From the definitions ntpq-opts.def
* and the template file options
*
/**
* static const strings for ntpq options
*/
-static char const ntpq_opt_strs[1979] =
-/* 0 */ "ntpq 4.3.96\n"
+static char const ntpq_opt_strs[1971] =
+/* 0 */ "ntpq 4.3.97\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"Time Foundation makes no representations about the suitability this\n"
"software for any purpose. It is provided \"as is\" without express or\n"
"implied warranty.\n\0"
-/* 1007 */ "Force IPv4 DNS name resolution\0"
-/* 1038 */ "IPV4\0"
-/* 1043 */ "ipv4\0"
-/* 1048 */ "Force IPv6 DNS name resolution\0"
-/* 1079 */ "IPV6\0"
-/* 1084 */ "ipv6\0"
-/* 1089 */ "run a command and exit\0"
-/* 1112 */ "COMMAND\0"
-/* 1120 */ "command\0"
-/* 1128 */ "Increase debug verbosity level\0"
-/* 1159 */ "DEBUG_LEVEL\0"
-/* 1171 */ "debug-level\0"
-/* 1183 */ "Set the debug verbosity level\0"
-/* 1213 */ "SET_DEBUG_LEVEL\0"
-/* 1229 */ "set-debug-level\0"
-/* 1245 */ "Force ntpq to operate in interactive mode\0"
-/* 1287 */ "INTERACTIVE\0"
-/* 1299 */ "interactive\0"
-/* 1311 */ "numeric host addresses\0"
-/* 1334 */ "NUMERIC\0"
-/* 1342 */ "numeric\0"
-/* 1350 */ "Always output status line with readvar\0"
-/* 1389 */ "OLD_RV\0"
-/* 1396 */ "old-rv\0"
-/* 1403 */ "Print a list of the peers\0"
-/* 1429 */ "PEERS\0"
-/* 1435 */ "peers\0"
-/* 1441 */ "Set default display type for S2+ refids\0"
-/* 1481 */ "REFID\0"
-/* 1487 */ "refid\0"
-/* 1493 */ "Display the full 'remote' value\0"
-/* 1525 */ "WIDE\0"
-/* 1530 */ "wide\0"
-/* 1535 */ "display extended usage information and exit\0"
-/* 1579 */ "help\0"
-/* 1584 */ "extended usage information passed thru pager\0"
-/* 1629 */ "more-help\0"
-/* 1639 */ "output version information and exit\0"
-/* 1675 */ "version\0"
-/* 1683 */ "save the option state to a config file\0"
-/* 1722 */ "save-opts\0"
-/* 1732 */ "load options from a config file\0"
-/* 1764 */ "LOAD_OPTS\0"
-/* 1774 */ "no-load-opts\0"
-/* 1787 */ "no\0"
-/* 1790 */ "NTPQ\0"
-/* 1795 */ "ntpq - standard NTP query program - Ver. 4.3.96\n"
+/* 1007 */ "Force IPv4 name resolution\0"
+/* 1034 */ "IPV4\0"
+/* 1039 */ "ipv4\0"
+/* 1044 */ "Force IPv6 name resolution\0"
+/* 1071 */ "IPV6\0"
+/* 1076 */ "ipv6\0"
+/* 1081 */ "run a command and exit\0"
+/* 1104 */ "COMMAND\0"
+/* 1112 */ "command\0"
+/* 1120 */ "Increase debug verbosity level\0"
+/* 1151 */ "DEBUG_LEVEL\0"
+/* 1163 */ "debug-level\0"
+/* 1175 */ "Set the debug verbosity level\0"
+/* 1205 */ "SET_DEBUG_LEVEL\0"
+/* 1221 */ "set-debug-level\0"
+/* 1237 */ "Force ntpq to operate in interactive mode\0"
+/* 1279 */ "INTERACTIVE\0"
+/* 1291 */ "interactive\0"
+/* 1303 */ "numeric host addresses\0"
+/* 1326 */ "NUMERIC\0"
+/* 1334 */ "numeric\0"
+/* 1342 */ "Always output status line with readvar\0"
+/* 1381 */ "OLD_RV\0"
+/* 1388 */ "old-rv\0"
+/* 1395 */ "Print a list of the peers\0"
+/* 1421 */ "PEERS\0"
+/* 1427 */ "peers\0"
+/* 1433 */ "Set default display type for S2+ refids\0"
+/* 1473 */ "REFID\0"
+/* 1479 */ "refid\0"
+/* 1485 */ "Display the full 'remote' value\0"
+/* 1517 */ "WIDE\0"
+/* 1522 */ "wide\0"
+/* 1527 */ "display extended usage information and exit\0"
+/* 1571 */ "help\0"
+/* 1576 */ "extended usage information passed thru pager\0"
+/* 1621 */ "more-help\0"
+/* 1631 */ "output version information and exit\0"
+/* 1667 */ "version\0"
+/* 1675 */ "save the option state to a config file\0"
+/* 1714 */ "save-opts\0"
+/* 1724 */ "load options from a config file\0"
+/* 1756 */ "LOAD_OPTS\0"
+/* 1766 */ "no-load-opts\0"
+/* 1779 */ "no\0"
+/* 1782 */ "NTPQ\0"
+/* 1787 */ "ntpq - standard NTP query program - Ver. 4.3.97\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1913 */ "$HOME\0"
-/* 1919 */ ".\0"
-/* 1921 */ ".ntprc\0"
-/* 1928 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1962 */ "ntpq 4.3.96\0"
-/* 1974 */ "hash";
+/* 1905 */ "$HOME\0"
+/* 1911 */ ".\0"
+/* 1913 */ ".ntprc\0"
+/* 1920 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1954 */ "ntpq 4.3.97\0"
+/* 1966 */ "hash";
/**
* ipv4 option description with
/** Descriptive text for the ipv4 option */
#define IPV4_DESC (ntpq_opt_strs+1007)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpq_opt_strs+1038)
+#define IPV4_NAME (ntpq_opt_strs+1034)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpq_opt_strs+1043)
+#define IPV4_name (ntpq_opt_strs+1039)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpq_opt_strs+1048)
+#define IPV6_DESC (ntpq_opt_strs+1044)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpq_opt_strs+1079)
+#define IPV6_NAME (ntpq_opt_strs+1071)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpq_opt_strs+1084)
+#define IPV6_name (ntpq_opt_strs+1076)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
* command option description:
*/
/** Descriptive text for the command option */
-#define COMMAND_DESC (ntpq_opt_strs+1089)
+#define COMMAND_DESC (ntpq_opt_strs+1081)
/** Upper-cased name for the command option */
-#define COMMAND_NAME (ntpq_opt_strs+1112)
+#define COMMAND_NAME (ntpq_opt_strs+1104)
/** Name string for the command option */
-#define COMMAND_name (ntpq_opt_strs+1120)
+#define COMMAND_name (ntpq_opt_strs+1112)
/** Compiled in flag settings for the command option */
#define COMMAND_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1128)
+#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1120)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1159)
+#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1151)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpq_opt_strs+1171)
+#define DEBUG_LEVEL_name (ntpq_opt_strs+1163)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1183)
+#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1175)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1213)
+#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1205)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1229)
+#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1221)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the interactive option */
-#define INTERACTIVE_DESC (ntpq_opt_strs+1245)
+#define INTERACTIVE_DESC (ntpq_opt_strs+1237)
/** Upper-cased name for the interactive option */
-#define INTERACTIVE_NAME (ntpq_opt_strs+1287)
+#define INTERACTIVE_NAME (ntpq_opt_strs+1279)
/** Name string for the interactive option */
-#define INTERACTIVE_name (ntpq_opt_strs+1299)
+#define INTERACTIVE_name (ntpq_opt_strs+1291)
/** Other options that appear in conjunction with the interactive option */
static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
* numeric option description:
*/
/** Descriptive text for the numeric option */
-#define NUMERIC_DESC (ntpq_opt_strs+1311)
+#define NUMERIC_DESC (ntpq_opt_strs+1303)
/** Upper-cased name for the numeric option */
-#define NUMERIC_NAME (ntpq_opt_strs+1334)
+#define NUMERIC_NAME (ntpq_opt_strs+1326)
/** Name string for the numeric option */
-#define NUMERIC_name (ntpq_opt_strs+1342)
+#define NUMERIC_name (ntpq_opt_strs+1334)
/** Compiled in flag settings for the numeric option */
#define NUMERIC_FLAGS (OPTST_DISABLED)
* old-rv option description:
*/
/** Descriptive text for the old-rv option */
-#define OLD_RV_DESC (ntpq_opt_strs+1350)
+#define OLD_RV_DESC (ntpq_opt_strs+1342)
/** Upper-cased name for the old-rv option */
-#define OLD_RV_NAME (ntpq_opt_strs+1389)
+#define OLD_RV_NAME (ntpq_opt_strs+1381)
/** Name string for the old-rv option */
-#define OLD_RV_name (ntpq_opt_strs+1396)
+#define OLD_RV_name (ntpq_opt_strs+1388)
/** Compiled in flag settings for the old-rv option */
#define OLD_RV_FLAGS (OPTST_DISABLED)
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the peers option */
-#define PEERS_DESC (ntpq_opt_strs+1403)
+#define PEERS_DESC (ntpq_opt_strs+1395)
/** Upper-cased name for the peers option */
-#define PEERS_NAME (ntpq_opt_strs+1429)
+#define PEERS_NAME (ntpq_opt_strs+1421)
/** Name string for the peers option */
-#define PEERS_name (ntpq_opt_strs+1435)
+#define PEERS_name (ntpq_opt_strs+1427)
/** Other options that appear in conjunction with the peers option */
static int const aPeersCantList[] = {
INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
* refid option description:
*/
/** Descriptive text for the refid option */
-#define REFID_DESC (ntpq_opt_strs+1441)
+#define REFID_DESC (ntpq_opt_strs+1433)
/** Upper-cased name for the refid option */
-#define REFID_NAME (ntpq_opt_strs+1481)
+#define REFID_NAME (ntpq_opt_strs+1473)
/** Name string for the refid option */
-#define REFID_name (ntpq_opt_strs+1487)
+#define REFID_name (ntpq_opt_strs+1479)
/** The compiled in default value for the refid option argument */
#define REFID_DFT_ARG ((char const*)REFID_IPV4)
/** Compiled in flag settings for the refid option */
* wide option description:
*/
/** Descriptive text for the wide option */
-#define WIDE_DESC (ntpq_opt_strs+1493)
+#define WIDE_DESC (ntpq_opt_strs+1485)
/** Upper-cased name for the wide option */
-#define WIDE_NAME (ntpq_opt_strs+1525)
+#define WIDE_NAME (ntpq_opt_strs+1517)
/** Name string for the wide option */
-#define WIDE_name (ntpq_opt_strs+1530)
+#define WIDE_name (ntpq_opt_strs+1522)
/** Compiled in flag settings for the wide option */
#define WIDE_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpq_opt_strs+1535)
-#define HELP_name (ntpq_opt_strs+1579)
+#define HELP_DESC (ntpq_opt_strs+1527)
+#define HELP_name (ntpq_opt_strs+1571)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpq_opt_strs+1584)
-#define MORE_HELP_name (ntpq_opt_strs+1629)
+#define MORE_HELP_DESC (ntpq_opt_strs+1576)
+#define MORE_HELP_name (ntpq_opt_strs+1621)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpq_opt_strs+1639)
-#define VER_name (ntpq_opt_strs+1675)
-#define SAVE_OPTS_DESC (ntpq_opt_strs+1683)
-#define SAVE_OPTS_name (ntpq_opt_strs+1722)
-#define LOAD_OPTS_DESC (ntpq_opt_strs+1732)
-#define LOAD_OPTS_NAME (ntpq_opt_strs+1764)
-#define NO_LOAD_OPTS_name (ntpq_opt_strs+1774)
-#define LOAD_OPTS_pfx (ntpq_opt_strs+1787)
+#define VER_DESC (ntpq_opt_strs+1631)
+#define VER_name (ntpq_opt_strs+1667)
+#define SAVE_OPTS_DESC (ntpq_opt_strs+1675)
+#define SAVE_OPTS_name (ntpq_opt_strs+1714)
+#define LOAD_OPTS_DESC (ntpq_opt_strs+1724)
+#define LOAD_OPTS_NAME (ntpq_opt_strs+1756)
+#define NO_LOAD_OPTS_name (ntpq_opt_strs+1766)
+#define LOAD_OPTS_pfx (ntpq_opt_strs+1779)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpq. */
-#define zPROGNAME (ntpq_opt_strs+1790)
+#define zPROGNAME (ntpq_opt_strs+1782)
/** Reference to the title line for ntpq usage. */
-#define zUsageTitle (ntpq_opt_strs+1795)
+#define zUsageTitle (ntpq_opt_strs+1787)
/** ntpq configuration file name. */
-#define zRcName (ntpq_opt_strs+1921)
+#define zRcName (ntpq_opt_strs+1913)
/** Directories to search for ntpq config files. */
static char const * const apzHomeList[3] = {
- ntpq_opt_strs+1913,
- ntpq_opt_strs+1919,
+ ntpq_opt_strs+1905,
+ ntpq_opt_strs+1911,
NULL };
/** The ntpq program bug email address. */
-#define zBugsAddr (ntpq_opt_strs+1928)
+#define zBugsAddr (ntpq_opt_strs+1920)
/** Clarification/explanation of what ntpq does. */
#define zExplain (NULL)
/** Extra detail explaining what ntpq does. */
#define zDetail (NULL)
/** The full version string for ntpq. */
-#define zFullVersion (ntpq_opt_strs+1962)
+#define zFullVersion (ntpq_opt_strs+1954)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
/* extracted from optmain.tlib near line 945 */
static char const * const names[2] = {
- ntpq_opt_strs+1974, ntpq_opt_strs+1043 };
+ ntpq_opt_strs+1966, ntpq_opt_strs+1039 };
if (pOptions <= OPTPROC_EMIT_LIMIT) {
(void) optionEnumerationVal(pOptions, pOptDesc, names, 2);
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.3.96\n\
+ puts(_("ntpq 4.3.97\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
implied warranty.\n"));
/* referenced via ntpqOptions.pOptDesc->pzText */
- puts(_("Force IPv4 DNS name resolution"));
+ puts(_("Force IPv4 name resolution"));
/* referenced via ntpqOptions.pOptDesc->pzText */
- puts(_("Force IPv6 DNS name resolution"));
+ puts(_("Force IPv6 name resolution"));
/* referenced via ntpqOptions.pOptDesc->pzText */
puts(_("run a command and exit"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.3.96\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.3.97\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.3.96"));
+ puts(_("ntpq 4.3.97"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:55 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:09 PM by AutoGen 5.18.5
* From the definitions ntpq-opts.def
* and the template file options
*
/** count of all options for ntpq */
#define OPTION_CT 16
/** ntpq version */
-#define NTPQ_VERSION "4.3.96"
+#define NTPQ_VERSION "4.3.97"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.3.96"
+#define NTPQ_FULL_VERSION "ntpq 4.3.97"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpq 1ntpqman "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:58 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:17 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.ne 2
.SH DESCRIPTION
+.sp \n(Ppu
+.ne 2
+
The
\f\*[B-Font]ntpq\fP
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.sp \n(Ppu
+.ne 2
+
If one or more request options is included on the command line
when
\f\*[B-Font]ntpq\fP
\f\*[B-Font]ntpq\fP
utility will prompt for
commands if the standard input is a terminal device.
+.sp \n(Ppu
+.ne 2
+
\f\*[B-Font]ntpq\fP
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+\f\*[B-Font]\-6\f[]
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+\*[Lq]NTP Debugging Techniques\*[Rq]
+page.
+.sp \n(Ppu
+.ne 2
+
Specifying a
command line option other than
\f\*[B-Font]\-i\f[]
will attempt to read
interactive format commands from the standard input.
.SS "Internal Commands"
+.sp \n(Ppu
+.ne 2
+
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.sp \n(Ppu
+.ne 2
+
A
number of interactive format commands are executed entirely within
the
\f\*[B-Font]ntpq\fP
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.TP 20
-.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command\f[]]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command\f[]]
A
\[oq]\&?\[cq]
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
\f\*[B-Font]ntpq\fP.
A
\[oq]\&?\[cq]
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-\f\*[B-Font]ntpq\fP
-than this manual
-page.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][,...]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]name\f[][,...]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]clearvars\f[]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]showvars\f[]
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-\[oq]variable_name=value\[cq],
+\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]],
where the
-\[oq]=value\[cq]
+.NOP \&=\f\*[I-Font]value\f[]
is ignored, and can be omitted,
in requests to the server to read variables.
The
\f\*[B-Font]ntpq\fP
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
\f\*[B-Font]readlist\f[]
and
\f\*[B-Font]writelist\f[]
\f\*[B-Font]rmvars\f[]
command can be used to remove individual variables from the list,
while the
-\f\*[B-Font]clearlist\f[]
+\f\*[B-Font]clearvars\f[]
command removes all variables from the
list.
The
command displays the current list of optional variables.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]authenticate\f[] [yes | no]
+.TP 15
+.NOP \f\*[B-Font]authenticate\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
Normally
\f\*[B-Font]ntpq\fP
does not authenticate requests unless
they are write requests.
The command
-\[oq]authenticate yes\[cq]
+\f\*[B-Font]authenticate\f[] \f\*[B-Font]yes\f[]
causes
\f\*[B-Font]ntpq\fP
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-\f\*[B-Font]peer\f[]
-display.
+requests slightly differently.
The command
-\[oq]authenticate\[cq]
+\f\*[B-Font]authenticate\f[]
causes
\f\*[B-Font]ntpq\fP
to display whether or not
-\f\*[B-Font]ntpq\fP
-is currently autheinticating requests.
+it is currently authenticating requests.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]cooked\f[]
Causes output from query commands to be "cooked", so that
variables which are recognized by
values reformatted for human consumption.
Variables which
\f\*[B-Font]ntpq\fP
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
\[oq]\&?\[cq].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
+.TP 15
+.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[]|\f\*[B-Font]less\f[]|\f\*[B-Font]off\f[]]
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
+Otherwise, the debugging level is changed as indicated.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]delay\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.br
+.ns
+.TP 15
+.NOP \f\*[B-Font]drefid\f[] [\f\*[B-Font]hash\f[]|\f\*[B-Font]ipv4\f[]]
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]exit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+.TP 15
+.NOP \f\*[B-Font]host\f[] [\f\*[I-Font]name\f[]]
Set the host to which future queries will be sent.
-\f\*[I-Font]hostname\f[]
+The
+\f\*[I-Font]name\f[]
may be either a host name or a numeric address.
+Without any arguments, displays the current host.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+.TP 15
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
If
\f\*[B-Font]yes\f[]
is specified, host names are printed in
modified using the command line
\f\*[B-Font]\-n\f[]
switch.
+Without any arguments, displays whether host names or numeric addresses
+are shown.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+.TP 15
+.NOP \f\*[B-Font]keyid\f[] [\f\*[I-Font]keyid\f[]]
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
\f\*[B-Font]controlkey\f[]
key number the server has been configured to use for this
purpose.
+Without any arguments, displays the current
+\f\*[I-Font]keyid\f[].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
-Specify the type of key to use for authenticating requests.
-\f\*[B-Font]md5\f[]
-is alway supported.
+.TP 15
+.NOP \f\*[B-Font]keytype\f[] [\f\*[I-Font]digest\f[]]
+Specify the digest algorithm to use for authenticating requests, with default
+\f\*[B-Font]MD5\f[].
If
\f\*[B-Font]ntpq\fP
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+\f\*[I-Font]digest\f[]
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-\f\*[B-Font]keytype\f[]
-is displayed.
+\f\*[B-Font]keytype\f[] \f\*[I-Font]digest\f[]
+algorithm used is displayed.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[] | \f\*[B-Font]2\f[] | \f\*[B-Font]3\f[] | \f\*[B-Font]4\f[]]
+.TP 15
+.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[]|\f\*[B-Font]2\f[]|\f\*[B-Font]3\f[]|\f\*[B-Font]4\f[]]
Sets the NTP version number which
\f\*[B-Font]ntpq\fP
claims in
when communicating with servers.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]passwd\f[]
This command prompts you to type in a password (which will not
be echoed) which will be used to authenticate configuration
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
.br
.ns
-.TP 20
+.TP 15
+.NOP \f\*[B-Font]poll\f[] [\f\*[I-Font]n\f[]] [\f\*[B-Font]verbose\f[]]
+Poll an NTP server in client mode
+\f\*[I-Font]n\f[]
+times.
+Poll not implemented yet.
+.br
+.ns
+.TP 15
.NOP \f\*[B-Font]quit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]raw\f[]
Causes all output from query commands is printed as received
from the remote server.
understandable) form.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]timeout\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
\f\*[B-Font]ntpq\fP
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]version\f[]
-Print the version of the
+Display the version of the
\f\*[B-Font]ntpq\fP
program.
.PP
.SS "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-\f[C]peers\f[]
+\f\*[B-Font]peers\f[]
command, which sends a series of messages,
and the
-\f[C]mreadlist\f[]
+\f\*[B-Font]mreadlist\f[]
and
-\f[C]mreadvar\f[]
+\f\*[B-Font]mreadvar\f[]
commands, which iterate over a range of associations.
.TP 10
+.NOP \f\*[B-Font]apeers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+\f\*[B-Font]peers\f[]
+command except that the
+\f\*[B-Font]refid\f[]
+is displayed in hex format and the association number is also displayed.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]associations\f[]
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
.RS
.IP \fB\(bu\fP 2
-.IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
-.IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
-.IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
-.IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
-.IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
-.IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
-.IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]ind\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]index\f[] \f\*[B-Font]on\f[] \f\*[B-Font]this\f[] \f\*[B-Font]list\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]assid\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]association\f[] \f\*[B-Font]id\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]status\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]conf\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]persistent,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]ephemeral\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]reach\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]reachable,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]unreachable\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]auth\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]ok\f[], \f\*[B-Font]yes\f[], \f\*[B-Font]bad\f[] \f\*[B-Font]No\f[] \f\*[B-Font]and\f[] \f\*[B-Font]none\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]condition\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]selection\f[] \f\*[B-Font]status\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]select\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]last_event\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]report\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]event\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]cnt\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]count\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]count\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
.RE
.br
.ns
.TP 10
.NOP \f\*[B-Font]authinfo\f[]
-Display the authentication statistics.
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clocklist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+.NOP \f\*[B-Font]cl\f[] [\f\*[I-Font]associd\f[]]
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
-Display a list of clock variables for those associations supporting a reference clock.
+.NOP \f\*[B-Font]clockvar\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]:config\f[] [...]
-Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.NOP \f\*[B-Font]cv\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
+Display a list of clock variables for those associations supporting a
+reference clock.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]:config\f[] \f\*[I-Font]configuration command line\f[]
+Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
-Send the each line of
+Send each line of
\f\*[I-Font]filename\f[]
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]ifstats\f[]
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]iostats\f[]
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.br
.ns
.TP 10
.NOP \f\*[B-Font]kerninfo\f[]
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.br
.ns
.TP 10
.NOP \f\*[B-Font]lassociations\f[]
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Obtain and print a list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients showing
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version).
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Print a peer spreadsheet for the appropriate IP version(s).
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lpassociations\f[]
+Display the last obtained list of associations, including all clients.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients (associated with the given IP version).
.br
.ns
.TP 10
.NOP \f\*[B-Font]monstats\f[]
-Display monitor facility statistics.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadlist\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrl\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+Perform the same function as the
+\f\*[B-Font]readlist\f[]
+command for a range of association ids.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadvar\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+This range may be determined from the list displayed by any
+command showing associations.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]]
-Obtain and print traffic counts collected and maintained by the monitor facility.
+.NOP \f\*[B-Font]mrv\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+Perform the same function as the
+\f\*[B-Font]readvar\f[]
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]\&=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]\&=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]\&=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]\&=\f\*[I-Font]hexmask\f[]]
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-\f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
+\f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[],
the options filter the list returned by
-\f\*[B-Font]ntpd.\f[]
+\fCntpd\f[]\fR(8)\f[].
The
\f\*[B-Font]limited\f[]
and
\f\*[B-Font]kod\f[]
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
option filters entries representing less than
\f\*[I-Font]sortorder\f[]
defaults to
\f\*[B-Font]lstint\f[]
-and may be any of
+and may be
\f\*[B-Font]addr\f[],
-\f\*[B-Font]count\f[],
\f\*[B-Font]avgint\f[],
+\f\*[B-Font]count\f[],
\f\*[B-Font]lstint\f[],
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+\[oq]\&-\[cq]
+to reverse the sort order.
The output columns are:
.RS
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]lstint\f[]
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
\f\*[B-Font]ntpq\fP.
.br
.ns
Restriction flags associated with this address.
Most are copied unchanged from the matching
\f\*[B-Font]restrict\f[]
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-Perform the same function as the
-\f\*[B-Font]readvar\f[]
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-\f\*[B-Font]associations\f[]
-command.
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
Obtain and print the old-style list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version),
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version),
rather than the
-\f\*[I-Font]refid\f[].
+\f\*[B-Font]refid\f[].
.br
.ns
.TP 10
.TP 10
.NOP \f\*[B-Font]remote\f[]
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+\f\*[B-Font]ntpq\fP
\f\*[B-Font]\-w\f[]
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
.br
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-association ID or
+source IP address or
.Lk decode.html#kiss "'kiss code"
.br
.ns
.TP 10
.NOP \f\*[B-Font]st\f[]
-stratum
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
.br
.ns
.TP 10
unicast or manycast client,
\f\*[B-Font]b\f[]:
broadcast or multicast client,
+\f\*[B-Font]p\f[]:
+pool source,
\f\*[B-Font]l\f[]:
local (reference clock),
\f\*[B-Font]s\f[]:
.ns
.TP 10
.NOP \f\*[B-Font]when\f[]
-sec/min/hr since last received packet
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+\[oq]\&-\[cq]
+if a packet has never been received
.br
.ns
.TP 10
.NOP \f\*[B-Font]poll\f[]
-poll interval (log2 s)
+poll interval (s)
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]jitter\f[]
-jitter
+offset RMS error estimate.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]apeers\f[]
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-\f\*[B-Font]peers\f[]
-command except that the
-\f\*[B-Font]refid\f[]
-is displayed in hex format and the association number is also displayed.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
-Show the statistics for the peer with the given
-\f\*[I-Font]assocID\f[].
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]associd\f[]
+Display the statistics for the peer with the given
+\f\*[I-Font]associd\f[]:
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
+.NOP \f\*[B-Font]readlist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
-Read the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]rl\f[] [\f\*[I-Font]associd\f[]]
+Display all system or peer variables.
+If the
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+.NOP \f\*[B-Font]readvar\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
-Display the specified variables.
+.NOP \f\*[B-Font]rv\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
+Display the specified system or peer variables.
If
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
If no
\f\*[I-Font]name\f[]
is included, all operative variables in the name space are displayed.
In this case only, if the
-\f\*[I-Font]assocID\f[]
-is omitted, it is assumed zero.
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+\f\*[I-Font]YYYY\f[]\f\*[I-Font]MM\f[] \f\*[I-Font]DD\f[] \f\*[I-Font]TTTT\f[],
+where
+\f\*[I-Font]YYYY\f[]
+is the year,
+\f\*[I-Font]MM\f[]
+the month of year,
+\f\*[I-Font]DD\f[]
+the day of month and
+\f\*[I-Font]TTTT\f[]
+the time of day.
.br
.ns
.TP 10
.NOP \f\*[B-Font]reslist\f[]
-Show the access control (restrict) list for
+Display the access control (restrict) list for
\f\*[B-Font]ntpq\fP.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
\f\*[B-Font]:config\f[]
or
\f\*[B-Font]config-from-file\f[],
-to the ntpd host's file
+to the NTP server host file
\f\*[I-Font]filename\f[].
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-\f\*[B-Font]ntpd\f[]
+\fCntpd\f[]\fR(8)\f[]
configuration file.
\f\*[I-Font]filename\f[]
can use
-\fCstrftime\f[]\fR()\f[]
-format specifies to substitute the current date and time, for example,
-\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
+\fCdate\f[]\fR(1)\f[]
+format specifiers to substitute the current date and time, for
+example,
+.in +4
+\f\*[B-Font]saveconfig\f[] \fIntp-%Y%m%d-%H%M%S.conf\f[].
+.in -4
The filename used is stored in system variable
\f\*[B-Font]savedconfig\f[].
Authentication is required.
.br
.ns
.TP 10
+.NOP \f\*[B-Font]sysinfo\f[]
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysstats\f[]
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]timerstats\f[]
-Display interval timer counters.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
-Write the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]associd\f[]
+Set all system or peer variables included in the variable list.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
-Write the specified variables.
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]associd\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
+Set the specified variables in the variable list.
If the
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysinfo\f[]
-Display operational summary.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysstats\f[]
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.PP
.SS Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-\f\*[B-Font]rv\f[]
+These words are displayed by the
+\f\*[B-Font]readlist\f[]
and
-\f\*[B-Font]as\f[]
+\f\*[B-Font]associations\f[]
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
in the reference identifier field in various billboards.
.SS System Variables
The following system variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
.br
.ns
.TP 10
-.NOP \f\*[B-Font]peer\f[]
-system peer association ID
+.NOP \f\*[B-Font]refid\f[]
+reference id or
+.Lk decode.html#kiss "kiss code"
.br
.ns
.TP 10
-.NOP \f\*[B-Font]tc\f[]
-time constant and poll exponent (log2 s) (3-17)
+.NOP \f\*[B-Font]reftime\f[]
+reference time
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mintc\f[]
-minimum time constant (log2 s) (3-10)
+.NOP \f\*[B-Font]clock\f[]
+date and time of day
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clock\f[]
-date and time of day
+.NOP \f\*[B-Font]peer\f[]
+system peer association id
.br
.ns
.TP 10
-.NOP \f\*[B-Font]refid\f[]
-reference ID or
-.Lk decode.html#kiss "kiss code"
+.NOP \f\*[B-Font]tc\f[]
+time constant and poll exponent (log2 s) (3-17)
.br
.ns
.TP 10
-.NOP \f\*[B-Font]reftime\f[]
-reference time
+.NOP \f\*[B-Font]mintc\f[]
+minimum time constant (log2 s) (3-10)
.br
.ns
.TP 10
.NOP \f\*[B-Font]offset\f[]
-combined offset of server relative to this host
+combined offset of server relative to this host
.br
.ns
.TP 10
-.NOP \f\*[B-Font]sys_jitter\f[]
-combined system jitter
+.NOP \f\*[B-Font]frequency\f[]
+frequency drift (PPM) relative to hardware clock
.br
.ns
.TP 10
-.NOP \f\*[B-Font]frequency\f[]
-frequency offset (PPM) relative to hardware clock
+.NOP \f\*[B-Font]sys_jitter\f[]
+combined system jitter
.br
.ns
.TP 10
.PP
.SS Peer Variables
The following peer variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard for each association.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-reference ID or
+reference id or
.Lk decode.html#kiss "kiss code"
.br
.ns
.br
.ns
.TP 10
+.NOP \f\*[B-Font]rec\f[]
+last packet received time
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]reach\f[]
reach register (octal)
.br
.br
.ns
.TP 10
+.NOP \f\*[B-Font]keyid\f[]
+symmetric key id
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]offset\f[]
filter offset
.br
.br
.ns
.TP 10
-.NOP \f\*[B-Font]ident\f[]
-Autokey group name for this association
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]bias\f[]
unicast/broadcast bias
.br
\f\*[B-Font]bias\f[]
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
\f\*[B-Font]xleave\f[]
variable appears only for the interleaved symmetric and interleaved modes.
.ns
.TP 10
.NOP \f\*[B-Font]initsequence\f[]
-initial key ID
+initial key id
.br
.ns
.TP 10
.TP 10
.NOP \f\*[B-Font]timestamp\f[]
Autokey signature timestamp
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this association
.PP
.SS Clock Variables
The following clock variables appear in the
-\f\*[B-Font]cv\f[]
+\f\*[B-Font]clocklist\f[]
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-driver reference ID
+driver reference id
.br
.ns
.TP 10
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.TP
.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
numeric host addresses.
.sp
Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.TP
.NOP \f\*[B-Font]\-\-old\-rv\f[]
Always output status line with readvar.
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:58 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:14 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
[ host ...]
.Pp
.Sh DESCRIPTION
+.Pp
The
.Nm
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.Pp
If one or more request options is included on the command line
when
.Nm
.Nm
utility will prompt for
commands if the standard input is a terminal device.
+.Pp
.Nm
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+.Fl 6
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+.Dq NTP Debugging Techniques
+page.
+.Pp
Specifying a
command line option other than
.Fl i
will attempt to read
interactive format commands from the standard input.
.Ss "Internal Commands"
+.Pp
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.Pp
A
number of interactive format commands are executed entirely within
the
.Nm
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.Bl -tag -width "? [command_keyword]" -compact -offset indent
-.It Ic ? Op Ar command_keyword
-.It Ic help Op Ar command_keyword
+.Bl -tag -width "help [command]" -compact -offset indent
+.It Ic ? Op Ar command
+.It Ic help Op Ar command
A
.Ql \&?
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
.Nm .
A
.Ql \&?
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-.Nm
-than this manual
-page.
-.It Ic addvars Ar variable_name Ns Xo Op Ic =value
-.Ic ...
-.Xc
-.It Ic rmvars Ar variable_name Ic ...
+.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
+.It Ic rmvars Ar name Ns Op ,...
.It Ic clearvars
.It Ic showvars
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-.Ql variable_name=value ,
+.Ar name Ns Op \&= Ns Ar value ,
where the
-.Ql =value
+.No \&= Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
.Nm
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
.Ic readlist
and
.Ic writelist
.Ic rmvars
command can be used to remove individual variables from the list,
while the
-.Ic clearlist
+.Ic clearvars
command removes all variables from the
list.
The
.Ic showvars
command displays the current list of optional variables.
-.It Ic authenticate Op yes | no
+.It Ic authenticate Op Cm yes Ns | Ns Cm no
Normally
.Nm
does not authenticate requests unless
they are write requests.
The command
-.Ql authenticate yes
+.Ic authenticate Cm yes
causes
.Nm
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-.Ic peer
-display.
+requests slightly differently.
The command
-.Ql authenticate
+.Ic authenticate
causes
.Nm
to display whether or not
-.Nm
-is currently autheinticating requests.
+it is currently authenticating requests.
.It Ic cooked
Causes output from query commands to be "cooked", so that
variables which are recognized by
values reformatted for human consumption.
Variables which
.Nm
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
.Ql \&? .
-.It Xo
-.Ic debug
-.Oo
-.Cm more |
-.Cm less |
-.Cm off
-.Oc
-.Xc
+.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-.It Ic delay Ar milliseconds
+Otherwise, the debugging level is changed as indicated.
+.It Ic delay Op Ar milliseconds
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.It Ic exit
Exit
.Nm .
-.It Ic host Ar hostname
+.It Ic host Op Ar name
Set the host to which future queries will be sent.
-.Ar hostname
+The
+.Ar name
may be either a host name or a numeric address.
-.It Ic hostnames Op Cm yes | Cm no
+Without any arguments, displays the current host.
+.It Ic hostnames Op Cm yes Ns | Ns Cm no
If
.Cm yes
is specified, host names are printed in
modified using the command line
.Fl n
switch.
-.It Ic keyid Ar keyid
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+.It Ic keyid Op Ar keyid
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
.Cm controlkey
key number the server has been configured to use for this
purpose.
-.It Ic keytype Xo Oo
-.Cm md5 |
-.Cm OpenSSLDigestType
-.Oc
-.Xc
-Specify the type of key to use for authenticating requests.
-.Cm md5
-is alway supported.
+Without any arguments, displays the current
+.Ar keyid .
+.It Ic keytype Op Ar digest
+Specify the digest algorithm to use for authenticating requests, with default
+.Cm MD5 .
If
.Nm
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+.Ar digest
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-.Ic keytype
-is displayed.
-.It Ic ntpversion Xo Oo
-.Cm 1 |
-.Cm 2 |
-.Cm 3 |
-.Cm 4
-.Oc
-.Xc
+.Ic keytype Ar digest
+algorithm used is displayed.
+.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
Sets the NTP version number which
.Nm
claims in
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
+.It Ic poll Oo Ar n Oc Op Cm verbose
+Poll an NTP server in client mode
+.Ar n
+times.
+Poll not implemented yet.
.It Ic quit
Exit
.Nm .
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-.It Ic timeout Ar milliseconds
+.It Ic timeout Op Ar milliseconds
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
.Nm
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.It Ic version
-Print the version of the
+Display the version of the
.Nm
program.
.El
.Ss "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode\-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-.Li peers
+.Ic peers
command, which sends a series of messages,
and the
-.Li mreadlist
+.Ic mreadlist
and
-.Li mreadvar
+.Ic mreadvar
commands, which iterate over a range of associations.
.Bl -tag -width "something" -compact -offset indent
-.It Cm associations
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Cm refid
+is displayed in hex format and the association number is also displayed.
+.It Ic associations
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
-.Bl -column -offset indent ".Sy Variable" ".Sy Description"
-.It Sy String Ta Sy Description
-.It Li ind Ta index on this list
-.It Li assid Ta association ID
-.It Li status Ta peer status word
-.It Li conf Ta Li yes : persistent, Li no : ephemeral
-.It Li reach Ta Li yes : reachable, Li no : unreachable
-.It Li auth Ta Li ok , Li yes , Li bad and Li none
-.It Li condition Ta selection status (see the Li select field of the peer status word)
-.It Li last_event Ta event report (see the Li event field of the peer status word)
-.It Li cnt Ta event count (see the Li count field of the peer status word)
+.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
+.It Sy Variable Ta Sy Description
+.It Cm ind Ta index on this list
+.It Cm assid Ta association id
+.It Cm status Ta peer status word
+.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
+.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
+.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
+.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
+.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
+.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
.El
-.It Cm authinfo
-Display the authentication statistics.
-.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-Display a list of clock variables for those associations supporting a reference clock.
-.It Cm :config Op ...
-Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
-.It Cm config\-from\-file Ar filename
-Send the each line of
+.It Ic authinfo
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.It Ic clocklist Op Ar associd
+.It Ic cl Op Ar associd
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+Display a list of clock variables for those associations supporting a
+reference clock.
+.It Ic :config Ar "configuration command line"
+Send the remainder of the command line, including whitespace, to the
+server as a run\-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+.It Ic config\-from\-file Ar filename
+Send each line of
.Ar filename
-to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run\-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.It Ic ifstats
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.It Ic iostats
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.It Ic kerninfo
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.It Ic lassociations
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-.It Ic lopeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Obtain and print a list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version).
-.It Ic lpeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Print a peer spreadsheet for the appropriate IP version(s).
-.Ar dstadr
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients showing
+.Cm dstadr
+(associated with the given IP version).
+.It Ic lpassociations
+Display the last obtained list of associations, including all clients.
+.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients (associated with the given IP version).
.It Ic monstats
-Display monitor facility statistics.
-.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.It Ic mreadlist Ar associdlo Ar associdhi
+.It Ic mrl Ar associdlo Ar associdhi
+Perform the same function as the
+.Ic readlist
+command for a range of association ids.
+.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+This range may be determined from the list displayed by any
+command showing associations.
+.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+Perform the same function as the
+.Ic readvar
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
+.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder |
+.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
+.Xc
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-.Cm sort Ns = Ns Ar sortorder ,
+.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder ,
the options filter the list returned by
-.Cm ntpd.
+.Xr ntpd 8 .
The
.Cm limited
and
.Cm kod
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
.Cm mincount Ns = Ns Ar count
option filters entries representing less than
.Ar sortorder
defaults to
.Cm lstint
-and may be any of
+and may be
.Cm addr ,
-.Cm count ,
.Cm avgint ,
+.Cm count ,
.Cm lstint ,
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+.Ql \&\-
+to reverse the sort order.
The output columns are:
.Bl -tag -width "something" -compact -offset indent
.It Column
Description
.It Ic lstint
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
.Nm .
.It Ic avgint
Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
.Ic restrict
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.It Ic r
Rate control indicator, either
a period,
.It Ic rport
Source port of last packet from this address.
.It Ic remote address
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.El
-.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-Perform the same function as the
-.Ic readvar
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-.Ic associations
-command.
-.It Ic opeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
+.It Ic opeers Op Fl 4 | Fl 6
Obtain and print the old\-style list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version),
+.Cm dstadr
+(associated with the given IP version),
rather than the
-.Ar refid .
+.Cm refid .
.It Ic passociations
Perform the same function as the
.Ic associations
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic [tally]
+.It Cm [tally]
single\-character code indicating current value of the
.Ic select
field of the
.Lk decode.html#peer "peer status word"
-.It Ic remote
+.It Cm remote
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+.Nm
.Fl w
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
-.It Ic refid
-association ID or
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
+.It Cm refid
+source IP address or
.Lk decode.html#kiss "'kiss code"
-.It Ic st
-stratum
-.It Ic t
+.It Cm st
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
+.It Cm t
.Ic u :
unicast or manycast client,
.Ic b :
broadcast or multicast client,
+.Ic p :
+pool source,
.Ic l :
local (reference clock),
.Ic s :
broadcast server,
.Ic M :
multicast server
-.It Ic when
-sec/min/hr since last received packet
-.It Ic poll
-poll interval (log2 s)
-.It Ic reach
+.It Cm when
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+.Ql \&\-
+if a packet has never been received
+.It Cm poll
+poll interval (s)
+.It Cm reach
reach shift register (octal)
-.It Ic delay
+.It Cm delay
roundtrip delay
-.It Ic offset
+.It Cm offset
offset of server relative to this host
-.It Ic jitter
-jitter
+.It Cm jitter
+offset RMS error estimate.
.El
-.It Ic apeers
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-.Ic peers
-command except that the
-.Ic refid
-is displayed in hex format and the association number is also displayed.
-.It Ic pstats Ar assocID
-Show the statistics for the peer with the given
-.Ar assocID .
-.It Ic readlist Ar assocID
-.It Ic rl Ar assocID
-Read the system or peer variables included in the variable list.
-.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-Display the specified variables.
+.It Ic pstats Ar associd
+Display the statistics for the peer with the given
+.Ar associd :
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+.It Ic readlist Op Ar associd
+.It Ic rl Op Ar associd
+Display all system or peer variables.
+If the
+.Ar associd
+is omitted, it is assumed to be zero.
+.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+Display the specified system or peer variables.
If
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
If no
.Ar name
is included, all operative variables in the name space are displayed.
In this case only, if the
-.Ar assocID
-is omitted, it is assumed zero.
+.Ar associd
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts\-per\-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
+where
+.Ar YYYY
+is the year,
+.Ar MM
+the month of year,
+.Ar DD
+the day of month and
+.Ar TTTT
+the time of day.
.It Ic reslist
-Show the access control (restrict) list for
+Display the access control (restrict) list for
.Nm .
+Authentication is required.
.It Ic saveconfig Ar filename
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
.Ic :config
or
.Ic config\-from\-file ,
-to the ntpd host's file
+to the NTP server host file
.Ar filename .
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-.Ic ntpd
+.Xr ntpd 8
configuration file.
.Ar filename
can use
-.Xr strftime
-format specifies to substitute the current date and time, for example,
-.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
+.Xr date 1
+format specifiers to substitute the current date and time, for
+example,
+.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf .
The filename used is stored in system variable
-.Ic savedconfig .
+.Cm savedconfig .
Authentication is required.
+.It Ic sysinfo
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.It Ic sysstats
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
.It Ic timerstats
-Display interval timer counters.
-.It Ic writelist Ar assocID
-Write the system or peer variables included in the variable list.
-.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+.It Ic writelist Ar associd
+Set all system or peer variables included in the variable list.
+.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
+Set the specified variables in the variable list.
If the
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
-.It Ic sysinfo
-Display operational summary.
-.It Ic sysstats
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.El
.Ss Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per\-association basis.
-These words are displayed in the
-.Ic rv
+These words are displayed by the
+.Ic readlist
and
-.Ic as
+.Ic associations
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
in the reference identifier field in various billboards.
.Ss System Variables
The following system variables appear in the
-.Ic rv
+.Ic readlist
billboard.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic status
+.It Cm status
.Lk decode.html#sys "system status word"
-.It Ic version
+.It Cm version
NTP software version and build time
-.It Ic processor
+.It Cm processor
hardware platform and version
-.It Ic system
+.It Cm system
operating system and version
-.It Ic leap
+.It Cm leap
leap warning indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (1\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total dispersion to the primary reference clock
-.It Ic peer
-system peer association ID
-.It Ic tc
-time constant and poll exponent (log2 s) (3\-17)
-.It Ic mintc
-minimum time constant (log2 s) (3\-10)
-.It Ic clock
-date and time of day
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic offset
-combined offset of server relative to this host
-.It Ic sys_jitter
+.It Ic clock
+date and time of day
+.It Cm peer
+system peer association id
+.It Cm tc
+time constant and poll exponent (log2 s) (3\-17)
+.It Cm mintc
+minimum time constant (log2 s) (3\-10)
+.It Cm offset
+combined offset of server relative to this host
+.It Cm frequency
+frequency drift (PPM) relative to hardware clock
+.It Cm sys_jitter
combined system jitter
-.It Ic frequency
-frequency offset (PPM) relative to hardware clock
-.It Ic clk_wander
+.It Cm clk_wander
clock frequency wander (PPM)
-.It Ic clk_jitter
+.It Cm clk_jitter
clock jitter
-.It Ic tai
+.It Cm tai
TAI\-UTC offset (s)
-.It Ic leapsec
+.It Cm leapsec
NTP seconds when the next leap second is/was inserted
-.It Ic expire
+.It Cm expire
NTP seconds when the NIST leapseconds file expires
.El
The jitter and wander statistics are exponentially\-weighted RMS averages.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic host
+.It Cm host
Autokey host name for this host
-.It Ic ident
+.It Cm ident
Autokey group name for this host
-.It Ic flags
+.It Cm flags
host flags (see Autokey specification)
-.It Ic digest
+.It Cm digest
OpenSSL message digest algorithm
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic update
+.It Cm update
NTP seconds at last signature update
-.It Ic cert
+.It Cm cert
certificate subject, issuer and certificate flags
-.It Ic until
+.It Cm until
NTP seconds when the certificate expires
.El
.Ss Peer Variables
The following peer variables appear in the
-.Ic rv
+.Ic readlist
billboard for each association.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#peer "peer status word"
-.It Ic srcadr
+.It Cm srcadr
source (remote) IP address
-.It Ic srcport
+.It Cm srcport
source (remote) port
-.It Ic dstadr
+.It Cm dstadr
destination (local) IP address
-.It Ic dstport
+.It Cm dstport
destination (local) port
-.It Ic leap
+.It Cm leap
leap indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (0\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total root dispersion to the primary reference clock
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic reach
+.It Cm rec
+last packet received time
+.It Cm reach
reach register (octal)
-.It Ic unreach
+.It Cm unreach
unreach counter
-.It Ic hmode
+.It Cm hmode
host mode (1\-6)
-.It Ic pmode
+.It Cm pmode
peer mode (1\-5)
-.It Ic hpoll
+.It Cm hpoll
host poll exponent (log2 s) (3\-17)
-.It Ic ppoll
+.It Cm ppoll
peer poll exponent (log2 s) (3\-17)
-.It Ic headway
+.It Cm headway
headway (see
.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
-.It Ic flash
+.It Cm flash
.Lk decode.html#flash "flash status word"
-.It Ic offset
+.It Cm keyid
+symmetric key id
+.It Cm offset
filter offset
-.It Ic delay
+.It Cm delay
filter delay
-.It Ic dispersion
+.It Cm dispersion
filter dispersion
-.It Ic jitter
+.It Cm jitter
filter jitter
-.It Ic ident
-Autokey group name for this association
-.It Ic bias
+.It Cm bias
unicast/broadcast bias
-.It Ic xleave
+.It Cm xleave
interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
.El
The
-.Ic bias
+.Cm bias
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
-.Ic xleave
+.Cm xleave
variable appears only for the interleaved symmetric and interleaved modes.
It represents the internal queuing, buffering and transmission delays
for the preceding packet.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic host
+.It Cm host
Autokey server name
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic initsequence
-initial key ID
-.It Ic initkey
+.It Cm initsequence
+initial key id
+.It Cm initkey
initial key index
-.It Ic timestamp
+.It Cm timestamp
Autokey signature timestamp
+.It Cm ident
+Autokey group name for this association
.El
.Ss Clock Variables
The following clock variables appear in the
-.Ic cv
+.Ic clocklist
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#clock "clock status word"
-.It Ic device
+.It Cm device
device description
-.It Ic timecode
+.It Cm timecode
ASCII time code string (specific to device)
-.It Ic poll
+.It Cm poll
poll messages sent
-.It Ic noreply
+.It Cm noreply
no reply
-.It Ic badformat
+.It Cm badformat
bad format
-.It Ic baddata
+.It Cm baddata
bad date or time
-.It Ic fudgetime1
+.It Cm fudgetime1
fudge time 1
-.It Ic fudgetime2
+.It Cm fudgetime2
fudge time 2
-.It Ic stratum
+.It Cm stratum
driver stratum
-.It Ic refid
-driver reference ID
-.It Ic flags
+.It Cm refid
+driver reference id
+.It Cm flags
driver flags
.El
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.It Fl 6 , Fl \-ipv6
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
run a command and exit.
numeric host addresses.
.sp
Output all host addresses in dotted\-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.It Fl \-old\-rv
Always output status line with readvar.
.sp
and determine the performance of
<code>ntpd</code>, the NTP daemon.
</p>
-<p>This document applies to version 4.3.96 of <code>ntpq</code>.
+<p>This document applies to version 4.3.97 of <code>ntpq</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="#ntpq-Description" accesskey="1">ntpq Description</a>:</td><td> </td><td align="left" valign="top">
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpq - standard NTP query program - Ver. 4.3.97
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p11
Usage: ntpq [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]
Flg Arg Option-Name Description
- -4 no ipv4 Force IPv4 DNS name resolution
+ -4 no ipv4 Force IPv4 name resolution
- prohibits the option 'ipv6'
- -6 no ipv6 Force IPv6 DNS name resolution
+ -6 no ipv6 Force IPv6 name resolution
- prohibits the option 'ipv4'
-c Str command run a command and exit
- may appear multiple times
with default <code>MD5</code>.
If the OpenSSL library is installed,
digest can be be any message digest algorithm supported by the library.
-The current selections are: <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
+The current selections are: <code>AES128CMAC</code>, <code>MD2</code>, <code>MD4</code>, <code>MD5</code>, <code>MDC2</code>, <code>RIPEMD160</code>, <code>SHA</code> and <code>SHA1</code>.
</p>
</dd>
<dt><code><a name="ntpversion"></a><code>ntpversion 1 | 2 | 3 | 4</code></code></dt>
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpq @NTPQ_MS@ "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:58 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:17 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.ne 2
.SH DESCRIPTION
+.sp \n(Ppu
+.ne 2
+
The
\f\*[B-Font]ntpq\fP
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.sp \n(Ppu
+.ne 2
+
If one or more request options is included on the command line
when
\f\*[B-Font]ntpq\fP
\f\*[B-Font]ntpq\fP
utility will prompt for
commands if the standard input is a terminal device.
+.sp \n(Ppu
+.ne 2
+
\f\*[B-Font]ntpq\fP
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.sp \n(Ppu
+.ne 2
+
+Note that in contexts where a host name is expected, a
+\f\*[B-Font]\-4\f[]
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+\f\*[B-Font]\-6\f[]
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+\*[Lq]NTP Debugging Techniques\*[Rq]
+page.
+.sp \n(Ppu
+.ne 2
+
Specifying a
command line option other than
\f\*[B-Font]\-i\f[]
will attempt to read
interactive format commands from the standard input.
.SS "Internal Commands"
+.sp \n(Ppu
+.ne 2
+
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.sp \n(Ppu
+.ne 2
+
A
number of interactive format commands are executed entirely within
the
\f\*[B-Font]ntpq\fP
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.TP 20
-.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command\f[]]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
+.TP 15
+.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command\f[]]
A
\[oq]\&?\[cq]
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
\f\*[B-Font]ntpq\fP.
A
\[oq]\&?\[cq]
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-\f\*[B-Font]ntpq\fP
-than this manual
-page.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][,...]
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
+.TP 15
+.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]name\f[][,...]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]clearvars\f[]
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]showvars\f[]
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-\[oq]variable_name=value\[cq],
+\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]],
where the
-\[oq]=value\[cq]
+.NOP \&=\f\*[I-Font]value\f[]
is ignored, and can be omitted,
in requests to the server to read variables.
The
\f\*[B-Font]ntpq\fP
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
\f\*[B-Font]readlist\f[]
and
\f\*[B-Font]writelist\f[]
\f\*[B-Font]rmvars\f[]
command can be used to remove individual variables from the list,
while the
-\f\*[B-Font]clearlist\f[]
+\f\*[B-Font]clearvars\f[]
command removes all variables from the
list.
The
command displays the current list of optional variables.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]authenticate\f[] [yes | no]
+.TP 15
+.NOP \f\*[B-Font]authenticate\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
Normally
\f\*[B-Font]ntpq\fP
does not authenticate requests unless
they are write requests.
The command
-\[oq]authenticate yes\[cq]
+\f\*[B-Font]authenticate\f[] \f\*[B-Font]yes\f[]
causes
\f\*[B-Font]ntpq\fP
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-\f\*[B-Font]peer\f[]
-display.
+requests slightly differently.
The command
-\[oq]authenticate\[cq]
+\f\*[B-Font]authenticate\f[]
causes
\f\*[B-Font]ntpq\fP
to display whether or not
-\f\*[B-Font]ntpq\fP
-is currently autheinticating requests.
+it is currently authenticating requests.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]cooked\f[]
Causes output from query commands to be "cooked", so that
variables which are recognized by
values reformatted for human consumption.
Variables which
\f\*[B-Font]ntpq\fP
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
\[oq]\&?\[cq].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
+.TP 15
+.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[]|\f\*[B-Font]less\f[]|\f\*[B-Font]off\f[]]
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
+Otherwise, the debugging level is changed as indicated.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]delay\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.br
+.ns
+.TP 15
+.NOP \f\*[B-Font]drefid\f[] [\f\*[B-Font]hash\f[]|\f\*[B-Font]ipv4\f[]]
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]exit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
+.TP 15
+.NOP \f\*[B-Font]host\f[] [\f\*[I-Font]name\f[]]
Set the host to which future queries will be sent.
-\f\*[I-Font]hostname\f[]
+The
+\f\*[I-Font]name\f[]
may be either a host name or a numeric address.
+Without any arguments, displays the current host.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
+.TP 15
+.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]]
If
\f\*[B-Font]yes\f[]
is specified, host names are printed in
modified using the command line
\f\*[B-Font]\-n\f[]
switch.
+Without any arguments, displays whether host names or numeric addresses
+are shown.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
+.TP 15
+.NOP \f\*[B-Font]keyid\f[] [\f\*[I-Font]keyid\f[]]
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
\f\*[B-Font]controlkey\f[]
key number the server has been configured to use for this
purpose.
+Without any arguments, displays the current
+\f\*[I-Font]keyid\f[].
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
-Specify the type of key to use for authenticating requests.
-\f\*[B-Font]md5\f[]
-is alway supported.
+.TP 15
+.NOP \f\*[B-Font]keytype\f[] [\f\*[I-Font]digest\f[]]
+Specify the digest algorithm to use for authenticating requests, with default
+\f\*[B-Font]MD5\f[].
If
\f\*[B-Font]ntpq\fP
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+\f\*[I-Font]digest\f[]
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-\f\*[B-Font]keytype\f[]
-is displayed.
+\f\*[B-Font]keytype\f[] \f\*[I-Font]digest\f[]
+algorithm used is displayed.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[] | \f\*[B-Font]2\f[] | \f\*[B-Font]3\f[] | \f\*[B-Font]4\f[]]
+.TP 15
+.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[]|\f\*[B-Font]2\f[]|\f\*[B-Font]3\f[]|\f\*[B-Font]4\f[]]
Sets the NTP version number which
\f\*[B-Font]ntpq\fP
claims in
when communicating with servers.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]passwd\f[]
This command prompts you to type in a password (which will not
be echoed) which will be used to authenticate configuration
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
.br
.ns
-.TP 20
+.TP 15
+.NOP \f\*[B-Font]poll\f[] [\f\*[I-Font]n\f[]] [\f\*[B-Font]verbose\f[]]
+Poll an NTP server in client mode
+\f\*[I-Font]n\f[]
+times.
+Poll not implemented yet.
+.br
+.ns
+.TP 15
.NOP \f\*[B-Font]quit\f[]
Exit
\f\*[B-Font]ntpq\fP.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]raw\f[]
Causes all output from query commands is printed as received
from the remote server.
understandable) form.
.br
.ns
-.TP 20
-.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
+.TP 15
+.NOP \f\*[B-Font]timeout\f[] [\f\*[I-Font]milliseconds\f[]]
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
\f\*[B-Font]ntpq\fP
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.br
.ns
-.TP 20
+.TP 15
.NOP \f\*[B-Font]version\f[]
-Print the version of the
+Display the version of the
\f\*[B-Font]ntpq\fP
program.
.PP
.SS "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-\f[C]peers\f[]
+\f\*[B-Font]peers\f[]
command, which sends a series of messages,
and the
-\f[C]mreadlist\f[]
+\f\*[B-Font]mreadlist\f[]
and
-\f[C]mreadvar\f[]
+\f\*[B-Font]mreadvar\f[]
commands, which iterate over a range of associations.
.TP 10
+.NOP \f\*[B-Font]apeers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+\f\*[B-Font]peers\f[]
+command except that the
+\f\*[B-Font]refid\f[]
+is displayed in hex format and the association number is also displayed.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]associations\f[]
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
.RS
.IP \fB\(bu\fP 2
-.IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
-.IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
-.IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
-.IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
-.IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
-.IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
-.IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
-.IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]ind\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]index\f[] \f\*[B-Font]on\f[] \f\*[B-Font]this\f[] \f\*[B-Font]list\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]assid\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]association\f[] \f\*[B-Font]id\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]status\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]conf\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]persistent,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]ephemeral\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]reach\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]reachable,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]unreachable\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]auth\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]ok\f[], \f\*[B-Font]yes\f[], \f\*[B-Font]bad\f[] \f\*[B-Font]No\f[] \f\*[B-Font]and\f[] \f\*[B-Font]none\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]condition\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]selection\f[] \f\*[B-Font]status\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]select\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]last_event\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]report\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]event\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
+.IP \fB\(bu\fP 2 \f\*[B-Font]cnt\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]count\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]count\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[]
.RE
.br
.ns
.TP 10
.NOP \f\*[B-Font]authinfo\f[]
-Display the authentication statistics.
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]clocklist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
+.NOP \f\*[B-Font]cl\f[] [\f\*[I-Font]associd\f[]]
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
-Display a list of clock variables for those associations supporting a reference clock.
+.NOP \f\*[B-Font]clockvar\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]:config\f[] [...]
-Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
+.NOP \f\*[B-Font]cv\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...]
+Display a list of clock variables for those associations supporting a
+reference clock.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]:config\f[] \f\*[I-Font]configuration command line\f[]
+Send the remainder of the command line, including whitespace, to the
+server as a run-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
-Send the each line of
+Send each line of
\f\*[I-Font]filename\f[]
-to the server as run-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]ifstats\f[]
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]iostats\f[]
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.br
.ns
.TP 10
.NOP \f\*[B-Font]kerninfo\f[]
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.br
.ns
.TP 10
.NOP \f\*[B-Font]lassociations\f[]
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Obtain and print a list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients showing
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version).
.br
.ns
.TP 10
-.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
-Print a peer spreadsheet for the appropriate IP version(s).
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version).
+.NOP \f\*[B-Font]lpassociations\f[]
+Display the last obtained list of associations, including all clients.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]]
+Display a list of all peers and clients (associated with the given IP version).
.br
.ns
.TP 10
.NOP \f\*[B-Font]monstats\f[]
-Display monitor facility statistics.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadlist\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrl\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[]
+Perform the same function as the
+\f\*[B-Font]readlist\f[]
+command for a range of association ids.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mreadvar\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+This range may be determined from the list displayed by any
+command showing associations.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]]
-Obtain and print traffic counts collected and maintained by the monitor facility.
+.NOP \f\*[B-Font]mrv\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...]
+Perform the same function as the
+\f\*[B-Font]readvar\f[]
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]\&=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]\&=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]\&=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]\&=\f\*[I-Font]hexmask\f[]]
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-\f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
+\f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[],
the options filter the list returned by
-\f\*[B-Font]ntpd.\f[]
+\fCntpd\f[]\fR(8)\f[].
The
\f\*[B-Font]limited\f[]
and
\f\*[B-Font]kod\f[]
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
option filters entries representing less than
\f\*[I-Font]sortorder\f[]
defaults to
\f\*[B-Font]lstint\f[]
-and may be any of
+and may be
\f\*[B-Font]addr\f[],
-\f\*[B-Font]count\f[],
\f\*[B-Font]avgint\f[],
+\f\*[B-Font]count\f[],
\f\*[B-Font]lstint\f[],
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+\[oq]\&-\[cq]
+to reverse the sort order.
The output columns are:
.RS
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]lstint\f[]
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
\f\*[B-Font]ntpq\fP.
.br
.ns
Restriction flags associated with this address.
Most are copied unchanged from the matching
\f\*[B-Font]restrict\f[]
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
-Perform the same function as the
-\f\*[B-Font]readvar\f[]
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-\f\*[B-Font]associations\f[]
-command.
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
Obtain and print the old-style list of all peers and clients showing
-\f\*[I-Font]dstadr\f[]
-(associated with any given IP version),
+\f\*[B-Font]dstadr\f[]
+(associated with the given IP version),
rather than the
-\f\*[I-Font]refid\f[].
+\f\*[B-Font]refid\f[].
.br
.ns
.TP 10
.TP 10
.NOP \f\*[B-Font]remote\f[]
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+\f\*[B-Font]ntpq\fP
\f\*[B-Font]\-w\f[]
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
.br
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-association ID or
+source IP address or
.Lk decode.html#kiss "'kiss code"
.br
.ns
.TP 10
.NOP \f\*[B-Font]st\f[]
-stratum
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
.br
.ns
.TP 10
unicast or manycast client,
\f\*[B-Font]b\f[]:
broadcast or multicast client,
+\f\*[B-Font]p\f[]:
+pool source,
\f\*[B-Font]l\f[]:
local (reference clock),
\f\*[B-Font]s\f[]:
.ns
.TP 10
.NOP \f\*[B-Font]when\f[]
-sec/min/hr since last received packet
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+\[oq]\&-\[cq]
+if a packet has never been received
.br
.ns
.TP 10
.NOP \f\*[B-Font]poll\f[]
-poll interval (log2 s)
+poll interval (s)
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]jitter\f[]
-jitter
+offset RMS error estimate.
.RE
.br
.ns
.TP 10
-.NOP \f\*[B-Font]apeers\f[]
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-\f\*[B-Font]peers\f[]
-command except that the
-\f\*[B-Font]refid\f[]
-is displayed in hex format and the association number is also displayed.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
-Show the statistics for the peer with the given
-\f\*[I-Font]assocID\f[].
+.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]associd\f[]
+Display the statistics for the peer with the given
+\f\*[I-Font]associd\f[]:
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
+.NOP \f\*[B-Font]readlist\f[] [\f\*[I-Font]associd\f[]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
-Read the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]rl\f[] [\f\*[I-Font]associd\f[]]
+Display all system or peer variables.
+If the
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
+.NOP \f\*[B-Font]readvar\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
.br
.ns
.TP 10
-.NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
-Display the specified variables.
+.NOP \f\*[B-Font]rv\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]]
+Display the specified system or peer variables.
If
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
If no
\f\*[I-Font]name\f[]
is included, all operative variables in the name space are displayed.
In this case only, if the
-\f\*[I-Font]assocID\f[]
-is omitted, it is assumed zero.
+\f\*[I-Font]associd\f[]
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+\f\*[I-Font]YYYY\f[]\f\*[I-Font]MM\f[] \f\*[I-Font]DD\f[] \f\*[I-Font]TTTT\f[],
+where
+\f\*[I-Font]YYYY\f[]
+is the year,
+\f\*[I-Font]MM\f[]
+the month of year,
+\f\*[I-Font]DD\f[]
+the day of month and
+\f\*[I-Font]TTTT\f[]
+the time of day.
.br
.ns
.TP 10
.NOP \f\*[B-Font]reslist\f[]
-Show the access control (restrict) list for
+Display the access control (restrict) list for
\f\*[B-Font]ntpq\fP.
+Authentication is required.
.br
.ns
.TP 10
.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
\f\*[B-Font]:config\f[]
or
\f\*[B-Font]config-from-file\f[],
-to the ntpd host's file
+to the NTP server host file
\f\*[I-Font]filename\f[].
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-\f\*[B-Font]ntpd\f[]
+\fCntpd\f[]\fR(8)\f[]
configuration file.
\f\*[I-Font]filename\f[]
can use
-\fCstrftime\f[]\fR()\f[]
-format specifies to substitute the current date and time, for example,
-\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
+\fCdate\f[]\fR(1)\f[]
+format specifiers to substitute the current date and time, for
+example,
+.in +4
+\f\*[B-Font]saveconfig\f[] \fIntp-%Y%m%d-%H%M%S.conf\f[].
+.in -4
The filename used is stored in system variable
\f\*[B-Font]savedconfig\f[].
Authentication is required.
.br
.ns
.TP 10
+.NOP \f\*[B-Font]sysinfo\f[]
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]sysstats\f[]
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]timerstats\f[]
-Display interval timer counters.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
-Write the system or peer variables included in the variable list.
+.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]associd\f[]
+Set all system or peer variables included in the variable list.
.br
.ns
.TP 10
-.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
-Write the specified variables.
+.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]associd\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
+Set the specified variables in the variable list.
If the
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is zero, the variables are from the
\fISystem\f[] \fIVariables\f[]
name space, otherwise they are from the
\fIPeer\f[] \fIVariables\f[]
name space.
The
-\f\*[I-Font]assocID\f[]
+\f\*[I-Font]associd\f[]
is required, as the same name can occur in both spaces.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysinfo\f[]
-Display operational summary.
-.br
-.ns
-.TP 10
-.NOP \f\*[B-Font]sysstats\f[]
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.PP
.SS Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per-association basis.
-These words are displayed in the
-\f\*[B-Font]rv\f[]
+These words are displayed by the
+\f\*[B-Font]readlist\f[]
and
-\f\*[B-Font]as\f[]
+\f\*[B-Font]associations\f[]
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
in the reference identifier field in various billboards.
.SS System Variables
The following system variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
.br
.ns
.TP 10
-.NOP \f\*[B-Font]peer\f[]
-system peer association ID
+.NOP \f\*[B-Font]refid\f[]
+reference id or
+.Lk decode.html#kiss "kiss code"
.br
.ns
.TP 10
-.NOP \f\*[B-Font]tc\f[]
-time constant and poll exponent (log2 s) (3-17)
+.NOP \f\*[B-Font]reftime\f[]
+reference time
.br
.ns
.TP 10
-.NOP \f\*[B-Font]mintc\f[]
-minimum time constant (log2 s) (3-10)
+.NOP \f\*[B-Font]clock\f[]
+date and time of day
.br
.ns
.TP 10
-.NOP \f\*[B-Font]clock\f[]
-date and time of day
+.NOP \f\*[B-Font]peer\f[]
+system peer association id
.br
.ns
.TP 10
-.NOP \f\*[B-Font]refid\f[]
-reference ID or
-.Lk decode.html#kiss "kiss code"
+.NOP \f\*[B-Font]tc\f[]
+time constant and poll exponent (log2 s) (3-17)
.br
.ns
.TP 10
-.NOP \f\*[B-Font]reftime\f[]
-reference time
+.NOP \f\*[B-Font]mintc\f[]
+minimum time constant (log2 s) (3-10)
.br
.ns
.TP 10
.NOP \f\*[B-Font]offset\f[]
-combined offset of server relative to this host
+combined offset of server relative to this host
.br
.ns
.TP 10
-.NOP \f\*[B-Font]sys_jitter\f[]
-combined system jitter
+.NOP \f\*[B-Font]frequency\f[]
+frequency drift (PPM) relative to hardware clock
.br
.ns
.TP 10
-.NOP \f\*[B-Font]frequency\f[]
-frequency offset (PPM) relative to hardware clock
+.NOP \f\*[B-Font]sys_jitter\f[]
+combined system jitter
.br
.ns
.TP 10
.PP
.SS Peer Variables
The following peer variables appear in the
-\f\*[B-Font]rv\f[]
+\f\*[B-Font]readlist\f[]
billboard for each association.
Not all variables are displayed in some configurations.
+.sp \n(Ppu
+.ne 2
+
.TP 10
.NOP Variable
Description
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-reference ID or
+reference id or
.Lk decode.html#kiss "kiss code"
.br
.ns
.br
.ns
.TP 10
+.NOP \f\*[B-Font]rec\f[]
+last packet received time
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]reach\f[]
reach register (octal)
.br
.br
.ns
.TP 10
+.NOP \f\*[B-Font]keyid\f[]
+symmetric key id
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]offset\f[]
filter offset
.br
.br
.ns
.TP 10
-.NOP \f\*[B-Font]ident\f[]
-Autokey group name for this association
-.br
-.ns
-.TP 10
.NOP \f\*[B-Font]bias\f[]
unicast/broadcast bias
.br
\f\*[B-Font]bias\f[]
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
\f\*[B-Font]xleave\f[]
variable appears only for the interleaved symmetric and interleaved modes.
.ns
.TP 10
.NOP \f\*[B-Font]initsequence\f[]
-initial key ID
+initial key id
.br
.ns
.TP 10
.TP 10
.NOP \f\*[B-Font]timestamp\f[]
Autokey signature timestamp
+.br
+.ns
+.TP 10
+.NOP \f\*[B-Font]ident\f[]
+Autokey group name for this association
.PP
.SS Clock Variables
The following clock variables appear in the
-\f\*[B-Font]cv\f[]
+\f\*[B-Font]clocklist\f[]
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]associd\f[]
-association ID
+association id
.br
.ns
.TP 10
.ns
.TP 10
.NOP \f\*[B-Font]refid\f[]
-driver reference ID
+driver reference id
.br
.ns
.TP 10
.SH "OPTIONS"
.TP
.NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.TP
.NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.TP
.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
numeric host addresses.
.sp
Output all host addresses in dotted-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.TP
.NOP \f\*[B-Font]\-\-old\-rv\f[]
Always output status line with readvar.
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:58 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:14 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
[ host ...]
.Pp
.Sh DESCRIPTION
+.Pp
The
.Nm
-utility program is used to query NTP servers which
-implement the standard NTP mode 6 control message formats defined
-in Appendix B of the NTPv3 specification RFC1305, requesting
+utility program is used to query NTP servers to monitor NTP operations
+and performance, requesting
information about current state and/or changes in that state.
-The same formats are used in NTPv4, although some of the
-variables have changed and new ones added. The description on this
-page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
+.Pp
If one or more request options is included on the command line
when
.Nm
.Nm
utility will prompt for
commands if the standard input is a terminal device.
+.Pp
.Nm
uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
+.Pp
+Note that in contexts where a host name is expected, a
+.Fl 4
+qualifier preceding the host name forces resolution to the IPv4
+namespace, while a
+.Fl 6
+qualifier forces resolution to the IPv6 namespace.
+For examples and usage, see the
+.Dq NTP Debugging Techniques
+page.
+.Pp
Specifying a
command line option other than
.Fl i
will attempt to read
interactive format commands from the standard input.
.Ss "Internal Commands"
+.Pp
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
+.Pp
A
number of interactive format commands are executed entirely within
the
.Nm
-utility itself and do not result in NTP mode 6
+utility itself and do not result in NTP
requests being sent to a server.
These are described following.
-.Bl -tag -width "? [command_keyword]" -compact -offset indent
-.It Ic ? Op Ar command_keyword
-.It Ic help Op Ar command_keyword
+.Bl -tag -width "help [command]" -compact -offset indent
+.It Ic ? Op Ar command
+.It Ic help Op Ar command
A
.Ql \&?
-by itself will print a list of all the command
-keywords known to this incarnation of
+by itself will print a list of all the commands
+known to
.Nm .
A
.Ql \&?
-followed by a command keyword will print function and usage
+followed by a command name will print function and usage
information about the command.
-This command is probably a better
-source of information about
-.Nm
-than this manual
-page.
-.It Ic addvars Ar variable_name Ns Xo Op Ic =value
-.Ic ...
-.Xc
-.It Ic rmvars Ar variable_name Ic ...
+.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
+.It Ic rmvars Ar name Ns Op ,...
.It Ic clearvars
.It Ic showvars
-The data carried by NTP mode 6 messages consists of a list of
+The arguments to this command consist of a list of
items of the form
-.Ql variable_name=value ,
+.Ar name Ns Op \&= Ns Ar value ,
where the
-.Ql =value
+.No \&= Ns Ar value
is ignored, and can be omitted,
in requests to the server to read variables.
The
.Nm
-utility maintains an internal list in which data to be included in control
-messages can be assembled, and sent using the
+utility maintains an internal list in which data to be included in
+messages can be assembled, and displayed or set using the
.Ic readlist
and
.Ic writelist
.Ic rmvars
command can be used to remove individual variables from the list,
while the
-.Ic clearlist
+.Ic clearvars
command removes all variables from the
list.
The
.Ic showvars
command displays the current list of optional variables.
-.It Ic authenticate Op yes | no
+.It Ic authenticate Op Cm yes Ns | Ns Cm no
Normally
.Nm
does not authenticate requests unless
they are write requests.
The command
-.Ql authenticate yes
+.Ic authenticate Cm yes
causes
.Nm
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
-requests slightly differently, and can occasionally melt the CPU in
-fuzzballs if you turn authentication on before doing a
-.Ic peer
-display.
+requests slightly differently.
The command
-.Ql authenticate
+.Ic authenticate
causes
.Nm
to display whether or not
-.Nm
-is currently autheinticating requests.
+it is currently authenticating requests.
.It Ic cooked
Causes output from query commands to be "cooked", so that
variables which are recognized by
values reformatted for human consumption.
Variables which
.Nm
-thinks should have a decodable value but didn't are
+could not decode completely are
marked with a trailing
.Ql \&? .
-.It Xo
-.Ic debug
-.Oo
-.Cm more |
-.Cm less |
-.Cm off
-.Oc
-.Xc
+.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
With no argument, displays the current debug level.
-Otherwise, the debug level is changed to the indicated level.
-.It Ic delay Ar milliseconds
+Otherwise, the debugging level is changed as indicated.
+.It Ic delay Op Ar milliseconds
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
+Without any arguments, displays the current delay.
+.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
+Display refids as IPv4 or hash.
+Without any arguments, displays whether refids are shown as IPv4
+addresses or hashes.
.It Ic exit
Exit
.Nm .
-.It Ic host Ar hostname
+.It Ic host Op Ar name
Set the host to which future queries will be sent.
-.Ar hostname
+The
+.Ar name
may be either a host name or a numeric address.
-.It Ic hostnames Op Cm yes | Cm no
+Without any arguments, displays the current host.
+.It Ic hostnames Op Cm yes Ns | Ns Cm no
If
.Cm yes
is specified, host names are printed in
modified using the command line
.Fl n
switch.
-.It Ic keyid Ar keyid
+Without any arguments, displays whether host names or numeric addresses
+are shown.
+.It Ic keyid Op Ar keyid
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
.Cm controlkey
key number the server has been configured to use for this
purpose.
-.It Ic keytype Xo Oo
-.Cm md5 |
-.Cm OpenSSLDigestType
-.Oc
-.Xc
-Specify the type of key to use for authenticating requests.
-.Cm md5
-is alway supported.
+Without any arguments, displays the current
+.Ar keyid .
+.It Ic keytype Op Ar digest
+Specify the digest algorithm to use for authenticating requests, with default
+.Cm MD5 .
If
.Nm
-was built with OpenSSL support,
-any digest type supported by OpenSSL can also be provided.
+was built with OpenSSL support, and OpenSSL is installed,
+.Ar digest
+can be any message digest algorithm supported by OpenSSL.
If no argument is given, the current
-.Ic keytype
-is displayed.
-.It Ic ntpversion Xo Oo
-.Cm 1 |
-.Cm 2 |
-.Cm 3 |
-.Cm 4
-.Oc
-.Xc
+.Ic keytype Ar digest
+algorithm used is displayed.
+.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
Sets the NTP version number which
.Nm
claims in
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
-.\" Not yet implemented.
-.\" .It Ic poll
-.\" .Op Ar n
-.\" .Op Ic verbose
-.\" Poll an NTP server in client mode
-.\" .Ar n
-.\" times.
+.It Ic poll Oo Ar n Oc Op Cm verbose
+Poll an NTP server in client mode
+.Ar n
+times.
+Poll not implemented yet.
.It Ic quit
Exit
.Nm .
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
-.It Ic timeout Ar milliseconds
+.It Ic timeout Op Ar milliseconds
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
+Without any arguments, displays the current timeout period.
Note that since
.Nm
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.It Ic version
-Print the version of the
+Display the version of the
.Nm
program.
.El
.Ss "Control Message Commands"
-Association IDs are used to identify system, peer and clock variables.
-System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
-Most control commands send a single mode\-6 message to the server and expect a single response message.
+Association ids are used to identify system, peer and clock variables.
+System variables are assigned an association id of zero and system name
+space, while each association is assigned a nonzero association id and
+peer namespace.
+Most control commands send a single message to the server and expect a
+single response message.
The exceptions are the
-.Li peers
+.Ic peers
command, which sends a series of messages,
and the
-.Li mreadlist
+.Ic mreadlist
and
-.Li mreadvar
+.Ic mreadvar
commands, which iterate over a range of associations.
.Bl -tag -width "something" -compact -offset indent
-.It Cm associations
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Cm refid
+is displayed in hex format and the association number is also displayed.
+.It Ic associations
Display a list of mobilized associations in the form:
.Dl ind assid status conf reach auth condition last_event cnt
-.Bl -column -offset indent ".Sy Variable" ".Sy Description"
-.It Sy String Ta Sy Description
-.It Li ind Ta index on this list
-.It Li assid Ta association ID
-.It Li status Ta peer status word
-.It Li conf Ta Li yes : persistent, Li no : ephemeral
-.It Li reach Ta Li yes : reachable, Li no : unreachable
-.It Li auth Ta Li ok , Li yes , Li bad and Li none
-.It Li condition Ta selection status (see the Li select field of the peer status word)
-.It Li last_event Ta event report (see the Li event field of the peer status word)
-.It Li cnt Ta event count (see the Li count field of the peer status word)
+.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
+.It Sy Variable Ta Sy Description
+.It Cm ind Ta index on this list
+.It Cm assid Ta association id
+.It Cm status Ta peer status word
+.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
+.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
+.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
+.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
+.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
+.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
.El
-.It Cm authinfo
-Display the authentication statistics.
-.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
-Display a list of clock variables for those associations supporting a reference clock.
-.It Cm :config Op ...
-Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.
-.It Cm config\-from\-file Ar filename
-Send the each line of
+.It Ic authinfo
+Display the authentication statistics counters:
+time since reset, stored keys, free keys, key lookups, keys not found,
+uncached keys, expired keys, encryptions, decryptions.
+.It Ic clocklist Op Ar associd
+.It Ic cl Op Ar associd
+Display all clock variables in the variable list for those associations
+supporting a reference clock.
+.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
+Display a list of clock variables for those associations supporting a
+reference clock.
+.It Ic :config Ar "configuration command line"
+Send the remainder of the command line, including whitespace, to the
+server as a run\-time configuration command in the same format as a line
+in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is of course required.
+.It Ic config\-from\-file Ar filename
+Send each line of
.Ar filename
-to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
+to the server as run\-time configuration commands in the same format as
+lines in the configuration file.
+This command is experimental until further notice and clarification.
+Authentication is required.
.It Ic ifstats
-Display statistics for each local network address. Authentication is required.
+Display status and statistics counters for each local network interface address:
+interface number, interface name and address or broadcast, drop, flag,
+ttl, mc, received, sent, send failed, peers, uptime.
+Authentication is required.
.It Ic iostats
-Display network and reference clock I/O statistics.
+Display network and reference clock I/O statistics:
+time since reset, receive buffers, free receive buffers, used receive buffers,
+low water refills, dropped packets, ignored packets, received packets,
+packets sent, packet send failures, input wakeups, useful input wakeups.
.It Ic kerninfo
-Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
+Display kernel loop and PPS statistics:
+associd, status, pll offset, pll frequency, maximum error,
+estimated error, kernel status, pll time constant, precision,
+frequency tolerance, pps frequency, pps stability, pps jitter,
+calibration interval, calibration cycles, jitter exceeded,
+stability exceeded, calibration errors.
+As with other ntpq output, times are in milliseconds; very small values
+may be shown as exponentials.
+The precision value displayed is in milliseconds as well, unlike the
+precision system variable.
.It Ic lassociations
-Perform the same function as the associations command, except display mobilized and unmobilized associations.
-.It Ic lopeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Obtain and print a list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version).
-.It Ic lpeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
-Print a peer spreadsheet for the appropriate IP version(s).
-.Ar dstadr
-(associated with any given IP version).
+Perform the same function as the associations command, except display
+mobilized and unmobilized associations, including all clients.
+.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients showing
+.Cm dstadr
+(associated with the given IP version).
+.It Ic lpassociations
+Display the last obtained list of associations, including all clients.
+.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
+Display a list of all peers and clients (associated with the given IP version).
.It Ic monstats
-Display monitor facility statistics.
-.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
-Obtain and print traffic counts collected and maintained by the monitor facility.
+Display monitor facility status, statistics, and limits:
+enabled, addresses, peak addresses, maximum addresses,
+reclaim above count, reclaim older than, kilobytes, maximum kilobytes.
+.It Ic mreadlist Ar associdlo Ar associdhi
+.It Ic mrl Ar associdlo Ar associdhi
+Perform the same function as the
+.Ic readlist
+command for a range of association ids.
+.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+This range may be determined from the list displayed by any
+command showing associations.
+.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
+Perform the same function as the
+.Ic readvar
+command for a range of association ids.
+This range may be determined from the list displayed by any
+command showing associations.
+.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
+.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder |
+.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
+.Xc
+Display traffic counts of the most recently seen source addresses
+collected and maintained by the monitor facility.
With the exception of
-.Cm sort Ns = Ns Ar sortorder ,
+.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder ,
the options filter the list returned by
-.Cm ntpd.
+.Xr ntpd 8 .
The
.Cm limited
and
.Cm kod
-options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
+options return only entries representing client addresses from which the
+last packet received triggered either discarding or a KoD response.
The
.Cm mincount Ns = Ns Ar count
option filters entries representing less than
.Ar sortorder
defaults to
.Cm lstint
-and may be any of
+and may be
.Cm addr ,
-.Cm count ,
.Cm avgint ,
+.Cm count ,
.Cm lstint ,
-or any of those preceded by a minus sign (hyphen) to reverse the sort order.
+or any of those preceded by
+.Ql \&\-
+to reverse the sort order.
The output columns are:
.Bl -tag -width "something" -compact -offset indent
.It Column
Description
.It Ic lstint
-Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
+Interval in seconds between the receipt of the most recent packet from
+this address and the completion of the retrieval of the MRU list by
.Nm .
.It Ic avgint
Average interval in s between packets from this address.
Restriction flags associated with this address.
Most are copied unchanged from the matching
.Ic restrict
-command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
+command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
+the last packet from this address triggered a rate control response.
.It Ic r
Rate control indicator, either
a period,
.It Ic rport
Source port of last packet from this address.
.It Ic remote address
-DNS name, numeric address, or address followed by
+host or DNS name, numeric address, or address followed by
claimed DNS name which could not be verified in parentheses.
.El
-.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
-Perform the same function as the
-.Ic readvar
-command, except for a range of association IDs.
-This range is determined from the association list cached by the most recent
-.Ic associations
-command.
-.It Ic opeers Xo
-.Oo Ic \-4 |
-.Ic \-6
-.Oc
-.Xc
+.It Ic opeers Op Fl 4 | Fl 6
Obtain and print the old\-style list of all peers and clients showing
-.Ar dstadr
-(associated with any given IP version),
+.Cm dstadr
+(associated with the given IP version),
rather than the
-.Ar refid .
+.Cm refid .
.It Ic passociations
Perform the same function as the
.Ic associations
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic [tally]
+.It Cm [tally]
single\-character code indicating current value of the
.Ic select
field of the
.Lk decode.html#peer "peer status word"
-.It Ic remote
+.It Cm remote
host name (or IP number) of peer.
-The value displayed will be truncated to 15 characters unless the
+The value displayed will be truncated to 15 characters unless the
+.Nm
.Fl w
-flag is given, in which case the full value will be displayed
-on the first line,
-and the remaining data is displayed on the next line.
-.It Ic refid
-association ID or
+option is given, in which case the full value will be displayed
+on the first line, and if too long,
+the remaining data will be displayed on the next line.
+.It Cm refid
+source IP address or
.Lk decode.html#kiss "'kiss code"
-.It Ic st
-stratum
-.It Ic t
+.It Cm st
+stratum: 0 for local reference clocks, 1 for servers with local
+reference clocks, ..., 16 for unsynchronized server clocks
+.It Cm t
.Ic u :
unicast or manycast client,
.Ic b :
broadcast or multicast client,
+.Ic p :
+pool source,
.Ic l :
local (reference clock),
.Ic s :
broadcast server,
.Ic M :
multicast server
-.It Ic when
-sec/min/hr since last received packet
-.It Ic poll
-poll interval (log2 s)
-.It Ic reach
+.It Cm when
+time in seconds, minutes, hours, or days since the last packet
+was received, or
+.Ql \&\-
+if a packet has never been received
+.It Cm poll
+poll interval (s)
+.It Cm reach
reach shift register (octal)
-.It Ic delay
+.It Cm delay
roundtrip delay
-.It Ic offset
+.It Cm offset
offset of server relative to this host
-.It Ic jitter
-jitter
+.It Cm jitter
+offset RMS error estimate.
.El
-.It Ic apeers
-Display a list of peers in the form:
-.Dl [tally]remote refid assid st t when pool reach delay offset jitter
-where the output is just like the
-.Ic peers
-command except that the
-.Ic refid
-is displayed in hex format and the association number is also displayed.
-.It Ic pstats Ar assocID
-Show the statistics for the peer with the given
-.Ar assocID .
-.It Ic readlist Ar assocID
-.It Ic rl Ar assocID
-Read the system or peer variables included in the variable list.
-.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc
-Display the specified variables.
+.It Ic pstats Ar associd
+Display the statistics for the peer with the given
+.Ar associd :
+associd, status, remote host, local address, time last received,
+time until next send, reachability change, packets sent,
+packets received, bad authentication, bogus origin, duplicate,
+bad dispersion, bad reference time, candidate order.
+.It Ic readlist Op Ar associd
+.It Ic rl Op Ar associd
+Display all system or peer variables.
+If the
+.Ar associd
+is omitted, it is assumed to be zero.
+.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
+Display the specified system or peer variables.
If
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
If no
.Ar name
is included, all operative variables in the name space are displayed.
In this case only, if the
-.Ar assocID
-is omitted, it is assumed zero.
+.Ar associd
+is omitted, it is assumed to be zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds
and frequency values in parts\-per\-million (PPM).
Some NTP timestamps are represented in the format
-YYYYMMDDTTTT ,
-where YYYY is the year,
-MM the month of year,
-DD the day of month and
-TTTT the time of day.
+.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
+where
+.Ar YYYY
+is the year,
+.Ar MM
+the month of year,
+.Ar DD
+the day of month and
+.Ar TTTT
+the time of day.
.It Ic reslist
-Show the access control (restrict) list for
+Display the access control (restrict) list for
.Nm .
+Authentication is required.
.It Ic saveconfig Ar filename
-Write the current configuration,
-including any runtime modifications given with
+Save the current configuration,
+including any runtime modifications made by
.Ic :config
or
.Ic config\-from\-file ,
-to the ntpd host's file
+to the NTP server host file
.Ar filename .
This command will be rejected by the server unless
.Lk miscopt.html#saveconfigdir "saveconfigdir"
appears in the
-.Ic ntpd
+.Xr ntpd 8
configuration file.
.Ar filename
can use
-.Xr strftime
-format specifies to substitute the current date and time, for example,
-.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
+.Xr date 1
+format specifiers to substitute the current date and time, for
+example,
+.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf .
The filename used is stored in system variable
-.Ic savedconfig .
+.Cm savedconfig .
Authentication is required.
+.It Ic sysinfo
+Display system operational summary:
+associd, status, system peer, system peer mode, leap indicator,
+stratum, log2 precision, root delay, root dispersion,
+reference id, reference time, system jitter, clock jitter,
+clock wander, broadcast delay, symm. auth. delay.
+.It Ic sysstats
+Display system uptime and packet counts maintained in the
+protocol module:
+uptime, sysstats reset, packets received, current version,
+older version, bad length or format, authentication failed,
+declined, restricted, rate limited, KoD responses,
+processed for time.
.It Ic timerstats
-Display interval timer counters.
-.It Ic writelist Ar assocID
-Write the system or peer variables included in the variable list.
-.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
-Write the specified variables.
+Display interval timer counters:
+time since reset, timer overruns, calls to transmit.
+.It Ic writelist Ar associd
+Set all system or peer variables included in the variable list.
+.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
+Set the specified variables in the variable list.
If the
-.Ar assocID
+.Ar associd
is zero, the variables are from the
.Sx System Variables
name space, otherwise they are from the
.Sx Peer Variables
name space.
The
-.Ar assocID
+.Ar associd
is required, as the same name can occur in both spaces.
-.It Ic sysinfo
-Display operational summary.
-.It Ic sysstats
-Print statistics counters maintained in the protocol module.
+Authentication is required.
.El
.Ss Status Words and Kiss Codes
The current state of the operating program is shown
in a set of status words
maintained by the system.
Status information is also available on a per\-association basis.
-These words are displayed in the
-.Ic rv
+These words are displayed by the
+.Ic readlist
and
-.Ic as
+.Ic associations
commands both in hexadecimal and in decoded short tip strings.
The codes, tips and short explanations are documented on the
.Lk decode.html "Event Messages and Status Words"
in the reference identifier field in various billboards.
.Ss System Variables
The following system variables appear in the
-.Ic rv
+.Ic readlist
billboard.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic status
+.It Cm status
.Lk decode.html#sys "system status word"
-.It Ic version
+.It Cm version
NTP software version and build time
-.It Ic processor
+.It Cm processor
hardware platform and version
-.It Ic system
+.It Cm system
operating system and version
-.It Ic leap
+.It Cm leap
leap warning indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (1\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total dispersion to the primary reference clock
-.It Ic peer
-system peer association ID
-.It Ic tc
-time constant and poll exponent (log2 s) (3\-17)
-.It Ic mintc
-minimum time constant (log2 s) (3\-10)
-.It Ic clock
-date and time of day
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic offset
-combined offset of server relative to this host
-.It Ic sys_jitter
+.It Ic clock
+date and time of day
+.It Cm peer
+system peer association id
+.It Cm tc
+time constant and poll exponent (log2 s) (3\-17)
+.It Cm mintc
+minimum time constant (log2 s) (3\-10)
+.It Cm offset
+combined offset of server relative to this host
+.It Cm frequency
+frequency drift (PPM) relative to hardware clock
+.It Cm sys_jitter
combined system jitter
-.It Ic frequency
-frequency offset (PPM) relative to hardware clock
-.It Ic clk_wander
+.It Cm clk_wander
clock frequency wander (PPM)
-.It Ic clk_jitter
+.It Cm clk_jitter
clock jitter
-.It Ic tai
+.It Cm tai
TAI\-UTC offset (s)
-.It Ic leapsec
+.It Cm leapsec
NTP seconds when the next leap second is/was inserted
-.It Ic expire
+.It Cm expire
NTP seconds when the NIST leapseconds file expires
.El
The jitter and wander statistics are exponentially\-weighted RMS averages.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic host
+.It Cm host
Autokey host name for this host
-.It Ic ident
+.It Cm ident
Autokey group name for this host
-.It Ic flags
+.It Cm flags
host flags (see Autokey specification)
-.It Ic digest
+.It Cm digest
OpenSSL message digest algorithm
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic update
+.It Cm update
NTP seconds at last signature update
-.It Ic cert
+.It Cm cert
certificate subject, issuer and certificate flags
-.It Ic until
+.It Cm until
NTP seconds when the certificate expires
.El
.Ss Peer Variables
The following peer variables appear in the
-.Ic rv
+.Ic readlist
billboard for each association.
Not all variables are displayed in some configurations.
+.Pp
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#peer "peer status word"
-.It Ic srcadr
+.It Cm srcadr
source (remote) IP address
-.It Ic srcport
+.It Cm srcport
source (remote) port
-.It Ic dstadr
+.It Cm dstadr
destination (local) IP address
-.It Ic dstport
+.It Cm dstport
destination (local) port
-.It Ic leap
+.It Cm leap
leap indicator (0\-3)
-.It Ic stratum
+.It Cm stratum
stratum (0\-15)
-.It Ic precision
+.It Cm precision
precision (log2 s)
-.It Ic rootdelay
+.It Cm rootdelay
total roundtrip delay to the primary reference clock
-.It Ic rootdisp
+.It Cm rootdisp
total root dispersion to the primary reference clock
-.It Ic refid
-reference ID or
+.It Cm refid
+reference id or
.Lk decode.html#kiss "kiss code"
-.It Ic reftime
+.It Cm reftime
reference time
-.It Ic reach
+.It Cm rec
+last packet received time
+.It Cm reach
reach register (octal)
-.It Ic unreach
+.It Cm unreach
unreach counter
-.It Ic hmode
+.It Cm hmode
host mode (1\-6)
-.It Ic pmode
+.It Cm pmode
peer mode (1\-5)
-.It Ic hpoll
+.It Cm hpoll
host poll exponent (log2 s) (3\-17)
-.It Ic ppoll
+.It Cm ppoll
peer poll exponent (log2 s) (3\-17)
-.It Ic headway
+.It Cm headway
headway (see
.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
-.It Ic flash
+.It Cm flash
.Lk decode.html#flash "flash status word"
-.It Ic offset
+.It Cm keyid
+symmetric key id
+.It Cm offset
filter offset
-.It Ic delay
+.It Cm delay
filter delay
-.It Ic dispersion
+.It Cm dispersion
filter dispersion
-.It Ic jitter
+.It Cm jitter
filter jitter
-.It Ic ident
-Autokey group name for this association
-.It Ic bias
+.It Cm bias
unicast/broadcast bias
-.It Ic xleave
+.It Cm xleave
interleave delay (see
.Lk xleave.html "NTP Interleaved Modes" )
.El
The
-.Ic bias
+.Cm bias
variable is calculated when the first broadcast packet is received
after the calibration volley.
-It represents the offset of the broadcast subgraph relative to the unicast subgraph.
+It represents the offset of the broadcast subgraph relative to the
+unicast subgraph.
The
-.Ic xleave
+.Cm xleave
variable appears only for the interleaved symmetric and interleaved modes.
It represents the internal queuing, buffering and transmission delays
for the preceding packet.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic host
+.It Cm host
Autokey server name
-.It Ic flags
+.It Cm flags
peer flags (see Autokey specification)
-.It Ic signature
+.It Cm signature
OpenSSL digest/signature scheme
-.It Ic initsequence
-initial key ID
-.It Ic initkey
+.It Cm initsequence
+initial key id
+.It Cm initkey
initial key index
-.It Ic timestamp
+.It Cm timestamp
Autokey signature timestamp
+.It Cm ident
+Autokey group name for this association
.El
.Ss Clock Variables
The following clock variables appear in the
-.Ic cv
+.Ic clocklist
billboard for each association with a reference clock.
Not all variables are displayed in some configurations.
.Bl -tag -width "something" -compact -offset indent
.It Variable
Description
-.It Ic associd
-association ID
-.It Ic status
+.It Cm associd
+association id
+.It Cm status
.Lk decode.html#clock "clock status word"
-.It Ic device
+.It Cm device
device description
-.It Ic timecode
+.It Cm timecode
ASCII time code string (specific to device)
-.It Ic poll
+.It Cm poll
poll messages sent
-.It Ic noreply
+.It Cm noreply
no reply
-.It Ic badformat
+.It Cm badformat
bad format
-.It Ic baddata
+.It Cm baddata
bad date or time
-.It Ic fudgetime1
+.It Cm fudgetime1
fudge time 1
-.It Ic fudgetime2
+.It Cm fudgetime2
fudge time 2
-.It Ic stratum
+.It Cm stratum
driver stratum
-.It Ic refid
-driver reference ID
-.It Ic flags
+.It Cm refid
+driver reference id
+.It Cm flags
driver flags
.El
.Sh "OPTIONS"
.Bl -tag
.It Fl 4 , Fl \-ipv4
-Force IPv4 DNS name resolution.
+Force IPv4 name resolution.
This option must not appear in combination with any of the following options:
ipv6.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv4 namespace.
.It Fl 6 , Fl \-ipv6
-Force IPv6 DNS name resolution.
+Force IPv6 name resolution.
This option must not appear in combination with any of the following options:
ipv4.
.sp
-Force DNS resolution of following host names on the command line
+Force resolution of following host names on the command line
to the IPv6 namespace.
.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
run a command and exit.
numeric host addresses.
.sp
Output all host addresses in dotted\-quad numeric format rather than
-converting to the canonical host names.
+converting to the canonical host names.
.It Fl \-old\-rv
Always output status line with readvar.
.sp
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsnmpd.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:31:00 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:19:21 PM by AutoGen 5.18.5
# From the definitions ntpsnmpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.c)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:59 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:19 PM by AutoGen 5.18.5
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
* static const strings for ntpsnmpd options
*/
static char const ntpsnmpd_opt_strs[1607] =
-/* 0 */ "ntpsnmpd 4.3.96\n"
+/* 0 */ "ntpsnmpd 4.3.97\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
/* 1413 */ "no-load-opts\0"
/* 1426 */ "no\0"
/* 1429 */ "NTPSNMPD\0"
-/* 1438 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.3.96\n"
+/* 1438 */ "ntpsnmpd - NTP SNMP MIB agent - Ver. 4.3.97\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
/* 1540 */ "$HOME\0"
/* 1546 */ ".\0"
/* 1548 */ ".ntprc\0"
/* 1555 */ "http://bugs.ntp.org, bugs@ntp.org\0"
/* 1589 */ "\n\0"
-/* 1591 */ "ntpsnmpd 4.3.96";
+/* 1591 */ "ntpsnmpd 4.3.97";
/**
* nofork option description:
translate option names.
*/
/* referenced via ntpsnmpdOptions.pzCopyright */
- puts(_("ntpsnmpd 4.3.96\n\
+ puts(_("ntpsnmpd 4.3.97\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
puts(_("load options from a config file"));
/* referenced via ntpsnmpdOptions.pzUsageTitle */
- puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.3.96\n\
+ puts(_("ntpsnmpd - NTP SNMP MIB agent - Ver. 4.3.97\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntpsnmpdOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpsnmpdOptions.pzFullVersion */
- puts(_("ntpsnmpd 4.3.96"));
+ puts(_("ntpsnmpd 4.3.97"));
/* referenced via ntpsnmpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
/*
* EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.h)
*
- * It has been AutoGen-ed June 6, 2019 at 05:30:59 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:19 PM by AutoGen 5.18.5
* From the definitions ntpsnmpd-opts.def
* and the template file options
*
/** count of all options for ntpsnmpd */
#define OPTION_CT 8
/** ntpsnmpd version */
-#define NTPSNMPD_VERSION "4.3.96"
+#define NTPSNMPD_VERSION "4.3.97"
/** Full ntpsnmpd version text */
-#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.3.96"
+#define NTPSNMPD_FULL_VERSION "ntpsnmpd 4.3.97"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd 1ntpsnmpdman "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpsnmpd 1ntpsnmpdman "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:01 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:22 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:01 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:20 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
<p>The <code>ntpsnmpd</code> utility program is used to monitor NTP daemon <code>ntpd</code>
operations and determine performance. It uses the standard NTP mode 6 control
</p>
-<p>This document applies to version 4.3.96 of <code>ntpsnmpd</code>.
+<p>This document applies to version 4.3.97 of <code>ntpsnmpd</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="#ntpsnmpd-Description" accesskey="1">ntpsnmpd Description</a>:</td><td> </td><td align="left" valign="top">Description
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsnmpd @NTPSNMPD_MS@ "06 Jun 2019" "4.3.96" "User Commands"
+.TH ntpsnmpd @NTPSNMPD_MS@ "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:01 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:22 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsnmpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:01 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:20 PM by AutoGen 5.18.5
.\" From the definitions ntpsnmpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
# - Numeric values increment
# - empty 'increments' to 0 for dev, 1 for stable
# - NEW 'increments' to empty
-point=96
+point=97
### betapoint is normally modified by script.
# ntp-stable Beta number (betapoint)
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:23 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:35:58 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:23 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:35:16 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
<h1 class="top">calc_tickadj User’s Manual</h1>
<p>This document describes the use of the NTP Project’s <code>calc_tickadj</code> program.
-This document applies to version 4.3.96 of <code>calc_tickadj</code>.
+This document applies to version 4.3.97 of <code>calc_tickadj</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH calc_tickadj 1calc_tickadjman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH calc_tickadj 1calc_tickadjman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:23 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:35:58 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (calc_tickadj-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:23 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:35:16 PM by AutoGen 5.18.5
.\" From the definitions calc_tickadj-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
#
# EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:23 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:35:59 PM by AutoGen 5.18.5
# From the definitions calc_tickadj-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
#
# EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:32 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:15 PM by AutoGen 5.18.5
# From the definitions plot_summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@exampleindent 0
@example
-plot_summary - plot statistics generated by summary script - Ver. 4.3.96
+plot_summary - plot statistics generated by summary script - Ver. 4.3.97
USAGE: plot_summary [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
--directory=str Where the summary files are
#
# EDIT THIS FILE WITH CAUTION (invoke-summary.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:31 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:19 PM by AutoGen 5.18.5
# From the definitions summary-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:25 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:01 PM by AutoGen 5.18.5
# From the definitions ntp-wait-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@exampleindent 0
@example
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.3.96
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.3.97
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
-n, --tries=num Number of times to check ntpd
# EDIT THIS FILE WITH CAUTION (ntp-wait-opts)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:25 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:35:17 PM by AutoGen 5.18.5
# From the definitions ntp-wait-opts.def
# and the template file perlopt
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.3.96
+ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.3.97
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-n, --tries=num Number of times to check ntpd
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait 1ntp-waitman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntp-wait 1ntp-waitman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:25 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:02 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:25 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:35:17 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
and only then start any applicaitons (like database servers) that require
accurate and stable time.
</p>
-<p>This document applies to version 4.3.96 of <code>ntp-wait</code>.
+<p>This document applies to version 4.3.97 of <code>ntp-wait</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.3.96
+<pre class="example">ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.3.97
USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-n, --tries=num Number of times to check ntpd
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-wait @NTP_WAIT_MS@ "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntp-wait @NTP_WAIT_MS@ "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:25 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:02 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-wait-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:25 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:35:17 PM by AutoGen 5.18.5
.\" From the definitions ntp-wait-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:26 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:03 PM by AutoGen 5.18.5
# From the definitions ntpsweep-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@exampleindent 0
@example
-ntpsweep - Print various informations about given ntp servers - Ver. 4.3.96
+ntpsweep - Print various informations about given ntp servers - Ver. 4.3.97
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
# EDIT THIS FILE WITH CAUTION (ntpsweep-opts)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:26 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:03 PM by AutoGen 5.18.5
# From the definitions ntpsweep-opts.def
# and the template file perlopt
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntpsweep - Print various informations about given ntp servers - Ver. 4.3.96
+ntpsweep - Print various informations about given ntp servers - Ver. 4.3.97
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntpsweep 1ntpsweepman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:06 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:05 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
<p>This document describes the use of the NTP Project’s <code>ntpsweep</code> program.
</p>
-<p>This document applies to version 4.3.96 of <code>ntpsweep</code>.
+<p>This document applies to version 4.3.97 of <code>ntpsweep</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.3.96
+<pre class="example">ntpsweep - Print various informations about given ntp servers - Ver. 4.3.97
USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [hostfile]
-l, --host-list=str Host to execute actions on
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpsweep 1ntpsweepman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntpsweep 1ntpsweepman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:06 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpsweep-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:26 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:05 PM by AutoGen 5.18.5
.\" From the definitions ntpsweep-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
#
# EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:28 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:08 PM by AutoGen 5.18.5
# From the definitions ntptrace-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@exampleindent 0
@example
-ntptrace - Trace peers of an NTP server - Ver. 4.3.96
+ntptrace - Trace peers of an NTP server - Ver. 4.3.97
USAGE: ntptrace [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
# EDIT THIS FILE WITH CAUTION (ntptrace-opts)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:28 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:07 PM by AutoGen 5.18.5
# From the definitions ntptrace-opts.def
# and the template file perlopt
'help|?', 'more-help'));
$usage = <<'USAGE';
-ntptrace - Trace peers of an NTP server - Ver. 4.3.96
+ntptrace - Trace peers of an NTP server - Ver. 4.3.97
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace 1ntptraceman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntptrace 1ntptraceman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:28 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:10 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:28 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:07 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
<h1 class="top">Simple Network Time Protocol User Manual</h1>
<p>This document describes the use of the NTP Project’s <code>ntptrace</code> program.
-This document applies to version 4.3.96 of <code>ntptrace</code>.
+This document applies to version 4.3.97 of <code>ntptrace</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.3.96
+<pre class="example">ntptrace - Trace peers of an NTP server - Ver. 4.3.97
USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [host]
-n, --numeric Print IP addresses instead of hostnames
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntptrace @NTPTRACE_MS@ "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntptrace @NTPTRACE_MS@ "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:28 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:10 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:28 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:07 PM by AutoGen 5.18.5
.\" From the definitions ntptrace-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
# EDIT THIS FILE WITH CAUTION (plot_summary-opts)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:31 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:15 PM by AutoGen 5.18.5
# From the definitions plot_summary-opts.def
# and the template file perlopt
'help|?', 'more-help'));
$usage = <<'USAGE';
-plot_summary - plot statistics generated by summary script - Ver. 4.3.96
+plot_summary - plot statistics generated by summary script - Ver. 4.3.97
USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Where the summary files are
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH plot_summary 1plot_summaryman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:31 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:16 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:31 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:17 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
<h1 class="top">Plot_summary User Manual</h1>
<p>This document describes the use of the NTP Project’s <code>plot_summary</code> program.
-This document applies to version 4.3.96 of <code>plot_summary</code>.
+This document applies to version 4.3.97 of <code>plot_summary</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
with a status code of 0.
</p>
<div class="example">
-<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.3.96
+<pre class="example">plot_summary - plot statistics generated by summary script - Ver. 4.3.97
USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Where the summary files are
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH plot_summary 1plot_summaryman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH plot_summary 1plot_summaryman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:31 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:16 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (plot_summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:31 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:17 PM by AutoGen 5.18.5
.\" From the definitions plot_summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
# EDIT THIS FILE WITH CAUTION (summary-opts)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:31 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:15 PM by AutoGen 5.18.5
# From the definitions summary-opts.def
# and the template file perlopt
'help|?', 'more-help'));
$usage = <<'USAGE';
-summary - compute various stastics from NTP stat files - Ver. 4.3.96
+summary - compute various stastics from NTP stat files - Ver. 4.3.97
USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
--directory=str Directory containing stat files
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH summary 1summaryman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:20 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:21 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
<h1 class="top">Summary User Manual</h1>
<p>This document describes the use of the NTP Project’s <code>summary</code> program.
-This document applies to version 4.3.96 of <code>summary</code>.
+This document applies to version 4.3.97 of <code>summary</code>.
</p>
<a name="SEC_Overview"></a>
<h2 class="shortcontents-heading">Short Table of Contents</h2>
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH summary 1summaryman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH summary 1summaryman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:20 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.Os
.\" EDIT THIS FILE WITH CAUTION (summary-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:32 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:21 PM by AutoGen 5.18.5
.\" From the definitions summary-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
#
# EDIT THIS FILE WITH CAUTION (invoke-update-leap.texi)
#
-# It has been AutoGen-ed February 27, 2018 at 04:55:50 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:12 PM by AutoGen 5.18.5
# From the definitions update-leap-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
# EDIT THIS FILE WITH CAUTION (update-leap-opts)
#
-# It has been AutoGen-ed February 27, 2018 at 04:32:15 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:36:15 PM by AutoGen 5.18.5
# From the definitions update-leap-opts.def
# and the template file perlopt
'help|?', 'more-help'));
$usage = <<'USAGE';
-update-leap - leap-seconds file manager/updater - Ver. 4.2.8p11
+update-leap - leap-seconds file manager/updater - Ver. 4.3.97
USAGE: update-leap [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
-s, --source-url=str The URL of the master copy of the leapseconds file
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "27 Feb 2018" "ntp (4.2.8p11)" "User Commands"
+.TH update-leap 1update-leapman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-cKaOWT/ag-pKaWVT)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 10:50:15 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:14 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
-.Dd February 27 2018
+.Dd June 6 2019
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 04:55:53 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:11 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
-<title>update-leap User's Manual</title>
-<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="update-leap User's Manual">
-<meta name="generator" content="makeinfo 4.7">
-<link title="Top" rel="top" href="#Top">
-<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family: serif; font-weight: normal; }
---></style>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>update-leap User’s Manual</title>
+
+<meta name="description" content="update-leap User’s Manual">
+<meta name="keywords" content="update-leap User’s Manual">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
+<link href="#Top" rel="start" title="Top">
+<link href="dir.html#Top" rel="up" title="(dir)">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.indentedblock {margin-right: 0em}
+blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smalllisp {margin-left: 3.2em}
+kbd {font-style: oblique}
+pre.display {font-family: inherit}
+pre.format {font-family: inherit}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: inherit; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: inherit; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.nolinebreak {white-space: nowrap}
+span.roman {font-family: initial; font-weight: normal}
+span.sansserif {font-family: sans-serif; font-weight: normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
</head>
-<body>
-<h1 class="settitle">update-leap User's Manual</h1>
-<div class="node">
-<p><hr>
-<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Description">update-leap Description</a>,
-Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
-Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
-<br>
-</div>
- <p>This document describes the use of the NTP Project's <code>update-leap</code> program.
+<body lang="en">
+<h1 class="settitle" align="center">update-leap User’s Manual</h1>
+
+
+
+
+
+<a name="Top"></a>
+<div class="header">
+<p>
+Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> </p>
+</div>
+<h1 class="node-heading">Top</h1>
- <p>This document applies to version 4.2.8p11 of <code>update-leap</code>.
+<p>This document describes the use of the NTP Project’s <code>update-leap</code> program.
+</p>
+<p>This document applies to version 4.3.97 of <code>update-leap</code>.
+</p>
+<a name="SEC_Overview"></a>
+<h2 class="shortcontents-heading">Short Table of Contents</h2>
<div class="shortcontents">
-<h2>Short Contents</h2>
-<ul>
-</ul>
+<li><a name="stoc-Invoking-update_002dleap" href="#toc-Invoking-update_002dleap">1 Invoking update-leap</a></li>
+
</div>
-<ul class="menu">
-<li><a accesskey="1" href="#update_002dleap-Description">update-leap Description</a>: Description
-<li><a accesskey="2" href="#update_002dleap-Invocation">update-leap Invocation</a>: Invoking update-leap
-</ul>
-<div class="node">
-<p><hr>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">• update-leap Description:</td><td> </td><td align="left" valign="top">Description
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-Invocation" accesskey="2">update-leap Invocation</a>:</td><td> </td><td align="left" valign="top">Invoking update-leap
+</td></tr>
+</table>
+
+<hr>
<a name="update_002dleap-Invocation"></a>
-<br>
+<div class="header">
+<p>
+Up: <a href="#Top" accesskey="u" rel="up">Top</a> </p>
</div>
+<a name="Invoking-update_002dleap"></a>
+<h3 class="section">1 Invoking update-leap</h3>
+<a name="index-update_002dleap"></a>
+<a name="index-leap_002dseconds-file-manager_002fupdater"></a>
-<h3 class="section">0.1 Invoking update-leap</h3>
-<p><a name="index-update_002dleap-1"></a><a name="index-leap_002dseconds-file-manager_002fupdater-2"></a>
- <p><code>update-leap</code>
+<p><code>update-leap</code>
will validate the file currently on the local system
and if necessary, updates leap-second definition file.
-
- <p>Ordinarily, the file is found using the "leapfile" directive in
-<code>ntp.conf(5)</code>.
+</p>
+<p>Ordinarily, the file is found using the "leapfile" directive in
+<code>ntp.conf(5)</code>.
However, an alternate location can be specified on the command line.
-
- <p>If the file does not exist, is not valid, has expired, or is expiring soon,
+</p>
+<p>If the file does not exist, is not valid, has expired, or is expiring soon,
a new copy will be downloaded. If the new copy validates, it is installed and
NTP is (optionally) restarted.
-
- <p>If the current file is acceptable, no download or restart occurs.
-
- <p>-c can also be used to invoke another script to perform administrative
-functions, e.g. to copy the file to other local systems.
+</p>
+<p>If the current file is acceptable, no download or restart occurs.
+</p>
+<p>-c can also be used to invoke another script to perform administrative
+functions, e.g. to copy the file to other local systems.
.PP
This can be run as a cron job. As the file is rarely updated, and leap
seconds are announced at least one month in advance (usually longer), it
-need not be run more frequently than about once every three weeks.
+need not be run more frequently than about once every three weeks.
.PP
-For cron-friendly behavior, define CRONJOB=1 in the crontab.
+For cron-friendly behavior, define CRONJOB=1 in the crontab.
.PP
This script depends on$REQUIREDCMDS
-
- <p>This section was generated by <strong>AutoGen</strong>,
+</p>
+<p>This section was generated by <strong>AutoGen</strong>,
using the <code>agtexi-cmd</code> template and the option descriptions for the <code>update-leap</code> program.
-
-<ul class="menu">
-<li><a accesskey="1" href="#update_002dleap-usage">update-leap usage</a>: update-leap help/usage (<span class="option">--help</span>)
-<li><a accesskey="2" href="#update_002dleap-source_002durl">update-leap source-url</a>: source-url option (-s)
-<li><a accesskey="3" href="#update_002dleap-ipv4">update-leap ipv4</a>: ipv4 option (-4)
-<li><a accesskey="4" href="#update_002dleap-destination">update-leap destination</a>: destination option (-d)
-<li><a accesskey="5" href="#update_002dleap-expiration">update-leap expiration</a>: expiration option (-e)
-<li><a accesskey="6" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>: ntp-conf-file option (-f)
-<li><a accesskey="7" href="#update_002dleap-force_002dupdate">update-leap force-update</a>: force-update option (-F)
-<li><a accesskey="8" href="#update_002dleap-exit-status">update-leap exit status</a>: exit status
-<li><a accesskey="9" href="#update_002dleap-Usage">update-leap Usage</a>: Usage
-<li><a href="#update_002dleap-Authors">update-leap Authors</a>: Authors
-</ul>
-
-<div class="node">
-<p><hr>
-<a name="update_002dleap-usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-source_002durl">update-leap source-url</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+</p>
+<table class="menu" border="0" cellspacing="0">
+<tr><td align="left" valign="top">• <a href="#update_002dleap-usage" accesskey="1">update-leap usage</a>:</td><td> </td><td align="left" valign="top">update-leap help/usage (<samp>--help</samp>)
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-source_002durl" accesskey="2">update-leap source-url</a>:</td><td> </td><td align="left" valign="top">source-url option (-s)
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-ipv4" accesskey="3">update-leap ipv4</a>:</td><td> </td><td align="left" valign="top">ipv4 option (-4)
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-destination" accesskey="4">update-leap destination</a>:</td><td> </td><td align="left" valign="top">destination option (-d)
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-expiration" accesskey="5">update-leap expiration</a>:</td><td> </td><td align="left" valign="top">expiration option (-e)
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-ntp_002dconf_002dfile" accesskey="6">update-leap ntp-conf-file</a>:</td><td> </td><td align="left" valign="top">ntp-conf-file option (-f)
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-force_002dupdate" accesskey="7">update-leap force-update</a>:</td><td> </td><td align="left" valign="top">force-update option (-F)
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-exit-status" accesskey="8">update-leap exit status</a>:</td><td> </td><td align="left" valign="top">exit status
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-Usage" accesskey="9">update-leap Usage</a>:</td><td> </td><td align="left" valign="top">Usage
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#update_002dleap-Authors">update-leap Authors</a>:</td><td> </td><td align="left" valign="top">Authors
+</td></tr>
+</table>
+
+<hr>
+<a name="update_002dleap-usage"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-source_002durl" accesskey="n" rel="next">update-leap source-url</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
-
-<h4 class="subsection">0.1.1 update-leap help/usage (<span class="option">--help</span>)</h4>
-
-<p><a name="index-update_002dleap-help-3"></a>
-This is the automatically generated usage text for update-leap.
-
- <p>The text printed is the same whether selected with the <code>help</code> option
-(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
-the usage text by passing it through a pager program.
+<a name="update_002dleap-help_002fusage-_0028_002d_002dhelp_0029"></a>
+<h4 class="subsection">1.1 update-leap help/usage (<samp>--help</samp>)</h4>
+<a name="index-update_002dleap-help"></a>
+
+<p>This is the automatically generated usage text for update-leap.
+</p>
+<p>The text printed is the same whether selected with the <code>help</code> option
+(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>). <code>more-help</code> will print
+the usage text by passing it through a pager program.
<code>more-help</code> is disabled on platforms without a working
<code>fork(2)</code> function. The <code>PAGER</code> environment variable is
-used to select the program, defaulting to <span class="file">more</span>. Both will exit
+used to select the program, defaulting to <samp>more</samp>. Both will exit
with a status code of 0.
-
+</p>
+<div class="example">
<pre class="example">
-</pre>
- <div class="node">
-<p><hr>
-<a name="update_002dleap-source_002durl"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-ipv4">update-leap ipv4</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-usage">update-leap usage</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
-</div>
-<h4 class="subsection">0.1.2 source-url option (-s)</h4>
+Usage: update-leap [options]
+
+Verifies and if necessary, updates leap-second definition file
+
+All arguments are optional: Default (or current value) shown:
+ -C Absolute path to CA Cert (see SSL/TLS Considerations)
+ -D Path to a CAdir (see SSL/TLS Considerations)
+ -e Specify how long (in days) before expiration the file is to be
+ refreshed. Note that larger values imply more frequent refreshes.
+ 60
+ -F Force update even if current file is OK and not close to expiring.
+ -f Absolute path ntp.conf file (default /etc/ntp.conf)
+ /etc/ntp.conf
+ -h show help
+ -i Specify number of minutes between retries
+ 10
+ -L Absolute path to leapfile on the local system
+ (overrides value in ntp.conf)
+ -l Specify the syslog(3) facility for logging
+ LOG_USER
+ -q Only report errors (cannot be used with -v)
+ -r Specify number of attempts to retrieve file
+ 6
+ -s Send output to syslog(3) - implied if STDOUT has no tty or redirected
+ -t Send output to terminal - implied if STDOUT attached to terminal
+ -u Specify the URL of the master copy to download
+ https://www.ietf.org/timezones/data/leap-seconds.list
+ -v Verbose - show debug messages (cannot be used with -q)
+
+The following options are not (yet) implemented in the perl version:
+ -4 Use only IPv4
+ -6 Use only IPv6
+ -c Command to restart NTP after installing a new file
+ <none> - ntpd checks file daily
+ -p 4|6
+ Prefer IPv4 or IPv6 (as specified) addresses, but use either
+
+update-leap will validate the file currently on the local system.
+
+Ordinarily, the leapfile is found using the 'leapfile' directive in
+/etc/ntp.conf. However, an alternate location can be specified on the
+command line with the -L flag.
+
+If the leapfile does not exist, is not valid, has expired, or is
+expiring soon, a new copy will be downloaded. If the new copy is
+valid, it is installed.
+
+If the current file is acceptable, no download or restart occurs.
+
+This can be run as a cron job. As the file is rarely updated, and
+leap seconds are announced at least one month in advance (usually
+longer), it need not be run more frequently than about once every
+three weeks.
+
+SSL/TLS Considerations
+-----------------------
+The perl modules can usually locate the CA certificate used to verify
+the peer's identity.
+
+On BSDs, the default is typically the file /etc/ssl/certs.pem. On
+Linux, the location is typically a path to a CAdir - a directory of
+symlinks named according to a hash of the certificates' subject names.
+
+The -C or -D options are available to pass in a location if no CA cert
+is found in the default location.
+
+External Dependencies
+---------------------
+The following perl modules are required:
+HTTP::Tiny - version >= 0.056
+IO::Socket::SSL - version >= 1.56
+NET::SSLeay - version >= 1.49
+
+Version: 1.004
+</pre></div>
+
+<hr>
+<a name="update_002dleap-source_002durl"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-ipv4" accesskey="n" rel="next">update-leap ipv4</a>, Previous: <a href="#update_002dleap-usage" accesskey="p" rel="prev">update-leap usage</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
+</div>
+<a name="source_002durl-option-_0028_002ds_0029"></a>
+<h4 class="subsection">1.2 source-url option (-s)</h4>
+<a name="index-update_002dleap_002dsource_002durl"></a>
-<p><a name="index-update_002dleap_002dsource_002durl-4"></a>
-This is the “the url of the master copy of the leapseconds file” option.
-This option takes a string argument.
+<p>This is the “the url of the master copy of the leapseconds file” option.
+This option takes a string argument.
Specify the URL of the master copy to download
$LEAPSRC
-<div class="node">
-<p><hr>
-<a name="update_002dleap-ipv4"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-destination">update-leap destination</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-source_002durl">update-leap source-url</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+</p><hr>
+<a name="update_002dleap-ipv4"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-destination" accesskey="n" rel="next">update-leap destination</a>, Previous: <a href="#update_002dleap-source_002durl" accesskey="p" rel="prev">update-leap source-url</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
-
-<h4 class="subsection">0.1.3 ipv4 option (-4)</h4>
-
-<p><a name="index-update_002dleap_002dipv4-5"></a>
-This is the “use only ipv4 addresses for dns name resolution” option.
-
-<p class="noindent">This option has some usage constraints. It:
- <ul>
-<li>must not appear in combination with any of the following options:
-ipv6.
-</ul>
-
- <p>Force DNS resolution of following host names on the command line
- to the IPv4 namespace.
+<a name="ipv4-option-_0028_002d4_0029"></a>
+<h4 class="subsection">1.3 ipv4 option (-4)</h4>
+<a name="index-update_002dleap_002dipv4"></a>
+
+<p>This is the “use only ipv4 addresses for dns name resolution” option.
+</p>
+<p>This option has some usage constraints. It:
+</p><ul>
+<li> must not appear in combination with any of the following options:
+ipv6.
+</li></ul>
+
+<p>Force DNS resolution of following host names on the command line
+ to the IPv4 namespace.
_EndOfDoc_;
;
-
- <p>flag =
+</p>
+<p>flag =
name = ipv6;
flags-cant = ipv4, prefer;
value = 6;
- descrip = "Use only IPv6 addresses for DNS name resolution";
+ descrip = "Use only IPv6 addresses for DNS name resolution";
doc = <<- _EndOfDoc_
Force DNS resolution of following host names on the command line
- to the IPv6 namespace.
+ to the IPv6 namespace.
_EndOfDoc_;
;
-
- <p>flag =
+</p>
+<p>flag =
name = prefer;
flags-cant = ipv4, ipv6;
value = p;
arg-type = keyword;
keyword = 4, 6;
- descrip = 'Prefer IPv4 or IPv6 (as specified) addresses, but use either';
+ descrip = ’Prefer IPv4 or IPv6 (as specified) addresses, but use either’;
doc = <<- _EndOfDoc_
-Prefer IPv4 or IPv6 (as specified) addresses, but use either.
-<div class="node">
-<p><hr>
-<a name="update_002dleap-destination"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-expiration">update-leap expiration</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ipv4">update-leap ipv4</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+Prefer IPv4 or IPv6 (as specified) addresses, but use either.
+</p><hr>
+<a name="update_002dleap-destination"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-expiration" accesskey="n" rel="next">update-leap expiration</a>, Previous: <a href="#update_002dleap-ipv4" accesskey="p" rel="prev">update-leap ipv4</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
+<a name="destination-option-_0028_002dd_0029"></a>
+<h4 class="subsection">1.4 destination option (-d)</h4>
+<a name="index-update_002dleap_002ddestination"></a>
-<h4 class="subsection">0.1.4 destination option (-d)</h4>
-
-<p><a name="index-update_002dleap_002ddestination-6"></a>
-This is the “filename on the local system” option.
-This option takes a string argument <span class="file">float</span>.
-The name to use to store the leapfile on the local system.
+<p>This is the “filename on the local system” option.
+This option takes a string argument <samp>float</samp>.
+The name to use to store the leapfile on the local system.
$LEAPFILE
-<div class="node">
-<p><hr>
-<a name="update_002dleap-expiration"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-destination">update-leap destination</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+</p><hr>
+<a name="update_002dleap-expiration"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-ntp_002dconf_002dfile" accesskey="n" rel="next">update-leap ntp-conf-file</a>, Previous: <a href="#update_002dleap-destination" accesskey="p" rel="prev">update-leap destination</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
+<a name="expiration-option-_0028_002de_0029"></a>
+<h4 class="subsection">1.5 expiration option (-e)</h4>
+<a name="index-update_002dleap_002dexpiration"></a>
-<h4 class="subsection">0.1.5 expiration option (-e)</h4>
-
-<p><a name="index-update_002dleap_002dexpiration-7"></a>
-This is the “refresh the leapfile this long before it expires” option.
-This option takes a string argument.
+<p>This is the “refresh the leapfile this long before it expires” option.
+This option takes a string argument.
Specify how long before expiration the file is to be refreshed
-Units are required, e.g. "-e 60 days" Note that larger values
-imply more frequent refreshes.
-"$PREFETCH"
-<div class="node">
-<p><hr>
-<a name="update_002dleap-ntp_002dconf_002dfile"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-expiration">update-leap expiration</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+Units are required, e.g. "-e 60 days" Note that larger values
+imply more frequent refreshes.
+"$PREFETCH"
+</p><hr>
+<a name="update_002dleap-ntp_002dconf_002dfile"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-force_002dupdate" accesskey="n" rel="next">update-leap force-update</a>, Previous: <a href="#update_002dleap-expiration" accesskey="p" rel="prev">update-leap expiration</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
+<a name="ntp_002dconf_002dfile-option-_0028_002df_0029"></a>
+<h4 class="subsection">1.6 ntp-conf-file option (-f)</h4>
+<a name="index-update_002dleap_002dntp_002dconf_002dfile"></a>
-<h4 class="subsection">0.1.6 ntp-conf-file option (-f)</h4>
-
-<p><a name="index-update_002dleap_002dntp_002dconf_002dfile-8"></a>
-This is the “location of the ntp.conf file” option.
-This option takes a string argument.
+<p>This is the “location of the ntp.conf file” option.
+This option takes a string argument.
Specify location of ntp.conf (used to make sure leapfile directive is
present and to default leapfile)
/etc/ntp.conf
-<div class="node">
-<p><hr>
-<a name="update_002dleap-force_002dupdate"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-exit-status">update-leap exit status</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-ntp_002dconf_002dfile">update-leap ntp-conf-file</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+</p><hr>
+<a name="update_002dleap-force_002dupdate"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-exit-status" accesskey="n" rel="next">update-leap exit status</a>, Previous: <a href="#update_002dleap-ntp_002dconf_002dfile" accesskey="p" rel="prev">update-leap ntp-conf-file</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
-
-<h4 class="subsection">0.1.7 force-update option (-F)</h4>
-
-<p><a name="index-update_002dleap_002dforce_002dupdate-9"></a>
-This is the “force update of the leapfile” option.
-Force update even if current file is OK and not close to expiring.
-<div class="node">
-<p><hr>
-<a name="update_002dleap-exit-status"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Usage">update-leap Usage</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-force_002dupdate">update-leap force-update</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+<a name="force_002dupdate-option-_0028_002dF_0029"></a>
+<h4 class="subsection">1.7 force-update option (-F)</h4>
+<a name="index-update_002dleap_002dforce_002dupdate"></a>
+
+<p>This is the “force update of the leapfile” option.
+Force update even if current file is OK and not close to expiring.
+</p><hr>
+<a name="update_002dleap-exit-status"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-Usage" accesskey="n" rel="next">update-leap Usage</a>, Previous: <a href="#update_002dleap-force_002dupdate" accesskey="p" rel="prev">update-leap force-update</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
-
-<h4 class="subsection">0.1.8 update-leap exit status</h4>
+<a name="update_002dleap-exit-status-1"></a>
+<h4 class="subsection">1.8 update-leap exit status</h4>
<p>One of the following exit values will be returned:
- <dl>
-<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
-<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
+</p><dl compact="compact">
+<dt>‘<samp>0 (EXIT_SUCCESS)</samp>’</dt>
+<dd><p>Successful program execution.
+</p></dd>
+<dt>‘<samp>1 (EXIT_FAILURE)</samp>’</dt>
+<dd><p>The operation failed or the command syntax was not valid.
+</p></dd>
</dl>
- <div class="node">
-<p><hr>
-<a name="update_002dleap-Usage"></a>Next: <a rel="next" accesskey="n" href="#update_002dleap-Authors">update-leap Authors</a>,
-Previous: <a rel="previous" accesskey="p" href="#update_002dleap-exit-status">update-leap exit status</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+<hr>
+<a name="update_002dleap-Usage"></a>
+<div class="header">
+<p>
+Next: <a href="#update_002dleap-Authors" accesskey="n" rel="next">update-leap Authors</a>, Previous: <a href="#update_002dleap-exit-status" accesskey="p" rel="prev">update-leap exit status</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
-
-<h4 class="subsection">0.1.9 update-leap Usage</h4>
-
-<div class="node">
-<p><hr>
-<a name="update_002dleap-Authors"></a>Previous: <a rel="previous" accesskey="p" href="#update_002dleap-Usage">update-leap Usage</a>,
-Up: <a rel="up" accesskey="u" href="#update_002dleap-Invocation">update-leap Invocation</a>
-<br>
+<a name="update_002dleap-Usage-1"></a>
+<h4 class="subsection">1.9 update-leap Usage</h4>
+<hr>
+<a name="update_002dleap-Authors"></a>
+<div class="header">
+<p>
+Previous: <a href="#update_002dleap-Usage" accesskey="p" rel="prev">update-leap Usage</a>, Up: <a href="#update_002dleap-Invocation" accesskey="u" rel="up">update-leap Invocation</a> </p>
</div>
+<a name="update_002dleap-Authors-1"></a>
+<h4 class="subsection">1.10 update-leap Authors</h4>
+<hr>
-<h4 class="subsection">0.1.10 update-leap Authors</h4>
-</body></html>
+</body>
+</html>
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH update-leap 1update-leapman "27 Feb 2018" "ntp (4.2.8p11)" "User Commands"
+.TH update-leap 1update-leapman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-cKaOWT/ag-pKaWVT)
+.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 10:50:15 AM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:14 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
-.Dd February 27 2018
+.Dd June 6 2019
.Dt UPDATE_LEAP 1update-leapmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (update-leap-opts.mdoc)
.\"
-.\" It has been AutoGen-ed February 27, 2018 at 04:55:53 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:36:11 PM by AutoGen 5.18.5
.\" From the definitions update-leap-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
#
# EDIT THIS FILE WITH CAUTION (invoke-sntp.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:30:22 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:18:00 PM by AutoGen 5.18.5
# From the definitions sntp-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@exampleindent 0
@example
-sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p11
+sntp - standard Simple Network Time Protocol client program - Ver. 4.3.97
Usage: sntp [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.c)
*
- * It has been AutoGen-ed June 6, 2019 at 05:18:34 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:17:56 PM by AutoGen 5.18.5
* From the definitions sntp-opts.def
* and the template file options
*
/**
* static const strings for sntp options
*/
-static char const sntp_opt_strs[2546] =
-/* 0 */ "sntp 4.3.96\n"
+static char const sntp_opt_strs[2560] =
+/* 0 */ "sntp 4.3.97\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
/* 1535 */ "Look in this file for the key specified with -a\0"
/* 1583 */ "KEYFILE\0"
/* 1591 */ "keyfile\0"
-/* 1599 */ "Log to specified logfile\0"
-/* 1624 */ "LOGFILE\0"
-/* 1632 */ "logfile\0"
-/* 1640 */ "Adjustments less than steplimit msec will be slewed\0"
-/* 1692 */ "STEPLIMIT\0"
-/* 1702 */ "steplimit\0"
-/* 1712 */ "Send int as our NTP protocol version\0"
-/* 1749 */ "NTPVERSION\0"
-/* 1760 */ "ntpversion\0"
-/* 1771 */ "Use the NTP Reserved Port (port 123)\0"
-/* 1808 */ "USERESERVEDPORT\0"
-/* 1824 */ "usereservedport\0"
-/* 1840 */ "OK to 'step' the time with settimeofday(2)\0"
-/* 1883 */ "STEP\0"
-/* 1888 */ "step\0"
-/* 1893 */ "OK to 'slew' the time with adjtime(2)\0"
-/* 1931 */ "SLEW\0"
-/* 1936 */ "slew\0"
-/* 1941 */ "The number of seconds to wait for responses\0"
-/* 1985 */ "TIMEOUT\0"
-/* 1993 */ "timeout\0"
-/* 2001 */ "Wait for pending replies (if not setting the time)\0"
-/* 2052 */ "WAIT\0"
-/* 2057 */ "no-wait\0"
-/* 2065 */ "no\0"
-/* 2068 */ "display extended usage information and exit\0"
-/* 2112 */ "help\0"
-/* 2117 */ "extended usage information passed thru pager\0"
-/* 2162 */ "more-help\0"
-/* 2172 */ "output version information and exit\0"
-/* 2208 */ "version\0"
-/* 2216 */ "save the option state to a config file\0"
-/* 2255 */ "save-opts\0"
-/* 2265 */ "load options from a config file\0"
-/* 2297 */ "LOAD_OPTS\0"
-/* 2307 */ "no-load-opts\0"
-/* 2320 */ "SNTP\0"
-/* 2325 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.3.96\n"
+/* 1599 */ "/etc/ntp.keys\0"
+/* 1613 */ "Log to specified logfile\0"
+/* 1638 */ "LOGFILE\0"
+/* 1646 */ "logfile\0"
+/* 1654 */ "Adjustments less than steplimit msec will be slewed\0"
+/* 1706 */ "STEPLIMIT\0"
+/* 1716 */ "steplimit\0"
+/* 1726 */ "Send int as our NTP protocol version\0"
+/* 1763 */ "NTPVERSION\0"
+/* 1774 */ "ntpversion\0"
+/* 1785 */ "Use the NTP Reserved Port (port 123)\0"
+/* 1822 */ "USERESERVEDPORT\0"
+/* 1838 */ "usereservedport\0"
+/* 1854 */ "OK to 'step' the time with settimeofday(2)\0"
+/* 1897 */ "STEP\0"
+/* 1902 */ "step\0"
+/* 1907 */ "OK to 'slew' the time with adjtime(2)\0"
+/* 1945 */ "SLEW\0"
+/* 1950 */ "slew\0"
+/* 1955 */ "The number of seconds to wait for responses\0"
+/* 1999 */ "TIMEOUT\0"
+/* 2007 */ "timeout\0"
+/* 2015 */ "Wait for pending replies (if not setting the time)\0"
+/* 2066 */ "WAIT\0"
+/* 2071 */ "no-wait\0"
+/* 2079 */ "no\0"
+/* 2082 */ "display extended usage information and exit\0"
+/* 2126 */ "help\0"
+/* 2131 */ "extended usage information passed thru pager\0"
+/* 2176 */ "more-help\0"
+/* 2186 */ "output version information and exit\0"
+/* 2222 */ "version\0"
+/* 2230 */ "save the option state to a config file\0"
+/* 2269 */ "save-opts\0"
+/* 2279 */ "load options from a config file\0"
+/* 2311 */ "LOAD_OPTS\0"
+/* 2321 */ "no-load-opts\0"
+/* 2334 */ "SNTP\0"
+/* 2339 */ "sntp - standard Simple Network Time Protocol client program - Ver. 4.3.97\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ hostname-or-IP ...]\n\0"
-/* 2483 */ "$HOME\0"
-/* 2489 */ ".\0"
-/* 2491 */ ".ntprc\0"
-/* 2498 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2532 */ "\n\0"
-/* 2534 */ "sntp 4.3.96";
+/* 2497 */ "$HOME\0"
+/* 2503 */ ".\0"
+/* 2505 */ ".ntprc\0"
+/* 2512 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2546 */ "\n\0"
+/* 2548 */ "sntp 4.3.97";
/**
* ipv4 option description with
#define KEYFILE_NAME (sntp_opt_strs+1583)
/** Name string for the keyfile option */
#define KEYFILE_name (sntp_opt_strs+1591)
+/** The compiled in default value for the keyfile option argument */
+#define KEYFILE_DFT_ARG (sntp_opt_strs+1599)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (sntp_opt_strs+1599)
+#define LOGFILE_DESC (sntp_opt_strs+1613)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (sntp_opt_strs+1624)
+#define LOGFILE_NAME (sntp_opt_strs+1638)
/** Name string for the logfile option */
-#define LOGFILE_name (sntp_opt_strs+1632)
+#define LOGFILE_name (sntp_opt_strs+1646)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
* steplimit option description:
*/
/** Descriptive text for the steplimit option */
-#define STEPLIMIT_DESC (sntp_opt_strs+1640)
+#define STEPLIMIT_DESC (sntp_opt_strs+1654)
/** Upper-cased name for the steplimit option */
-#define STEPLIMIT_NAME (sntp_opt_strs+1692)
+#define STEPLIMIT_NAME (sntp_opt_strs+1706)
/** Name string for the steplimit option */
-#define STEPLIMIT_name (sntp_opt_strs+1702)
+#define STEPLIMIT_name (sntp_opt_strs+1716)
/** Compiled in flag settings for the steplimit option */
#define STEPLIMIT_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
* ntpversion option description:
*/
/** Descriptive text for the ntpversion option */
-#define NTPVERSION_DESC (sntp_opt_strs+1712)
+#define NTPVERSION_DESC (sntp_opt_strs+1726)
/** Upper-cased name for the ntpversion option */
-#define NTPVERSION_NAME (sntp_opt_strs+1749)
+#define NTPVERSION_NAME (sntp_opt_strs+1763)
/** Name string for the ntpversion option */
-#define NTPVERSION_name (sntp_opt_strs+1760)
+#define NTPVERSION_name (sntp_opt_strs+1774)
/** The compiled in default value for the ntpversion option argument */
#define NTPVERSION_DFT_ARG ((char const*)4)
/** Compiled in flag settings for the ntpversion option */
* usereservedport option description:
*/
/** Descriptive text for the usereservedport option */
-#define USERESERVEDPORT_DESC (sntp_opt_strs+1771)
+#define USERESERVEDPORT_DESC (sntp_opt_strs+1785)
/** Upper-cased name for the usereservedport option */
-#define USERESERVEDPORT_NAME (sntp_opt_strs+1808)
+#define USERESERVEDPORT_NAME (sntp_opt_strs+1822)
/** Name string for the usereservedport option */
-#define USERESERVEDPORT_name (sntp_opt_strs+1824)
+#define USERESERVEDPORT_name (sntp_opt_strs+1838)
/** Compiled in flag settings for the usereservedport option */
#define USERESERVEDPORT_FLAGS (OPTST_DISABLED)
* step option description:
*/
/** Descriptive text for the step option */
-#define STEP_DESC (sntp_opt_strs+1840)
+#define STEP_DESC (sntp_opt_strs+1854)
/** Upper-cased name for the step option */
-#define STEP_NAME (sntp_opt_strs+1883)
+#define STEP_NAME (sntp_opt_strs+1897)
/** Name string for the step option */
-#define STEP_name (sntp_opt_strs+1888)
+#define STEP_name (sntp_opt_strs+1902)
/** Compiled in flag settings for the step option */
#define STEP_FLAGS (OPTST_DISABLED)
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (sntp_opt_strs+1893)
+#define SLEW_DESC (sntp_opt_strs+1907)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (sntp_opt_strs+1931)
+#define SLEW_NAME (sntp_opt_strs+1945)
/** Name string for the slew option */
-#define SLEW_name (sntp_opt_strs+1936)
+#define SLEW_name (sntp_opt_strs+1950)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
* timeout option description:
*/
/** Descriptive text for the timeout option */
-#define TIMEOUT_DESC (sntp_opt_strs+1941)
+#define TIMEOUT_DESC (sntp_opt_strs+1955)
/** Upper-cased name for the timeout option */
-#define TIMEOUT_NAME (sntp_opt_strs+1985)
+#define TIMEOUT_NAME (sntp_opt_strs+1999)
/** Name string for the timeout option */
-#define TIMEOUT_name (sntp_opt_strs+1993)
+#define TIMEOUT_name (sntp_opt_strs+2007)
/** The compiled in default value for the timeout option argument */
#define TIMEOUT_DFT_ARG ((char const*)5)
/** Compiled in flag settings for the timeout option */
* wait option description:
*/
/** Descriptive text for the wait option */
-#define WAIT_DESC (sntp_opt_strs+2001)
+#define WAIT_DESC (sntp_opt_strs+2015)
/** Upper-cased name for the wait option */
-#define WAIT_NAME (sntp_opt_strs+2052)
+#define WAIT_NAME (sntp_opt_strs+2066)
/** disablement name for the wait option */
-#define NOT_WAIT_name (sntp_opt_strs+2057)
+#define NOT_WAIT_name (sntp_opt_strs+2071)
/** disablement prefix for the wait option */
-#define NOT_WAIT_PFX (sntp_opt_strs+2065)
+#define NOT_WAIT_PFX (sntp_opt_strs+2079)
/** Name string for the wait option */
#define WAIT_name (NOT_WAIT_name + 3)
/** Compiled in flag settings for the wait option */
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (sntp_opt_strs+2068)
-#define HELP_name (sntp_opt_strs+2112)
+#define HELP_DESC (sntp_opt_strs+2082)
+#define HELP_name (sntp_opt_strs+2126)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (sntp_opt_strs+2117)
-#define MORE_HELP_name (sntp_opt_strs+2162)
+#define MORE_HELP_DESC (sntp_opt_strs+2131)
+#define MORE_HELP_name (sntp_opt_strs+2176)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (sntp_opt_strs+2172)
-#define VER_name (sntp_opt_strs+2208)
-#define SAVE_OPTS_DESC (sntp_opt_strs+2216)
-#define SAVE_OPTS_name (sntp_opt_strs+2255)
-#define LOAD_OPTS_DESC (sntp_opt_strs+2265)
-#define LOAD_OPTS_NAME (sntp_opt_strs+2297)
-#define NO_LOAD_OPTS_name (sntp_opt_strs+2307)
-#define LOAD_OPTS_pfx (sntp_opt_strs+2065)
+#define VER_DESC (sntp_opt_strs+2186)
+#define VER_name (sntp_opt_strs+2222)
+#define SAVE_OPTS_DESC (sntp_opt_strs+2230)
+#define SAVE_OPTS_name (sntp_opt_strs+2269)
+#define LOAD_OPTS_DESC (sntp_opt_strs+2279)
+#define LOAD_OPTS_NAME (sntp_opt_strs+2311)
+#define NO_LOAD_OPTS_name (sntp_opt_strs+2321)
+#define LOAD_OPTS_pfx (sntp_opt_strs+2079)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --keyfile */
+ /* last opt argumnt */ { KEYFILE_DFT_ARG },
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ doOptKeyfile,
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of sntp. */
-#define zPROGNAME (sntp_opt_strs+2320)
+#define zPROGNAME (sntp_opt_strs+2334)
/** Reference to the title line for sntp usage. */
-#define zUsageTitle (sntp_opt_strs+2325)
+#define zUsageTitle (sntp_opt_strs+2339)
/** sntp configuration file name. */
-#define zRcName (sntp_opt_strs+2491)
+#define zRcName (sntp_opt_strs+2505)
/** Directories to search for sntp config files. */
static char const * const apzHomeList[3] = {
- sntp_opt_strs+2483,
- sntp_opt_strs+2489,
+ sntp_opt_strs+2497,
+ sntp_opt_strs+2503,
NULL };
/** The sntp program bug email address. */
-#define zBugsAddr (sntp_opt_strs+2498)
+#define zBugsAddr (sntp_opt_strs+2512)
/** Clarification/explanation of what sntp does. */
-#define zExplain (sntp_opt_strs+2532)
+#define zExplain (sntp_opt_strs+2546)
/** Extra detail explaining what sntp does. */
#define zDetail (NULL)
/** The full version string for sntp. */
-#define zFullVersion (sntp_opt_strs+2534)
+#define zFullVersion (sntp_opt_strs+2548)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
translate option names.
*/
/* referenced via sntpOptions.pzCopyright */
- puts(_("sntp 4.3.96\n\
+ puts(_("sntp 4.3.97\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
puts(_("load options from a config file"));
/* referenced via sntpOptions.pzUsageTitle */
- puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.3.96\n\
+ puts(_("sntp - standard Simple Network Time Protocol client program - Ver. 4.3.97\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ hostname-or-IP ...]\n"));
puts(_("\n"));
/* referenced via sntpOptions.pzFullVersion */
- puts(_("sntp 4.3.96"));
+ puts(_("sntp 4.3.97"));
/* referenced via sntpOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
/*
* EDIT THIS FILE WITH CAUTION (sntp-opts.h)
*
- * It has been AutoGen-ed June 6, 2019 at 05:18:34 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:17:56 PM by AutoGen 5.18.5
* From the definitions sntp-opts.def
* and the template file options
*
/** count of all options for sntp */
#define OPTION_CT 23
/** sntp version */
-#define SNTP_VERSION "4.3.96"
+#define SNTP_VERSION "4.3.97"
/** Full sntp version text */
-#define SNTP_FULL_VERSION "sntp 4.3.96"
+#define SNTP_FULL_VERSION "sntp 4.3.97"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp 1sntpman "06 Jun 2019" "4.3.96" "User Commands"
+.TH sntp 1sntpman "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:22 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:01 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
Look in this file for the key specified with \fB-a\fP.
+The default
+\f\*[I-Font]file\-name\f[]
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB-a\fP
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:22 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:17:58 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
warning message will be displayed. The file will not be created.
.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
Look in this file for the key specified with \fB\-a\fP.
+The default
+.Ar file\-name
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB\-a\fP
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
</p>
-<p>This document applies to version 4.3.96 of <code>sntp</code>.
+<p>This document applies to version 4.3.97 of <code>sntp</code>.
</p>
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
with a status code of 0.
</p>
<div class="example">
-<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p11
+<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.3.97
Usage: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
[ hostname-or-IP ...]
Flg Arg Option-Name Description
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH sntp @SNTP_MS@ "06 Jun 2019" "4.3.96" "User Commands"
+.TH sntp @SNTP_MS@ "06 Jun 2019" "4.3.97" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:22 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:18:01 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]file\-name\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]file\-name\f[]
Look in this file for the key specified with \fB-a\fP.
+The default
+\f\*[I-Font]file\-name\f[]
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB-a\fP
.Os
.\" EDIT THIS FILE WITH CAUTION (sntp-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:30:22 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:17:58 PM by AutoGen 5.18.5
.\" From the definitions sntp-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
warning message will be displayed. The file will not be created.
.It Fl k Ar file\-name , Fl \-keyfile Ns = Ns Ar file\-name
Look in this file for the key specified with \fB\-a\fP.
+The default
+.Ar file\-name
+for this option is:
+.ti +4
+ /etc/ntp.keys
.sp
This option specifies the keyfile.
\fBsntp\fP will search for the key specified with \fB\-a\fP
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp-keygen.texi)
#
-# It has been AutoGen-ed June 6, 2019 at 05:31:04 PM by AutoGen 5.18.5
+# It has been AutoGen-ed June 6, 2019 at 11:19:28 PM by AutoGen 5.18.5
# From the definitions ntp-keygen-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
This program generates cryptographic data files used by the NTPv4
authentication and identification schemes.
-It generates MD5 key files used in symmetric key cryptography.
-In addition, if the OpenSSL software library has been installed,
-it generates keys, certificate and identity files used in public key
-cryptography.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software library has been installed, it can generate host keys,
+signing keys, certificates, and identity keys and parameters used in Autokey
+public key cryptography.
These files are used for cookie encryption,
-digital signature and challenge/response identification algorithms
+digital signature, and challenge/response identification algorithms
compatible with the Internet standard security infrastructure.
-All files are in PEM-encoded printable ASCII format,
-so they can be embedded as MIME attachments in mail to other sites
+The message digest symmetric keys file is generated in a format
+compatible with NTPv3.
+All other files are in PEM-encoded printable ASCII format,
+so they can be embedded as MIME attachments in email to other sites
and certificate authorities.
By default, files are not encrypted.
-When used to generate message digest keys, the program produces a file
-containing ten pseudo-random printable ASCII strings suitable for the
-MD5 message digest algorithm included in the distribution.
+When used to generate message digest symmetric keys, the program
+produces a file containing ten pseudo-random printable ASCII strings
+suitable for the MD5 message digest algorithm included in the
+distribution.
If the OpenSSL library is installed, it produces an additional ten
-hex-encoded random bit strings suitable for the SHA1 and other message
-digest algorithms.
-The message digest keys file must be distributed and stored
+hex-encoded random bit strings suitable for SHA1, AES-128-CMAC, and
+other message digest algorithms.
+The message digest symmetric keys file must be distributed and stored
using secure means beyond the scope of NTP itself.
Besides the keys used for ordinary NTP associations, additional keys
can be defined as passwords for the
Some files used by this program are encrypted using a private password.
The
@code{-p}
-option specifies the password for local encrypted files and the
+option specifies the read password for local encrypted files and the
@code{-q}
-option the password for encrypted files sent to remote sites.
+option the write password for encrypted files sent to remote sites.
If no password is specified, the host name returned by the Unix
-@code{gethostname()}
-function, normally the DNS name of the host is used.
+@code{hostname(1)}
+command, normally the DNS name of the host, is used as the the default read
+password, for convenience.
+The
+@code{ntp-keygen}
+program prompts for the password if it reads an encrypted file
+and the password is missing or incorrect.
+If an encrypted file is read successfully and
+no write password is specified, the read password is used
+as the write password by default.
The
-@kbd{pw}
+@code{pw}
option of the
-@kbd{crypto}
+@code{crypto}
+@code{ntpd(1ntpdmdoc)}
configuration command specifies the read
password for previously encrypted local files.
-This must match the local password used by this program.
+This must match the local read password used by this program.
If not specified, the host name is used.
-Thus, if files are generated by this program without password,
+Thus, if files are generated by this program without an explicit password,
they can be read back by
-@kbd{ntpd}
-without password but only on the same host.
+@code{ntpd(1ntpdmdoc)}
+without specifying an explicit password but only on the same host.
+If the write password used for encryption is specified as the host name,
+these files can be read by that host with no explicit password.
Normally, encrypted files for each host are generated by that host and
used only by that host, although exceptions exist as noted later on
this page.
The symmetric keys file, normally called
-@kbd{ntp.keys},
+@file{ntp.keys},
is usually installed in
@file{/etc}.
Other files and links are usually installed in
@file{/usr/local/etc},
which is normally in a shared filesystem in
NFS-mounted networks and cannot be changed by shared clients.
-The location of the keys directory can be changed by the
-@kbd{keysdir}
-configuration command in such cases.
-Normally, this is in
-@file{/etc}.
+In these cases, NFS clients can specify the files in another
+directory such as
+@file{/etc}
+using the
+@code{keysdir}
+@code{ntpd(1ntpdmdoc)}
+configuration file command.
This program directs commentary and error messages to the standard
error stream
-@kbd{stderr}
+@file{stderr}
and remote files to the standard output stream
-@kbd{stdout}
+@file{stdout}
where they can be piped to other applications or redirected to files.
The names used for generated files and links all begin with the
string
-@kbd{ntpkey}
+@file{ntpkey*}
and include the file type, generating host and filestamp,
as described in the
-@quotedblleft{}Cryptographic Data Files@quotedblright{}
+@ref{Cryptographic Data Files}
section below.
-@subsubsection Running the Program
-To test and gain experience with Autokey concepts, log in as root and
-change to the keys directory, usually
-@file{/usr/local/etc}
-When run for the first time, or if all files with names beginning with
-@kbd{ntpkey}
-have been removed, use the
-@code{ntp-keygen}
-command without arguments to generate a
-default RSA host key and matching RSA-MD5 certificate with expiration
-date one year hence.
-If run again without options, the program uses the
-existing keys and parameters and generates only a new certificate with
-new expiration date one year hence.
-
-Run the command on as many hosts as necessary.
-Designate one of them as the trusted host (TH) using
-@code{ntp-keygen}
-with the
-@code{-T}
-option and configure it to synchronize from reliable Internet servers.
-Then configure the other hosts to synchronize to the TH directly or
-indirectly.
-A certificate trail is created when Autokey asks the immediately
-ascendant host towards the TH to sign its certificate, which is then
-provided to the immediately descendant host on request.
-All group hosts should have acyclic certificate trails ending on the TH.
-
-The host key is used to encrypt the cookie when required and so must be
-RSA type.
-By default, the host key is also the sign key used to encrypt
-signatures.
-A different sign key can be assigned using the
-@code{-S}
-option and this can be either RSA or DSA type.
-By default, the signature
-message digest type is MD5, but any combination of sign key type and
-message digest type supported by the OpenSSL library can be specified
-using the
-@code{-c}
-option.
-The rules say cryptographic media should be generated with proventic
-filestamps, which means the host should already be synchronized before
-this program is run.
-This of course creates a chicken-and-egg problem
-when the host is started for the first time.
-Accordingly, the host time
-should be set by some other means, such as eyeball-and-wristwatch, at
-least so that the certificate lifetime is within the current year.
-After that and when the host is synchronized to a proventic source, the
-certificate should be re-generated.
-
-Additional information on trusted groups and identity schemes is on the
-@quotedblleft{}Autokey Public-Key Authentication@quotedblright{}
-page.
-
-
-
-The
-@code{ntpd(1ntpdmdoc)}
-configuration command
-@code{crypto} @code{pw} @kbd{password}
-specifies the read password for previously encrypted files.
-The daemon expires on the spot if the password is missing
-or incorrect.
-For convenience, if a file has been previously encrypted,
-the default read password is the name of the host running
-the program.
-If the previous write password is specified as the host name,
-these files can be read by that host with no explicit password.
-
-
-File names begin with the prefix
-@code{ntpkey_}
-and end with the postfix
-@kbd{_hostname.filestamp},
-where
-@kbd{hostname}
-is the owner name, usually the string returned
-by the Unix gethostname() routine, and
-@kbd{filestamp}
-is the NTP seconds when the file was generated, in decimal digits.
-This both guarantees uniqueness and simplifies maintenance
-procedures, since all files can be quickly removed
-by a
-@code{rm} @code{ntpkey*}
-command or all files generated
-at a specific time can be removed by a
-@code{rm}
-@kbd{*filestamp}
-command.
-To further reduce the risk of misconfiguration,
-the first two lines of a file contain the file name
-and generation date and time as comments.
-
-All files are installed by default in the keys directory
-@file{/usr/local/etc},
-which is normally in a shared filesystem
-in NFS-mounted networks.
-The actual location of the keys directory
-and each file can be overridden by configuration commands,
-but this is not recommended.
-Normally, the files for each host are generated by that host
-and used only by that host, although exceptions exist
-as noted later on this page.
-
-Normally, files containing private values,
-including the host key, sign key and identification parameters,
-are permitted root read/write-only;
-while others containing public values are permitted world readable.
-Alternatively, files containing private values can be encrypted
-and these files permitted world readable,
-which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
-dependent clients can all be installed in the same shared directory.
-The recommended practice is to keep the file name extensions
-when installing a file and to install a soft link
-from the generic names specified elsewhere on this page
-to the generated files.
-This allows new file generations to be activated simply
-by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
-If a link is not present,
-@code{ntpd(1ntpdmdoc)}
-extracts the filestamp from the file itself.
-This allows clients to verify that the file and generation times
-are always current.
-The
-@code{ntp-keygen}
-program uses the same timestamp extension for all files generated
-at one time, so each generation is distinct and can be readily
-recognized in monitoring data.
-@subsubsection Running the program
+@subsubsection Running the Program
The safest way to run the
@code{ntp-keygen}
program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
+The recommended procedure is change to the
+@kbd{keys}
+directory, usually
@file{/usr/local/etc},
then run the program.
-When run for the first time,
-or if all
-@code{ntpkey}
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
+
+To test and gain experience with Autokey concepts, log in as root and
+change to the
+@kbd{keys}
+directory, usually
+@file{/usr/local/etc}.
+When run for the first time, or if all files with names beginning with
+@file{ntpkey*}
+have been removed, use the
+@code{ntp-keygen}
+command without arguments to generate a default
+@code{RSA}
+host key and matching
+@code{RSA-MD5}
+certificate file with expiration date one year hence,
which is all that is necessary in many cases.
The program also generates soft links from the generic names
to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+If run again without options, the program uses the
+existing keys and parameters and generates a new certificate file with
+new expiration date one year hence, and soft link.
-The host key is used to encrypt the cookie when required and so must be RSA type.
+The host key is used to encrypt the cookie when required and so must be
+@code{RSA}
+type.
By default, the host key is also the sign key used to encrypt signatures.
When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
+either
+@code{RSA}
+or
+@code{DSA}
+type.
+By default, the message digest type is
+@code{MD5},
+but any combination
of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
+can be specified, including those using the
+@code{AES128CMAC}, @code{MD2}, @code{MD5}, @code{MDC2}, @code{SHA}, @code{SHA1}
+and
+@code{RIPE160}
+message digest algorithms.
However, the scheme specified in the certificate must be compatible
with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Certificates using any digest algorithm are compatible with
+@code{RSA}
+sign keys;
+however, only
+@code{SHA}
+and
+@code{SHA1}
+certificates are compatible with
+@code{DSA}
+sign keys.
Private/public key files and certificates are compatible with
other OpenSSL applications and very likely other libraries as well.
as the other files, are probably not compatible with anything other than Autokey.
Running the program as other than root and using the Unix
-@code{su}
+@code{su(1)}
command
to assume root may not work properly, since by default the OpenSSL library
looks for the random seed file
-@code{.rnd}
+@file{.rnd}
in the user home directory.
However, there should be only one
-@code{.rnd},
+@file{.rnd},
most conveniently
in the root directory, so it is convenient to define the
-@code{$RANDFILE}
+.Ev RANDFILE
environment variable used by the OpenSSL library as the path to
-@code{/.rnd}.
+@file{.rnd}.
Installing the keys as root might not work in NFS-mounted
shared file systems, as NFS clients may not be able to write
@file{/etc}
using the
@code{keysdir}
-command.
+@code{ntpd(1ntpdmdoc)}
+configuration file command.
There is no need for one client to read the keys and certificates
of other clients or servers, as these data are obtained automatically
by the Autokey protocol.
The owner name is also used for the host and sign key files,
while the trusted name is used for the identity files.
-
All files are installed by default in the keys directory
@file{/usr/local/etc},
which is normally in a shared filesystem
Alternatively, files containing private values can be encrypted
and these files permitted world readable,
which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
+Since uniqueness is insured by the
+@kbd{hostname}
+and
+@kbd{filestamp}
+file name extensions, the files for an NTP server and
dependent clients can all be installed in the same shared directory.
The recommended practice is to keep the file name extensions
to the generated files.
This allows new file generations to be activated simply
by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
+If a link is present,
+@code{ntpd(1ntpdmdoc)}
+follows it to the file name to extract the
+@kbd{filestamp}.
If a link is not present,
@code{ntpd(1ntpdmdoc)}
-extracts the filestamp from the file itself.
+extracts the
+@kbd{filestamp}
+from the file itself.
This allows clients to verify that the file and generation times
are always current.
The
@code{ntp-keygen}
-program uses the same timestamp extension for all files generated
+program uses the same
+@kbd{filestamp}
+extension for all files generated
at one time, so each generation is distinct and can be readily
recognized in monitoring data.
-@subsubsection Running the program
-The safest way to run the
+
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
@code{ntp-keygen}
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-@file{/usr/local/etc},
-then run the program.
-When run for the first time,
-or if all
-@code{ntpkey}
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
-which is all that is necessary in many cases.
-The program also generates soft links from the generic names
-to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+with the
+@code{-T}
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
-The host key is used to encrypt the cookie when required and so must be RSA type.
-By default, the host key is also the sign key used to encrypt signatures.
-When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
-of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
-However, the scheme specified in the certificate must be compatible
-with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+The host key is used to encrypt the cookie when required and so must be
+RSA type.
+By default, the host key is also the sign key used to encrypt
+signatures.
+A different sign key can be assigned using the
+@code{-S}
+option and this can be either
+@code{RSA}
+or
+@code{DSA}
+type.
+By default, the signature
+message digest type is
+@code{MD5},
+but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+@code{-c}
+option.
-Private/public key files and certificates are compatible with
-other OpenSSL applications and very likely other libraries as well.
-Certificates or certificate requests derived from them should be compatible
-with extant industry practice, although some users might find
-the interpretation of X509v3 extension fields somewhat liberal.
-However, the identification parameter files, although encoded
-as the other files, are probably not compatible with anything other than Autokey.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
-Running the program as other than root and using the Unix
-@code{su}
-command
-to assume root may not work properly, since by default the OpenSSL library
-looks for the random seed file
-@code{.rnd}
-in the user home directory.
-However, there should be only one
-@code{.rnd},
-most conveniently
-in the root directory, so it is convenient to define the
-@code{$RANDFILE}
-environment variable used by the OpenSSL library as the path to
-@code{/.rnd}.
+Additional information on trusted groups and identity schemes is on the
+@quotedblleft{}Autokey Public-Key Authentication@quotedblright{}
+page.
-Installing the keys as root might not work in NFS-mounted
-shared file systems, as NFS clients may not be able to write
-to the shared keys directory, even as root.
-In this case, NFS clients can specify the files in another
-directory such as
-@file{/etc}
-using the
-@code{keysdir}
+File names begin with the prefix
+@file{ntpkey}_
+and end with the suffix
+@file{_}@kbd{hostname}. @kbd{filestamp},
+where
+@kbd{hostname}
+is the owner name, usually the string returned
+by the Unix
+@code{hostname(1)}
+command, and
+@kbd{filestamp}
+is the NTP seconds when the file was generated, in decimal digits.
+This both guarantees uniqueness and simplifies maintenance
+procedures, since all files can be quickly removed
+by a
+@code{rm} @file{ntpkey*}
+command or all files generated
+at a specific time can be removed by a
+@code{rm} @file{*}@kbd{filestamp}
command.
-There is no need for one client to read the keys and certificates
-of other clients or servers, as these data are obtained automatically
-by the Autokey protocol.
-
-Ordinarily, cryptographic files are generated by the host that uses them,
-but it is possible for a trusted agent (TA) to generate these files
-for other hosts; however, in such cases files should always be encrypted.
-The subject name and trusted name default to the hostname
-of the host generating the files, but can be changed by command line options.
-It is convenient to designate the owner name and trusted name
-as the subject and issuer fields, respectively, of the certificate.
-The owner name is also used for the host and sign key files,
-while the trusted name is used for the identity files.
-seconds.
-seconds.
+To further reduce the risk of misconfiguration,
+the first two lines of a file contain the file name
+and generation date and time as comments.
-s Trusted Hosts and Groups
+@subsubsection Trusted Hosts and Groups
Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
@ref{Authentication Options}
section of
@code{ntp.conf(5)}.
-The default cryptotype uses RSA encryption, MD5 message digest
-and TC identification.
+The default cryptotype uses
+@code{RSA}
+encryption,
+@code{MD5}
+message digest
+and
+@code{TC}
+identification.
First, configure a NTP subnet including one or more low-stratum
trusted hosts from which all other hosts derive synchronization
directly or indirectly.
On each trusted host as root, change to the keys directory.
To insure a fresh fileset, remove all
-@code{ntpkey}
+@file{ntpkey}
files.
Then run
@code{ntp-keygen}
@code{RSA}
or
@code{DSA}.
-The most often need to do this is when a DSA-signed certificate is used.
+The most frequent need to do this is when a
+@code{DSA}-signed
+certificate is used.
If it is necessary to use a different certificate scheme than the default,
run
@code{ntp-keygen}
option and selected
@kbd{scheme}
as needed.
-f
+If
@code{ntp-keygen}
is run again without these options, it generates a new certificate
-using the same scheme and sign key.
+using the same scheme and sign key, and soft link.
After setting up the environment it is advisable to update certificates
from time to time, if only to extend the validity interval.
Simply run
@code{ntp-keygen}
with the same flags as before to generate new certificates
-using existing keys.
+using existing keys, and soft links.
However, if the host or sign key is changed,
@code{ntpd(1ntpdmdoc)}
should be restarted.
is restarted, it loads any new files and restarts the protocol.
Other dependent hosts will continue as usual until signatures are refreshed,
at which time the protocol is restarted.
+
@subsubsection Identity Schemes
As mentioned on the Autonomous Authentication page,
-the default TC identity scheme is vulnerable to a middleman attack.
+the default
+@code{TC}
+identity scheme is vulnerable to a middleman attack.
However, there are more secure identity schemes available,
-including PC, IFF, GQ and MV described on the
-"Identification Schemes"
-page
-(maybe available at
-@code{http://www.eecis.udel.edu/%7emills/keygen.html}).
+including
+@code{PC}, @code{IFF}, @code{GQ}
+and
+@code{MV}
+schemes described below.
These schemes are based on a TA, one or more trusted hosts
and some number of nontrusted hosts.
Trusted hosts prove identity using values provided by the TA,
@code{-P}
@code{-p} @kbd{password}
to generate the host key file
-@file{ntpkey_RSAkey_}@kbd{alice.filestamp}
+@file{ntpkey}_ @code{RSA} @file{key_alice.} @kbd{filestamp}
and trusted private certificate file
-@file{ntpkey_RSA-MD5_cert_}@kbd{alice.filestamp}.
+@file{ntpkey}_ @code{RSA-MD5} @code{_} @file{cert_alice.} @kbd{filestamp},
+and soft links.
Copy both files to all group hosts;
they replace the files which would be generated in other schemes.
-On each host bob install a soft link from the generic name
+On each host
+@kbd{bob}
+install a soft link from the generic name
@file{ntpkey_host_}@kbd{bob}
to the host key file and soft link
@file{ntpkey_cert_}@kbd{bob}
by trusted host alice.
In this scheme it is not possible to refresh
either the keys or certificates without copying them
-to all other hosts in the group.
+to all other hosts in the group, and recreating the soft links.
-For the IFF scheme proceed as in the TC scheme to generate keys
+For the
+@code{IFF}
+scheme proceed as in the
+@code{TC}
+scheme to generate keys
and certificates for all group hosts, then for every trusted host in the group,
-generate the IFF parameter file.
+generate the
+@code{IFF}
+parameter file.
On trusted host alice run
@code{ntp-keygen}
@code{-T}
@code{-I}
@code{-p} @kbd{password}
to produce her parameter file
-@file{ntpkey_IFFpar_}@kbd{alice.filestamp},
+@file{ntpkey_IFFpar_alice.}@kbd{filestamp},
which includes both server and client keys.
Copy this file to all group hosts that operate as both servers
and clients and install a soft link from the generic
-@file{ntpkey_iff_}@kbd{alice}
+@file{ntpkey_iff_alice}
to this file.
If there are no hosts restricted to operate only as clients,
there is nothing further to do.
-As the IFF scheme is independent
+As the
+@code{IFF}
+scheme is independent
of keys and certificates, these files can be refreshed as needed.
If a rogue client has the parameter file, it could masquerade
After generating the parameter file, on alice run
@code{ntp-keygen}
@code{-e}
-and pipe the output to a file or mail program.
-Copy or mail this file to all restricted clients.
+and pipe the output to a file or email program.
+Copy or email this file to all restricted clients.
On these clients install a soft link from the generic
-@file{ntpkey_iff_}@kbd{alice}
+@file{ntpkey_iff_alice}
to this file.
To further protect the integrity of the keys,
each file can be encrypted with a secret password.
-For the GQ scheme proceed as in the TC scheme to generate keys
+For the
+@code{GQ}
+scheme proceed as in the
+@code{TC}
+scheme to generate keys
and certificates for all group hosts, then for every trusted host
-in the group, generate the IFF parameter file.
+in the group, generate the
+@code{IFF}
+parameter file.
On trusted host alice run
@code{ntp-keygen}
@code{-T}
@code{-G}
@code{-p} @kbd{password}
to produce her parameter file
-@file{ntpkey_GQpar_}@kbd{alice.filestamp},
+@file{ntpkey_GQpar_alice.}@kbd{filestamp},
which includes both server and client keys.
Copy this file to all group hosts and install a soft link
from the generic
-@file{ntpkey_gq_}@kbd{alice}
+@file{ntpkey_gq_alice}
to this file.
-In addition, on each host bob install a soft link
+In addition, on each host
+@kbd{bob}
+install a soft link
from generic
@file{ntpkey_gq_}@kbd{bob}
to this file.
-As the GQ scheme updates the GQ parameters file and certificate
+As the
+@code{GQ}
+scheme updates the
+@code{GQ}
+parameters file and certificate
at the same time, keys and certificates can be regenerated as needed.
-For the MV scheme, proceed as in the TC scheme to generate keys
+For the
+@code{MV}
+scheme, proceed as in the
+@code{TC}
+scheme to generate keys
and certificates for all group hosts.
For illustration assume trish is the TA, alice one of several trusted hosts
and bob one of her clients.
@kbd{n}
is the number of revokable keys (typically 5) to produce
the parameter file
-@file{ntpkeys_MVpar_}@kbd{trish.filestamp}
+@file{ntpkeys_MVpar_trish.}@kbd{filestamp}
and client key files
-@file{ntpkeys_MVkeyd_}@kbd{trish.filestamp}
+@file{ntpkeys_MVkey}@kbd{d} @kbd{_} @file{trish.} @kbd{filestamp}
where
@kbd{d}
is the key number (0 <
@kbd{n}).
Copy the parameter file to alice and install a soft link
from the generic
-@file{ntpkey_mv_}@kbd{alice}
+@file{ntpkey_mv_alice}
to this file.
Copy one of the client key files to alice for later distribution
to her clients.
-It doesn't matter which client key file goes to alice,
+It does not matter which client key file goes to alice,
since they all work the same way.
-Alice copies the client key file to all of her cliens.
+Alice copies the client key file to all of her clients.
On client bob install a soft link from generic
-@file{ntpkey_mvkey_}@kbd{bob}
+@file{ntpkey_mvkey_bob}
to the client key file.
-As the MV scheme is independent of keys and certificates,
+As the
+@code{MV}
+scheme is independent of keys and certificates,
these files can be refreshed as needed.
+
@subsubsection Command Line Options
@table @asis
-@item @code{-c} @kbd{scheme}
-Select certificate message digest/signature encryption scheme.
+@item @code{-b} @code{--imbits}= @kbd{modulus}
+Set the number of bits in the identity modulus for generating identity keys to
+@kbd{modulus}
+bits.
+The number of bits in the identity modulus defaults to 256, but can be set to
+values from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+@item @code{-c} @code{--certificate}= @kbd{scheme}
+Select certificate signature encryption/message digest scheme.
The
@kbd{scheme}
can be one of the following:
-. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+@code{RSA-MD2}, @code{RSA-MD5}, @code{RSA-MDC2}, @code{RSA-SHA}, @code{RSA-SHA1}, @code{RSA-RIPEMD160}, @code{DSA-SHA},
or
@code{DSA-SHA1}.
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key.
+Note that
+@code{RSA}
+schemes must be used with an
+@code{RSA}
+sign key and
+@code{DSA}
+schemes must be used with a
+@code{DSA}
+sign key.
The default without this option is
@code{RSA-MD5}.
-@item @code{-d}
-Enable debugging.
+If compatibility with FIPS 140-2 is required, either the
+@code{DSA-SHA}
+or
+@code{DSA-SHA1}
+scheme must be used.
+@item @code{-C} @code{--cipher}= @kbd{cipher}
+Select the OpenSSL cipher to encrypt the files containing private keys.
+The default without this option is three-key triple DES in CBC mode,
+@code{des-ede3-cbc}.
+The
+@code{openssl} @code{-h}
+command provided with OpenSSL displays available ciphers.
+@item @code{-d} @code{--debug-level}
+Increase debugging verbosity level.
This option displays the cryptographic data produced in eye-friendly billboards.
-@item @code{-e}
-Write the IFF client keys to the standard output.
-This is intended for automatic key distribution by mail.
-@item @code{-G}
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-@item @code{-g}
-Generate keys for the GQ identification scheme
-using the existing GQ parameters.
-If the GQ parameters do not yet exist, create them first.
-@item @code{-H}
-Generate new host keys, obsoleting any that may exist.
-@item @code{-I}
-Generate parameters for the IFF identification scheme,
-obsoleting any that may exist.
-@item @code{-i} @kbd{name}
-Set the suject name to
-@kbd{name}.
-This is used as the subject field in certificates
-and in the file name for host and sign keys.
-@item @code{-M}
-Generate MD5 keys, obsoleting any that may exist.
-@item @code{-P}
-Generate a private certificate.
+@item @code{-D} @code{--set-debug-level}= @kbd{level}
+Set the debugging verbosity to
+@kbd{level}.
+This option displays the cryptographic data produced in eye-friendly billboards.
+@item @code{-e} @code{--id-key}
+Write the
+@code{IFF}
+or
+@code{GQ}
+public parameters from the
+@kbd{IFFkey} @kbd{or} @kbd{GQkey}
+client keys file previously specified
+as unencrypted data to the standard output stream
+@file{stdout}.
+This is intended for automatic key distribution by email.
+@item @code{-G} @code{--gq-params}
+Generate a new encrypted
+@code{GQ}
+parameters and key file for the Guillou-Quisquater (GQ) identity scheme.
+This option is mutually exclusive with the
+@code{-I}
+and
+@code{-V}
+options.
+@item @code{-H} @code{--host-key}
+Generate a new encrypted
+@code{RSA}
+public/private host key file.
+@item @code{-I} @code{--iffkey}
+Generate a new encrypted
+@code{IFF}
+key file for the Schnorr (IFF) identity scheme.
+This option is mutually exclusive with the
+@code{-G}
+and
+Fl V
+options.
+@item @code{-i} @code{--ident}= @kbd{group}
+Set the optional Autokey group name to
+@kbd{group}.
+This is used in the identity scheme parameter file names of
+@code{IFF}, @code{GQ},
+and
+@code{MV}
+client parameters files.
+In that role, the default is the host name if no group is provided.
+The group name, if specified using
+@code{-i}
+or
+@code{-s}
+following an
+@quoteleft{}@@@quoteright{}
+character, is also used in certificate subject and issuer names in the form
+@kbd{host} @kbd{@@} @kbd{group}
+and should match the group specified via
+@code{crypto} @code{ident}
+or
+@code{server} @code{ident}
+in the ntpd configuration file.
+@item @code{-l} @code{--lifetime}= @kbd{days}
+Set the lifetime for certificate expiration to
+@kbd{days}.
+The default lifetime is one year (365 days).
+@item @code{-m} @code{--modulus}= @kbd{bits}
+Set the number of bits in the prime modulus for generating files to
+@kbd{bits}.
+The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+@item @code{-M} @code{--md5key}
+Generate a new symmetric keys file containing 10
+@code{MD5}
+keys, and if OpenSSL is available, 10
+@code{SHA}
+keys.
+An
+@code{MD5}
+key is a string of 20 random printable ASCII characters, while a
+@code{SHA}
+key is a string of 40 random hex digits.
+The file can be edited using a text editor to change the key type or key content.
+This option is mutually exclusive with all other options.
+@item @code{-p} @code{--password}= @kbd{passwd}
+Set the password for reading and writing encrypted files to
+@kbd{passwd}.
+These include the host, sign and identify key files.
+By default, the password is the string returned by the Unix
+@code{hostname}
+command.
+@item @code{-P} @code{--pvt-cert}
+Generate a new private certificate used by the
+@code{PC}
+identity scheme.
By default, the program generates public certificates.
-@item @code{-p} @kbd{password}
-Encrypt generated files containing private data with
-@kbd{password}
-and the DES-CBC algorithm.
-@item @code{-q}
-Set the password for reading files to password.
-@item @code{-S} @code{[@code{RSA} | @code{DSA}]}
-Generate a new sign key of the designated type,
-obsoleting any that may exist.
-By default, the program uses the host key as the sign key.
-@item @code{-s} @kbd{name}
-Set the issuer name to
-@kbd{name}.
-This is used for the issuer field in certificates
-and in the file name for identity files.
-@item @code{-T}
+Note: the PC identity scheme is not recommended for new installations.
+@item @code{-q} @code{--export-passwd}= @kbd{passwd}
+Set the password for writing encrypted
+@code{IFF}, @code{GQ} @code{and} @code{MV}
+identity files redirected to
+@file{stdout}
+to
+@kbd{passwd}.
+In effect, these files are decrypted with the
+@code{-p}
+password, then encrypted with the
+@code{-q}
+password.
+By default, the password is the string returned by the Unix
+@code{hostname}
+command.
+@item @code{-s} @code{--subject-key}= @code{[host]} @code{[@@ @kbd{group}]}
+Specify the Autokey host name, where
+@kbd{host}
+is the optional host name and
+@kbd{group}
+is the optional group name.
+The host name, and if provided, group name are used in
+@kbd{host} @kbd{@@} @kbd{group}
+form as certificate subject and issuer.
+Specifying
+@code{-s} @code{-@@} @kbd{group}
+is allowed, and results in leaving the host name unchanged, as with
+@code{-i} @kbd{group}.
+The group name, or if no group is provided, the host name are also used in the
+file names of
+@code{IFF}, @code{GQ},
+and
+@code{MV}
+identity scheme client parameter files.
+If
+@kbd{host}
+is not specified, the default host name is the string returned by the Unix
+@code{hostname}
+command.
+@item @code{-S} @code{--sign-key}= @code{[@code{RSA} | @code{DSA}]}
+Generate a new encrypted public/private sign key file of the specified type.
+By default, the sign key is the host key and has the same type.
+If compatibility with FIPS 140-2 is required, the sign key type must be
+@code{DSA}.
+@item @code{-T} @code{--trusted-cert}
Generate a trusted certificate.
By default, the program generates a non-trusted certificate.
-@item @code{-V} @kbd{nkeys}
-Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+@item @code{-V} @code{--mv-params} @kbd{nkeys}
+Generate
+@kbd{nkeys}
+encrypted server keys and parameters for the Mu-Varadharajan (MV)
+identity scheme.
+This option is mutually exclusive with the
+@code{-I}
+and
+@code{-G}
+options.
+Note: support for this option should be considered a work in progress.
@end table
+
@subsubsection Random Seed File
All cryptographically sound key generation schemes must have means
to randomize the entropy seed used to initialize
The entropy seed used by the OpenSSL library is contained in a file,
usually called
-@code{.rnd},
+@file{.rnd},
which must be available when starting the NTP daemon
or the
@code{ntp-keygen}
.Ev RANDFILE
environment variable is not present,
the library will look for the
-@code{.rnd}
+@file{.rnd}
file in the user home directory.
+Since both the
+@code{ntp-keygen}
+program and
+@code{ntpd(1ntpdmdoc)}
+daemon must run as root, the logical place to put this file is in
+@file{/.rnd}
+or
+@file{/root/.rnd}.
If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
+
@subsubsection Cryptographic Data Files
-All other file formats begin with two lines.
-The first contains the file name, including the generated host name
-and filestamp.
-The second contains the datestamp in conventional Unix date format.
-Lines beginning with # are considered comments and ignored by the
+All file formats begin with two nonencrypted lines.
+The first line contains the file name, including the generated host name
+and filestamp, in the format
+@file{ntpkey_}@kbd{key} @kbd{_} @kbd{name}. @kbd{filestamp},
+where
+@kbd{key}
+is the key or parameter type,
+@kbd{name}
+is the host or group name and
+@kbd{filestamp}
+is the filestamp (NTP seconds) when the file was created.
+By convention,
+@kbd{key}
+names in generated file names include both upper and lower case
+characters, while
+@kbd{key}
+names in generated link names include only lower case characters.
+The filestamp is not used in generated link names.
+The second line contains the datestamp in conventional Unix
+@file{date}
+format.
+Lines beginning with
+@quoteleft{}#@quoteright{}
+are considered comments and ignored by the
@code{ntp-keygen}
program and
@code{ntpd(1ntpdmdoc)}
daemon.
-Cryptographic values are encoded first using ASN.1 rules,
-then encrypted if necessary, and finally written PEM-encoded
-printable ASCII format preceded and followed by MIME content identifier lines.
-
-The format of the symmetric keys file is somewhat different
-than the other files in the interest of backward compatibility.
-Since DES-CBC is deprecated in NTPv4, the only key format of interest
-is MD5 alphanumeric strings.
-Following hte heard the keys are
-entered one per line in the format
+
+The remainder of the file contains cryptographic data, encoded first using ASN.1
+rules, then encrypted if necessary, and finally written in PEM-encoded
+printable ASCII text, preceded and followed by MIME content identifier lines.
+
+The format of the symmetric keys file, ordinarily named
+@file{ntp.keys},
+is somewhat different than the other files in the interest of backward compatibility.
+Ordinarily, the file is generated by this program, but it can be constructed
+and edited using an ordinary text editor.
+@verbatim
+# ntpkey_MD5key_bk.ntp.org.3595864945
+# Thu Dec 12 19:22:25 2013
+
+1 MD5 L";Nw<\`.I<f4U0)247"i # MD5 key
+2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key
+3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
+4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key
+5 MD5 B;fx'Kgr/&4ZTbL6=RxA # MD5 key
+6 MD5 4eYwa\`o@}3i@@@@V@@..R9!l # MD5 key
+7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key
+8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
+9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key
+10 MD5 2late4Me # MD5 key
+11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
+12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
+13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
+14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
+15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
+16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
+17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
+18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
+19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
+20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
+@end verbatim
+@example
+Figure 1. Typical Symmetric Key File
+@end example
+
+Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Following the header the keys are entered one per line in the format
@example
@kbd{keyno} @kbd{type} @kbd{key}
@end example
where
@kbd{keyno}
-is a positive integer in the range 1-65,535,
+is a positive integer in the range 1-65534;
@kbd{type}
-is the string MD5 defining the key format and
+is the key type for the message digest algorithm, which in the absence of the
+OpenSSL library must be
+@code{MD5}
+to designate the MD5 message digest algorithm;
+if the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library;
+however, if compatibility with FIPS 140-2 is required,
+the key type must be either
+@code{SHA}
+or
+@code{SHA1};
@kbd{key}
is the key itself,
-which is a printable ASCII string 16 characters or less in length.
-Each character is chosen from the 93 printable characters
-in the range 0x21 through 0x7f excluding space and the
+which is a printable ASCII string 20 characters or less in length:
+each character is chosen from the 93 printable characters
+in the range 0x21 through 0x7e (
+@quoteleft{}@quoteright{}!
+through
+@quoteleft{}~@quoteright{}
+) excluding space and the
+@quoteleft{}#@quoteright{}
+character, and terminated by whitespace or a
@quoteleft{}#@quoteright{}
character.
+An OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which
+is truncated as necessary.
Note that the keys used by the
@code{ntpq(1ntpqmdoc)}
The
@code{ntp-keygen}
-program generates a MD5 symmetric keys file
-@file{ntpkey_MD5key_}@kbd{hostname.filestamp}.
+program generates a symmetric keys file
+@file{ntpkey_MD5key_}@kbd{hostname}. @kbd{filestamp}.
Since the file contains private shared keys,
it should be visible only to root and distributed by secure means
to other subnet hosts.
* ntp-keygen iffkey:: iffkey option (-I)
* ntp-keygen ident:: ident option (-i)
* ntp-keygen lifetime:: lifetime option (-l)
-* ntp-keygen md5key:: md5key option (-M)
* ntp-keygen modulus:: modulus option (-m)
+* ntp-keygen md5key:: md5key option (-M)
* ntp-keygen pvt-cert:: pvt-cert option (-P)
* ntp-keygen password:: password option (-p)
* ntp-keygen export-passwd:: export-passwd option (-q)
-* ntp-keygen sign-key:: sign-key option (-S)
* ntp-keygen subject-name:: subject-name option (-s)
+* ntp-keygen sign-key:: sign-key option (-S)
* ntp-keygen trusted-cert:: trusted-cert option (-T)
* ntp-keygen mv-params:: mv-params option (-V)
* ntp-keygen mv-keys:: mv-keys option (-v)
@exampleindent 0
@example
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p11
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.3.97
Usage: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
@end itemize
scheme is one of
-RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+RSA-MD2, RSA-MD5, RSA-MDC2, RSA-SHA, RSA-SHA1, RSA-RIPEMD160,
DSA-SHA, or DSA-SHA1.
-Select the certificate message digest/signature encryption scheme.
+Select the certificate signature encryption/message digest scheme.
Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA-MD5.
Select the cipher which is used to encrypt the files containing
private keys. The default is three-key triple DES in CBC mode,
-equivalent to "@code{-C des-ede3-cbc". The openssl tool lists ciphers
+equivalent to "@code{-C des-ede3-cbc}". The openssl tool lists ciphers
available in "@code{openssl -h}" output.
@node ntp-keygen id-key
@subsection id-key option (-e)
must be compiled in by defining @code{AUTOKEY} during the compilation.
@end itemize
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
+Write the public parameters from the IFF or GQ client keys to
+the standard output.
+This is intended for automatic key distribution by email.
@node ntp-keygen gq-params
@subsection gq-params option (-G)
@cindex ntp-keygen-gq-params
the file name of IFF, GQ, and MV client parameters files. In
that role, the default is the host name if this option is not
provided. The group name, if specified using @code{-i/--ident} or
-using @code{-s/--subject-name} following an '@code{@}' character,
-is also a part of the self-signed host certificate's subject and
-issuer names in the form @code{host@group} and should match the
-'@code{crypto ident}' or '@code{server ident}' configuration in
-@code{ntpd}'s configuration file.
+using @code{-s/--subject-name} following an '@code{@@}' character,
+is also a part of the self-signed host certificate subject and
+issuer names in the form @code{host@@group} and should match the
+'@code{crypto ident}' or '@code{server ident}' configuration in the
+@code{ntpd} configuration file.
@node ntp-keygen lifetime
@subsection lifetime option (-l)
@cindex ntp-keygen-lifetime
@end itemize
Set the certificate expiration to lifetime days from now.
-@node ntp-keygen md5key
-@subsection md5key option (-M)
-@cindex ntp-keygen-md5key
-
-This is the ``generate md5 keys'' option.
-Generate MD5 keys, obsoleting any that may exist.
@node ntp-keygen modulus
@subsection modulus option (-m)
@cindex ntp-keygen-modulus
-This is the ``modulus'' option.
+This is the ``prime modulus'' option.
This option takes a number argument @file{modulus}.
@noindent
@end itemize
The number of bits in the prime modulus. The default is 512.
+@node ntp-keygen md5key
+@subsection md5key option (-M)
+@cindex ntp-keygen-md5key
+
+This is the ``generate symmetric keys'' option.
+Generate symmetric keys, obsoleting any that may exist.
@node ntp-keygen pvt-cert
@subsection pvt-cert option (-P)
@cindex ntp-keygen-pvt-cert
The same password must be specified to the remote ntpd via the
"crypto pw password" configuration command. See also the option
--id-key (-e) for unencrypted exports.
-@node ntp-keygen sign-key
-@subsection sign-key option (-S)
-@cindex ntp-keygen-sign-key
-
-This is the ``generate sign key (rsa or dsa)'' option.
-This option takes a string argument @file{sign}.
-
-@noindent
-This option has some usage constraints. It:
-@itemize @bullet
-@item
-must be compiled in by defining @code{AUTOKEY} during the compilation.
-@end itemize
-
-Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
@node ntp-keygen subject-name
@subsection subject-name option (-s)
@cindex ntp-keygen-subject-name
@end itemize
Set the Autokey host name, and optionally, group name specified
-following an '@code{@}' character. The host name is used in the file
+following an '@code{@@}' character. The host name is used in the file
name of generated host and signing certificates, without the
group name. The host name, and if provided, group name are used
-in @code{host@group} form for the host certificate's subject and issuer
-fields. Specifying '@code{-s @group}' is allowed, and results in
-leaving the host name unchanged while appending @code{@group} to the
+in @code{host@@group} form for the host certificate subject and issuer
+fields. Specifying '@code{-s @@group}' is allowed, and results in
+leaving the host name unchanged while appending @code{@@group} to the
subject and issuer fields, as with @code{-i group}. The group name, or
if not provided, the host name are also used in the file names
of IFF, GQ, and MV client parameter files.
+@node ntp-keygen sign-key
+@subsection sign-key option (-S)
+@cindex ntp-keygen-sign-key
+
+This is the ``generate sign key (rsa or dsa)'' option.
+This option takes a string argument @file{sign}.
+
+@noindent
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{AUTOKEY} during the compilation.
+@end itemize
+
+Generate a new sign key of the designated type, obsoleting any
+that may exist. By default, the program uses the host key as the
+sign key.
@node ntp-keygen trusted-cert
@subsection trusted-cert option (-T)
@cindex ntp-keygen-trusted-cert
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed June 6, 2019 at 05:31:02 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:24 PM by AutoGen 5.18.5
* From the definitions ntp-keygen-opts.def
* and the template file options
*
/**
* static const strings for ntp-keygen options
*/
-static char const ntp_keygen_opt_strs[2416] =
-/* 0 */ "ntp-keygen (ntp) 4.3.96\n"
+static char const ntp_keygen_opt_strs[2436] =
+/* 0 */ "ntp-keygen (ntp) 4.3.97\n"
"Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
/* 1456 */ "set certificate lifetime\0"
/* 1481 */ "LIFETIME\0"
/* 1490 */ "lifetime\0"
-/* 1499 */ "generate MD5 keys\0"
-/* 1517 */ "MD5KEY\0"
-/* 1524 */ "md5key\0"
-/* 1531 */ "modulus\0"
-/* 1539 */ "MODULUS\0"
-/* 1547 */ "generate PC private certificate\0"
-/* 1579 */ "PVT_CERT\0"
-/* 1588 */ "pvt-cert\0"
-/* 1597 */ "local private password\0"
-/* 1620 */ "PASSWORD\0"
-/* 1629 */ "password\0"
-/* 1638 */ "export IFF or GQ group keys with password\0"
-/* 1680 */ "EXPORT_PASSWD\0"
-/* 1694 */ "export-passwd\0"
-/* 1708 */ "generate sign key (RSA or DSA)\0"
-/* 1739 */ "SIGN_KEY\0"
-/* 1748 */ "sign-key\0"
-/* 1757 */ "set host and optionally group name\0"
-/* 1792 */ "SUBJECT_NAME\0"
-/* 1805 */ "subject-name\0"
-/* 1818 */ "trusted certificate (TC scheme)\0"
-/* 1850 */ "TRUSTED_CERT\0"
-/* 1863 */ "trusted-cert\0"
-/* 1876 */ "generate <num> MV parameters\0"
-/* 1905 */ "MV_PARAMS\0"
-/* 1915 */ "mv-params\0"
-/* 1925 */ "update <num> MV keys\0"
-/* 1946 */ "MV_KEYS\0"
-/* 1954 */ "mv-keys\0"
-/* 1962 */ "display extended usage information and exit\0"
-/* 2006 */ "help\0"
-/* 2011 */ "extended usage information passed thru pager\0"
-/* 2056 */ "more-help\0"
-/* 2066 */ "output version information and exit\0"
-/* 2102 */ "version\0"
-/* 2110 */ "save the option state to a config file\0"
-/* 2149 */ "save-opts\0"
-/* 2159 */ "load options from a config file\0"
-/* 2191 */ "LOAD_OPTS\0"
-/* 2201 */ "no-load-opts\0"
-/* 2214 */ "no\0"
-/* 2217 */ "NTP_KEYGEN\0"
-/* 2228 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.3.96\n"
+/* 1499 */ "prime modulus\0"
+/* 1513 */ "MODULUS\0"
+/* 1521 */ "modulus\0"
+/* 1529 */ "generate symmetric keys\0"
+/* 1553 */ "MD5KEY\0"
+/* 1560 */ "md5key\0"
+/* 1567 */ "generate PC private certificate\0"
+/* 1599 */ "PVT_CERT\0"
+/* 1608 */ "pvt-cert\0"
+/* 1617 */ "local private password\0"
+/* 1640 */ "PASSWORD\0"
+/* 1649 */ "password\0"
+/* 1658 */ "export IFF or GQ group keys with password\0"
+/* 1700 */ "EXPORT_PASSWD\0"
+/* 1714 */ "export-passwd\0"
+/* 1728 */ "set host and optionally group name\0"
+/* 1763 */ "SUBJECT_NAME\0"
+/* 1776 */ "subject-name\0"
+/* 1789 */ "generate sign key (RSA or DSA)\0"
+/* 1820 */ "SIGN_KEY\0"
+/* 1829 */ "sign-key\0"
+/* 1838 */ "trusted certificate (TC scheme)\0"
+/* 1870 */ "TRUSTED_CERT\0"
+/* 1883 */ "trusted-cert\0"
+/* 1896 */ "generate <num> MV parameters\0"
+/* 1925 */ "MV_PARAMS\0"
+/* 1935 */ "mv-params\0"
+/* 1945 */ "update <num> MV keys\0"
+/* 1966 */ "MV_KEYS\0"
+/* 1974 */ "mv-keys\0"
+/* 1982 */ "display extended usage information and exit\0"
+/* 2026 */ "help\0"
+/* 2031 */ "extended usage information passed thru pager\0"
+/* 2076 */ "more-help\0"
+/* 2086 */ "output version information and exit\0"
+/* 2122 */ "version\0"
+/* 2130 */ "save the option state to a config file\0"
+/* 2169 */ "save-opts\0"
+/* 2179 */ "load options from a config file\0"
+/* 2211 */ "LOAD_OPTS\0"
+/* 2221 */ "no-load-opts\0"
+/* 2234 */ "no\0"
+/* 2237 */ "NTP_KEYGEN\0"
+/* 2248 */ "ntp-keygen (ntp) - Create a NTP host key - Ver. 4.3.97\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
-/* 2341 */ "$HOME\0"
-/* 2347 */ ".\0"
-/* 2349 */ ".ntprc\0"
-/* 2356 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2390 */ "\n\0"
-/* 2392 */ "ntp-keygen (ntp) 4.3.96";
+/* 2361 */ "$HOME\0"
+/* 2367 */ ".\0"
+/* 2369 */ ".ntprc\0"
+/* 2376 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 2410 */ "\n\0"
+/* 2412 */ "ntp-keygen (ntp) 4.3.97";
/**
* imbits option description:
#define LIFETIME_name NULL
#endif /* AUTOKEY */
-/**
- * md5key option description:
- */
-/** Descriptive text for the md5key option */
-#define MD5KEY_DESC (ntp_keygen_opt_strs+1499)
-/** Upper-cased name for the md5key option */
-#define MD5KEY_NAME (ntp_keygen_opt_strs+1517)
-/** Name string for the md5key option */
-#define MD5KEY_name (ntp_keygen_opt_strs+1524)
-/** Compiled in flag settings for the md5key option */
-#define MD5KEY_FLAGS (OPTST_DISABLED)
-
/**
* modulus option description:
*/
#ifdef AUTOKEY
/** Descriptive text for the modulus option */
-#define MODULUS_DESC (ntp_keygen_opt_strs+1531)
+#define MODULUS_DESC (ntp_keygen_opt_strs+1499)
/** Upper-cased name for the modulus option */
-#define MODULUS_NAME (ntp_keygen_opt_strs+1539)
+#define MODULUS_NAME (ntp_keygen_opt_strs+1513)
/** Name string for the modulus option */
-#define MODULUS_name (ntp_keygen_opt_strs+1531)
+#define MODULUS_name (ntp_keygen_opt_strs+1521)
/** Compiled in flag settings for the modulus option */
#define MODULUS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
#define MODULUS_name NULL
#endif /* AUTOKEY */
+/**
+ * md5key option description:
+ */
+/** Descriptive text for the md5key option */
+#define MD5KEY_DESC (ntp_keygen_opt_strs+1529)
+/** Upper-cased name for the md5key option */
+#define MD5KEY_NAME (ntp_keygen_opt_strs+1553)
+/** Name string for the md5key option */
+#define MD5KEY_name (ntp_keygen_opt_strs+1560)
+/** Compiled in flag settings for the md5key option */
+#define MD5KEY_FLAGS (OPTST_DISABLED)
+
/**
* pvt-cert option description:
*/
#ifdef AUTOKEY
/** Descriptive text for the pvt-cert option */
-#define PVT_CERT_DESC (ntp_keygen_opt_strs+1547)
+#define PVT_CERT_DESC (ntp_keygen_opt_strs+1567)
/** Upper-cased name for the pvt-cert option */
-#define PVT_CERT_NAME (ntp_keygen_opt_strs+1579)
+#define PVT_CERT_NAME (ntp_keygen_opt_strs+1599)
/** Name string for the pvt-cert option */
-#define PVT_CERT_name (ntp_keygen_opt_strs+1588)
+#define PVT_CERT_name (ntp_keygen_opt_strs+1608)
/** Compiled in flag settings for the pvt-cert option */
#define PVT_CERT_FLAGS (OPTST_DISABLED)
*/
#ifdef AUTOKEY
/** Descriptive text for the password option */
-#define PASSWORD_DESC (ntp_keygen_opt_strs+1597)
+#define PASSWORD_DESC (ntp_keygen_opt_strs+1617)
/** Upper-cased name for the password option */
-#define PASSWORD_NAME (ntp_keygen_opt_strs+1620)
+#define PASSWORD_NAME (ntp_keygen_opt_strs+1640)
/** Name string for the password option */
-#define PASSWORD_name (ntp_keygen_opt_strs+1629)
+#define PASSWORD_name (ntp_keygen_opt_strs+1649)
/** Compiled in flag settings for the password option */
#define PASSWORD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
*/
#ifdef AUTOKEY
/** Descriptive text for the export-passwd option */
-#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1638)
+#define EXPORT_PASSWD_DESC (ntp_keygen_opt_strs+1658)
/** Upper-cased name for the export-passwd option */
-#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1680)
+#define EXPORT_PASSWD_NAME (ntp_keygen_opt_strs+1700)
/** Name string for the export-passwd option */
-#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1694)
+#define EXPORT_PASSWD_name (ntp_keygen_opt_strs+1714)
/** Compiled in flag settings for the export-passwd option */
#define EXPORT_PASSWD_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
#define EXPORT_PASSWD_name NULL
#endif /* AUTOKEY */
-/**
- * sign-key option description:
- */
-#ifdef AUTOKEY
-/** Descriptive text for the sign-key option */
-#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1708)
-/** Upper-cased name for the sign-key option */
-#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1739)
-/** Name string for the sign-key option */
-#define SIGN_KEY_name (ntp_keygen_opt_strs+1748)
-/** Compiled in flag settings for the sign-key option */
-#define SIGN_KEY_FLAGS (OPTST_DISABLED \
- | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-
-#else /* disable sign-key */
-#define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define SIGN_KEY_NAME NULL
-#define SIGN_KEY_DESC NULL
-#define SIGN_KEY_name NULL
-#endif /* AUTOKEY */
-
/**
* subject-name option description:
*/
#ifdef AUTOKEY
/** Descriptive text for the subject-name option */
-#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1757)
+#define SUBJECT_NAME_DESC (ntp_keygen_opt_strs+1728)
/** Upper-cased name for the subject-name option */
-#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1792)
+#define SUBJECT_NAME_NAME (ntp_keygen_opt_strs+1763)
/** Name string for the subject-name option */
-#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1805)
+#define SUBJECT_NAME_name (ntp_keygen_opt_strs+1776)
/** Compiled in flag settings for the subject-name option */
#define SUBJECT_NAME_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
#define SUBJECT_NAME_name NULL
#endif /* AUTOKEY */
+/**
+ * sign-key option description:
+ */
+#ifdef AUTOKEY
+/** Descriptive text for the sign-key option */
+#define SIGN_KEY_DESC (ntp_keygen_opt_strs+1789)
+/** Upper-cased name for the sign-key option */
+#define SIGN_KEY_NAME (ntp_keygen_opt_strs+1820)
+/** Name string for the sign-key option */
+#define SIGN_KEY_name (ntp_keygen_opt_strs+1829)
+/** Compiled in flag settings for the sign-key option */
+#define SIGN_KEY_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+#else /* disable sign-key */
+#define SIGN_KEY_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define SIGN_KEY_NAME NULL
+#define SIGN_KEY_DESC NULL
+#define SIGN_KEY_name NULL
+#endif /* AUTOKEY */
+
/**
* trusted-cert option description:
*/
#ifdef AUTOKEY
/** Descriptive text for the trusted-cert option */
-#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1818)
+#define TRUSTED_CERT_DESC (ntp_keygen_opt_strs+1838)
/** Upper-cased name for the trusted-cert option */
-#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1850)
+#define TRUSTED_CERT_NAME (ntp_keygen_opt_strs+1870)
/** Name string for the trusted-cert option */
-#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1863)
+#define TRUSTED_CERT_name (ntp_keygen_opt_strs+1883)
/** Compiled in flag settings for the trusted-cert option */
#define TRUSTED_CERT_FLAGS (OPTST_DISABLED)
*/
#ifdef AUTOKEY
/** Descriptive text for the mv-params option */
-#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1876)
+#define MV_PARAMS_DESC (ntp_keygen_opt_strs+1896)
/** Upper-cased name for the mv-params option */
-#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1905)
+#define MV_PARAMS_NAME (ntp_keygen_opt_strs+1925)
/** Name string for the mv-params option */
-#define MV_PARAMS_name (ntp_keygen_opt_strs+1915)
+#define MV_PARAMS_name (ntp_keygen_opt_strs+1935)
/** Compiled in flag settings for the mv-params option */
#define MV_PARAMS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
*/
#ifdef AUTOKEY
/** Descriptive text for the mv-keys option */
-#define MV_KEYS_DESC (ntp_keygen_opt_strs+1925)
+#define MV_KEYS_DESC (ntp_keygen_opt_strs+1945)
/** Upper-cased name for the mv-keys option */
-#define MV_KEYS_NAME (ntp_keygen_opt_strs+1946)
+#define MV_KEYS_NAME (ntp_keygen_opt_strs+1966)
/** Name string for the mv-keys option */
-#define MV_KEYS_name (ntp_keygen_opt_strs+1954)
+#define MV_KEYS_name (ntp_keygen_opt_strs+1974)
/** Compiled in flag settings for the mv-keys option */
#define MV_KEYS_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntp_keygen_opt_strs+1962)
-#define HELP_name (ntp_keygen_opt_strs+2006)
+#define HELP_DESC (ntp_keygen_opt_strs+1982)
+#define HELP_name (ntp_keygen_opt_strs+2026)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntp_keygen_opt_strs+2011)
-#define MORE_HELP_name (ntp_keygen_opt_strs+2056)
+#define MORE_HELP_DESC (ntp_keygen_opt_strs+2031)
+#define MORE_HELP_name (ntp_keygen_opt_strs+2076)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntp_keygen_opt_strs+2066)
-#define VER_name (ntp_keygen_opt_strs+2102)
-#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2110)
-#define SAVE_OPTS_name (ntp_keygen_opt_strs+2149)
-#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2159)
-#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2191)
-#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2201)
-#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2214)
+#define VER_DESC (ntp_keygen_opt_strs+2086)
+#define VER_name (ntp_keygen_opt_strs+2122)
+#define SAVE_OPTS_DESC (ntp_keygen_opt_strs+2130)
+#define SAVE_OPTS_name (ntp_keygen_opt_strs+2169)
+#define LOAD_OPTS_DESC (ntp_keygen_opt_strs+2179)
+#define LOAD_OPTS_NAME (ntp_keygen_opt_strs+2211)
+#define NO_LOAD_OPTS_name (ntp_keygen_opt_strs+2221)
+#define LOAD_OPTS_pfx (ntp_keygen_opt_strs+2234)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
/* desc, NAME, name */ LIFETIME_DESC, LIFETIME_NAME, LIFETIME_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 11, VALUE_OPT_MD5KEY,
- /* equiv idx, value */ 11, VALUE_OPT_MD5KEY,
+ { /* entry idx, value */ 11, VALUE_OPT_MODULUS,
+ /* equiv idx, value */ 11, VALUE_OPT_MODULUS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ MD5KEY_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --md5key */
+ /* opt state flags */ MODULUS_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --modulus */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ NULL,
- /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name,
+ /* option proc */ doOptModulus,
+ /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 12, VALUE_OPT_MODULUS,
- /* equiv idx, value */ 12, VALUE_OPT_MODULUS,
+ { /* entry idx, value */ 12, VALUE_OPT_MD5KEY,
+ /* equiv idx, value */ 12, VALUE_OPT_MD5KEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ MODULUS_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --modulus */
+ /* opt state flags */ MD5KEY_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --md5key */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
- /* option proc */ doOptModulus,
- /* desc, NAME, name */ MODULUS_DESC, MODULUS_NAME, MODULUS_name,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ MD5KEY_DESC, MD5KEY_NAME, MD5KEY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 13, VALUE_OPT_PVT_CERT,
/* desc, NAME, name */ EXPORT_PASSWD_DESC, EXPORT_PASSWD_NAME, EXPORT_PASSWD_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 16, VALUE_OPT_SIGN_KEY,
- /* equiv idx, value */ 16, VALUE_OPT_SIGN_KEY,
+ { /* entry idx, value */ 16, VALUE_OPT_SUBJECT_NAME,
+ /* equiv idx, value */ 16, VALUE_OPT_SUBJECT_NAME,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ SIGN_KEY_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --sign-key */
+ /* opt state flags */ SUBJECT_NAME_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --subject-name */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name,
+ /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
- /* equiv idx, value */ 17, VALUE_OPT_SUBJECT_NAME,
+ { /* entry idx, value */ 17, VALUE_OPT_SIGN_KEY,
+ /* equiv idx, value */ 17, VALUE_OPT_SIGN_KEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
- /* opt state flags */ SUBJECT_NAME_FLAGS, 0,
- /* last opt argumnt */ { NULL }, /* --subject-name */
+ /* opt state flags */ SIGN_KEY_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --sign-key */
/* arg list/cookie */ NULL,
/* must/cannot opts */ NULL, NULL,
/* option proc */ NULL,
- /* desc, NAME, name */ SUBJECT_NAME_DESC, SUBJECT_NAME_NAME, SUBJECT_NAME_name,
+ /* desc, NAME, name */ SIGN_KEY_DESC, SIGN_KEY_NAME, SIGN_KEY_name,
/* disablement strs */ NULL, NULL },
{ /* entry idx, value */ 18, VALUE_OPT_TRUSTED_CERT,
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntp-keygen. */
-#define zPROGNAME (ntp_keygen_opt_strs+2217)
+#define zPROGNAME (ntp_keygen_opt_strs+2237)
/** Reference to the title line for ntp-keygen usage. */
-#define zUsageTitle (ntp_keygen_opt_strs+2228)
+#define zUsageTitle (ntp_keygen_opt_strs+2248)
/** ntp-keygen configuration file name. */
-#define zRcName (ntp_keygen_opt_strs+2349)
+#define zRcName (ntp_keygen_opt_strs+2369)
/** Directories to search for ntp-keygen config files. */
static char const * const apzHomeList[3] = {
- ntp_keygen_opt_strs+2341,
- ntp_keygen_opt_strs+2347,
+ ntp_keygen_opt_strs+2361,
+ ntp_keygen_opt_strs+2367,
NULL };
/** The ntp-keygen program bug email address. */
-#define zBugsAddr (ntp_keygen_opt_strs+2356)
+#define zBugsAddr (ntp_keygen_opt_strs+2376)
/** Clarification/explanation of what ntp-keygen does. */
-#define zExplain (ntp_keygen_opt_strs+2390)
+#define zExplain (ntp_keygen_opt_strs+2410)
/** Extra detail explaining what ntp-keygen does. */
#define zDetail (NULL)
/** The full version string for ntp-keygen. */
-#define zFullVersion (ntp_keygen_opt_strs+2392)
+#define zFullVersion (ntp_keygen_opt_strs+2412)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
translate option names.
*/
/* referenced via ntp_keygenOptions.pzCopyright */
- puts(_("ntp-keygen (ntp) 4.3.96\n\
+ puts(_("ntp-keygen (ntp) 4.3.97\n\
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
puts(_("set certificate lifetime"));
/* referenced via ntp_keygenOptions.pOptDesc->pzText */
- puts(_("generate MD5 keys"));
+ puts(_("prime modulus"));
/* referenced via ntp_keygenOptions.pOptDesc->pzText */
- puts(_("modulus"));
+ puts(_("generate symmetric keys"));
/* referenced via ntp_keygenOptions.pOptDesc->pzText */
puts(_("generate PC private certificate"));
puts(_("export IFF or GQ group keys with password"));
/* referenced via ntp_keygenOptions.pOptDesc->pzText */
- puts(_("generate sign key (RSA or DSA)"));
+ puts(_("set host and optionally group name"));
/* referenced via ntp_keygenOptions.pOptDesc->pzText */
- puts(_("set host and optionally group name"));
+ puts(_("generate sign key (RSA or DSA)"));
/* referenced via ntp_keygenOptions.pOptDesc->pzText */
puts(_("trusted certificate (TC scheme)"));
puts(_("load options from a config file"));
/* referenced via ntp_keygenOptions.pzUsageTitle */
- puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.3.96\n\
+ puts(_("ntp-keygen (ntp) - Create a NTP host key - Ver. 4.3.97\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
/* referenced via ntp_keygenOptions.pzExplain */
puts(_("\n"));
/* referenced via ntp_keygenOptions.pzFullVersion */
- puts(_("ntp-keygen (ntp) 4.3.96"));
+ puts(_("ntp-keygen (ntp) 4.3.97"));
/* referenced via ntp_keygenOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed June 6, 2019 at 05:31:02 PM by AutoGen 5.18.5
+ * It has been AutoGen-ed June 6, 2019 at 11:19:24 PM by AutoGen 5.18.5
* From the definitions ntp-keygen-opts.def
* and the template file options
*
INDEX_OPT_IFFKEY = 8,
INDEX_OPT_IDENT = 9,
INDEX_OPT_LIFETIME = 10,
- INDEX_OPT_MD5KEY = 11,
- INDEX_OPT_MODULUS = 12,
+ INDEX_OPT_MODULUS = 11,
+ INDEX_OPT_MD5KEY = 12,
INDEX_OPT_PVT_CERT = 13,
INDEX_OPT_PASSWORD = 14,
INDEX_OPT_EXPORT_PASSWD = 15,
- INDEX_OPT_SIGN_KEY = 16,
- INDEX_OPT_SUBJECT_NAME = 17,
+ INDEX_OPT_SUBJECT_NAME = 16,
+ INDEX_OPT_SIGN_KEY = 17,
INDEX_OPT_TRUSTED_CERT = 18,
INDEX_OPT_MV_PARAMS = 19,
INDEX_OPT_MV_KEYS = 20,
/** count of all options for ntp-keygen */
#define OPTION_CT 26
/** ntp-keygen version */
-#define NTP_KEYGEN_VERSION "4.3.96"
+#define NTP_KEYGEN_VERSION "4.3.97"
/** Full ntp-keygen version text */
-#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.3.96"
+#define NTP_KEYGEN_FULL_VERSION "ntp-keygen (ntp) 4.3.97"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
# warning undefining LIFETIME due to option name conflict
# undef LIFETIME
# endif
-# ifdef MD5KEY
-# warning undefining MD5KEY due to option name conflict
-# undef MD5KEY
-# endif
# ifdef MODULUS
# warning undefining MODULUS due to option name conflict
# undef MODULUS
# endif
+# ifdef MD5KEY
+# warning undefining MD5KEY due to option name conflict
+# undef MD5KEY
+# endif
# ifdef PVT_CERT
# warning undefining PVT_CERT due to option name conflict
# undef PVT_CERT
# warning undefining EXPORT_PASSWD due to option name conflict
# undef EXPORT_PASSWD
# endif
-# ifdef SIGN_KEY
-# warning undefining SIGN_KEY due to option name conflict
-# undef SIGN_KEY
-# endif
# ifdef SUBJECT_NAME
# warning undefining SUBJECT_NAME due to option name conflict
# undef SUBJECT_NAME
# endif
+# ifdef SIGN_KEY
+# warning undefining SIGN_KEY due to option name conflict
+# undef SIGN_KEY
+# endif
# ifdef TRUSTED_CERT
# warning undefining TRUSTED_CERT due to option name conflict
# undef TRUSTED_CERT
# undef IFFKEY
# undef IDENT
# undef LIFETIME
-# undef MD5KEY
# undef MODULUS
+# undef MD5KEY
# undef PVT_CERT
# undef PASSWORD
# undef EXPORT_PASSWD
-# undef SIGN_KEY
# undef SUBJECT_NAME
+# undef SIGN_KEY
# undef TRUSTED_CERT
# undef MV_PARAMS
# undef MV_KEYS
#ifdef AUTOKEY
#define OPT_VALUE_LIFETIME (DESC(LIFETIME).optArg.argInt)
#endif /* AUTOKEY */
-#define VALUE_OPT_MD5KEY 'M'
#define VALUE_OPT_MODULUS 'm'
#ifdef AUTOKEY
#define OPT_VALUE_MODULUS (DESC(MODULUS).optArg.argInt)
#endif /* AUTOKEY */
+#define VALUE_OPT_MD5KEY 'M'
#define VALUE_OPT_PVT_CERT 'P'
#define VALUE_OPT_PASSWORD 'p'
#define VALUE_OPT_EXPORT_PASSWD 'q'
-#define VALUE_OPT_SIGN_KEY 'S'
#define VALUE_OPT_SUBJECT_NAME 's'
+#define VALUE_OPT_SIGN_KEY 'S'
#define VALUE_OPT_TRUSTED_CERT 'T'
#define VALUE_OPT_MV_PARAMS 'V'
#ifdef AUTOKEY
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen 1ntp-keygenman "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntp-keygen 1ntp-keygenman "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:04 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:29 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.SH DESCRIPTION
This program generates cryptographic data files used by the NTPv4
authentication and identification schemes.
-It generates MD5 key files used in symmetric key cryptography.
-In addition, if the OpenSSL software library has been installed,
-it generates keys, certificate and identity files used in public key
-cryptography.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software library has been installed, it can generate host keys,
+signing keys, certificates, and identity keys and parameters used in Autokey
+public key cryptography.
These files are used for cookie encryption,
-digital signature and challenge/response identification algorithms
+digital signature, and challenge/response identification algorithms
compatible with the Internet standard security infrastructure.
.sp \n(Ppu
.ne 2
-All files are in PEM-encoded printable ASCII format,
-so they can be embedded as MIME attachments in mail to other sites
+The message digest symmetric keys file is generated in a format
+compatible with NTPv3.
+All other files are in PEM-encoded printable ASCII format,
+so they can be embedded as MIME attachments in email to other sites
and certificate authorities.
By default, files are not encrypted.
.sp \n(Ppu
.ne 2
-When used to generate message digest keys, the program produces a file
-containing ten pseudo-random printable ASCII strings suitable for the
-MD5 message digest algorithm included in the distribution.
+When used to generate message digest symmetric keys, the program
+produces a file containing ten pseudo-random printable ASCII strings
+suitable for the MD5 message digest algorithm included in the
+distribution.
If the OpenSSL library is installed, it produces an additional ten
-hex-encoded random bit strings suitable for the SHA1 and other message
-digest algorithms.
-The message digest keys file must be distributed and stored
+hex-encoded random bit strings suitable for SHA1, AES-128-CMAC, and
+other message digest algorithms.
+The message digest symmetric keys file must be distributed and stored
using secure means beyond the scope of NTP itself.
Besides the keys used for ordinary NTP associations, additional keys
can be defined as passwords for the
Some files used by this program are encrypted using a private password.
The
\f\*[B-Font]\-p\f[]
-option specifies the password for local encrypted files and the
+option specifies the read password for local encrypted files and the
\f\*[B-Font]\-q\f[]
-option the password for encrypted files sent to remote sites.
+option the write password for encrypted files sent to remote sites.
If no password is specified, the host name returned by the Unix
-\fBgethostname\f[]\fR()\f[]
-function, normally the DNS name of the host is used.
+\fChostname\f[]\fR(1)\f[]
+command, normally the DNS name of the host, is used as the the default read
+password, for convenience.
+The
+\f\*[B-Font]ntp-keygen\fP
+program prompts for the password if it reads an encrypted file
+and the password is missing or incorrect.
+If an encrypted file is read successfully and
+no write password is specified, the read password is used
+as the write password by default.
.sp \n(Ppu
.ne 2
The
-\f\*[I-Font]pw\f[]
+\f\*[B-Font]pw\f[]
option of the
-\f\*[I-Font]crypto\f[]
+\f\*[B-Font]crypto\f[]
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
configuration command specifies the read
password for previously encrypted local files.
-This must match the local password used by this program.
+This must match the local read password used by this program.
If not specified, the host name is used.
-Thus, if files are generated by this program without password,
+Thus, if files are generated by this program without an explicit password,
they can be read back by
-\f\*[I-Font]ntpd\f[]
-without password but only on the same host.
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+without specifying an explicit password but only on the same host.
+If the write password used for encryption is specified as the host name,
+these files can be read by that host with no explicit password.
.sp \n(Ppu
.ne 2
used only by that host, although exceptions exist as noted later on
this page.
The symmetric keys file, normally called
-\f\*[I-Font]ntp.keys\f[],
+\fIntp.keys\f[],
is usually installed in
\fI/etc\f[].
Other files and links are usually installed in
\fI/usr/local/etc\f[],
which is normally in a shared filesystem in
NFS-mounted networks and cannot be changed by shared clients.
-The location of the keys directory can be changed by the
-\f\*[I-Font]keysdir\f[]
-configuration command in such cases.
-Normally, this is in
-\fI/etc\f[].
+In these cases, NFS clients can specify the files in another
+directory such as
+\fI/etc\f[]
+using the
+\f\*[B-Font]keysdir\f[]
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+configuration file command.
.sp \n(Ppu
.ne 2
This program directs commentary and error messages to the standard
error stream
-\f\*[I-Font]stderr\f[]
+\fIstderr\f[]
and remote files to the standard output stream
-\f\*[I-Font]stdout\f[]
+\fIstdout\f[]
where they can be piped to other applications or redirected to files.
The names used for generated files and links all begin with the
string
-\f\*[I-Font]ntpkey\f[]
+\fIntpkey\&*\f[]
and include the file type, generating host and filestamp,
as described in the
-\*[Lq]Cryptographic Data Files\*[Rq]
+\fICryptographic Data Files\f[]
section below.
.SS Running the Program
-To test and gain experience with Autokey concepts, log in as root and
-change to the keys directory, usually
-\fI/usr/local/etc\f[]
-When run for the first time, or if all files with names beginning with
-\f\*[I-Font]ntpkey\f[]
-have been removed, use the
-\f\*[B-Font]ntp-keygen\fP
-command without arguments to generate a
-default RSA host key and matching RSA-MD5 certificate with expiration
-date one year hence.
-If run again without options, the program uses the
-existing keys and parameters and generates only a new certificate with
-new expiration date one year hence.
-.sp \n(Ppu
-.ne 2
-
-Run the command on as many hosts as necessary.
-Designate one of them as the trusted host (TH) using
+The safest way to run the
\f\*[B-Font]ntp-keygen\fP
-with the
-\f\*[B-Font]\-T\f[]
-option and configure it to synchronize from reliable Internet servers.
-Then configure the other hosts to synchronize to the TH directly or
-indirectly.
-A certificate trail is created when Autokey asks the immediately
-ascendant host towards the TH to sign its certificate, which is then
-provided to the immediately descendant host on request.
-All group hosts should have acyclic certificate trails ending on the TH.
-.sp \n(Ppu
-.ne 2
-
-The host key is used to encrypt the cookie when required and so must be
-RSA type.
-By default, the host key is also the sign key used to encrypt
-signatures.
-A different sign key can be assigned using the
-\f\*[B-Font]\-S\f[]
-option and this can be either RSA or DSA type.
-By default, the signature
-message digest type is MD5, but any combination of sign key type and
-message digest type supported by the OpenSSL library can be specified
-using the
-\f\*[B-Font]\-c\f[]
-option.
-The rules say cryptographic media should be generated with proventic
-filestamps, which means the host should already be synchronized before
-this program is run.
-This of course creates a chicken-and-egg problem
-when the host is started for the first time.
-Accordingly, the host time
-should be set by some other means, such as eyeball-and-wristwatch, at
-least so that the certificate lifetime is within the current year.
-After that and when the host is synchronized to a proventic source, the
-certificate should be re-generated.
-.sp \n(Ppu
-.ne 2
-
-Additional information on trusted groups and identity schemes is on the
-\*[Lq]Autokey Public-Key Authentication\*[Rq]
-page.
-.sp \n(Ppu
-.ne 2
-
-The
-\fCntpd\f[]\fR(1ntpdmdoc)\f[]
-configuration command
-\f\*[B-Font]crypto\f[] \f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]
-specifies the read password for previously encrypted files.
-The daemon expires on the spot if the password is missing
-or incorrect.
-For convenience, if a file has been previously encrypted,
-the default read password is the name of the host running
-the program.
-If the previous write password is specified as the host name,
-these files can be read by that host with no explicit password.
-.sp \n(Ppu
-.ne 2
-
-File names begin with the prefix
-\f\*[B-Font]ntpkey_\f[]
-and end with the postfix
-\f\*[I-Font]_hostname.filestamp\f[],
-where
-\f\*[I-Font]hostname\f[]
-is the owner name, usually the string returned
-by the Unix gethostname() routine, and
-\f\*[I-Font]filestamp\f[]
-is the NTP seconds when the file was generated, in decimal digits.
-This both guarantees uniqueness and simplifies maintenance
-procedures, since all files can be quickly removed
-by a
-\f\*[B-Font]rm\f[] \f\*[B-Font]ntpkey\&*\f[]
-command or all files generated
-at a specific time can be removed by a
-\f\*[B-Font]rm\f[]
-\f\*[I-Font]\&*filestamp\f[]
-command.
-To further reduce the risk of misconfiguration,
-the first two lines of a file contain the file name
-and generation date and time as comments.
-.sp \n(Ppu
-.ne 2
-
-All files are installed by default in the keys directory
+program is logged in directly as root.
+The recommended procedure is change to the
+\f\*[I-Font]keys\f[]
+directory, usually
\fI/usr/local/etc\f[],
-which is normally in a shared filesystem
-in NFS-mounted networks.
-The actual location of the keys directory
-and each file can be overridden by configuration commands,
-but this is not recommended.
-Normally, the files for each host are generated by that host
-and used only by that host, although exceptions exist
-as noted later on this page.
-.sp \n(Ppu
-.ne 2
-
-Normally, files containing private values,
-including the host key, sign key and identification parameters,
-are permitted root read/write-only;
-while others containing public values are permitted world readable.
-Alternatively, files containing private values can be encrypted
-and these files permitted world readable,
-which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
-dependent clients can all be installed in the same shared directory.
+then run the program.
.sp \n(Ppu
.ne 2
-The recommended practice is to keep the file name extensions
-when installing a file and to install a soft link
-from the generic names specified elsewhere on this page
-to the generated files.
-This allows new file generations to be activated simply
-by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
-If a link is not present,
-\fCntpd\f[]\fR(1ntpdmdoc)\f[]
-extracts the filestamp from the file itself.
-This allows clients to verify that the file and generation times
-are always current.
-The
-\f\*[B-Font]ntp-keygen\fP
-program uses the same timestamp extension for all files generated
-at one time, so each generation is distinct and can be readily
-recognized in monitoring data.
-.SS Running the program
-The safest way to run the
+To test and gain experience with Autokey concepts, log in as root and
+change to the
+\f\*[I-Font]keys\f[]
+directory, usually
+\fI/usr/local/etc\f[].
+When run for the first time, or if all files with names beginning with
+\fIntpkey\&*\f[]
+have been removed, use the
\f\*[B-Font]ntp-keygen\fP
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-\fI/usr/local/etc\f[],
-then run the program.
-When run for the first time,
-or if all
-\f\*[B-Font]ntpkey\f[]
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
+command without arguments to generate a default
+\f\*[B-Font]RSA\f[]
+host key and matching
+\f\*[B-Font]RSA-MD5\f[]
+certificate file with expiration date one year hence,
which is all that is necessary in many cases.
The program also generates soft links from the generic names
to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+If run again without options, the program uses the
+existing keys and parameters and generates a new certificate file with
+new expiration date one year hence, and soft link.
.sp \n(Ppu
.ne 2
-The host key is used to encrypt the cookie when required and so must be RSA type.
+The host key is used to encrypt the cookie when required and so must be
+\f\*[B-Font]RSA\f[]
+type.
By default, the host key is also the sign key used to encrypt signatures.
When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
+either
+\f\*[B-Font]RSA\f[]
+or
+\f\*[B-Font]DSA\f[]
+type.
+By default, the message digest type is
+\f\*[B-Font]MD5\f[],
+but any combination
of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
+can be specified, including those using the
+\f\*[B-Font]AES128CMAC\f[], \f\*[B-Font]MD2\f[], \f\*[B-Font]MD5\f[], \f\*[B-Font]MDC2\f[], \f\*[B-Font]SHA\f[], \f\*[B-Font]SHA1\f[]
+and
+\f\*[B-Font]RIPE160\f[]
+message digest algorithms.
However, the scheme specified in the certificate must be compatible
with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Certificates using any digest algorithm are compatible with
+\f\*[B-Font]RSA\f[]
+sign keys;
+however, only
+\f\*[B-Font]SHA\f[]
+and
+\f\*[B-Font]SHA1\f[]
+certificates are compatible with
+\f\*[B-Font]DSA\f[]
+sign keys.
.sp \n(Ppu
.ne 2
.ne 2
Running the program as other than root and using the Unix
-\f\*[B-Font]su\f[]
+\fCsu\f[]\fR(1)\f[]
command
to assume root may not work properly, since by default the OpenSSL library
looks for the random seed file
-\f\*[B-Font].rnd\f[]
+\fI.rnd\f[]
in the user home directory.
However, there should be only one
-\f\*[B-Font].rnd\f[],
+\fI.rnd\f[],
most conveniently
in the root directory, so it is convenient to define the
-\f\*[B-Font]$RANDFILE\f[]
+RANDFILE
environment variable used by the OpenSSL library as the path to
-\f\*[B-Font]/.rnd\f[].
+\fI.rnd\f[].
.sp \n(Ppu
.ne 2
\fI/etc\f[]
using the
\f\*[B-Font]keysdir\f[]
-command.
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+configuration file command.
There is no need for one client to read the keys and certificates
of other clients or servers, as these data are obtained automatically
by the Autokey protocol.
Alternatively, files containing private values can be encrypted
and these files permitted world readable,
which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
+Since uniqueness is insured by the
+\f\*[I-Font]hostname\f[]
+and
+\f\*[I-Font]filestamp\f[]
+file name extensions, the files for an NTP server and
dependent clients can all be installed in the same shared directory.
.sp \n(Ppu
.ne 2
to the generated files.
This allows new file generations to be activated simply
by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
+If a link is present,
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+follows it to the file name to extract the
+\f\*[I-Font]filestamp\f[].
If a link is not present,
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
-extracts the filestamp from the file itself.
+extracts the
+\f\*[I-Font]filestamp\f[]
+from the file itself.
This allows clients to verify that the file and generation times
are always current.
The
\f\*[B-Font]ntp-keygen\fP
-program uses the same timestamp extension for all files generated
+program uses the same
+\f\*[I-Font]filestamp\f[]
+extension for all files generated
at one time, so each generation is distinct and can be readily
recognized in monitoring data.
-.SS Running the program
-The safest way to run the
-\f\*[B-Font]ntp-keygen\fP
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-\fI/usr/local/etc\f[],
-then run the program.
-When run for the first time,
-or if all
-\f\*[B-Font]ntpkey\f[]
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
-which is all that is necessary in many cases.
-The program also generates soft links from the generic names
-to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
.sp \n(Ppu
.ne 2
-The host key is used to encrypt the cookie when required and so must be RSA type.
-By default, the host key is also the sign key used to encrypt signatures.
-When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
-of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
-However, the scheme specified in the certificate must be compatible
-with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-T\f[]
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
.sp \n(Ppu
.ne 2
-Private/public key files and certificates are compatible with
-other OpenSSL applications and very likely other libraries as well.
-Certificates or certificate requests derived from them should be compatible
-with extant industry practice, although some users might find
-the interpretation of X509v3 extension fields somewhat liberal.
-However, the identification parameter files, although encoded
-as the other files, are probably not compatible with anything other than Autokey.
+The host key is used to encrypt the cookie when required and so must be
+RSA type.
+By default, the host key is also the sign key used to encrypt
+signatures.
+A different sign key can be assigned using the
+\f\*[B-Font]\-S\f[]
+option and this can be either
+\f\*[B-Font]RSA\f[]
+or
+\f\*[B-Font]DSA\f[]
+type.
+By default, the signature
+message digest type is
+\f\*[B-Font]MD5\f[],
+but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+\f\*[B-Font]\-c\f[]
+option.
.sp \n(Ppu
.ne 2
-Running the program as other than root and using the Unix
-\f\*[B-Font]su\f[]
-command
-to assume root may not work properly, since by default the OpenSSL library
-looks for the random seed file
-\f\*[B-Font].rnd\f[]
-in the user home directory.
-However, there should be only one
-\f\*[B-Font].rnd\f[],
-most conveniently
-in the root directory, so it is convenient to define the
-\f\*[B-Font]$RANDFILE\f[]
-environment variable used by the OpenSSL library as the path to
-\f\*[B-Font]/.rnd\f[].
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
.sp \n(Ppu
.ne 2
-Installing the keys as root might not work in NFS-mounted
-shared file systems, as NFS clients may not be able to write
-to the shared keys directory, even as root.
-In this case, NFS clients can specify the files in another
-directory such as
-\fI/etc\f[]
-using the
-\f\*[B-Font]keysdir\f[]
-command.
-There is no need for one client to read the keys and certificates
-of other clients or servers, as these data are obtained automatically
-by the Autokey protocol.
+Additional information on trusted groups and identity schemes is on the
+\*[Lq]Autokey Public-Key Authentication\*[Rq]
+page.
.sp \n(Ppu
.ne 2
-Ordinarily, cryptographic files are generated by the host that uses them,
-but it is possible for a trusted agent (TA) to generate these files
-for other hosts; however, in such cases files should always be encrypted.
-The subject name and trusted name default to the hostname
-of the host generating the files, but can be changed by command line options.
-It is convenient to designate the owner name and trusted name
-as the subject and issuer fields, respectively, of the certificate.
-The owner name is also used for the host and sign key files,
-while the trusted name is used for the identity files.
-seconds.
-seconds.
-s Trusted Hosts and Groups
+File names begin with the prefix
+\fIntpkey\f[]_
+and end with the suffix
+\fI_\f[]\f\*[I-Font]hostname\f[]. \f\*[I-Font]filestamp\f[],
+where
+\f\*[I-Font]hostname\f[]
+is the owner name, usually the string returned
+by the Unix
+\fChostname\f[]\fR(1)\f[]
+command, and
+\f\*[I-Font]filestamp\f[]
+is the NTP seconds when the file was generated, in decimal digits.
+This both guarantees uniqueness and simplifies maintenance
+procedures, since all files can be quickly removed
+by a
+\f\*[B-Font]rm\f[] \fIntpkey\&*\f[]
+command or all files generated
+at a specific time can be removed by a
+\f\*[B-Font]rm\f[] \fI\&*\f[]\f\*[I-Font]filestamp\f[]
+command.
+To further reduce the risk of misconfiguration,
+the first two lines of a file contain the file name
+and generation date and time as comments.
+.SS Trusted Hosts and Groups
Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
\fIAuthentication\f[] \fIOptions\f[]
section of
\fCntp.conf\f[]\fR(5)\f[].
-The default cryptotype uses RSA encryption, MD5 message digest
-and TC identification.
+The default cryptotype uses
+\f\*[B-Font]RSA\f[]
+encryption,
+\f\*[B-Font]MD5\f[]
+message digest
+and
+\f\*[B-Font]TC\f[]
+identification.
First, configure a NTP subnet including one or more low-stratum
trusted hosts from which all other hosts derive synchronization
directly or indirectly.
On each trusted host as root, change to the keys directory.
To insure a fresh fileset, remove all
-\f\*[B-Font]ntpkey\f[]
+\fIntpkey\f[]
files.
Then run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]RSA\f[]
or
\f\*[B-Font]DSA\f[].
-The most often need to do this is when a DSA-signed certificate is used.
+The most frequent need to do this is when a
+\f\*[B-Font]DSA\f[]\-signed
+certificate is used.
If it is necessary to use a different certificate scheme than the default,
run
\f\*[B-Font]ntp-keygen\fP
option and selected
\f\*[I-Font]scheme\f[]
as needed.
-f
+If
\f\*[B-Font]ntp-keygen\fP
is run again without these options, it generates a new certificate
-using the same scheme and sign key.
+using the same scheme and sign key, and soft link.
.sp \n(Ppu
.ne 2
Simply run
\f\*[B-Font]ntp-keygen\fP
with the same flags as before to generate new certificates
-using existing keys.
+using existing keys, and soft links.
However, if the host or sign key is changed,
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
should be restarted.
at which time the protocol is restarted.
.SS Identity Schemes
As mentioned on the Autonomous Authentication page,
-the default TC identity scheme is vulnerable to a middleman attack.
+the default
+\f\*[B-Font]TC\f[]
+identity scheme is vulnerable to a middleman attack.
However, there are more secure identity schemes available,
-including PC, IFF, GQ and MV described on the
-"Identification Schemes"
-page
-(maybe available at
-\f[C]http://www.eecis.udel.edu/%7emills/keygen.html\f[]).
+including
+\f\*[B-Font]PC\f[], \f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[]
+and
+\f\*[B-Font]MV\f[]
+schemes described below.
These schemes are based on a TA, one or more trusted hosts
and some number of nontrusted hosts.
Trusted hosts prove identity using values provided by the TA,
\f\*[B-Font]\-P\f[]
\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
to generate the host key file
-\fIntpkey_RSAkey_\f[]\f\*[I-Font]alice.filestamp\f[]
+\fIntpkey\f[]_ \f\*[B-Font]RSA\f[] \fIkey_alice.\f[] \f\*[I-Font]filestamp\f[]
and trusted private certificate file
-\fIntpkey_RSA-MD5_cert_\f[]\f\*[I-Font]alice.filestamp\f[].
+\fIntpkey\f[]_ \f\*[B-Font]RSA-MD5\f[] \f\*[B-Font]_\f[] \fIcert_alice.\f[] \f\*[I-Font]filestamp\f[],
+and soft links.
Copy both files to all group hosts;
they replace the files which would be generated in other schemes.
-On each host bob install a soft link from the generic name
+On each host
+\f\*[I-Font]bob\f[]
+install a soft link from the generic name
\fIntpkey_host_\f[]\f\*[I-Font]bob\f[]
to the host key file and soft link
\fIntpkey_cert_\f[]\f\*[I-Font]bob\f[]
by trusted host alice.
In this scheme it is not possible to refresh
either the keys or certificates without copying them
-to all other hosts in the group.
+to all other hosts in the group, and recreating the soft links.
.sp \n(Ppu
.ne 2
-For the IFF scheme proceed as in the TC scheme to generate keys
+For the
+\f\*[B-Font]IFF\f[]
+scheme proceed as in the
+\f\*[B-Font]TC\f[]
+scheme to generate keys
and certificates for all group hosts, then for every trusted host in the group,
-generate the IFF parameter file.
+generate the
+\f\*[B-Font]IFF\f[]
+parameter file.
On trusted host alice run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]\-T\f[]
\f\*[B-Font]\-I\f[]
\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
to produce her parameter file
-\fIntpkey_IFFpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+\fIntpkey_IFFpar_alice.\f[]\f\*[I-Font]filestamp\f[],
which includes both server and client keys.
Copy this file to all group hosts that operate as both servers
and clients and install a soft link from the generic
-\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_iff_alice\f[]
to this file.
If there are no hosts restricted to operate only as clients,
there is nothing further to do.
-As the IFF scheme is independent
+As the
+\f\*[B-Font]IFF\f[]
+scheme is independent
of keys and certificates, these files can be refreshed as needed.
.sp \n(Ppu
.ne 2
After generating the parameter file, on alice run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]\-e\f[]
-and pipe the output to a file or mail program.
-Copy or mail this file to all restricted clients.
+and pipe the output to a file or email program.
+Copy or email this file to all restricted clients.
On these clients install a soft link from the generic
-\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_iff_alice\f[]
to this file.
To further protect the integrity of the keys,
each file can be encrypted with a secret password.
.sp \n(Ppu
.ne 2
-For the GQ scheme proceed as in the TC scheme to generate keys
+For the
+\f\*[B-Font]GQ\f[]
+scheme proceed as in the
+\f\*[B-Font]TC\f[]
+scheme to generate keys
and certificates for all group hosts, then for every trusted host
-in the group, generate the IFF parameter file.
+in the group, generate the
+\f\*[B-Font]IFF\f[]
+parameter file.
On trusted host alice run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]\-T\f[]
\f\*[B-Font]\-G\f[]
\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
to produce her parameter file
-\fIntpkey_GQpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+\fIntpkey_GQpar_alice.\f[]\f\*[I-Font]filestamp\f[],
which includes both server and client keys.
Copy this file to all group hosts and install a soft link
from the generic
-\fIntpkey_gq_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_gq_alice\f[]
to this file.
-In addition, on each host bob install a soft link
+In addition, on each host
+\f\*[I-Font]bob\f[]
+install a soft link
from generic
\fIntpkey_gq_\f[]\f\*[I-Font]bob\f[]
to this file.
-As the GQ scheme updates the GQ parameters file and certificate
+As the
+\f\*[B-Font]GQ\f[]
+scheme updates the
+\f\*[B-Font]GQ\f[]
+parameters file and certificate
at the same time, keys and certificates can be regenerated as needed.
.sp \n(Ppu
.ne 2
-For the MV scheme, proceed as in the TC scheme to generate keys
+For the
+\f\*[B-Font]MV\f[]
+scheme, proceed as in the
+\f\*[B-Font]TC\f[]
+scheme to generate keys
and certificates for all group hosts.
For illustration assume trish is the TA, alice one of several trusted hosts
and bob one of her clients.
\f\*[I-Font]n\f[]
is the number of revokable keys (typically 5) to produce
the parameter file
-\fIntpkeys_MVpar_\f[]\f\*[I-Font]trish.filestamp\f[]
+\fIntpkeys_MVpar_trish.\f[]\f\*[I-Font]filestamp\f[]
and client key files
-\fIntpkeys_MVkeyd_\f[]\f\*[I-Font]trish.filestamp\f[]
+\fIntpkeys_MVkey\f[]\f\*[I-Font]d\f[] \f\*[I-Font]_\f[] \fItrish.\f[] \f\*[I-Font]filestamp\f[]
where
\f\*[I-Font]d\f[]
is the key number (0 \&<
\f\*[I-Font]n\f[]).
Copy the parameter file to alice and install a soft link
from the generic
-\fIntpkey_mv_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_mv_alice\f[]
to this file.
Copy one of the client key files to alice for later distribution
to her clients.
-It doesn't matter which client key file goes to alice,
+It does not matter which client key file goes to alice,
since they all work the same way.
-Alice copies the client key file to all of her cliens.
+Alice copies the client key file to all of her clients.
On client bob install a soft link from generic
-\fIntpkey_mvkey_\f[]\f\*[I-Font]bob\f[]
+\fIntpkey_mvkey_bob\f[]
to the client key file.
-As the MV scheme is independent of keys and certificates,
+As the
+\f\*[B-Font]MV\f[]
+scheme is independent of keys and certificates,
these files can be refreshed as needed.
.SS Command Line Options
.TP 7
-.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[]
-Select certificate message digest/signature encryption scheme.
+.NOP \f\*[B-Font]\-b\f[] \f\*[B-Font]\-\-imbits\f[]= \f\*[I-Font]modulus\f[]
+Set the number of bits in the identity modulus for generating identity keys to
+\f\*[I-Font]modulus\f[]
+bits.
+The number of bits in the identity modulus defaults to 256, but can be set to
+values from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.TP 7
+.NOP \f\*[B-Font]\-c\f[] \f\*[B-Font]\-\-certificate\f[]= \f\*[I-Font]scheme\f[]
+Select certificate signature encryption/message digest scheme.
The
\f\*[I-Font]scheme\f[]
can be one of the following:
-. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+\f\*[B-Font]RSA-MD2\f[], \f\*[B-Font]RSA-MD5\f[], \f\*[B-Font]RSA-MDC2\f[], \f\*[B-Font]RSA-SHA\f[], \f\*[B-Font]RSA-SHA1\f[], \f\*[B-Font]RSA-RIPEMD160\f[], \f\*[B-Font]DSA-SHA\f[],
or
\f\*[B-Font]DSA-SHA1\f[].
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key.
+Note that
+\f\*[B-Font]RSA\f[]
+schemes must be used with an
+\f\*[B-Font]RSA\f[]
+sign key and
+\f\*[B-Font]DSA\f[]
+schemes must be used with a
+\f\*[B-Font]DSA\f[]
+sign key.
The default without this option is
\f\*[B-Font]RSA-MD5\f[].
+If compatibility with FIPS 140-2 is required, either the
+\f\*[B-Font]DSA-SHA\f[]
+or
+\f\*[B-Font]DSA-SHA1\f[]
+scheme must be used.
.TP 7
-.NOP \f\*[B-Font]\-d\f[]
-Enable debugging.
+.NOP \f\*[B-Font]\-C\f[] \f\*[B-Font]\-\-cipher\f[]= \f\*[I-Font]cipher\f[]
+Select the OpenSSL cipher to encrypt the files containing private keys.
+The default without this option is three-key triple DES in CBC mode,
+\f\*[B-Font]des-ede3-cbc\f[].
+The
+\f\*[B-Font]openssl\f[] \f\*[B-Font]\-h\f[]
+command provided with OpenSSL displays available ciphers.
+.TP 7
+.NOP \f\*[B-Font]\-d\f[] \f\*[B-Font]\-\-debug-level\f[]
+Increase debugging verbosity level.
This option displays the cryptographic data produced in eye-friendly billboards.
.TP 7
-.NOP \f\*[B-Font]\-e\f[]
-Write the IFF client keys to the standard output.
-This is intended for automatic key distribution by mail.
+.NOP \f\*[B-Font]\-D\f[] \f\*[B-Font]\-\-set-debug-level\f[]= \f\*[I-Font]level\f[]
+Set the debugging verbosity to
+\f\*[I-Font]level\f[].
+This option displays the cryptographic data produced in eye-friendly billboards.
.TP 7
-.NOP \f\*[B-Font]\-G\f[]
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
+.NOP \f\*[B-Font]\-e\f[] \f\*[B-Font]\-\-id-key\f[]
+Write the
+\f\*[B-Font]IFF\f[]
+or
+\f\*[B-Font]GQ\f[]
+public parameters from the
+\f\*[I-Font]IFFkey\f[] \f\*[I-Font]or\f[] \f\*[I-Font]GQkey\f[]
+client keys file previously specified
+as unencrypted data to the standard output stream
+\fIstdout\f[].
+This is intended for automatic key distribution by email.
.TP 7
-.NOP \f\*[B-Font]\-g\f[]
-Generate keys for the GQ identification scheme
-using the existing GQ parameters.
-If the GQ parameters do not yet exist, create them first.
+.NOP \f\*[B-Font]\-G\f[] \f\*[B-Font]\-\-gq-params\f[]
+Generate a new encrypted
+\f\*[B-Font]GQ\f[]
+parameters and key file for the Guillou-Quisquater (GQ) identity scheme.
+This option is mutually exclusive with the
+\f\*[B-Font]\-I\f[]
+and
+\f\*[B-Font]\-V\f[]
+options.
.TP 7
-.NOP \f\*[B-Font]\-H\f[]
-Generate new host keys, obsoleting any that may exist.
+.NOP \f\*[B-Font]\-H\f[] \f\*[B-Font]\-\-host-key\f[]
+Generate a new encrypted
+\f\*[B-Font]RSA\f[]
+public/private host key file.
.TP 7
-.NOP \f\*[B-Font]\-I\f[]
-Generate parameters for the IFF identification scheme,
-obsoleting any that may exist.
+.NOP \f\*[B-Font]\-I\f[] \f\*[B-Font]\-\-iffkey\f[]
+Generate a new encrypted
+\f\*[B-Font]IFF\f[]
+key file for the Schnorr (IFF) identity scheme.
+This option is mutually exclusive with the
+\f\*[B-Font]\-G\f[]
+and
+Fl V
+options.
.TP 7
-.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]name\f[]
-Set the suject name to
-\f\*[I-Font]name\f[].
-This is used as the subject field in certificates
-and in the file name for host and sign keys.
+.NOP \f\*[B-Font]\-i\f[] \f\*[B-Font]\-\-ident\f[]= \f\*[I-Font]group\f[]
+Set the optional Autokey group name to
+\f\*[I-Font]group\f[].
+This is used in the identity scheme parameter file names of
+\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[],
+and
+\f\*[B-Font]MV\f[]
+client parameters files.
+In that role, the default is the host name if no group is provided.
+The group name, if specified using
+\f\*[B-Font]\-i\f[]
+or
+\f\*[B-Font]\-s\f[]
+following an
+\[oq]@@\[cq]
+character, is also used in certificate subject and issuer names in the form
+\f\*[I-Font]host\f[] \f\*[I-Font]@@\f[] \f\*[I-Font]group\f[]
+and should match the group specified via
+\f\*[B-Font]crypto\f[] \f\*[B-Font]ident\f[]
+or
+\f\*[B-Font]server\f[] \f\*[B-Font]ident\f[]
+in the ntpd configuration file.
.TP 7
-.NOP \f\*[B-Font]\-M\f[]
-Generate MD5 keys, obsoleting any that may exist.
+.NOP \f\*[B-Font]\-l\f[] \f\*[B-Font]\-\-lifetime\f[]= \f\*[I-Font]days\f[]
+Set the lifetime for certificate expiration to
+\f\*[I-Font]days\f[].
+The default lifetime is one year (365 days).
.TP 7
-.NOP \f\*[B-Font]\-P\f[]
-Generate a private certificate.
-By default, the program generates public certificates.
+.NOP \f\*[B-Font]\-m\f[] \f\*[B-Font]\-\-modulus\f[]= \f\*[I-Font]bits\f[]
+Set the number of bits in the prime modulus for generating files to
+\f\*[I-Font]bits\f[].
+The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
.TP 7
-.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
-Encrypt generated files containing private data with
-\f\*[I-Font]password\f[]
-and the DES-CBC algorithm.
+.NOP \f\*[B-Font]\-M\f[] \f\*[B-Font]\-\-md5key\f[]
+Generate a new symmetric keys file containing 10
+\f\*[B-Font]MD5\f[]
+keys, and if OpenSSL is available, 10
+\f\*[B-Font]SHA\f[]
+keys.
+An
+\f\*[B-Font]MD5\f[]
+key is a string of 20 random printable ASCII characters, while a
+\f\*[B-Font]SHA\f[]
+key is a string of 40 random hex digits.
+The file can be edited using a text editor to change the key type or key content.
+This option is mutually exclusive with all other options.
.TP 7
-.NOP \f\*[B-Font]\-q\f[]
-Set the password for reading files to password.
+.NOP \f\*[B-Font]\-p\f[] \f\*[B-Font]\-\-password\f[]= \f\*[I-Font]passwd\f[]
+Set the password for reading and writing encrypted files to
+\f\*[I-Font]passwd\f[].
+These include the host, sign and identify key files.
+By default, the password is the string returned by the Unix
+\f\*[B-Font]hostname\f[]
+command.
.TP 7
-.NOP \f\*[B-Font]\-S\f[] [\f\*[B-Font]RSA\f[] | \f\*[B-Font]DSA\f[]]
-Generate a new sign key of the designated type,
-obsoleting any that may exist.
-By default, the program uses the host key as the sign key.
+.NOP \f\*[B-Font]\-P\f[] \f\*[B-Font]\-\-pvt-cert\f[]
+Generate a new private certificate used by the
+\f\*[B-Font]PC\f[]
+identity scheme.
+By default, the program generates public certificates.
+Note: the PC identity scheme is not recommended for new installations.
.TP 7
-.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]name\f[]
-Set the issuer name to
-\f\*[I-Font]name\f[].
-This is used for the issuer field in certificates
-and in the file name for identity files.
+.NOP \f\*[B-Font]\-q\f[] \f\*[B-Font]\-\-export-passwd\f[]= \f\*[I-Font]passwd\f[]
+Set the password for writing encrypted
+\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[] \f\*[B-Font]and\f[] \f\*[B-Font]MV\f[]
+identity files redirected to
+\fIstdout\f[]
+to
+\f\*[I-Font]passwd\f[].
+In effect, these files are decrypted with the
+\f\*[B-Font]\-p\f[]
+password, then encrypted with the
+\f\*[B-Font]\-q\f[]
+password.
+By default, the password is the string returned by the Unix
+\f\*[B-Font]hostname\f[]
+command.
.TP 7
-.NOP \f\*[B-Font]\-T\f[]
+.NOP \f\*[B-Font]\-s\f[] \f\*[B-Font]\-\-subject-key\f[]= [host] [@@ \f\*[I-Font]group\f[]]
+Specify the Autokey host name, where
+\f\*[I-Font]host\f[]
+is the optional host name and
+\f\*[I-Font]group\f[]
+is the optional group name.
+The host name, and if provided, group name are used in
+\f\*[I-Font]host\f[] \f\*[I-Font]@@\f[] \f\*[I-Font]group\f[]
+form as certificate subject and issuer.
+Specifying
+\f\*[B-Font]\-s\f[] \f\*[B-Font]\-@@\f[] \f\*[I-Font]group\f[]
+is allowed, and results in leaving the host name unchanged, as with
+\f\*[B-Font]\-i\f[] \f\*[I-Font]group\f[].
+The group name, or if no group is provided, the host name are also used in the
+file names of
+\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[],
+and
+\f\*[B-Font]MV\f[]
+identity scheme client parameter files.
+If
+\f\*[I-Font]host\f[]
+is not specified, the default host name is the string returned by the Unix
+\f\*[B-Font]hostname\f[]
+command.
+.TP 7
+.NOP \f\*[B-Font]\-S\f[] \f\*[B-Font]\-\-sign-key\f[]= [\f\*[B-Font]RSA\f[] | \f\*[B-Font]DSA\f[]]
+Generate a new encrypted public/private sign key file of the specified type.
+By default, the sign key is the host key and has the same type.
+If compatibility with FIPS 140-2 is required, the sign key type must be
+\f\*[B-Font]DSA\f[].
+.TP 7
+.NOP \f\*[B-Font]\-T\f[] \f\*[B-Font]\-\-trusted-cert\f[]
Generate a trusted certificate.
By default, the program generates a non-trusted certificate.
.TP 7
-.NOP \f\*[B-Font]\-V\f[] \f\*[I-Font]nkeys\f[]
-Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+.NOP \f\*[B-Font]\-V\f[] \f\*[B-Font]\-\-mv-params\f[] \f\*[I-Font]nkeys\f[]
+Generate
+\f\*[I-Font]nkeys\f[]
+encrypted server keys and parameters for the Mu-Varadharajan (MV)
+identity scheme.
+This option is mutually exclusive with the
+\f\*[B-Font]\-I\f[]
+and
+\f\*[B-Font]\-G\f[]
+options.
+Note: support for this option should be considered a work in progress.
.PP
.SS Random Seed File
All cryptographically sound key generation schemes must have means
The entropy seed used by the OpenSSL library is contained in a file,
usually called
-\f\*[B-Font].rnd\f[],
+\fI.rnd\f[],
which must be available when starting the NTP daemon
or the
\f\*[B-Font]ntp-keygen\fP
RANDFILE
environment variable is not present,
the library will look for the
-\f\*[B-Font].rnd\f[]
+\fI.rnd\f[]
file in the user home directory.
+Since both the
+\f\*[B-Font]ntp-keygen\fP
+program and
+\fCntpd\f[]\fR(1ntpdmdoc)\f[]
+daemon must run as root, the logical place to put this file is in
+\fI/.rnd\f[]
+or
+\fI/root/.rnd\f[].
If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
.SS Cryptographic Data Files
-All other file formats begin with two lines.
-The first contains the file name, including the generated host name
-and filestamp.
-The second contains the datestamp in conventional Unix date format.
-Lines beginning with # are considered comments and ignored by the
+All file formats begin with two nonencrypted lines.
+The first line contains the file name, including the generated host name
+and filestamp, in the format
+\fIntpkey_\f[]\f\*[I-Font]key\f[] \f\*[I-Font]_\f[] \f\*[I-Font]name\f[]. \f\*[I-Font]filestamp\f[],
+where
+\f\*[I-Font]key\f[]
+is the key or parameter type,
+\f\*[I-Font]name\f[]
+is the host or group name and
+\f\*[I-Font]filestamp\f[]
+is the filestamp (NTP seconds) when the file was created.
+By convention,
+\f\*[I-Font]key\f[]
+names in generated file names include both upper and lower case
+characters, while
+\f\*[I-Font]key\f[]
+names in generated link names include only lower case characters.
+The filestamp is not used in generated link names.
+The second line contains the datestamp in conventional Unix
+\fIdate\f[]
+format.
+Lines beginning with
+\[oq]#\[cq]
+are considered comments and ignored by the
\f\*[B-Font]ntp-keygen\fP
program and
\fCntpd\f[]\fR(1ntpdmdoc)\f[]
daemon.
-Cryptographic values are encoded first using ASN.1 rules,
-then encrypted if necessary, and finally written PEM-encoded
-printable ASCII format preceded and followed by MIME content identifier lines.
.sp \n(Ppu
.ne 2
-The format of the symmetric keys file is somewhat different
-than the other files in the interest of backward compatibility.
-Since DES-CBC is deprecated in NTPv4, the only key format of interest
-is MD5 alphanumeric strings.
-Following hte heard the keys are
-entered one per line in the format
+The remainder of the file contains cryptographic data, encoded first using ASN.1
+rules, then encrypted if necessary, and finally written in PEM-encoded
+printable ASCII text, preceded and followed by MIME content identifier lines.
+.sp \n(Ppu
+.ne 2
+
+The format of the symmetric keys file, ordinarily named
+\fIntp.keys\f[],
+is somewhat different than the other files in the interest of backward compatibility.
+Ordinarily, the file is generated by this program, but it can be constructed
+and edited using an ordinary text editor.
+.br
+.in +4
+.nf
+# ntpkey_MD5key_bk.ntp.org.3595864945
+# Thu Dec 12 19:22:25 2013
+1 MD5 L";Nw<\`.I<f4U0)247"i # MD5 key
+2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key
+3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
+4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key
+5 MD5 B;fx'Kgr/&4ZTbL6=RxA # MD5 key
+6 MD5 4eYwa\`o}3i@@@@V@@..R9!l # MD5 key
+7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key
+8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
+9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key
+10 MD5 2late4Me # MD5 key
+11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
+12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
+13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
+14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
+15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
+16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
+17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
+18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
+19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
+20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
+.in -4
+.fi
+.in +4
+Figure 1. Typical Symmetric Key File
+.in -4
+.sp \n(Ppu
+.ne 2
+
+Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Following the header the keys are entered one per line in the format
.in +4
\f\*[I-Font]keyno\f[] \f\*[I-Font]type\f[] \f\*[I-Font]key\f[]
.in -4
where
\f\*[I-Font]keyno\f[]
-is a positive integer in the range 1-65,535,
+is a positive integer in the range 1-65534;
\f\*[I-Font]type\f[]
-is the string MD5 defining the key format and
+is the key type for the message digest algorithm, which in the absence of the
+OpenSSL library must be
+\f\*[B-Font]MD5\f[]
+to designate the MD5 message digest algorithm;
+if the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library;
+however, if compatibility with FIPS 140-2 is required,
+the key type must be either
+\f\*[B-Font]SHA\f[]
+or
+\f\*[B-Font]SHA1\f[];
\f\*[I-Font]key\f[]
is the key itself,
-which is a printable ASCII string 16 characters or less in length.
-Each character is chosen from the 93 printable characters
-in the range 0x21 through 0x7f excluding space and the
+which is a printable ASCII string 20 characters or less in length:
+each character is chosen from the 93 printable characters
+in the range 0x21 through 0x7e (
+\[oq]\[cq]!
+through
+\[oq]~\[cq]
+\&) excluding space and the
+\[oq]#\[cq]
+character, and terminated by whitespace or a
\[oq]#\[cq]
character.
+An OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which
+is truncated as necessary.
.sp \n(Ppu
.ne 2
The
\f\*[B-Font]ntp-keygen\fP
-program generates a MD5 symmetric keys file
-\fIntpkey_MD5key_\f[]\f\*[I-Font]hostname.filestamp\f[].
+program generates a symmetric keys file
+\fIntpkey_MD5key_\f[]\f\*[I-Font]hostname\f[]. \f\*[I-Font]filestamp\f[].
Since the file contains private shared keys,
it should be visible only to root and distributed by secure means
to other subnet hosts.
certificate scheme.
.sp
scheme is one of
-RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+RSA-MD2, RSA-MD5, RSA-MDC2, RSA-SHA, RSA-SHA1, RSA-RIPEMD160,
DSA-SHA, or DSA-SHA1.
.sp
-Select the certificate message digest/signature encryption scheme.
+Select the certificate signature encryption/message digest scheme.
Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA-MD5.
.sp
Select the cipher which is used to encrypt the files containing
private keys. The default is three-key triple DES in CBC mode,
-equivalent to "@code{-C des-ede3-cbc". The openssl tool lists ciphers
+equivalent to "\fB-C des-ede3-cbc\fP". The openssl tool lists ciphers
available in "\fBopenssl \-h\fP" output.
.TP
.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-id\-key\f[]
Write IFF or GQ identity keys.
.sp
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
+Write the public parameters from the IFF or GQ client keys to
+the standard output.
+This is intended for automatic key distribution by email.
.TP
.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-gq\-params\f[]
Generate GQ parameters and keys.
the file name of IFF, GQ, and MV client parameters files. In
that role, the default is the host name if this option is not
provided. The group name, if specified using \fB-i/--ident\fP or
-using \fB-s/--subject-name\fP following an '\fB@\fP' character,
-is also a part of the self-signed host certificate's subject and
-issuer names in the form \fBhost@group\fP and should match the
-'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
-\fBntpd\fP's configuration file.
+using \fB-s/--subject-name\fP following an '\fB@@\fP' character,
+is also a part of the self-signed host certificate subject and
+issuer names in the form \fBhost@@group\fP and should match the
+'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in the
+\fBntpd\fP configuration file.
.TP
.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]lifetime\f[], \f\*[B-Font]\-\-lifetime\f[]=\f\*[I-Font]lifetime\f[]
set certificate lifetime.
.sp
Set the certificate expiration to lifetime days from now.
.TP
-.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-md5key\f[]
-generate MD5 keys.
-.sp
-Generate MD5 keys, obsoleting any that may exist.
-.TP
.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]modulus\f[], \f\*[B-Font]\-\-modulus\f[]=\f\*[I-Font]modulus\f[]
-modulus.
+prime modulus.
This option takes an integer number as its argument.
The value of
\f\*[I-Font]modulus\f[]
.sp
The number of bits in the prime modulus. The default is 512.
.TP
+.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-md5key\f[]
+generate symmetric keys.
+.sp
+Generate symmetric keys, obsoleting any that may exist.
+.TP
.NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pvt\-cert\f[]
generate PC private certificate.
.sp
"crypto pw password" configuration command. See also the option
--id-key (-e) for unencrypted exports.
.TP
-.NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]sign\f[], \f\*[B-Font]\-\-sign\-key\f[]=\f\*[I-Font]sign\f[]
-generate sign key (RSA or DSA).
-.sp
-Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
-.TP
.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]host@group\f[], \f\*[B-Font]\-\-subject\-name\f[]=\f\*[I-Font]host@group\f[]
set host and optionally group name.
.sp
Set the Autokey host name, and optionally, group name specified
-following an '\fB@\fP' character. The host name is used in the file
+following an '\fB@@\fP' character. The host name is used in the file
name of generated host and signing certificates, without the
group name. The host name, and if provided, group name are used
-in \fBhost@group\fP form for the host certificate's subject and issuer
-fields. Specifying '\fB-s @group\fP' is allowed, and results in
-leaving the host name unchanged while appending \fB@group\fP to the
+in \fBhost@@group\fP form for the host certificate subject and issuer
+fields. Specifying '\fB-s @@group\fP' is allowed, and results in
+leaving the host name unchanged while appending \fB@@group\fP to the
subject and issuer fields, as with \fB-i group\fP. The group name, or
if not provided, the host name are also used in the file names
of IFF, GQ, and MV client parameter files.
.TP
+.NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]sign\f[], \f\*[B-Font]\-\-sign\-key\f[]=\f\*[I-Font]sign\f[]
+generate sign key (RSA or DSA).
+.sp
+Generate a new sign key of the designated type, obsoleting any
+that may exist. By default, the program uses the host key as the
+sign key.
+.TP
.NOP \f\*[B-Font]\-T\f[], \f\*[B-Font]\-\-trusted\-cert\f[]
trusted certificate (TC scheme).
.sp
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.SH USAGE
-The
-\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
-option specifies the write password and
-\f\*[B-Font]\-q\f[] \f\*[I-Font]password\f[]
-option the read password for previously encrypted files.
-The
-\f\*[B-Font]ntp-keygen\fP
-program prompts for the password if it reads an encrypted file
-and the password is missing or incorrect.
-If an encrypted file is read successfully and
-no write password is specified, the read password is used
-as the write password by default.
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH "FILES"
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
-It can take quite a while to generate some cryptographic values,
-from one to several minutes with modern architectures
-such as UltraSPARC and up to tens of minutes to an hour
-with older architectures such as SPARC IPC.
+It can take quite a while to generate some cryptographic values.
.sp \n(Ppu
.ne 2
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:04 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:26 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
.Sh DESCRIPTION
This program generates cryptographic data files used by the NTPv4
authentication and identification schemes.
-It generates MD5 key files used in symmetric key cryptography.
-In addition, if the OpenSSL software library has been installed,
-it generates keys, certificate and identity files used in public key
-cryptography.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software library has been installed, it can generate host keys,
+signing keys, certificates, and identity keys and parameters used in Autokey
+public key cryptography.
These files are used for cookie encryption,
-digital signature and challenge/response identification algorithms
+digital signature, and challenge/response identification algorithms
compatible with the Internet standard security infrastructure.
.Pp
-All files are in PEM\-encoded printable ASCII format,
-so they can be embedded as MIME attachments in mail to other sites
+The message digest symmetric keys file is generated in a format
+compatible with NTPv3.
+All other files are in PEM\-encoded printable ASCII format,
+so they can be embedded as MIME attachments in email to other sites
and certificate authorities.
By default, files are not encrypted.
.Pp
-When used to generate message digest keys, the program produces a file
-containing ten pseudo\-random printable ASCII strings suitable for the
-MD5 message digest algorithm included in the distribution.
+When used to generate message digest symmetric keys, the program
+produces a file containing ten pseudo\-random printable ASCII strings
+suitable for the MD5 message digest algorithm included in the
+distribution.
If the OpenSSL library is installed, it produces an additional ten
-hex\-encoded random bit strings suitable for the SHA1 and other message
-digest algorithms.
-The message digest keys file must be distributed and stored
+hex\-encoded random bit strings suitable for SHA1, AES\-128\-CMAC, and
+other message digest algorithms.
+The message digest symmetric keys file must be distributed and stored
using secure means beyond the scope of NTP itself.
Besides the keys used for ordinary NTP associations, additional keys
can be defined as passwords for the
Some files used by this program are encrypted using a private password.
The
.Fl p
-option specifies the password for local encrypted files and the
+option specifies the read password for local encrypted files and the
.Fl q
-option the password for encrypted files sent to remote sites.
+option the write password for encrypted files sent to remote sites.
If no password is specified, the host name returned by the Unix
-.Fn gethostname
-function, normally the DNS name of the host is used.
+.Xr hostname 1
+command, normally the DNS name of the host, is used as the the default read
+password, for convenience.
+The
+.Nm
+program prompts for the password if it reads an encrypted file
+and the password is missing or incorrect.
+If an encrypted file is read successfully and
+no write password is specified, the read password is used
+as the write password by default.
.Pp
The
-.Ar pw
+.Cm pw
option of the
-.Ar crypto
+.Ic crypto
+.Xr ntpd 1ntpdmdoc
configuration command specifies the read
password for previously encrypted local files.
-This must match the local password used by this program.
+This must match the local read password used by this program.
If not specified, the host name is used.
-Thus, if files are generated by this program without password,
+Thus, if files are generated by this program without an explicit password,
they can be read back by
-.Ar ntpd
-without password but only on the same host.
+.Xr ntpd 1ntpdmdoc
+without specifying an explicit password but only on the same host.
+If the write password used for encryption is specified as the host name,
+these files can be read by that host with no explicit password.
.Pp
Normally, encrypted files for each host are generated by that host and
used only by that host, although exceptions exist as noted later on
this page.
The symmetric keys file, normally called
-.Ar ntp.keys ,
+.Pa ntp.keys ,
is usually installed in
.Pa /etc .
Other files and links are usually installed in
.Pa /usr/local/etc ,
which is normally in a shared filesystem in
NFS\-mounted networks and cannot be changed by shared clients.
-The location of the keys directory can be changed by the
-.Ar keysdir
-configuration command in such cases.
-Normally, this is in
-.Pa /etc .
+In these cases, NFS clients can specify the files in another
+directory such as
+.Pa /etc
+using the
+.Ic keysdir
+.Xr ntpd 1ntpdmdoc
+configuration file command.
.Pp
This program directs commentary and error messages to the standard
error stream
-.Ar stderr
+.Pa stderr
and remote files to the standard output stream
-.Ar stdout
+.Pa stdout
where they can be piped to other applications or redirected to files.
The names used for generated files and links all begin with the
string
-.Ar ntpkey
+.Pa ntpkey\&*
and include the file type, generating host and filestamp,
as described in the
-.Dq Cryptographic Data Files
+.Sx "Cryptographic Data Files"
section below.
.Ss Running the Program
-To test and gain experience with Autokey concepts, log in as root and
-change to the keys directory, usually
-.Pa /usr/local/etc
-When run for the first time, or if all files with names beginning with
-.Ar ntpkey
-have been removed, use the
-.Nm
-command without arguments to generate a
-default RSA host key and matching RSA\-MD5 certificate with expiration
-date one year hence.
-If run again without options, the program uses the
-existing keys and parameters and generates only a new certificate with
-new expiration date one year hence.
-.Pp
-Run the command on as many hosts as necessary.
-Designate one of them as the trusted host (TH) using
-.Nm
-with the
-.Fl T
-option and configure it to synchronize from reliable Internet servers.
-Then configure the other hosts to synchronize to the TH directly or
-indirectly.
-A certificate trail is created when Autokey asks the immediately
-ascendant host towards the TH to sign its certificate, which is then
-provided to the immediately descendant host on request.
-All group hosts should have acyclic certificate trails ending on the TH.
-.Pp
-The host key is used to encrypt the cookie when required and so must be
-RSA type.
-By default, the host key is also the sign key used to encrypt
-signatures.
-A different sign key can be assigned using the
-.Fl S
-option and this can be either RSA or DSA type.
-By default, the signature
-message digest type is MD5, but any combination of sign key type and
-message digest type supported by the OpenSSL library can be specified
-using the
-.Fl c
-option.
-The rules say cryptographic media should be generated with proventic
-filestamps, which means the host should already be synchronized before
-this program is run.
-This of course creates a chicken\-and\-egg problem
-when the host is started for the first time.
-Accordingly, the host time
-should be set by some other means, such as eyeball\-and\-wristwatch, at
-least so that the certificate lifetime is within the current year.
-After that and when the host is synchronized to a proventic source, the
-certificate should be re\-generated.
-.Pp
-Additional information on trusted groups and identity schemes is on the
-.Dq Autokey Public\-Key Authentication
-page.
-.Pp
-The
-.Xr ntpd 1ntpdmdoc
-configuration command
-.Ic crypto pw Ar password
-specifies the read password for previously encrypted files.
-The daemon expires on the spot if the password is missing
-or incorrect.
-For convenience, if a file has been previously encrypted,
-the default read password is the name of the host running
-the program.
-If the previous write password is specified as the host name,
-these files can be read by that host with no explicit password.
-.Pp
-File names begin with the prefix
-.Cm ntpkey_
-and end with the postfix
-.Ar _hostname.filestamp ,
-where
-.Ar hostname
-is the owner name, usually the string returned
-by the Unix gethostname() routine, and
-.Ar filestamp
-is the NTP seconds when the file was generated, in decimal digits.
-This both guarantees uniqueness and simplifies maintenance
-procedures, since all files can be quickly removed
-by a
-.Ic rm ntpkey\&*
-command or all files generated
-at a specific time can be removed by a
-.Ic rm
-.Ar \&*filestamp
-command.
-To further reduce the risk of misconfiguration,
-the first two lines of a file contain the file name
-and generation date and time as comments.
-.Pp
-All files are installed by default in the keys directory
-.Pa /usr/local/etc ,
-which is normally in a shared filesystem
-in NFS\-mounted networks.
-The actual location of the keys directory
-and each file can be overridden by configuration commands,
-but this is not recommended.
-Normally, the files for each host are generated by that host
-and used only by that host, although exceptions exist
-as noted later on this page.
-.Pp
-Normally, files containing private values,
-including the host key, sign key and identification parameters,
-are permitted root read/write\-only;
-while others containing public values are permitted world readable.
-Alternatively, files containing private values can be encrypted
-and these files permitted world readable,
-which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
-dependent clients can all be installed in the same shared directory.
-.Pp
-The recommended practice is to keep the file name extensions
-when installing a file and to install a soft link
-from the generic names specified elsewhere on this page
-to the generated files.
-This allows new file generations to be activated simply
-by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
-If a link is not present,
-.Xr ntpd 1ntpdmdoc
-extracts the filestamp from the file itself.
-This allows clients to verify that the file and generation times
-are always current.
-The
-.Nm
-program uses the same timestamp extension for all files generated
-at one time, so each generation is distinct and can be readily
-recognized in monitoring data.
-.Ss Running the program
The safest way to run the
.Nm
program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
+The recommended procedure is change to the
+.Ar keys
+directory, usually
.Pa /usr/local/etc ,
then run the program.
-When run for the first time,
-or if all
-.Cm ntpkey
-files have been removed,
-the program generates a RSA host key file and matching RSA\-MD5 certificate file,
+.Pp
+To test and gain experience with Autokey concepts, log in as root and
+change to the
+.Ar keys
+directory, usually
+.Pa /usr/local/etc .
+When run for the first time, or if all files with names beginning with
+.Pa ntpkey\&*
+have been removed, use the
+.Nm
+command without arguments to generate a default
+.Cm RSA
+host key and matching
+.Cm RSA\-MD5
+certificate file with expiration date one year hence,
which is all that is necessary in many cases.
The program also generates soft links from the generic names
to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+If run again without options, the program uses the
+existing keys and parameters and generates a new certificate file with
+new expiration date one year hence, and soft link.
.Pp
-The host key is used to encrypt the cookie when required and so must be RSA type.
+The host key is used to encrypt the cookie when required and so must be
+.Cm RSA
+type.
By default, the host key is also the sign key used to encrypt signatures.
When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
+either
+.Cm RSA
+or
+.Cm DSA
+type.
+By default, the message digest type is
+.Cm MD5 ,
+but any combination
of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
+can be specified, including those using the
+.Cm AES128CMAC , MD2 , MD5 , MDC2 , SHA , SHA1
+and
+.Cm RIPE160
+message digest algorithms.
However, the scheme specified in the certificate must be compatible
with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Certificates using any digest algorithm are compatible with
+.Cm RSA
+sign keys;
+however, only
+.Cm SHA
+and
+.Cm SHA1
+certificates are compatible with
+.Cm DSA
+sign keys.
.Pp
Private/public key files and certificates are compatible with
other OpenSSL applications and very likely other libraries as well.
as the other files, are probably not compatible with anything other than Autokey.
.Pp
Running the program as other than root and using the Unix
-.Ic su
+.Xr su 1
command
to assume root may not work properly, since by default the OpenSSL library
looks for the random seed file
-.Cm .rnd
+.Pa .rnd
in the user home directory.
However, there should be only one
-.Cm .rnd ,
+.Pa .rnd ,
most conveniently
in the root directory, so it is convenient to define the
-.Cm $RANDFILE
+.Ev RANDFILE
environment variable used by the OpenSSL library as the path to
-.Cm /.rnd .
+.Pa .rnd .
.Pp
Installing the keys as root might not work in NFS\-mounted
shared file systems, as NFS clients may not be able to write
.Pa /etc
using the
.Ic keysdir
-command.
+.Xr ntpd 1ntpdmdoc
+configuration file command.
There is no need for one client to read the keys and certificates
of other clients or servers, as these data are obtained automatically
by the Autokey protocol.
Alternatively, files containing private values can be encrypted
and these files permitted world readable,
which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
+Since uniqueness is insured by the
+.Ar hostname
+and
+.Ar filestamp
+file name extensions, the files for an NTP server and
dependent clients can all be installed in the same shared directory.
.Pp
The recommended practice is to keep the file name extensions
to the generated files.
This allows new file generations to be activated simply
by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
+If a link is present,
+.Xr ntpd 1ntpdmdoc
+follows it to the file name to extract the
+.Ar filestamp .
If a link is not present,
.Xr ntpd 1ntpdmdoc
-extracts the filestamp from the file itself.
+extracts the
+.Ar filestamp
+from the file itself.
This allows clients to verify that the file and generation times
are always current.
The
.Nm
-program uses the same timestamp extension for all files generated
+program uses the same
+.Ar filestamp
+extension for all files generated
at one time, so each generation is distinct and can be readily
recognized in monitoring data.
-.Ss Running the program
-The safest way to run the
+.Pp
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
.Nm
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-.Pa /usr/local/etc ,
-then run the program.
-When run for the first time,
-or if all
-.Cm ntpkey
-files have been removed,
-the program generates a RSA host key file and matching RSA\-MD5 certificate file,
-which is all that is necessary in many cases.
-The program also generates soft links from the generic names
-to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+with the
+.Fl T
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
.Pp
-The host key is used to encrypt the cookie when required and so must be RSA type.
-By default, the host key is also the sign key used to encrypt signatures.
-When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
-of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
-However, the scheme specified in the certificate must be compatible
-with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+The host key is used to encrypt the cookie when required and so must be
+RSA type.
+By default, the host key is also the sign key used to encrypt
+signatures.
+A different sign key can be assigned using the
+.Fl S
+option and this can be either
+.Cm RSA
+or
+.Cm DSA
+type.
+By default, the signature
+message digest type is
+.Cm MD5 ,
+but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+.Fl c
+option.
.Pp
-Private/public key files and certificates are compatible with
-other OpenSSL applications and very likely other libraries as well.
-Certificates or certificate requests derived from them should be compatible
-with extant industry practice, although some users might find
-the interpretation of X509v3 extension fields somewhat liberal.
-However, the identification parameter files, although encoded
-as the other files, are probably not compatible with anything other than Autokey.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken\-and\-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball\-and\-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re\-generated.
.Pp
-Running the program as other than root and using the Unix
-.Ic su
-command
-to assume root may not work properly, since by default the OpenSSL library
-looks for the random seed file
-.Cm .rnd
-in the user home directory.
-However, there should be only one
-.Cm .rnd ,
-most conveniently
-in the root directory, so it is convenient to define the
-.Cm $RANDFILE
-environment variable used by the OpenSSL library as the path to
-.Cm /.rnd .
+Additional information on trusted groups and identity schemes is on the
+.Dq Autokey Public\-Key Authentication
+page.
.Pp
-Installing the keys as root might not work in NFS\-mounted
-shared file systems, as NFS clients may not be able to write
-to the shared keys directory, even as root.
-In this case, NFS clients can specify the files in another
-directory such as
-.Pa /etc
-using the
-.Ic keysdir
+File names begin with the prefix
+.Pa ntpkey Ns _
+and end with the suffix
+.Pa _ Ns Ar hostname . Ar filestamp ,
+where
+.Ar hostname
+is the owner name, usually the string returned
+by the Unix
+.Xr hostname 1
+command, and
+.Ar filestamp
+is the NTP seconds when the file was generated, in decimal digits.
+This both guarantees uniqueness and simplifies maintenance
+procedures, since all files can be quickly removed
+by a
+.Ic rm Pa ntpkey\&*
+command or all files generated
+at a specific time can be removed by a
+.Ic rm Pa \&* Ns Ar filestamp
command.
-There is no need for one client to read the keys and certificates
-of other clients or servers, as these data are obtained automatically
-by the Autokey protocol.
-.Pp
-Ordinarily, cryptographic files are generated by the host that uses them,
-but it is possible for a trusted agent (TA) to generate these files
-for other hosts; however, in such cases files should always be encrypted.
-The subject name and trusted name default to the hostname
-of the host generating the files, but can be changed by command line options.
-It is convenient to designate the owner name and trusted name
-as the subject and issuer fields, respectively, of the certificate.
-The owner name is also used for the host and sign key files,
-while the trusted name is used for the identity files.
-seconds.
-seconds.
-s Trusted Hosts and Groups
+To further reduce the risk of misconfiguration,
+the first two lines of a file contain the file name
+and generation date and time as comments.
+.Ss Trusted Hosts and Groups
Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
.Sx Authentication Options
section of
.Xr ntp.conf 5 .
-The default cryptotype uses RSA encryption, MD5 message digest
-and TC identification.
+The default cryptotype uses
+.Cm RSA
+encryption,
+.Cm MD5
+message digest
+and
+.Cm TC
+identification.
First, configure a NTP subnet including one or more low\-stratum
trusted hosts from which all other hosts derive synchronization
directly or indirectly.
.Pp
On each trusted host as root, change to the keys directory.
To insure a fresh fileset, remove all
-.Cm ntpkey
+.Pa ntpkey
files.
Then run
.Nm
.Cm RSA
or
.Cm DSA .
-The most often need to do this is when a DSA\-signed certificate is used.
+The most frequent need to do this is when a
+.Cm DSA Ns \-signed
+certificate is used.
If it is necessary to use a different certificate scheme than the default,
run
.Nm
option and selected
.Ar scheme
as needed.
-f
+If
.Nm
is run again without these options, it generates a new certificate
-using the same scheme and sign key.
+using the same scheme and sign key, and soft link.
.Pp
After setting up the environment it is advisable to update certificates
from time to time, if only to extend the validity interval.
Simply run
.Nm
with the same flags as before to generate new certificates
-using existing keys.
+using existing keys, and soft links.
However, if the host or sign key is changed,
.Xr ntpd 1ntpdmdoc
should be restarted.
at which time the protocol is restarted.
.Ss Identity Schemes
As mentioned on the Autonomous Authentication page,
-the default TC identity scheme is vulnerable to a middleman attack.
+the default
+.Cm TC
+identity scheme is vulnerable to a middleman attack.
However, there are more secure identity schemes available,
-including PC, IFF, GQ and MV described on the
-.Qq Identification Schemes
-page
-(maybe available at
-.Li http://www.eecis.udel.edu/%7emills/keygen.html ) .
+including
+.Cm PC , IFF , GQ
+and
+.Cm MV
+schemes described below.
These schemes are based on a TA, one or more trusted hosts
and some number of nontrusted hosts.
Trusted hosts prove identity using values provided by the TA,
.Fl P
.Fl p Ar password
to generate the host key file
-.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp
+.Pa ntpkey Ns _ Cm RSA Pa key_alice. Ar filestamp
and trusted private certificate file
-.Pa ntpkey_RSA\-MD5_cert_ Ns Ar alice.filestamp .
+.Pa ntpkey Ns _ Cm RSA\-MD5 _ Pa cert_alice. Ar filestamp ,
+and soft links.
Copy both files to all group hosts;
they replace the files which would be generated in other schemes.
-On each host bob install a soft link from the generic name
+On each host
+.Ar bob
+install a soft link from the generic name
.Pa ntpkey_host_ Ns Ar bob
to the host key file and soft link
.Pa ntpkey_cert_ Ns Ar bob
by trusted host alice.
In this scheme it is not possible to refresh
either the keys or certificates without copying them
-to all other hosts in the group.
+to all other hosts in the group, and recreating the soft links.
.Pp
-For the IFF scheme proceed as in the TC scheme to generate keys
+For the
+.Cm IFF
+scheme proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts, then for every trusted host in the group,
-generate the IFF parameter file.
+generate the
+.Cm IFF
+parameter file.
On trusted host alice run
.Nm
.Fl T
.Fl I
.Fl p Ar password
to produce her parameter file
-.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp ,
+.Pa ntpkey_IFFpar_alice. Ns Ar filestamp ,
which includes both server and client keys.
Copy this file to all group hosts that operate as both servers
and clients and install a soft link from the generic
-.Pa ntpkey_iff_ Ns Ar alice
+.Pa ntpkey_iff_alice
to this file.
If there are no hosts restricted to operate only as clients,
there is nothing further to do.
-As the IFF scheme is independent
+As the
+.Cm IFF
+scheme is independent
of keys and certificates, these files can be refreshed as needed.
.Pp
If a rogue client has the parameter file, it could masquerade
After generating the parameter file, on alice run
.Nm
.Fl e
-and pipe the output to a file or mail program.
-Copy or mail this file to all restricted clients.
+and pipe the output to a file or email program.
+Copy or email this file to all restricted clients.
On these clients install a soft link from the generic
-.Pa ntpkey_iff_ Ns Ar alice
+.Pa ntpkey_iff_alice
to this file.
To further protect the integrity of the keys,
each file can be encrypted with a secret password.
.Pp
-For the GQ scheme proceed as in the TC scheme to generate keys
+For the
+.Cm GQ
+scheme proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts, then for every trusted host
-in the group, generate the IFF parameter file.
+in the group, generate the
+.Cm IFF
+parameter file.
On trusted host alice run
.Nm
.Fl T
.Fl G
.Fl p Ar password
to produce her parameter file
-.Pa ntpkey_GQpar_ Ns Ar alice.filestamp ,
+.Pa ntpkey_GQpar_alice. Ns Ar filestamp ,
which includes both server and client keys.
Copy this file to all group hosts and install a soft link
from the generic
-.Pa ntpkey_gq_ Ns Ar alice
+.Pa ntpkey_gq_alice
to this file.
-In addition, on each host bob install a soft link
+In addition, on each host
+.Ar bob
+install a soft link
from generic
.Pa ntpkey_gq_ Ns Ar bob
to this file.
-As the GQ scheme updates the GQ parameters file and certificate
+As the
+.Cm GQ
+scheme updates the
+.Cm GQ
+parameters file and certificate
at the same time, keys and certificates can be regenerated as needed.
.Pp
-For the MV scheme, proceed as in the TC scheme to generate keys
+For the
+.Cm MV
+scheme, proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts.
For illustration assume trish is the TA, alice one of several trusted hosts
and bob one of her clients.
.Ar n
is the number of revokable keys (typically 5) to produce
the parameter file
-.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp
+.Pa ntpkeys_MVpar_trish. Ns Ar filestamp
and client key files
-.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp
+.Pa ntpkeys_MVkey Ns Ar d _ Pa trish. Ar filestamp
where
.Ar d
is the key number (0 \&<
.Ar n ) .
Copy the parameter file to alice and install a soft link
from the generic
-.Pa ntpkey_mv_ Ns Ar alice
+.Pa ntpkey_mv_alice
to this file.
Copy one of the client key files to alice for later distribution
to her clients.
-It doesn't matter which client key file goes to alice,
+It does not matter which client key file goes to alice,
since they all work the same way.
-Alice copies the client key file to all of her cliens.
+Alice copies the client key file to all of her clients.
On client bob install a soft link from generic
-.Pa ntpkey_mvkey_ Ns Ar bob
+.Pa ntpkey_mvkey_bob
to the client key file.
-As the MV scheme is independent of keys and certificates,
+As the
+.Cm MV
+scheme is independent of keys and certificates,
these files can be refreshed as needed.
.Ss Command Line Options
.Bl -tag -width indent
-.It Fl c Ar scheme
-Select certificate message digest/signature encryption scheme.
+.It Fl b Fl \-imbits Ns = Ar modulus
+Set the number of bits in the identity modulus for generating identity keys to
+.Ar modulus
+bits.
+The number of bits in the identity modulus defaults to 256, but can be set to
+values from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.It Fl c Fl \-certificate Ns = Ar scheme
+Select certificate signature encryption/message digest scheme.
The
.Ar scheme
can be one of the following:
-. Cm RSA\-MD2 , RSA\-MD5 , RSA\-SHA , RSA\-SHA1 , RSA\-MDC2 , RSA\-RIPEMD160 , DSA\-SHA ,
+.Cm RSA\-MD2 , RSA\-MD5 , RSA\-MDC2 , RSA\-SHA , RSA\-SHA1 , RSA\-RIPEMD160 , DSA\-SHA ,
or
.Cm DSA\-SHA1 .
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key.
+Note that
+.Cm RSA
+schemes must be used with an
+.Cm RSA
+sign key and
+.Cm DSA
+schemes must be used with a
+.Cm DSA
+sign key.
The default without this option is
.Cm RSA\-MD5 .
-.It Fl d
-Enable debugging.
+If compatibility with FIPS 140\-2 is required, either the
+.Cm DSA\-SHA
+or
+.Cm DSA\-SHA1
+scheme must be used.
+.It Fl C Fl \-cipher Ns = Ar cipher
+Select the OpenSSL cipher to encrypt the files containing private keys.
+The default without this option is three\-key triple DES in CBC mode,
+.Cm des\-ede3\-cbc .
+The
+.Ic openssl Fl h
+command provided with OpenSSL displays available ciphers.
+.It Fl d Fl \-debug\-level
+Increase debugging verbosity level.
This option displays the cryptographic data produced in eye\-friendly billboards.
-.It Fl e
-Write the IFF client keys to the standard output.
-This is intended for automatic key distribution by mail.
-.It Fl G
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-.It Fl g
-Generate keys for the GQ identification scheme
-using the existing GQ parameters.
-If the GQ parameters do not yet exist, create them first.
-.It Fl H
-Generate new host keys, obsoleting any that may exist.
-.It Fl I
-Generate parameters for the IFF identification scheme,
-obsoleting any that may exist.
-.It Fl i Ar name
-Set the suject name to
-.Ar name .
-This is used as the subject field in certificates
-and in the file name for host and sign keys.
-.It Fl M
-Generate MD5 keys, obsoleting any that may exist.
-.It Fl P
-Generate a private certificate.
+.It Fl D Fl \-set\-debug\-level Ns = Ar level
+Set the debugging verbosity to
+.Ar level .
+This option displays the cryptographic data produced in eye\-friendly billboards.
+.It Fl e Fl \-id\-key
+Write the
+.Cm IFF
+or
+.Cm GQ
+public parameters from the
+.Ar IFFkey or GQkey
+client keys file previously specified
+as unencrypted data to the standard output stream
+.Pa stdout .
+This is intended for automatic key distribution by email.
+.It Fl G Fl \-gq\-params
+Generate a new encrypted
+.Cm GQ
+parameters and key file for the Guillou\-Quisquater (GQ) identity scheme.
+This option is mutually exclusive with the
+.Fl I
+and
+.Fl V
+options.
+.It Fl H Fl \-host\-key
+Generate a new encrypted
+.Cm RSA
+public/private host key file.
+.It Fl I Fl \-iffkey
+Generate a new encrypted
+.Cm IFF
+key file for the Schnorr (IFF) identity scheme.
+This option is mutually exclusive with the
+.Fl G
+and
+Fl V
+options.
+.It Fl i Fl \-ident Ns = Ar group
+Set the optional Autokey group name to
+.Ar group .
+This is used in the identity scheme parameter file names of
+.Cm IFF , GQ ,
+and
+.Cm MV
+client parameters files.
+In that role, the default is the host name if no group is provided.
+The group name, if specified using
+.Fl i
+or
+.Fl s
+following an
+.Ql @
+character, is also used in certificate subject and issuer names in the form
+.Ar host @ group
+and should match the group specified via
+.Ic crypto Cm ident
+or
+.Ic server Cm ident
+in the ntpd configuration file.
+.It Fl l Fl \-lifetime Ns = Ar days
+Set the lifetime for certificate expiration to
+.Ar days .
+The default lifetime is one year (365 days).
+.It Fl m Fl \-modulus Ns = Ar bits
+Set the number of bits in the prime modulus for generating files to
+.Ar bits .
+The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.It Fl M Fl \-md5key
+Generate a new symmetric keys file containing 10
+.Cm MD5
+keys, and if OpenSSL is available, 10
+.Cm SHA
+keys.
+An
+.Cm MD5
+key is a string of 20 random printable ASCII characters, while a
+.Cm SHA
+key is a string of 40 random hex digits.
+The file can be edited using a text editor to change the key type or key content.
+This option is mutually exclusive with all other options.
+.It Fl p Fl \-password Ns = Ar passwd
+Set the password for reading and writing encrypted files to
+.Ar passwd .
+These include the host, sign and identify key files.
+By default, the password is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl P Fl \-pvt\-cert
+Generate a new private certificate used by the
+.Cm PC
+identity scheme.
By default, the program generates public certificates.
-.It Fl p Ar password
-Encrypt generated files containing private data with
-.Ar password
-and the DES\-CBC algorithm.
-.It Fl q
-Set the password for reading files to password.
-.It Fl S Oo Cm RSA | DSA Oc
-Generate a new sign key of the designated type,
-obsoleting any that may exist.
-By default, the program uses the host key as the sign key.
-.It Fl s Ar name
-Set the issuer name to
-.Ar name .
-This is used for the issuer field in certificates
-and in the file name for identity files.
-.It Fl T
+Note: the PC identity scheme is not recommended for new installations.
+.It Fl q Fl \-export\-passwd Ns = Ar passwd
+Set the password for writing encrypted
+.Cm IFF , GQ and MV
+identity files redirected to
+.Pa stdout
+to
+.Ar passwd .
+In effect, these files are decrypted with the
+.Fl p
+password, then encrypted with the
+.Fl q
+password.
+By default, the password is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl s Fl \-subject\-key Ns = Ar Oo host Oc Op @ Ar group
+Specify the Autokey host name, where
+.Ar host
+is the optional host name and
+.Ar group
+is the optional group name.
+The host name, and if provided, group name are used in
+.Ar host @ group
+form as certificate subject and issuer.
+Specifying
+.Fl s @ Ar group
+is allowed, and results in leaving the host name unchanged, as with
+.Fl i Ar group .
+The group name, or if no group is provided, the host name are also used in the
+file names of
+.Cm IFF , GQ ,
+and
+.Cm MV
+identity scheme client parameter files.
+If
+.Ar host
+is not specified, the default host name is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl S Fl \-sign\-key Ns = Op Cm RSA | DSA
+Generate a new encrypted public/private sign key file of the specified type.
+By default, the sign key is the host key and has the same type.
+If compatibility with FIPS 140\-2 is required, the sign key type must be
+.Cm DSA .
+.It Fl T Fl \-trusted\-cert
Generate a trusted certificate.
By default, the program generates a non\-trusted certificate.
-.It Fl V Ar nkeys
-Generate parameters and keys for the Mu\-Varadharajan (MV) identification scheme.
+.It Fl V Fl \-mv\-params Ar nkeys
+Generate
+.Ar nkeys
+encrypted server keys and parameters for the Mu\-Varadharajan (MV)
+identity scheme.
+This option is mutually exclusive with the
+.Fl I
+and
+.Fl G
+options.
+Note: support for this option should be considered a work in progress.
.El
.Ss Random Seed File
All cryptographically sound key generation schemes must have means
.Pp
The entropy seed used by the OpenSSL library is contained in a file,
usually called
-.Cm .rnd ,
+.Pa .rnd ,
which must be available when starting the NTP daemon
or the
.Nm
program.
The NTP daemon will first look for the file
using the path specified by the
-.Ic randfile
+.Cm randfile
subcommand of the
.Ic crypto
configuration command.
.Ev RANDFILE
environment variable is not present,
the library will look for the
-.Cm .rnd
+.Pa .rnd
file in the user home directory.
+Since both the
+.Nm
+program and
+.Xr ntpd 1ntpdmdoc
+daemon must run as root, the logical place to put this file is in
+.Pa /.rnd
+or
+.Pa /root/.rnd .
If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
.Ss Cryptographic Data Files
-All other file formats begin with two lines.
-The first contains the file name, including the generated host name
-and filestamp.
-The second contains the datestamp in conventional Unix date format.
-Lines beginning with # are considered comments and ignored by the
+All file formats begin with two nonencrypted lines.
+The first line contains the file name, including the generated host name
+and filestamp, in the format
+.Pa ntpkey_ Ns Ar key _ Ar name . Ar filestamp ,
+where
+.Ar key
+is the key or parameter type,
+.Ar name
+is the host or group name and
+.Ar filestamp
+is the filestamp (NTP seconds) when the file was created.
+By convention,
+.Ar key
+names in generated file names include both upper and lower case
+characters, while
+.Ar key
+names in generated link names include only lower case characters.
+The filestamp is not used in generated link names.
+The second line contains the datestamp in conventional Unix
+.Pa date
+format.
+Lines beginning with
+.Ql #
+are considered comments and ignored by the
.Nm
program and
.Xr ntpd 1ntpdmdoc
daemon.
-Cryptographic values are encoded first using ASN.1 rules,
-then encrypted if necessary, and finally written PEM\-encoded
-printable ASCII format preceded and followed by MIME content identifier lines.
.Pp
-The format of the symmetric keys file is somewhat different
-than the other files in the interest of backward compatibility.
-Since DES\-CBC is deprecated in NTPv4, the only key format of interest
-is MD5 alphanumeric strings.
-Following hte heard the keys are
-entered one per line in the format
-.D1 Ar keyno type key
+The remainder of the file contains cryptographic data, encoded first using ASN.1
+rules, then encrypted if necessary, and finally written in PEM\-encoded
+printable ASCII text, preceded and followed by MIME content identifier lines.
+.Pp
+The format of the symmetric keys file, ordinarily named
+.Pa ntp.keys ,
+is somewhat different than the other files in the interest of backward compatibility.
+Ordinarily, the file is generated by this program, but it can be constructed
+and edited using an ordinary text editor.
+.Bd -literal -unfilled -offset center
+# ntpkey_MD5key_bk.ntp.org.3595864945
+# Thu Dec 12 19:22:25 2013
+1 MD5 L";Nw<\`.I<f4U0)247"i # MD5 key
+2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key
+3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
+4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key
+5 MD5 B;fx'Kgr/&4ZTbL6=RxA # MD5 key
+6 MD5 4eYwa\`o}3i@@V@..R9!l # MD5 key
+7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key
+8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
+9 MD5 3\-5vcn*6l29DS?Xdsg)* # MD5 key
+10 MD5 2late4Me # MD5 key
+11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
+12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
+13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
+14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
+15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
+16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
+17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
+18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
+19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
+20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
+.Ed
+.D1 Figure 1. Typical Symmetric Key File
+.Pp
+Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Following the header the keys are entered one per line in the format
+.D1 Ar keyno Ar type Ar key
where
.Ar keyno
-is a positive integer in the range 1\-65,535,
+is a positive integer in the range 1\-65534;
.Ar type
-is the string MD5 defining the key format and
+is the key type for the message digest algorithm, which in the absence of the
+OpenSSL library must be
+.Cm MD5
+to designate the MD5 message digest algorithm;
+if the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library;
+however, if compatibility with FIPS 140\-2 is required,
+the key type must be either
+.Cm SHA
+or
+.Cm SHA1 ;
.Ar key
is the key itself,
-which is a printable ASCII string 16 characters or less in length.
-Each character is chosen from the 93 printable characters
-in the range 0x21 through 0x7f excluding space and the
+which is a printable ASCII string 20 characters or less in length:
+each character is chosen from the 93 printable characters
+in the range 0x21 through 0x7e (
+.Ql !
+through
+.Ql ~
+\&) excluding space and the
+.Ql #
+character, and terminated by whitespace or a
.Ql #
character.
+An OpenSSL key consists of a hex\-encoded ASCII string of 40 characters, which
+is truncated as necessary.
.Pp
Note that the keys used by the
.Xr ntpq 1ntpqmdoc
.Pp
The
.Nm
-program generates a MD5 symmetric keys file
-.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp .
+program generates a symmetric keys file
+.Pa ntpkey_MD5key_ Ns Ar hostname Ns . Ns Ar filestamp .
Since the file contains private shared keys,
it should be visible only to root and distributed by secure means
to other subnet hosts.
certificate scheme.
.sp
scheme is one of
-RSA\-MD2, RSA\-MD5, RSA\-SHA, RSA\-SHA1, RSA\-MDC2, RSA\-RIPEMD160,
+RSA\-MD2, RSA\-MD5, RSA\-MDC2, RSA\-SHA, RSA\-SHA1, RSA\-RIPEMD160,
DSA\-SHA, or DSA\-SHA1.
.sp
-Select the certificate message digest/signature encryption scheme.
+Select the certificate signature encryption/message digest scheme.
Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA\-MD5.
.sp
Select the cipher which is used to encrypt the files containing
private keys. The default is three\-key triple DES in CBC mode,
-equivalent to "@code{\-C des\-ede3\-cbc". The openssl tool lists ciphers
+equivalent to "\fB\-C des\-ede3\-cbc\fP". The openssl tool lists ciphers
available in "\fBopenssl \-h\fP" output.
.It Fl d , Fl \-debug\-level
Increase debug verbosity level.
.It Fl e , Fl \-id\-key
Write IFF or GQ identity keys.
.sp
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
+Write the public parameters from the IFF or GQ client keys to
+the standard output.
+This is intended for automatic key distribution by email.
.It Fl G , Fl \-gq\-params
Generate GQ parameters and keys.
.sp
that role, the default is the host name if this option is not
provided. The group name, if specified using \fB\-i/\-\-ident\fP or
using \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character,
-is also a part of the self\-signed host certificate's subject and
+is also a part of the self\-signed host certificate subject and
issuer names in the form \fBhost@group\fP and should match the
-\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
-\fBntpd\fP's configuration file.
+\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in the
+\fBntpd\fP configuration file.
.It Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime
set certificate lifetime.
This option takes an integer number as its argument.
.sp
Set the certificate expiration to lifetime days from now.
-.It Fl M , Fl \-md5key
-generate MD5 keys.
-.sp
-Generate MD5 keys, obsoleting any that may exist.
.It Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus
-modulus.
+prime modulus.
This option takes an integer number as its argument.
The value of
.Ar modulus
.in -4
.sp
The number of bits in the prime modulus. The default is 512.
+.It Fl M , Fl \-md5key
+generate symmetric keys.
+.sp
+Generate symmetric keys, obsoleting any that may exist.
.It Fl P , Fl \-pvt\-cert
generate PC private certificate.
.sp
The same password must be specified to the remote ntpd via the
"crypto pw password" configuration command. See also the option
-\-id\-key (\-e) for unencrypted exports.
-.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
-generate sign key (RSA or DSA).
-.sp
-Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
.It Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group
set host and optionally group name.
.sp
following an '\fB@\fP' character. The host name is used in the file
name of generated host and signing certificates, without the
group name. The host name, and if provided, group name are used
-in \fBhost@group\fP form for the host certificate's subject and issuer
+in \fBhost@group\fP form for the host certificate subject and issuer
fields. Specifying '\fB\-s @group\fP' is allowed, and results in
leaving the host name unchanged while appending \fB@group\fP to the
subject and issuer fields, as with \fB\-i group\fP. The group name, or
if not provided, the host name are also used in the file names
of IFF, GQ, and MV client parameter files.
+.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
+generate sign key (RSA or DSA).
+.sp
+Generate a new sign key of the designated type, obsoleting any
+that may exist. By default, the program uses the host key as the
+sign key.
.It Fl T , Fl \-trusted\-cert
trusted certificate (TC scheme).
.sp
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.Sh USAGE
-The
-.Fl p Ar password
-option specifies the write password and
-.Fl q Ar password
-option the read password for previously encrypted files.
-The
-.Nm
-program prompts for the password if it reads an encrypted file
-and the password is missing or incorrect.
-If an encrypted file is read successfully and
-no write password is specified, the read password is used
-as the write password by default.
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh "FILES"
Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
-It can take quite a while to generate some cryptographic values,
-from one to several minutes with modern architectures
-such as UltraSPARC and up to tens of minutes to an hour
-with older architectures such as SPARC IPC.
+It can take quite a while to generate some cryptographic values.
.Pp
Please report bugs to http://bugs.ntp.org .
.Pp
printable ASCII format so they can be embedded as MIME attachments in
mail to other sites.
</p>
-<p>This document applies to version 4.3.96 of <code>ntp-keygen</code>.
+<p>This document applies to version 4.3.97 of <code>ntp-keygen</code>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="#Description" accesskey="1">Description</a>:</td><td> </td><td align="left" valign="top">
with a status code of 0.
</p>
<div class="example">
-<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.3.97
+<pre class="example">ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.8p11
Usage: ntp-keygen [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
Flg Arg Option-Name Description
-b Num imbits identity modulus bits
-I no iffkey generate IFF parameters
-i Str ident set Autokey group name
-l Num lifetime set certificate lifetime
- -M no md5key generate MD5 keys
- -m Num modulus modulus
+ -m Num modulus prime modulus
- it must be in the range:
256 to 2048
+ -M no md5key generate symmetric keys
-P no pvt-cert generate PC private certificate
-p Str password local private password
-q Str export-passwd export IFF or GQ group keys with password
- -S Str sign-key generate sign key (RSA or DSA)
-s Str subject-name set host and optionally group name
+ -S Str sign-key generate sign key (RSA or DSA)
-T no trusted-cert trusted certificate (TC scheme)
-V Num mv-params generate <num> MV parameters
-v Num mv-keys update <num> MV keys
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp-keygen @NTP_KEYGEN_MS@ "06 Jun 2019" "ntp (4.3.96)" "User Commands"
+.TH ntp-keygen @NTP_KEYGEN_MS@ "06 Jun 2019" "ntp (4.3.97)" "User Commands"
.\"
.\" EDIT THIS FILE WITH CAUTION (in-mem file)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:04 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:29 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
.SH DESCRIPTION
This program generates cryptographic data files used by the NTPv4
authentication and identification schemes.
-It generates MD5 key files used in symmetric key cryptography.
-In addition, if the OpenSSL software library has been installed,
-it generates keys, certificate and identity files used in public key
-cryptography.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software library has been installed, it can generate host keys,
+signing keys, certificates, and identity keys and parameters used in Autokey
+public key cryptography.
These files are used for cookie encryption,
-digital signature and challenge/response identification algorithms
+digital signature, and challenge/response identification algorithms
compatible with the Internet standard security infrastructure.
.sp \n(Ppu
.ne 2
-All files are in PEM-encoded printable ASCII format,
-so they can be embedded as MIME attachments in mail to other sites
+The message digest symmetric keys file is generated in a format
+compatible with NTPv3.
+All other files are in PEM-encoded printable ASCII format,
+so they can be embedded as MIME attachments in email to other sites
and certificate authorities.
By default, files are not encrypted.
.sp \n(Ppu
.ne 2
-When used to generate message digest keys, the program produces a file
-containing ten pseudo-random printable ASCII strings suitable for the
-MD5 message digest algorithm included in the distribution.
+When used to generate message digest symmetric keys, the program
+produces a file containing ten pseudo-random printable ASCII strings
+suitable for the MD5 message digest algorithm included in the
+distribution.
If the OpenSSL library is installed, it produces an additional ten
-hex-encoded random bit strings suitable for the SHA1 and other message
-digest algorithms.
-The message digest keys file must be distributed and stored
+hex-encoded random bit strings suitable for SHA1, AES-128-CMAC, and
+other message digest algorithms.
+The message digest symmetric keys file must be distributed and stored
using secure means beyond the scope of NTP itself.
Besides the keys used for ordinary NTP associations, additional keys
can be defined as passwords for the
Some files used by this program are encrypted using a private password.
The
\f\*[B-Font]\-p\f[]
-option specifies the password for local encrypted files and the
+option specifies the read password for local encrypted files and the
\f\*[B-Font]\-q\f[]
-option the password for encrypted files sent to remote sites.
+option the write password for encrypted files sent to remote sites.
If no password is specified, the host name returned by the Unix
-\fBgethostname\f[]\fR()\f[]
-function, normally the DNS name of the host is used.
+\fChostname\f[]\fR(1)\f[]
+command, normally the DNS name of the host, is used as the the default read
+password, for convenience.
+The
+\f\*[B-Font]ntp-keygen\fP
+program prompts for the password if it reads an encrypted file
+and the password is missing or incorrect.
+If an encrypted file is read successfully and
+no write password is specified, the read password is used
+as the write password by default.
.sp \n(Ppu
.ne 2
The
-\f\*[I-Font]pw\f[]
+\f\*[B-Font]pw\f[]
option of the
-\f\*[I-Font]crypto\f[]
+\f\*[B-Font]crypto\f[]
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
configuration command specifies the read
password for previously encrypted local files.
-This must match the local password used by this program.
+This must match the local read password used by this program.
If not specified, the host name is used.
-Thus, if files are generated by this program without password,
+Thus, if files are generated by this program without an explicit password,
they can be read back by
-\f\*[I-Font]ntpd\f[]
-without password but only on the same host.
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+without specifying an explicit password but only on the same host.
+If the write password used for encryption is specified as the host name,
+these files can be read by that host with no explicit password.
.sp \n(Ppu
.ne 2
used only by that host, although exceptions exist as noted later on
this page.
The symmetric keys file, normally called
-\f\*[I-Font]ntp.keys\f[],
+\fIntp.keys\f[],
is usually installed in
\fI/etc\f[].
Other files and links are usually installed in
\fI/usr/local/etc\f[],
which is normally in a shared filesystem in
NFS-mounted networks and cannot be changed by shared clients.
-The location of the keys directory can be changed by the
-\f\*[I-Font]keysdir\f[]
-configuration command in such cases.
-Normally, this is in
-\fI/etc\f[].
+In these cases, NFS clients can specify the files in another
+directory such as
+\fI/etc\f[]
+using the
+\f\*[B-Font]keysdir\f[]
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+configuration file command.
.sp \n(Ppu
.ne 2
This program directs commentary and error messages to the standard
error stream
-\f\*[I-Font]stderr\f[]
+\fIstderr\f[]
and remote files to the standard output stream
-\f\*[I-Font]stdout\f[]
+\fIstdout\f[]
where they can be piped to other applications or redirected to files.
The names used for generated files and links all begin with the
string
-\f\*[I-Font]ntpkey\f[]
+\fIntpkey\&*\f[]
and include the file type, generating host and filestamp,
as described in the
-\*[Lq]Cryptographic Data Files\*[Rq]
+\fICryptographic Data Files\f[]
section below.
.SS Running the Program
-To test and gain experience with Autokey concepts, log in as root and
-change to the keys directory, usually
-\fI/usr/local/etc\f[]
-When run for the first time, or if all files with names beginning with
-\f\*[I-Font]ntpkey\f[]
-have been removed, use the
-\f\*[B-Font]ntp-keygen\fP
-command without arguments to generate a
-default RSA host key and matching RSA-MD5 certificate with expiration
-date one year hence.
-If run again without options, the program uses the
-existing keys and parameters and generates only a new certificate with
-new expiration date one year hence.
-.sp \n(Ppu
-.ne 2
-
-Run the command on as many hosts as necessary.
-Designate one of them as the trusted host (TH) using
+The safest way to run the
\f\*[B-Font]ntp-keygen\fP
-with the
-\f\*[B-Font]\-T\f[]
-option and configure it to synchronize from reliable Internet servers.
-Then configure the other hosts to synchronize to the TH directly or
-indirectly.
-A certificate trail is created when Autokey asks the immediately
-ascendant host towards the TH to sign its certificate, which is then
-provided to the immediately descendant host on request.
-All group hosts should have acyclic certificate trails ending on the TH.
-.sp \n(Ppu
-.ne 2
-
-The host key is used to encrypt the cookie when required and so must be
-RSA type.
-By default, the host key is also the sign key used to encrypt
-signatures.
-A different sign key can be assigned using the
-\f\*[B-Font]\-S\f[]
-option and this can be either RSA or DSA type.
-By default, the signature
-message digest type is MD5, but any combination of sign key type and
-message digest type supported by the OpenSSL library can be specified
-using the
-\f\*[B-Font]\-c\f[]
-option.
-The rules say cryptographic media should be generated with proventic
-filestamps, which means the host should already be synchronized before
-this program is run.
-This of course creates a chicken-and-egg problem
-when the host is started for the first time.
-Accordingly, the host time
-should be set by some other means, such as eyeball-and-wristwatch, at
-least so that the certificate lifetime is within the current year.
-After that and when the host is synchronized to a proventic source, the
-certificate should be re-generated.
-.sp \n(Ppu
-.ne 2
-
-Additional information on trusted groups and identity schemes is on the
-\*[Lq]Autokey Public-Key Authentication\*[Rq]
-page.
-.sp \n(Ppu
-.ne 2
-
-The
-\fCntpd\f[]\fR(@NTPD_MS@)\f[]
-configuration command
-\f\*[B-Font]crypto\f[] \f\*[B-Font]pw\f[] \f\*[I-Font]password\f[]
-specifies the read password for previously encrypted files.
-The daemon expires on the spot if the password is missing
-or incorrect.
-For convenience, if a file has been previously encrypted,
-the default read password is the name of the host running
-the program.
-If the previous write password is specified as the host name,
-these files can be read by that host with no explicit password.
-.sp \n(Ppu
-.ne 2
-
-File names begin with the prefix
-\f\*[B-Font]ntpkey_\f[]
-and end with the postfix
-\f\*[I-Font]_hostname.filestamp\f[],
-where
-\f\*[I-Font]hostname\f[]
-is the owner name, usually the string returned
-by the Unix gethostname() routine, and
-\f\*[I-Font]filestamp\f[]
-is the NTP seconds when the file was generated, in decimal digits.
-This both guarantees uniqueness and simplifies maintenance
-procedures, since all files can be quickly removed
-by a
-\f\*[B-Font]rm\f[] \f\*[B-Font]ntpkey\&*\f[]
-command or all files generated
-at a specific time can be removed by a
-\f\*[B-Font]rm\f[]
-\f\*[I-Font]\&*filestamp\f[]
-command.
-To further reduce the risk of misconfiguration,
-the first two lines of a file contain the file name
-and generation date and time as comments.
-.sp \n(Ppu
-.ne 2
-
-All files are installed by default in the keys directory
+program is logged in directly as root.
+The recommended procedure is change to the
+\f\*[I-Font]keys\f[]
+directory, usually
\fI/usr/local/etc\f[],
-which is normally in a shared filesystem
-in NFS-mounted networks.
-The actual location of the keys directory
-and each file can be overridden by configuration commands,
-but this is not recommended.
-Normally, the files for each host are generated by that host
-and used only by that host, although exceptions exist
-as noted later on this page.
-.sp \n(Ppu
-.ne 2
-
-Normally, files containing private values,
-including the host key, sign key and identification parameters,
-are permitted root read/write-only;
-while others containing public values are permitted world readable.
-Alternatively, files containing private values can be encrypted
-and these files permitted world readable,
-which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
-dependent clients can all be installed in the same shared directory.
+then run the program.
.sp \n(Ppu
.ne 2
-The recommended practice is to keep the file name extensions
-when installing a file and to install a soft link
-from the generic names specified elsewhere on this page
-to the generated files.
-This allows new file generations to be activated simply
-by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
-If a link is not present,
-\fCntpd\f[]\fR(@NTPD_MS@)\f[]
-extracts the filestamp from the file itself.
-This allows clients to verify that the file and generation times
-are always current.
-The
-\f\*[B-Font]ntp-keygen\fP
-program uses the same timestamp extension for all files generated
-at one time, so each generation is distinct and can be readily
-recognized in monitoring data.
-.SS Running the program
-The safest way to run the
+To test and gain experience with Autokey concepts, log in as root and
+change to the
+\f\*[I-Font]keys\f[]
+directory, usually
+\fI/usr/local/etc\f[].
+When run for the first time, or if all files with names beginning with
+\fIntpkey\&*\f[]
+have been removed, use the
\f\*[B-Font]ntp-keygen\fP
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-\fI/usr/local/etc\f[],
-then run the program.
-When run for the first time,
-or if all
-\f\*[B-Font]ntpkey\f[]
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
+command without arguments to generate a default
+\f\*[B-Font]RSA\f[]
+host key and matching
+\f\*[B-Font]RSA-MD5\f[]
+certificate file with expiration date one year hence,
which is all that is necessary in many cases.
The program also generates soft links from the generic names
to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+If run again without options, the program uses the
+existing keys and parameters and generates a new certificate file with
+new expiration date one year hence, and soft link.
.sp \n(Ppu
.ne 2
-The host key is used to encrypt the cookie when required and so must be RSA type.
+The host key is used to encrypt the cookie when required and so must be
+\f\*[B-Font]RSA\f[]
+type.
By default, the host key is also the sign key used to encrypt signatures.
When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
+either
+\f\*[B-Font]RSA\f[]
+or
+\f\*[B-Font]DSA\f[]
+type.
+By default, the message digest type is
+\f\*[B-Font]MD5\f[],
+but any combination
of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
+can be specified, including those using the
+\f\*[B-Font]AES128CMAC\f[], \f\*[B-Font]MD2\f[], \f\*[B-Font]MD5\f[], \f\*[B-Font]MDC2\f[], \f\*[B-Font]SHA\f[], \f\*[B-Font]SHA1\f[]
+and
+\f\*[B-Font]RIPE160\f[]
+message digest algorithms.
However, the scheme specified in the certificate must be compatible
with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Certificates using any digest algorithm are compatible with
+\f\*[B-Font]RSA\f[]
+sign keys;
+however, only
+\f\*[B-Font]SHA\f[]
+and
+\f\*[B-Font]SHA1\f[]
+certificates are compatible with
+\f\*[B-Font]DSA\f[]
+sign keys.
.sp \n(Ppu
.ne 2
.ne 2
Running the program as other than root and using the Unix
-\f\*[B-Font]su\f[]
+\fCsu\f[]\fR(1)\f[]
command
to assume root may not work properly, since by default the OpenSSL library
looks for the random seed file
-\f\*[B-Font].rnd\f[]
+\fI.rnd\f[]
in the user home directory.
However, there should be only one
-\f\*[B-Font].rnd\f[],
+\fI.rnd\f[],
most conveniently
in the root directory, so it is convenient to define the
-\f\*[B-Font]$RANDFILE\f[]
+RANDFILE
environment variable used by the OpenSSL library as the path to
-\f\*[B-Font]/.rnd\f[].
+\fI.rnd\f[].
.sp \n(Ppu
.ne 2
\fI/etc\f[]
using the
\f\*[B-Font]keysdir\f[]
-command.
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+configuration file command.
There is no need for one client to read the keys and certificates
of other clients or servers, as these data are obtained automatically
by the Autokey protocol.
Alternatively, files containing private values can be encrypted
and these files permitted world readable,
which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
+Since uniqueness is insured by the
+\f\*[I-Font]hostname\f[]
+and
+\f\*[I-Font]filestamp\f[]
+file name extensions, the files for an NTP server and
dependent clients can all be installed in the same shared directory.
.sp \n(Ppu
.ne 2
to the generated files.
This allows new file generations to be activated simply
by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
+If a link is present,
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+follows it to the file name to extract the
+\f\*[I-Font]filestamp\f[].
If a link is not present,
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
-extracts the filestamp from the file itself.
+extracts the
+\f\*[I-Font]filestamp\f[]
+from the file itself.
This allows clients to verify that the file and generation times
are always current.
The
\f\*[B-Font]ntp-keygen\fP
-program uses the same timestamp extension for all files generated
+program uses the same
+\f\*[I-Font]filestamp\f[]
+extension for all files generated
at one time, so each generation is distinct and can be readily
recognized in monitoring data.
-.SS Running the program
-The safest way to run the
-\f\*[B-Font]ntp-keygen\fP
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-\fI/usr/local/etc\f[],
-then run the program.
-When run for the first time,
-or if all
-\f\*[B-Font]ntpkey\f[]
-files have been removed,
-the program generates a RSA host key file and matching RSA-MD5 certificate file,
-which is all that is necessary in many cases.
-The program also generates soft links from the generic names
-to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
.sp \n(Ppu
.ne 2
-The host key is used to encrypt the cookie when required and so must be RSA type.
-By default, the host key is also the sign key used to encrypt signatures.
-When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
-of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
-However, the scheme specified in the certificate must be compatible
-with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
+\f\*[B-Font]ntp-keygen\fP
+with the
+\f\*[B-Font]\-T\f[]
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
.sp \n(Ppu
.ne 2
-Private/public key files and certificates are compatible with
-other OpenSSL applications and very likely other libraries as well.
-Certificates or certificate requests derived from them should be compatible
-with extant industry practice, although some users might find
-the interpretation of X509v3 extension fields somewhat liberal.
-However, the identification parameter files, although encoded
-as the other files, are probably not compatible with anything other than Autokey.
+The host key is used to encrypt the cookie when required and so must be
+RSA type.
+By default, the host key is also the sign key used to encrypt
+signatures.
+A different sign key can be assigned using the
+\f\*[B-Font]\-S\f[]
+option and this can be either
+\f\*[B-Font]RSA\f[]
+or
+\f\*[B-Font]DSA\f[]
+type.
+By default, the signature
+message digest type is
+\f\*[B-Font]MD5\f[],
+but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+\f\*[B-Font]\-c\f[]
+option.
.sp \n(Ppu
.ne 2
-Running the program as other than root and using the Unix
-\f\*[B-Font]su\f[]
-command
-to assume root may not work properly, since by default the OpenSSL library
-looks for the random seed file
-\f\*[B-Font].rnd\f[]
-in the user home directory.
-However, there should be only one
-\f\*[B-Font].rnd\f[],
-most conveniently
-in the root directory, so it is convenient to define the
-\f\*[B-Font]$RANDFILE\f[]
-environment variable used by the OpenSSL library as the path to
-\f\*[B-Font]/.rnd\f[].
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken-and-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball-and-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re-generated.
.sp \n(Ppu
.ne 2
-Installing the keys as root might not work in NFS-mounted
-shared file systems, as NFS clients may not be able to write
-to the shared keys directory, even as root.
-In this case, NFS clients can specify the files in another
-directory such as
-\fI/etc\f[]
-using the
-\f\*[B-Font]keysdir\f[]
-command.
-There is no need for one client to read the keys and certificates
-of other clients or servers, as these data are obtained automatically
-by the Autokey protocol.
+Additional information on trusted groups and identity schemes is on the
+\*[Lq]Autokey Public-Key Authentication\*[Rq]
+page.
.sp \n(Ppu
.ne 2
-Ordinarily, cryptographic files are generated by the host that uses them,
-but it is possible for a trusted agent (TA) to generate these files
-for other hosts; however, in such cases files should always be encrypted.
-The subject name and trusted name default to the hostname
-of the host generating the files, but can be changed by command line options.
-It is convenient to designate the owner name and trusted name
-as the subject and issuer fields, respectively, of the certificate.
-The owner name is also used for the host and sign key files,
-while the trusted name is used for the identity files.
-seconds.
-seconds.
-s Trusted Hosts and Groups
+File names begin with the prefix
+\fIntpkey\f[]_
+and end with the suffix
+\fI_\f[]\f\*[I-Font]hostname\f[]. \f\*[I-Font]filestamp\f[],
+where
+\f\*[I-Font]hostname\f[]
+is the owner name, usually the string returned
+by the Unix
+\fChostname\f[]\fR(1)\f[]
+command, and
+\f\*[I-Font]filestamp\f[]
+is the NTP seconds when the file was generated, in decimal digits.
+This both guarantees uniqueness and simplifies maintenance
+procedures, since all files can be quickly removed
+by a
+\f\*[B-Font]rm\f[] \fIntpkey\&*\f[]
+command or all files generated
+at a specific time can be removed by a
+\f\*[B-Font]rm\f[] \fI\&*\f[]\f\*[I-Font]filestamp\f[]
+command.
+To further reduce the risk of misconfiguration,
+the first two lines of a file contain the file name
+and generation date and time as comments.
+.SS Trusted Hosts and Groups
Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
\fIAuthentication\f[] \fIOptions\f[]
section of
\fCntp.conf\f[]\fR(5)\f[].
-The default cryptotype uses RSA encryption, MD5 message digest
-and TC identification.
+The default cryptotype uses
+\f\*[B-Font]RSA\f[]
+encryption,
+\f\*[B-Font]MD5\f[]
+message digest
+and
+\f\*[B-Font]TC\f[]
+identification.
First, configure a NTP subnet including one or more low-stratum
trusted hosts from which all other hosts derive synchronization
directly or indirectly.
On each trusted host as root, change to the keys directory.
To insure a fresh fileset, remove all
-\f\*[B-Font]ntpkey\f[]
+\fIntpkey\f[]
files.
Then run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]RSA\f[]
or
\f\*[B-Font]DSA\f[].
-The most often need to do this is when a DSA-signed certificate is used.
+The most frequent need to do this is when a
+\f\*[B-Font]DSA\f[]\-signed
+certificate is used.
If it is necessary to use a different certificate scheme than the default,
run
\f\*[B-Font]ntp-keygen\fP
option and selected
\f\*[I-Font]scheme\f[]
as needed.
-f
+If
\f\*[B-Font]ntp-keygen\fP
is run again without these options, it generates a new certificate
-using the same scheme and sign key.
+using the same scheme and sign key, and soft link.
.sp \n(Ppu
.ne 2
Simply run
\f\*[B-Font]ntp-keygen\fP
with the same flags as before to generate new certificates
-using existing keys.
+using existing keys, and soft links.
However, if the host or sign key is changed,
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
should be restarted.
at which time the protocol is restarted.
.SS Identity Schemes
As mentioned on the Autonomous Authentication page,
-the default TC identity scheme is vulnerable to a middleman attack.
+the default
+\f\*[B-Font]TC\f[]
+identity scheme is vulnerable to a middleman attack.
However, there are more secure identity schemes available,
-including PC, IFF, GQ and MV described on the
-"Identification Schemes"
-page
-(maybe available at
-\f[C]http://www.eecis.udel.edu/%7emills/keygen.html\f[]).
+including
+\f\*[B-Font]PC\f[], \f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[]
+and
+\f\*[B-Font]MV\f[]
+schemes described below.
These schemes are based on a TA, one or more trusted hosts
and some number of nontrusted hosts.
Trusted hosts prove identity using values provided by the TA,
\f\*[B-Font]\-P\f[]
\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
to generate the host key file
-\fIntpkey_RSAkey_\f[]\f\*[I-Font]alice.filestamp\f[]
+\fIntpkey\f[]_ \f\*[B-Font]RSA\f[] \fIkey_alice.\f[] \f\*[I-Font]filestamp\f[]
and trusted private certificate file
-\fIntpkey_RSA-MD5_cert_\f[]\f\*[I-Font]alice.filestamp\f[].
+\fIntpkey\f[]_ \f\*[B-Font]RSA-MD5\f[] \f\*[B-Font]_\f[] \fIcert_alice.\f[] \f\*[I-Font]filestamp\f[],
+and soft links.
Copy both files to all group hosts;
they replace the files which would be generated in other schemes.
-On each host bob install a soft link from the generic name
+On each host
+\f\*[I-Font]bob\f[]
+install a soft link from the generic name
\fIntpkey_host_\f[]\f\*[I-Font]bob\f[]
to the host key file and soft link
\fIntpkey_cert_\f[]\f\*[I-Font]bob\f[]
by trusted host alice.
In this scheme it is not possible to refresh
either the keys or certificates without copying them
-to all other hosts in the group.
+to all other hosts in the group, and recreating the soft links.
.sp \n(Ppu
.ne 2
-For the IFF scheme proceed as in the TC scheme to generate keys
+For the
+\f\*[B-Font]IFF\f[]
+scheme proceed as in the
+\f\*[B-Font]TC\f[]
+scheme to generate keys
and certificates for all group hosts, then for every trusted host in the group,
-generate the IFF parameter file.
+generate the
+\f\*[B-Font]IFF\f[]
+parameter file.
On trusted host alice run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]\-T\f[]
\f\*[B-Font]\-I\f[]
\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
to produce her parameter file
-\fIntpkey_IFFpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+\fIntpkey_IFFpar_alice.\f[]\f\*[I-Font]filestamp\f[],
which includes both server and client keys.
Copy this file to all group hosts that operate as both servers
and clients and install a soft link from the generic
-\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_iff_alice\f[]
to this file.
If there are no hosts restricted to operate only as clients,
there is nothing further to do.
-As the IFF scheme is independent
+As the
+\f\*[B-Font]IFF\f[]
+scheme is independent
of keys and certificates, these files can be refreshed as needed.
.sp \n(Ppu
.ne 2
After generating the parameter file, on alice run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]\-e\f[]
-and pipe the output to a file or mail program.
-Copy or mail this file to all restricted clients.
+and pipe the output to a file or email program.
+Copy or email this file to all restricted clients.
On these clients install a soft link from the generic
-\fIntpkey_iff_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_iff_alice\f[]
to this file.
To further protect the integrity of the keys,
each file can be encrypted with a secret password.
.sp \n(Ppu
.ne 2
-For the GQ scheme proceed as in the TC scheme to generate keys
+For the
+\f\*[B-Font]GQ\f[]
+scheme proceed as in the
+\f\*[B-Font]TC\f[]
+scheme to generate keys
and certificates for all group hosts, then for every trusted host
-in the group, generate the IFF parameter file.
+in the group, generate the
+\f\*[B-Font]IFF\f[]
+parameter file.
On trusted host alice run
\f\*[B-Font]ntp-keygen\fP
\f\*[B-Font]\-T\f[]
\f\*[B-Font]\-G\f[]
\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
to produce her parameter file
-\fIntpkey_GQpar_\f[]\f\*[I-Font]alice.filestamp\f[],
+\fIntpkey_GQpar_alice.\f[]\f\*[I-Font]filestamp\f[],
which includes both server and client keys.
Copy this file to all group hosts and install a soft link
from the generic
-\fIntpkey_gq_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_gq_alice\f[]
to this file.
-In addition, on each host bob install a soft link
+In addition, on each host
+\f\*[I-Font]bob\f[]
+install a soft link
from generic
\fIntpkey_gq_\f[]\f\*[I-Font]bob\f[]
to this file.
-As the GQ scheme updates the GQ parameters file and certificate
+As the
+\f\*[B-Font]GQ\f[]
+scheme updates the
+\f\*[B-Font]GQ\f[]
+parameters file and certificate
at the same time, keys and certificates can be regenerated as needed.
.sp \n(Ppu
.ne 2
-For the MV scheme, proceed as in the TC scheme to generate keys
+For the
+\f\*[B-Font]MV\f[]
+scheme, proceed as in the
+\f\*[B-Font]TC\f[]
+scheme to generate keys
and certificates for all group hosts.
For illustration assume trish is the TA, alice one of several trusted hosts
and bob one of her clients.
\f\*[I-Font]n\f[]
is the number of revokable keys (typically 5) to produce
the parameter file
-\fIntpkeys_MVpar_\f[]\f\*[I-Font]trish.filestamp\f[]
+\fIntpkeys_MVpar_trish.\f[]\f\*[I-Font]filestamp\f[]
and client key files
-\fIntpkeys_MVkeyd_\f[]\f\*[I-Font]trish.filestamp\f[]
+\fIntpkeys_MVkey\f[]\f\*[I-Font]d\f[] \f\*[I-Font]_\f[] \fItrish.\f[] \f\*[I-Font]filestamp\f[]
where
\f\*[I-Font]d\f[]
is the key number (0 \&<
\f\*[I-Font]n\f[]).
Copy the parameter file to alice and install a soft link
from the generic
-\fIntpkey_mv_\f[]\f\*[I-Font]alice\f[]
+\fIntpkey_mv_alice\f[]
to this file.
Copy one of the client key files to alice for later distribution
to her clients.
-It doesn't matter which client key file goes to alice,
+It does not matter which client key file goes to alice,
since they all work the same way.
-Alice copies the client key file to all of her cliens.
+Alice copies the client key file to all of her clients.
On client bob install a soft link from generic
-\fIntpkey_mvkey_\f[]\f\*[I-Font]bob\f[]
+\fIntpkey_mvkey_bob\f[]
to the client key file.
-As the MV scheme is independent of keys and certificates,
+As the
+\f\*[B-Font]MV\f[]
+scheme is independent of keys and certificates,
these files can be refreshed as needed.
.SS Command Line Options
.TP 7
-.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[]
-Select certificate message digest/signature encryption scheme.
+.NOP \f\*[B-Font]\-b\f[] \f\*[B-Font]\-\-imbits\f[]= \f\*[I-Font]modulus\f[]
+Set the number of bits in the identity modulus for generating identity keys to
+\f\*[I-Font]modulus\f[]
+bits.
+The number of bits in the identity modulus defaults to 256, but can be set to
+values from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.TP 7
+.NOP \f\*[B-Font]\-c\f[] \f\*[B-Font]\-\-certificate\f[]= \f\*[I-Font]scheme\f[]
+Select certificate signature encryption/message digest scheme.
The
\f\*[I-Font]scheme\f[]
can be one of the following:
-. Cm RSA-MD2 , RSA-MD5 , RSA-SHA , RSA-SHA1 , RSA-MDC2 , RSA-RIPEMD160 , DSA-SHA ,
+\f\*[B-Font]RSA-MD2\f[], \f\*[B-Font]RSA-MD5\f[], \f\*[B-Font]RSA-MDC2\f[], \f\*[B-Font]RSA-SHA\f[], \f\*[B-Font]RSA-SHA1\f[], \f\*[B-Font]RSA-RIPEMD160\f[], \f\*[B-Font]DSA-SHA\f[],
or
\f\*[B-Font]DSA-SHA1\f[].
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key.
+Note that
+\f\*[B-Font]RSA\f[]
+schemes must be used with an
+\f\*[B-Font]RSA\f[]
+sign key and
+\f\*[B-Font]DSA\f[]
+schemes must be used with a
+\f\*[B-Font]DSA\f[]
+sign key.
The default without this option is
\f\*[B-Font]RSA-MD5\f[].
+If compatibility with FIPS 140-2 is required, either the
+\f\*[B-Font]DSA-SHA\f[]
+or
+\f\*[B-Font]DSA-SHA1\f[]
+scheme must be used.
.TP 7
-.NOP \f\*[B-Font]\-d\f[]
-Enable debugging.
+.NOP \f\*[B-Font]\-C\f[] \f\*[B-Font]\-\-cipher\f[]= \f\*[I-Font]cipher\f[]
+Select the OpenSSL cipher to encrypt the files containing private keys.
+The default without this option is three-key triple DES in CBC mode,
+\f\*[B-Font]des-ede3-cbc\f[].
+The
+\f\*[B-Font]openssl\f[] \f\*[B-Font]\-h\f[]
+command provided with OpenSSL displays available ciphers.
+.TP 7
+.NOP \f\*[B-Font]\-d\f[] \f\*[B-Font]\-\-debug-level\f[]
+Increase debugging verbosity level.
This option displays the cryptographic data produced in eye-friendly billboards.
.TP 7
-.NOP \f\*[B-Font]\-e\f[]
-Write the IFF client keys to the standard output.
-This is intended for automatic key distribution by mail.
+.NOP \f\*[B-Font]\-D\f[] \f\*[B-Font]\-\-set-debug-level\f[]= \f\*[I-Font]level\f[]
+Set the debugging verbosity to
+\f\*[I-Font]level\f[].
+This option displays the cryptographic data produced in eye-friendly billboards.
.TP 7
-.NOP \f\*[B-Font]\-G\f[]
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
+.NOP \f\*[B-Font]\-e\f[] \f\*[B-Font]\-\-id-key\f[]
+Write the
+\f\*[B-Font]IFF\f[]
+or
+\f\*[B-Font]GQ\f[]
+public parameters from the
+\f\*[I-Font]IFFkey\f[] \f\*[I-Font]or\f[] \f\*[I-Font]GQkey\f[]
+client keys file previously specified
+as unencrypted data to the standard output stream
+\fIstdout\f[].
+This is intended for automatic key distribution by email.
.TP 7
-.NOP \f\*[B-Font]\-g\f[]
-Generate keys for the GQ identification scheme
-using the existing GQ parameters.
-If the GQ parameters do not yet exist, create them first.
+.NOP \f\*[B-Font]\-G\f[] \f\*[B-Font]\-\-gq-params\f[]
+Generate a new encrypted
+\f\*[B-Font]GQ\f[]
+parameters and key file for the Guillou-Quisquater (GQ) identity scheme.
+This option is mutually exclusive with the
+\f\*[B-Font]\-I\f[]
+and
+\f\*[B-Font]\-V\f[]
+options.
.TP 7
-.NOP \f\*[B-Font]\-H\f[]
-Generate new host keys, obsoleting any that may exist.
+.NOP \f\*[B-Font]\-H\f[] \f\*[B-Font]\-\-host-key\f[]
+Generate a new encrypted
+\f\*[B-Font]RSA\f[]
+public/private host key file.
.TP 7
-.NOP \f\*[B-Font]\-I\f[]
-Generate parameters for the IFF identification scheme,
-obsoleting any that may exist.
+.NOP \f\*[B-Font]\-I\f[] \f\*[B-Font]\-\-iffkey\f[]
+Generate a new encrypted
+\f\*[B-Font]IFF\f[]
+key file for the Schnorr (IFF) identity scheme.
+This option is mutually exclusive with the
+\f\*[B-Font]\-G\f[]
+and
+Fl V
+options.
.TP 7
-.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]name\f[]
-Set the suject name to
-\f\*[I-Font]name\f[].
-This is used as the subject field in certificates
-and in the file name for host and sign keys.
+.NOP \f\*[B-Font]\-i\f[] \f\*[B-Font]\-\-ident\f[]= \f\*[I-Font]group\f[]
+Set the optional Autokey group name to
+\f\*[I-Font]group\f[].
+This is used in the identity scheme parameter file names of
+\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[],
+and
+\f\*[B-Font]MV\f[]
+client parameters files.
+In that role, the default is the host name if no group is provided.
+The group name, if specified using
+\f\*[B-Font]\-i\f[]
+or
+\f\*[B-Font]\-s\f[]
+following an
+\[oq]@@\[cq]
+character, is also used in certificate subject and issuer names in the form
+\f\*[I-Font]host\f[] \f\*[I-Font]@@\f[] \f\*[I-Font]group\f[]
+and should match the group specified via
+\f\*[B-Font]crypto\f[] \f\*[B-Font]ident\f[]
+or
+\f\*[B-Font]server\f[] \f\*[B-Font]ident\f[]
+in the ntpd configuration file.
.TP 7
-.NOP \f\*[B-Font]\-M\f[]
-Generate MD5 keys, obsoleting any that may exist.
+.NOP \f\*[B-Font]\-l\f[] \f\*[B-Font]\-\-lifetime\f[]= \f\*[I-Font]days\f[]
+Set the lifetime for certificate expiration to
+\f\*[I-Font]days\f[].
+The default lifetime is one year (365 days).
.TP 7
-.NOP \f\*[B-Font]\-P\f[]
-Generate a private certificate.
-By default, the program generates public certificates.
+.NOP \f\*[B-Font]\-m\f[] \f\*[B-Font]\-\-modulus\f[]= \f\*[I-Font]bits\f[]
+Set the number of bits in the prime modulus for generating files to
+\f\*[I-Font]bits\f[].
+The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
.TP 7
-.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
-Encrypt generated files containing private data with
-\f\*[I-Font]password\f[]
-and the DES-CBC algorithm.
+.NOP \f\*[B-Font]\-M\f[] \f\*[B-Font]\-\-md5key\f[]
+Generate a new symmetric keys file containing 10
+\f\*[B-Font]MD5\f[]
+keys, and if OpenSSL is available, 10
+\f\*[B-Font]SHA\f[]
+keys.
+An
+\f\*[B-Font]MD5\f[]
+key is a string of 20 random printable ASCII characters, while a
+\f\*[B-Font]SHA\f[]
+key is a string of 40 random hex digits.
+The file can be edited using a text editor to change the key type or key content.
+This option is mutually exclusive with all other options.
.TP 7
-.NOP \f\*[B-Font]\-q\f[]
-Set the password for reading files to password.
+.NOP \f\*[B-Font]\-p\f[] \f\*[B-Font]\-\-password\f[]= \f\*[I-Font]passwd\f[]
+Set the password for reading and writing encrypted files to
+\f\*[I-Font]passwd\f[].
+These include the host, sign and identify key files.
+By default, the password is the string returned by the Unix
+\f\*[B-Font]hostname\f[]
+command.
.TP 7
-.NOP \f\*[B-Font]\-S\f[] [\f\*[B-Font]RSA\f[] | \f\*[B-Font]DSA\f[]]
-Generate a new sign key of the designated type,
-obsoleting any that may exist.
-By default, the program uses the host key as the sign key.
+.NOP \f\*[B-Font]\-P\f[] \f\*[B-Font]\-\-pvt-cert\f[]
+Generate a new private certificate used by the
+\f\*[B-Font]PC\f[]
+identity scheme.
+By default, the program generates public certificates.
+Note: the PC identity scheme is not recommended for new installations.
.TP 7
-.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]name\f[]
-Set the issuer name to
-\f\*[I-Font]name\f[].
-This is used for the issuer field in certificates
-and in the file name for identity files.
+.NOP \f\*[B-Font]\-q\f[] \f\*[B-Font]\-\-export-passwd\f[]= \f\*[I-Font]passwd\f[]
+Set the password for writing encrypted
+\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[] \f\*[B-Font]and\f[] \f\*[B-Font]MV\f[]
+identity files redirected to
+\fIstdout\f[]
+to
+\f\*[I-Font]passwd\f[].
+In effect, these files are decrypted with the
+\f\*[B-Font]\-p\f[]
+password, then encrypted with the
+\f\*[B-Font]\-q\f[]
+password.
+By default, the password is the string returned by the Unix
+\f\*[B-Font]hostname\f[]
+command.
.TP 7
-.NOP \f\*[B-Font]\-T\f[]
+.NOP \f\*[B-Font]\-s\f[] \f\*[B-Font]\-\-subject-key\f[]= [host] [@@ \f\*[I-Font]group\f[]]
+Specify the Autokey host name, where
+\f\*[I-Font]host\f[]
+is the optional host name and
+\f\*[I-Font]group\f[]
+is the optional group name.
+The host name, and if provided, group name are used in
+\f\*[I-Font]host\f[] \f\*[I-Font]@@\f[] \f\*[I-Font]group\f[]
+form as certificate subject and issuer.
+Specifying
+\f\*[B-Font]\-s\f[] \f\*[B-Font]\-@@\f[] \f\*[I-Font]group\f[]
+is allowed, and results in leaving the host name unchanged, as with
+\f\*[B-Font]\-i\f[] \f\*[I-Font]group\f[].
+The group name, or if no group is provided, the host name are also used in the
+file names of
+\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[],
+and
+\f\*[B-Font]MV\f[]
+identity scheme client parameter files.
+If
+\f\*[I-Font]host\f[]
+is not specified, the default host name is the string returned by the Unix
+\f\*[B-Font]hostname\f[]
+command.
+.TP 7
+.NOP \f\*[B-Font]\-S\f[] \f\*[B-Font]\-\-sign-key\f[]= [\f\*[B-Font]RSA\f[] | \f\*[B-Font]DSA\f[]]
+Generate a new encrypted public/private sign key file of the specified type.
+By default, the sign key is the host key and has the same type.
+If compatibility with FIPS 140-2 is required, the sign key type must be
+\f\*[B-Font]DSA\f[].
+.TP 7
+.NOP \f\*[B-Font]\-T\f[] \f\*[B-Font]\-\-trusted-cert\f[]
Generate a trusted certificate.
By default, the program generates a non-trusted certificate.
.TP 7
-.NOP \f\*[B-Font]\-V\f[] \f\*[I-Font]nkeys\f[]
-Generate parameters and keys for the Mu-Varadharajan (MV) identification scheme.
+.NOP \f\*[B-Font]\-V\f[] \f\*[B-Font]\-\-mv-params\f[] \f\*[I-Font]nkeys\f[]
+Generate
+\f\*[I-Font]nkeys\f[]
+encrypted server keys and parameters for the Mu-Varadharajan (MV)
+identity scheme.
+This option is mutually exclusive with the
+\f\*[B-Font]\-I\f[]
+and
+\f\*[B-Font]\-G\f[]
+options.
+Note: support for this option should be considered a work in progress.
.PP
.SS Random Seed File
All cryptographically sound key generation schemes must have means
The entropy seed used by the OpenSSL library is contained in a file,
usually called
-\f\*[B-Font].rnd\f[],
+\fI.rnd\f[],
which must be available when starting the NTP daemon
or the
\f\*[B-Font]ntp-keygen\fP
RANDFILE
environment variable is not present,
the library will look for the
-\f\*[B-Font].rnd\f[]
+\fI.rnd\f[]
file in the user home directory.
+Since both the
+\f\*[B-Font]ntp-keygen\fP
+program and
+\fCntpd\f[]\fR(@NTPD_MS@)\f[]
+daemon must run as root, the logical place to put this file is in
+\fI/.rnd\f[]
+or
+\fI/root/.rnd\f[].
If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
.SS Cryptographic Data Files
-All other file formats begin with two lines.
-The first contains the file name, including the generated host name
-and filestamp.
-The second contains the datestamp in conventional Unix date format.
-Lines beginning with # are considered comments and ignored by the
+All file formats begin with two nonencrypted lines.
+The first line contains the file name, including the generated host name
+and filestamp, in the format
+\fIntpkey_\f[]\f\*[I-Font]key\f[] \f\*[I-Font]_\f[] \f\*[I-Font]name\f[]. \f\*[I-Font]filestamp\f[],
+where
+\f\*[I-Font]key\f[]
+is the key or parameter type,
+\f\*[I-Font]name\f[]
+is the host or group name and
+\f\*[I-Font]filestamp\f[]
+is the filestamp (NTP seconds) when the file was created.
+By convention,
+\f\*[I-Font]key\f[]
+names in generated file names include both upper and lower case
+characters, while
+\f\*[I-Font]key\f[]
+names in generated link names include only lower case characters.
+The filestamp is not used in generated link names.
+The second line contains the datestamp in conventional Unix
+\fIdate\f[]
+format.
+Lines beginning with
+\[oq]#\[cq]
+are considered comments and ignored by the
\f\*[B-Font]ntp-keygen\fP
program and
\fCntpd\f[]\fR(@NTPD_MS@)\f[]
daemon.
-Cryptographic values are encoded first using ASN.1 rules,
-then encrypted if necessary, and finally written PEM-encoded
-printable ASCII format preceded and followed by MIME content identifier lines.
.sp \n(Ppu
.ne 2
-The format of the symmetric keys file is somewhat different
-than the other files in the interest of backward compatibility.
-Since DES-CBC is deprecated in NTPv4, the only key format of interest
-is MD5 alphanumeric strings.
-Following hte heard the keys are
-entered one per line in the format
+The remainder of the file contains cryptographic data, encoded first using ASN.1
+rules, then encrypted if necessary, and finally written in PEM-encoded
+printable ASCII text, preceded and followed by MIME content identifier lines.
+.sp \n(Ppu
+.ne 2
+
+The format of the symmetric keys file, ordinarily named
+\fIntp.keys\f[],
+is somewhat different than the other files in the interest of backward compatibility.
+Ordinarily, the file is generated by this program, but it can be constructed
+and edited using an ordinary text editor.
+.br
+.in +4
+.nf
+# ntpkey_MD5key_bk.ntp.org.3595864945
+# Thu Dec 12 19:22:25 2013
+1 MD5 L";Nw<\`.I<f4U0)247"i # MD5 key
+2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key
+3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
+4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key
+5 MD5 B;fx'Kgr/&4ZTbL6=RxA # MD5 key
+6 MD5 4eYwa\`o}3i@@@@V@@..R9!l # MD5 key
+7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key
+8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
+9 MD5 3-5vcn*6l29DS?Xdsg)* # MD5 key
+10 MD5 2late4Me # MD5 key
+11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
+12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
+13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
+14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
+15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
+16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
+17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
+18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
+19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
+20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
+.in -4
+.fi
+.in +4
+Figure 1. Typical Symmetric Key File
+.in -4
+.sp \n(Ppu
+.ne 2
+
+Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Following the header the keys are entered one per line in the format
.in +4
\f\*[I-Font]keyno\f[] \f\*[I-Font]type\f[] \f\*[I-Font]key\f[]
.in -4
where
\f\*[I-Font]keyno\f[]
-is a positive integer in the range 1-65,535,
+is a positive integer in the range 1-65534;
\f\*[I-Font]type\f[]
-is the string MD5 defining the key format and
+is the key type for the message digest algorithm, which in the absence of the
+OpenSSL library must be
+\f\*[B-Font]MD5\f[]
+to designate the MD5 message digest algorithm;
+if the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library;
+however, if compatibility with FIPS 140-2 is required,
+the key type must be either
+\f\*[B-Font]SHA\f[]
+or
+\f\*[B-Font]SHA1\f[];
\f\*[I-Font]key\f[]
is the key itself,
-which is a printable ASCII string 16 characters or less in length.
-Each character is chosen from the 93 printable characters
-in the range 0x21 through 0x7f excluding space and the
+which is a printable ASCII string 20 characters or less in length:
+each character is chosen from the 93 printable characters
+in the range 0x21 through 0x7e (
+\[oq]\[cq]!
+through
+\[oq]~\[cq]
+\&) excluding space and the
+\[oq]#\[cq]
+character, and terminated by whitespace or a
\[oq]#\[cq]
character.
+An OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which
+is truncated as necessary.
.sp \n(Ppu
.ne 2
The
\f\*[B-Font]ntp-keygen\fP
-program generates a MD5 symmetric keys file
-\fIntpkey_MD5key_\f[]\f\*[I-Font]hostname.filestamp\f[].
+program generates a symmetric keys file
+\fIntpkey_MD5key_\f[]\f\*[I-Font]hostname\f[]. \f\*[I-Font]filestamp\f[].
Since the file contains private shared keys,
it should be visible only to root and distributed by secure means
to other subnet hosts.
certificate scheme.
.sp
scheme is one of
-RSA-MD2, RSA-MD5, RSA-SHA, RSA-SHA1, RSA-MDC2, RSA-RIPEMD160,
+RSA-MD2, RSA-MD5, RSA-MDC2, RSA-SHA, RSA-SHA1, RSA-RIPEMD160,
DSA-SHA, or DSA-SHA1.
.sp
-Select the certificate message digest/signature encryption scheme.
+Select the certificate signature encryption/message digest scheme.
Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA-MD5.
.sp
Select the cipher which is used to encrypt the files containing
private keys. The default is three-key triple DES in CBC mode,
-equivalent to "@code{-C des-ede3-cbc". The openssl tool lists ciphers
+equivalent to "\fB-C des-ede3-cbc\fP". The openssl tool lists ciphers
available in "\fBopenssl \-h\fP" output.
.TP
.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-id\-key\f[]
Write IFF or GQ identity keys.
.sp
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
+Write the public parameters from the IFF or GQ client keys to
+the standard output.
+This is intended for automatic key distribution by email.
.TP
.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-gq\-params\f[]
Generate GQ parameters and keys.
the file name of IFF, GQ, and MV client parameters files. In
that role, the default is the host name if this option is not
provided. The group name, if specified using \fB-i/--ident\fP or
-using \fB-s/--subject-name\fP following an '\fB@\fP' character,
-is also a part of the self-signed host certificate's subject and
-issuer names in the form \fBhost@group\fP and should match the
-'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
-\fBntpd\fP's configuration file.
+using \fB-s/--subject-name\fP following an '\fB@@\fP' character,
+is also a part of the self-signed host certificate subject and
+issuer names in the form \fBhost@@group\fP and should match the
+'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in the
+\fBntpd\fP configuration file.
.TP
.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]lifetime\f[], \f\*[B-Font]\-\-lifetime\f[]=\f\*[I-Font]lifetime\f[]
set certificate lifetime.
.sp
Set the certificate expiration to lifetime days from now.
.TP
-.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-md5key\f[]
-generate MD5 keys.
-.sp
-Generate MD5 keys, obsoleting any that may exist.
-.TP
.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]modulus\f[], \f\*[B-Font]\-\-modulus\f[]=\f\*[I-Font]modulus\f[]
-modulus.
+prime modulus.
This option takes an integer number as its argument.
The value of
\f\*[I-Font]modulus\f[]
.sp
The number of bits in the prime modulus. The default is 512.
.TP
+.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-md5key\f[]
+generate symmetric keys.
+.sp
+Generate symmetric keys, obsoleting any that may exist.
+.TP
.NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pvt\-cert\f[]
generate PC private certificate.
.sp
"crypto pw password" configuration command. See also the option
--id-key (-e) for unencrypted exports.
.TP
-.NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]sign\f[], \f\*[B-Font]\-\-sign\-key\f[]=\f\*[I-Font]sign\f[]
-generate sign key (RSA or DSA).
-.sp
-Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
-.TP
.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]host@group\f[], \f\*[B-Font]\-\-subject\-name\f[]=\f\*[I-Font]host@group\f[]
set host and optionally group name.
.sp
Set the Autokey host name, and optionally, group name specified
-following an '\fB@\fP' character. The host name is used in the file
+following an '\fB@@\fP' character. The host name is used in the file
name of generated host and signing certificates, without the
group name. The host name, and if provided, group name are used
-in \fBhost@group\fP form for the host certificate's subject and issuer
-fields. Specifying '\fB-s @group\fP' is allowed, and results in
-leaving the host name unchanged while appending \fB@group\fP to the
+in \fBhost@@group\fP form for the host certificate subject and issuer
+fields. Specifying '\fB-s @@group\fP' is allowed, and results in
+leaving the host name unchanged while appending \fB@@group\fP to the
subject and issuer fields, as with \fB-i group\fP. The group name, or
if not provided, the host name are also used in the file names
of IFF, GQ, and MV client parameter files.
.TP
+.NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]sign\f[], \f\*[B-Font]\-\-sign\-key\f[]=\f\*[I-Font]sign\f[]
+generate sign key (RSA or DSA).
+.sp
+Generate a new sign key of the designated type, obsoleting any
+that may exist. By default, the program uses the host key as the
+sign key.
+.TP
.NOP \f\*[B-Font]\-T\f[], \f\*[B-Font]\-\-trusted\-cert\f[]
trusted certificate (TC scheme).
.sp
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.SH USAGE
-The
-\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
-option specifies the write password and
-\f\*[B-Font]\-q\f[] \f\*[I-Font]password\f[]
-option the read password for previously encrypted files.
-The
-\f\*[B-Font]ntp-keygen\fP
-program prompts for the password if it reads an encrypted file
-and the password is missing or incorrect.
-If an encrypted file is read successfully and
-no write password is specified, the read password is used
-as the write password by default.
.SH "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.SH "FILES"
Copyright (C) 1992-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
-It can take quite a while to generate some cryptographic values,
-from one to several minutes with modern architectures
-such as UltraSPARC and up to tens of minutes to an hour
-with older architectures such as SPARC IPC.
+It can take quite a while to generate some cryptographic values.
.sp \n(Ppu
.ne 2
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc)
.\"
-.\" It has been AutoGen-ed June 6, 2019 at 05:31:04 PM by AutoGen 5.18.5
+.\" It has been AutoGen-ed June 6, 2019 at 11:19:26 PM by AutoGen 5.18.5
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
.Sh DESCRIPTION
This program generates cryptographic data files used by the NTPv4
authentication and identification schemes.
-It generates MD5 key files used in symmetric key cryptography.
-In addition, if the OpenSSL software library has been installed,
-it generates keys, certificate and identity files used in public key
-cryptography.
+It can generate message digest keys used in symmetric key cryptography and,
+if the OpenSSL software library has been installed, it can generate host keys,
+signing keys, certificates, and identity keys and parameters used in Autokey
+public key cryptography.
These files are used for cookie encryption,
-digital signature and challenge/response identification algorithms
+digital signature, and challenge/response identification algorithms
compatible with the Internet standard security infrastructure.
.Pp
-All files are in PEM\-encoded printable ASCII format,
-so they can be embedded as MIME attachments in mail to other sites
+The message digest symmetric keys file is generated in a format
+compatible with NTPv3.
+All other files are in PEM\-encoded printable ASCII format,
+so they can be embedded as MIME attachments in email to other sites
and certificate authorities.
By default, files are not encrypted.
.Pp
-When used to generate message digest keys, the program produces a file
-containing ten pseudo\-random printable ASCII strings suitable for the
-MD5 message digest algorithm included in the distribution.
+When used to generate message digest symmetric keys, the program
+produces a file containing ten pseudo\-random printable ASCII strings
+suitable for the MD5 message digest algorithm included in the
+distribution.
If the OpenSSL library is installed, it produces an additional ten
-hex\-encoded random bit strings suitable for the SHA1 and other message
-digest algorithms.
-The message digest keys file must be distributed and stored
+hex\-encoded random bit strings suitable for SHA1, AES\-128\-CMAC, and
+other message digest algorithms.
+The message digest symmetric keys file must be distributed and stored
using secure means beyond the scope of NTP itself.
Besides the keys used for ordinary NTP associations, additional keys
can be defined as passwords for the
Some files used by this program are encrypted using a private password.
The
.Fl p
-option specifies the password for local encrypted files and the
+option specifies the read password for local encrypted files and the
.Fl q
-option the password for encrypted files sent to remote sites.
+option the write password for encrypted files sent to remote sites.
If no password is specified, the host name returned by the Unix
-.Fn gethostname
-function, normally the DNS name of the host is used.
+.Xr hostname 1
+command, normally the DNS name of the host, is used as the the default read
+password, for convenience.
+The
+.Nm
+program prompts for the password if it reads an encrypted file
+and the password is missing or incorrect.
+If an encrypted file is read successfully and
+no write password is specified, the read password is used
+as the write password by default.
.Pp
The
-.Ar pw
+.Cm pw
option of the
-.Ar crypto
+.Ic crypto
+.Xr ntpd @NTPD_MS@
configuration command specifies the read
password for previously encrypted local files.
-This must match the local password used by this program.
+This must match the local read password used by this program.
If not specified, the host name is used.
-Thus, if files are generated by this program without password,
+Thus, if files are generated by this program without an explicit password,
they can be read back by
-.Ar ntpd
-without password but only on the same host.
+.Xr ntpd @NTPD_MS@
+without specifying an explicit password but only on the same host.
+If the write password used for encryption is specified as the host name,
+these files can be read by that host with no explicit password.
.Pp
Normally, encrypted files for each host are generated by that host and
used only by that host, although exceptions exist as noted later on
this page.
The symmetric keys file, normally called
-.Ar ntp.keys ,
+.Pa ntp.keys ,
is usually installed in
.Pa /etc .
Other files and links are usually installed in
.Pa /usr/local/etc ,
which is normally in a shared filesystem in
NFS\-mounted networks and cannot be changed by shared clients.
-The location of the keys directory can be changed by the
-.Ar keysdir
-configuration command in such cases.
-Normally, this is in
-.Pa /etc .
+In these cases, NFS clients can specify the files in another
+directory such as
+.Pa /etc
+using the
+.Ic keysdir
+.Xr ntpd @NTPD_MS@
+configuration file command.
.Pp
This program directs commentary and error messages to the standard
error stream
-.Ar stderr
+.Pa stderr
and remote files to the standard output stream
-.Ar stdout
+.Pa stdout
where they can be piped to other applications or redirected to files.
The names used for generated files and links all begin with the
string
-.Ar ntpkey
+.Pa ntpkey\&*
and include the file type, generating host and filestamp,
as described in the
-.Dq Cryptographic Data Files
+.Sx "Cryptographic Data Files"
section below.
.Ss Running the Program
-To test and gain experience with Autokey concepts, log in as root and
-change to the keys directory, usually
-.Pa /usr/local/etc
-When run for the first time, or if all files with names beginning with
-.Ar ntpkey
-have been removed, use the
-.Nm
-command without arguments to generate a
-default RSA host key and matching RSA\-MD5 certificate with expiration
-date one year hence.
-If run again without options, the program uses the
-existing keys and parameters and generates only a new certificate with
-new expiration date one year hence.
-.Pp
-Run the command on as many hosts as necessary.
-Designate one of them as the trusted host (TH) using
-.Nm
-with the
-.Fl T
-option and configure it to synchronize from reliable Internet servers.
-Then configure the other hosts to synchronize to the TH directly or
-indirectly.
-A certificate trail is created when Autokey asks the immediately
-ascendant host towards the TH to sign its certificate, which is then
-provided to the immediately descendant host on request.
-All group hosts should have acyclic certificate trails ending on the TH.
-.Pp
-The host key is used to encrypt the cookie when required and so must be
-RSA type.
-By default, the host key is also the sign key used to encrypt
-signatures.
-A different sign key can be assigned using the
-.Fl S
-option and this can be either RSA or DSA type.
-By default, the signature
-message digest type is MD5, but any combination of sign key type and
-message digest type supported by the OpenSSL library can be specified
-using the
-.Fl c
-option.
-The rules say cryptographic media should be generated with proventic
-filestamps, which means the host should already be synchronized before
-this program is run.
-This of course creates a chicken\-and\-egg problem
-when the host is started for the first time.
-Accordingly, the host time
-should be set by some other means, such as eyeball\-and\-wristwatch, at
-least so that the certificate lifetime is within the current year.
-After that and when the host is synchronized to a proventic source, the
-certificate should be re\-generated.
-.Pp
-Additional information on trusted groups and identity schemes is on the
-.Dq Autokey Public\-Key Authentication
-page.
-.Pp
-The
-.Xr ntpd @NTPD_MS@
-configuration command
-.Ic crypto pw Ar password
-specifies the read password for previously encrypted files.
-The daemon expires on the spot if the password is missing
-or incorrect.
-For convenience, if a file has been previously encrypted,
-the default read password is the name of the host running
-the program.
-If the previous write password is specified as the host name,
-these files can be read by that host with no explicit password.
-.Pp
-File names begin with the prefix
-.Cm ntpkey_
-and end with the postfix
-.Ar _hostname.filestamp ,
-where
-.Ar hostname
-is the owner name, usually the string returned
-by the Unix gethostname() routine, and
-.Ar filestamp
-is the NTP seconds when the file was generated, in decimal digits.
-This both guarantees uniqueness and simplifies maintenance
-procedures, since all files can be quickly removed
-by a
-.Ic rm ntpkey\&*
-command or all files generated
-at a specific time can be removed by a
-.Ic rm
-.Ar \&*filestamp
-command.
-To further reduce the risk of misconfiguration,
-the first two lines of a file contain the file name
-and generation date and time as comments.
-.Pp
-All files are installed by default in the keys directory
-.Pa /usr/local/etc ,
-which is normally in a shared filesystem
-in NFS\-mounted networks.
-The actual location of the keys directory
-and each file can be overridden by configuration commands,
-but this is not recommended.
-Normally, the files for each host are generated by that host
-and used only by that host, although exceptions exist
-as noted later on this page.
-.Pp
-Normally, files containing private values,
-including the host key, sign key and identification parameters,
-are permitted root read/write\-only;
-while others containing public values are permitted world readable.
-Alternatively, files containing private values can be encrypted
-and these files permitted world readable,
-which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
-dependent clients can all be installed in the same shared directory.
-.Pp
-The recommended practice is to keep the file name extensions
-when installing a file and to install a soft link
-from the generic names specified elsewhere on this page
-to the generated files.
-This allows new file generations to be activated simply
-by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
-If a link is not present,
-.Xr ntpd @NTPD_MS@
-extracts the filestamp from the file itself.
-This allows clients to verify that the file and generation times
-are always current.
-The
-.Nm
-program uses the same timestamp extension for all files generated
-at one time, so each generation is distinct and can be readily
-recognized in monitoring data.
-.Ss Running the program
The safest way to run the
.Nm
program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
+The recommended procedure is change to the
+.Ar keys
+directory, usually
.Pa /usr/local/etc ,
then run the program.
-When run for the first time,
-or if all
-.Cm ntpkey
-files have been removed,
-the program generates a RSA host key file and matching RSA\-MD5 certificate file,
+.Pp
+To test and gain experience with Autokey concepts, log in as root and
+change to the
+.Ar keys
+directory, usually
+.Pa /usr/local/etc .
+When run for the first time, or if all files with names beginning with
+.Pa ntpkey\&*
+have been removed, use the
+.Nm
+command without arguments to generate a default
+.Cm RSA
+host key and matching
+.Cm RSA\-MD5
+certificate file with expiration date one year hence,
which is all that is necessary in many cases.
The program also generates soft links from the generic names
to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+If run again without options, the program uses the
+existing keys and parameters and generates a new certificate file with
+new expiration date one year hence, and soft link.
.Pp
-The host key is used to encrypt the cookie when required and so must be RSA type.
+The host key is used to encrypt the cookie when required and so must be
+.Cm RSA
+type.
By default, the host key is also the sign key used to encrypt signatures.
When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
+either
+.Cm RSA
+or
+.Cm DSA
+type.
+By default, the message digest type is
+.Cm MD5 ,
+but any combination
of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
+can be specified, including those using the
+.Cm AES128CMAC , MD2 , MD5 , MDC2 , SHA , SHA1
+and
+.Cm RIPE160
+message digest algorithms.
However, the scheme specified in the certificate must be compatible
with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+Certificates using any digest algorithm are compatible with
+.Cm RSA
+sign keys;
+however, only
+.Cm SHA
+and
+.Cm SHA1
+certificates are compatible with
+.Cm DSA
+sign keys.
.Pp
Private/public key files and certificates are compatible with
other OpenSSL applications and very likely other libraries as well.
as the other files, are probably not compatible with anything other than Autokey.
.Pp
Running the program as other than root and using the Unix
-.Ic su
+.Xr su 1
command
to assume root may not work properly, since by default the OpenSSL library
looks for the random seed file
-.Cm .rnd
+.Pa .rnd
in the user home directory.
However, there should be only one
-.Cm .rnd ,
+.Pa .rnd ,
most conveniently
in the root directory, so it is convenient to define the
-.Cm $RANDFILE
+.Ev RANDFILE
environment variable used by the OpenSSL library as the path to
-.Cm /.rnd .
+.Pa .rnd .
.Pp
Installing the keys as root might not work in NFS\-mounted
shared file systems, as NFS clients may not be able to write
.Pa /etc
using the
.Ic keysdir
-command.
+.Xr ntpd @NTPD_MS@
+configuration file command.
There is no need for one client to read the keys and certificates
of other clients or servers, as these data are obtained automatically
by the Autokey protocol.
Alternatively, files containing private values can be encrypted
and these files permitted world readable,
which simplifies maintenance in shared file systems.
-Since uniqueness is insured by the hostname and
-file name extensions, the files for a NFS server and
+Since uniqueness is insured by the
+.Ar hostname
+and
+.Ar filestamp
+file name extensions, the files for an NTP server and
dependent clients can all be installed in the same shared directory.
.Pp
The recommended practice is to keep the file name extensions
to the generated files.
This allows new file generations to be activated simply
by changing the link.
-If a link is present, ntpd follows it to the file name
-to extract the filestamp.
+If a link is present,
+.Xr ntpd @NTPD_MS@
+follows it to the file name to extract the
+.Ar filestamp .
If a link is not present,
.Xr ntpd @NTPD_MS@
-extracts the filestamp from the file itself.
+extracts the
+.Ar filestamp
+from the file itself.
This allows clients to verify that the file and generation times
are always current.
The
.Nm
-program uses the same timestamp extension for all files generated
+program uses the same
+.Ar filestamp
+extension for all files generated
at one time, so each generation is distinct and can be readily
recognized in monitoring data.
-.Ss Running the program
-The safest way to run the
+.Pp
+Run the command on as many hosts as necessary.
+Designate one of them as the trusted host (TH) using
.Nm
-program is logged in directly as root.
-The recommended procedure is change to the keys directory,
-usually
-.Pa /usr/local/etc ,
-then run the program.
-When run for the first time,
-or if all
-.Cm ntpkey
-files have been removed,
-the program generates a RSA host key file and matching RSA\-MD5 certificate file,
-which is all that is necessary in many cases.
-The program also generates soft links from the generic names
-to the respective files.
-If run again, the program uses the same host key file,
-but generates a new certificate file and link.
+with the
+.Fl T
+option and configure it to synchronize from reliable Internet servers.
+Then configure the other hosts to synchronize to the TH directly or
+indirectly.
+A certificate trail is created when Autokey asks the immediately
+ascendant host towards the TH to sign its certificate, which is then
+provided to the immediately descendant host on request.
+All group hosts should have acyclic certificate trails ending on the TH.
.Pp
-The host key is used to encrypt the cookie when required and so must be RSA type.
-By default, the host key is also the sign key used to encrypt signatures.
-When necessary, a different sign key can be specified and this can be
-either RSA or DSA type.
-By default, the message digest type is MD5, but any combination
-of sign key type and message digest type supported by the OpenSSL library
-can be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
-and RIPE160 message digest algorithms.
-However, the scheme specified in the certificate must be compatible
-with the sign key.
-Certificates using any digest algorithm are compatible with RSA sign keys;
-however, only SHA and SHA1 certificates are compatible with DSA sign keys.
+The host key is used to encrypt the cookie when required and so must be
+RSA type.
+By default, the host key is also the sign key used to encrypt
+signatures.
+A different sign key can be assigned using the
+.Fl S
+option and this can be either
+.Cm RSA
+or
+.Cm DSA
+type.
+By default, the signature
+message digest type is
+.Cm MD5 ,
+but any combination of sign key type and
+message digest type supported by the OpenSSL library can be specified
+using the
+.Fl c
+option.
.Pp
-Private/public key files and certificates are compatible with
-other OpenSSL applications and very likely other libraries as well.
-Certificates or certificate requests derived from them should be compatible
-with extant industry practice, although some users might find
-the interpretation of X509v3 extension fields somewhat liberal.
-However, the identification parameter files, although encoded
-as the other files, are probably not compatible with anything other than Autokey.
+The rules say cryptographic media should be generated with proventic
+filestamps, which means the host should already be synchronized before
+this program is run.
+This of course creates a chicken\-and\-egg problem
+when the host is started for the first time.
+Accordingly, the host time
+should be set by some other means, such as eyeball\-and\-wristwatch, at
+least so that the certificate lifetime is within the current year.
+After that and when the host is synchronized to a proventic source, the
+certificate should be re\-generated.
.Pp
-Running the program as other than root and using the Unix
-.Ic su
-command
-to assume root may not work properly, since by default the OpenSSL library
-looks for the random seed file
-.Cm .rnd
-in the user home directory.
-However, there should be only one
-.Cm .rnd ,
-most conveniently
-in the root directory, so it is convenient to define the
-.Cm $RANDFILE
-environment variable used by the OpenSSL library as the path to
-.Cm /.rnd .
+Additional information on trusted groups and identity schemes is on the
+.Dq Autokey Public\-Key Authentication
+page.
.Pp
-Installing the keys as root might not work in NFS\-mounted
-shared file systems, as NFS clients may not be able to write
-to the shared keys directory, even as root.
-In this case, NFS clients can specify the files in another
-directory such as
-.Pa /etc
-using the
-.Ic keysdir
+File names begin with the prefix
+.Pa ntpkey Ns _
+and end with the suffix
+.Pa _ Ns Ar hostname . Ar filestamp ,
+where
+.Ar hostname
+is the owner name, usually the string returned
+by the Unix
+.Xr hostname 1
+command, and
+.Ar filestamp
+is the NTP seconds when the file was generated, in decimal digits.
+This both guarantees uniqueness and simplifies maintenance
+procedures, since all files can be quickly removed
+by a
+.Ic rm Pa ntpkey\&*
+command or all files generated
+at a specific time can be removed by a
+.Ic rm Pa \&* Ns Ar filestamp
command.
-There is no need for one client to read the keys and certificates
-of other clients or servers, as these data are obtained automatically
-by the Autokey protocol.
-.Pp
-Ordinarily, cryptographic files are generated by the host that uses them,
-but it is possible for a trusted agent (TA) to generate these files
-for other hosts; however, in such cases files should always be encrypted.
-The subject name and trusted name default to the hostname
-of the host generating the files, but can be changed by command line options.
-It is convenient to designate the owner name and trusted name
-as the subject and issuer fields, respectively, of the certificate.
-The owner name is also used for the host and sign key files,
-while the trusted name is used for the identity files.
-seconds.
-seconds.
-s Trusted Hosts and Groups
+To further reduce the risk of misconfiguration,
+the first two lines of a file contain the file name
+and generation date and time as comments.
+.Ss Trusted Hosts and Groups
Each cryptographic configuration involves selection of a signature scheme
and identification scheme, called a cryptotype,
as explained in the
.Sx Authentication Options
section of
.Xr ntp.conf 5 .
-The default cryptotype uses RSA encryption, MD5 message digest
-and TC identification.
+The default cryptotype uses
+.Cm RSA
+encryption,
+.Cm MD5
+message digest
+and
+.Cm TC
+identification.
First, configure a NTP subnet including one or more low\-stratum
trusted hosts from which all other hosts derive synchronization
directly or indirectly.
.Pp
On each trusted host as root, change to the keys directory.
To insure a fresh fileset, remove all
-.Cm ntpkey
+.Pa ntpkey
files.
Then run
.Nm
.Cm RSA
or
.Cm DSA .
-The most often need to do this is when a DSA\-signed certificate is used.
+The most frequent need to do this is when a
+.Cm DSA Ns \-signed
+certificate is used.
If it is necessary to use a different certificate scheme than the default,
run
.Nm
option and selected
.Ar scheme
as needed.
-f
+If
.Nm
is run again without these options, it generates a new certificate
-using the same scheme and sign key.
+using the same scheme and sign key, and soft link.
.Pp
After setting up the environment it is advisable to update certificates
from time to time, if only to extend the validity interval.
Simply run
.Nm
with the same flags as before to generate new certificates
-using existing keys.
+using existing keys, and soft links.
However, if the host or sign key is changed,
.Xr ntpd @NTPD_MS@
should be restarted.
at which time the protocol is restarted.
.Ss Identity Schemes
As mentioned on the Autonomous Authentication page,
-the default TC identity scheme is vulnerable to a middleman attack.
+the default
+.Cm TC
+identity scheme is vulnerable to a middleman attack.
However, there are more secure identity schemes available,
-including PC, IFF, GQ and MV described on the
-.Qq Identification Schemes
-page
-(maybe available at
-.Li http://www.eecis.udel.edu/%7emills/keygen.html ) .
+including
+.Cm PC , IFF , GQ
+and
+.Cm MV
+schemes described below.
These schemes are based on a TA, one or more trusted hosts
and some number of nontrusted hosts.
Trusted hosts prove identity using values provided by the TA,
.Fl P
.Fl p Ar password
to generate the host key file
-.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp
+.Pa ntpkey Ns _ Cm RSA Pa key_alice. Ar filestamp
and trusted private certificate file
-.Pa ntpkey_RSA\-MD5_cert_ Ns Ar alice.filestamp .
+.Pa ntpkey Ns _ Cm RSA\-MD5 _ Pa cert_alice. Ar filestamp ,
+and soft links.
Copy both files to all group hosts;
they replace the files which would be generated in other schemes.
-On each host bob install a soft link from the generic name
+On each host
+.Ar bob
+install a soft link from the generic name
.Pa ntpkey_host_ Ns Ar bob
to the host key file and soft link
.Pa ntpkey_cert_ Ns Ar bob
by trusted host alice.
In this scheme it is not possible to refresh
either the keys or certificates without copying them
-to all other hosts in the group.
+to all other hosts in the group, and recreating the soft links.
.Pp
-For the IFF scheme proceed as in the TC scheme to generate keys
+For the
+.Cm IFF
+scheme proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts, then for every trusted host in the group,
-generate the IFF parameter file.
+generate the
+.Cm IFF
+parameter file.
On trusted host alice run
.Nm
.Fl T
.Fl I
.Fl p Ar password
to produce her parameter file
-.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp ,
+.Pa ntpkey_IFFpar_alice. Ns Ar filestamp ,
which includes both server and client keys.
Copy this file to all group hosts that operate as both servers
and clients and install a soft link from the generic
-.Pa ntpkey_iff_ Ns Ar alice
+.Pa ntpkey_iff_alice
to this file.
If there are no hosts restricted to operate only as clients,
there is nothing further to do.
-As the IFF scheme is independent
+As the
+.Cm IFF
+scheme is independent
of keys and certificates, these files can be refreshed as needed.
.Pp
If a rogue client has the parameter file, it could masquerade
After generating the parameter file, on alice run
.Nm
.Fl e
-and pipe the output to a file or mail program.
-Copy or mail this file to all restricted clients.
+and pipe the output to a file or email program.
+Copy or email this file to all restricted clients.
On these clients install a soft link from the generic
-.Pa ntpkey_iff_ Ns Ar alice
+.Pa ntpkey_iff_alice
to this file.
To further protect the integrity of the keys,
each file can be encrypted with a secret password.
.Pp
-For the GQ scheme proceed as in the TC scheme to generate keys
+For the
+.Cm GQ
+scheme proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts, then for every trusted host
-in the group, generate the IFF parameter file.
+in the group, generate the
+.Cm IFF
+parameter file.
On trusted host alice run
.Nm
.Fl T
.Fl G
.Fl p Ar password
to produce her parameter file
-.Pa ntpkey_GQpar_ Ns Ar alice.filestamp ,
+.Pa ntpkey_GQpar_alice. Ns Ar filestamp ,
which includes both server and client keys.
Copy this file to all group hosts and install a soft link
from the generic
-.Pa ntpkey_gq_ Ns Ar alice
+.Pa ntpkey_gq_alice
to this file.
-In addition, on each host bob install a soft link
+In addition, on each host
+.Ar bob
+install a soft link
from generic
.Pa ntpkey_gq_ Ns Ar bob
to this file.
-As the GQ scheme updates the GQ parameters file and certificate
+As the
+.Cm GQ
+scheme updates the
+.Cm GQ
+parameters file and certificate
at the same time, keys and certificates can be regenerated as needed.
.Pp
-For the MV scheme, proceed as in the TC scheme to generate keys
+For the
+.Cm MV
+scheme, proceed as in the
+.Cm TC
+scheme to generate keys
and certificates for all group hosts.
For illustration assume trish is the TA, alice one of several trusted hosts
and bob one of her clients.
.Ar n
is the number of revokable keys (typically 5) to produce
the parameter file
-.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp
+.Pa ntpkeys_MVpar_trish. Ns Ar filestamp
and client key files
-.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp
+.Pa ntpkeys_MVkey Ns Ar d _ Pa trish. Ar filestamp
where
.Ar d
is the key number (0 \&<
.Ar n ) .
Copy the parameter file to alice and install a soft link
from the generic
-.Pa ntpkey_mv_ Ns Ar alice
+.Pa ntpkey_mv_alice
to this file.
Copy one of the client key files to alice for later distribution
to her clients.
-It doesn't matter which client key file goes to alice,
+It does not matter which client key file goes to alice,
since they all work the same way.
-Alice copies the client key file to all of her cliens.
+Alice copies the client key file to all of her clients.
On client bob install a soft link from generic
-.Pa ntpkey_mvkey_ Ns Ar bob
+.Pa ntpkey_mvkey_bob
to the client key file.
-As the MV scheme is independent of keys and certificates,
+As the
+.Cm MV
+scheme is independent of keys and certificates,
these files can be refreshed as needed.
.Ss Command Line Options
.Bl -tag -width indent
-.It Fl c Ar scheme
-Select certificate message digest/signature encryption scheme.
+.It Fl b Fl \-imbits Ns = Ar modulus
+Set the number of bits in the identity modulus for generating identity keys to
+.Ar modulus
+bits.
+The number of bits in the identity modulus defaults to 256, but can be set to
+values from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.It Fl c Fl \-certificate Ns = Ar scheme
+Select certificate signature encryption/message digest scheme.
The
.Ar scheme
can be one of the following:
-. Cm RSA\-MD2 , RSA\-MD5 , RSA\-SHA , RSA\-SHA1 , RSA\-MDC2 , RSA\-RIPEMD160 , DSA\-SHA ,
+.Cm RSA\-MD2 , RSA\-MD5 , RSA\-MDC2 , RSA\-SHA , RSA\-SHA1 , RSA\-RIPEMD160 , DSA\-SHA ,
or
.Cm DSA\-SHA1 .
-Note that RSA schemes must be used with a RSA sign key and DSA
-schemes must be used with a DSA sign key.
+Note that
+.Cm RSA
+schemes must be used with an
+.Cm RSA
+sign key and
+.Cm DSA
+schemes must be used with a
+.Cm DSA
+sign key.
The default without this option is
.Cm RSA\-MD5 .
-.It Fl d
-Enable debugging.
+If compatibility with FIPS 140\-2 is required, either the
+.Cm DSA\-SHA
+or
+.Cm DSA\-SHA1
+scheme must be used.
+.It Fl C Fl \-cipher Ns = Ar cipher
+Select the OpenSSL cipher to encrypt the files containing private keys.
+The default without this option is three\-key triple DES in CBC mode,
+.Cm des\-ede3\-cbc .
+The
+.Ic openssl Fl h
+command provided with OpenSSL displays available ciphers.
+.It Fl d Fl \-debug\-level
+Increase debugging verbosity level.
This option displays the cryptographic data produced in eye\-friendly billboards.
-.It Fl e
-Write the IFF client keys to the standard output.
-This is intended for automatic key distribution by mail.
-.It Fl G
-Generate parameters and keys for the GQ identification scheme,
-obsoleting any that may exist.
-.It Fl g
-Generate keys for the GQ identification scheme
-using the existing GQ parameters.
-If the GQ parameters do not yet exist, create them first.
-.It Fl H
-Generate new host keys, obsoleting any that may exist.
-.It Fl I
-Generate parameters for the IFF identification scheme,
-obsoleting any that may exist.
-.It Fl i Ar name
-Set the suject name to
-.Ar name .
-This is used as the subject field in certificates
-and in the file name for host and sign keys.
-.It Fl M
-Generate MD5 keys, obsoleting any that may exist.
-.It Fl P
-Generate a private certificate.
+.It Fl D Fl \-set\-debug\-level Ns = Ar level
+Set the debugging verbosity to
+.Ar level .
+This option displays the cryptographic data produced in eye\-friendly billboards.
+.It Fl e Fl \-id\-key
+Write the
+.Cm IFF
+or
+.Cm GQ
+public parameters from the
+.Ar IFFkey or GQkey
+client keys file previously specified
+as unencrypted data to the standard output stream
+.Pa stdout .
+This is intended for automatic key distribution by email.
+.It Fl G Fl \-gq\-params
+Generate a new encrypted
+.Cm GQ
+parameters and key file for the Guillou\-Quisquater (GQ) identity scheme.
+This option is mutually exclusive with the
+.Fl I
+and
+.Fl V
+options.
+.It Fl H Fl \-host\-key
+Generate a new encrypted
+.Cm RSA
+public/private host key file.
+.It Fl I Fl \-iffkey
+Generate a new encrypted
+.Cm IFF
+key file for the Schnorr (IFF) identity scheme.
+This option is mutually exclusive with the
+.Fl G
+and
+Fl V
+options.
+.It Fl i Fl \-ident Ns = Ar group
+Set the optional Autokey group name to
+.Ar group .
+This is used in the identity scheme parameter file names of
+.Cm IFF , GQ ,
+and
+.Cm MV
+client parameters files.
+In that role, the default is the host name if no group is provided.
+The group name, if specified using
+.Fl i
+or
+.Fl s
+following an
+.Ql @
+character, is also used in certificate subject and issuer names in the form
+.Ar host @ group
+and should match the group specified via
+.Ic crypto Cm ident
+or
+.Ic server Cm ident
+in the ntpd configuration file.
+.It Fl l Fl \-lifetime Ns = Ar days
+Set the lifetime for certificate expiration to
+.Ar days .
+The default lifetime is one year (365 days).
+.It Fl m Fl \-modulus Ns = Ar bits
+Set the number of bits in the prime modulus for generating files to
+.Ar bits .
+The modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
+Use the larger moduli with caution, as this can consume considerable computing
+resources and increases the size of authenticated packets.
+.It Fl M Fl \-md5key
+Generate a new symmetric keys file containing 10
+.Cm MD5
+keys, and if OpenSSL is available, 10
+.Cm SHA
+keys.
+An
+.Cm MD5
+key is a string of 20 random printable ASCII characters, while a
+.Cm SHA
+key is a string of 40 random hex digits.
+The file can be edited using a text editor to change the key type or key content.
+This option is mutually exclusive with all other options.
+.It Fl p Fl \-password Ns = Ar passwd
+Set the password for reading and writing encrypted files to
+.Ar passwd .
+These include the host, sign and identify key files.
+By default, the password is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl P Fl \-pvt\-cert
+Generate a new private certificate used by the
+.Cm PC
+identity scheme.
By default, the program generates public certificates.
-.It Fl p Ar password
-Encrypt generated files containing private data with
-.Ar password
-and the DES\-CBC algorithm.
-.It Fl q
-Set the password for reading files to password.
-.It Fl S Oo Cm RSA | DSA Oc
-Generate a new sign key of the designated type,
-obsoleting any that may exist.
-By default, the program uses the host key as the sign key.
-.It Fl s Ar name
-Set the issuer name to
-.Ar name .
-This is used for the issuer field in certificates
-and in the file name for identity files.
-.It Fl T
+Note: the PC identity scheme is not recommended for new installations.
+.It Fl q Fl \-export\-passwd Ns = Ar passwd
+Set the password for writing encrypted
+.Cm IFF , GQ and MV
+identity files redirected to
+.Pa stdout
+to
+.Ar passwd .
+In effect, these files are decrypted with the
+.Fl p
+password, then encrypted with the
+.Fl q
+password.
+By default, the password is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl s Fl \-subject\-key Ns = Ar Oo host Oc Op @ Ar group
+Specify the Autokey host name, where
+.Ar host
+is the optional host name and
+.Ar group
+is the optional group name.
+The host name, and if provided, group name are used in
+.Ar host @ group
+form as certificate subject and issuer.
+Specifying
+.Fl s @ Ar group
+is allowed, and results in leaving the host name unchanged, as with
+.Fl i Ar group .
+The group name, or if no group is provided, the host name are also used in the
+file names of
+.Cm IFF , GQ ,
+and
+.Cm MV
+identity scheme client parameter files.
+If
+.Ar host
+is not specified, the default host name is the string returned by the Unix
+.Ic hostname
+command.
+.It Fl S Fl \-sign\-key Ns = Op Cm RSA | DSA
+Generate a new encrypted public/private sign key file of the specified type.
+By default, the sign key is the host key and has the same type.
+If compatibility with FIPS 140\-2 is required, the sign key type must be
+.Cm DSA .
+.It Fl T Fl \-trusted\-cert
Generate a trusted certificate.
By default, the program generates a non\-trusted certificate.
-.It Fl V Ar nkeys
-Generate parameters and keys for the Mu\-Varadharajan (MV) identification scheme.
+.It Fl V Fl \-mv\-params Ar nkeys
+Generate
+.Ar nkeys
+encrypted server keys and parameters for the Mu\-Varadharajan (MV)
+identity scheme.
+This option is mutually exclusive with the
+.Fl I
+and
+.Fl G
+options.
+Note: support for this option should be considered a work in progress.
.El
.Ss Random Seed File
All cryptographically sound key generation schemes must have means
.Pp
The entropy seed used by the OpenSSL library is contained in a file,
usually called
-.Cm .rnd ,
+.Pa .rnd ,
which must be available when starting the NTP daemon
or the
.Nm
program.
The NTP daemon will first look for the file
using the path specified by the
-.Ic randfile
+.Cm randfile
subcommand of the
.Ic crypto
configuration command.
.Ev RANDFILE
environment variable is not present,
the library will look for the
-.Cm .rnd
+.Pa .rnd
file in the user home directory.
+Since both the
+.Nm
+program and
+.Xr ntpd @NTPD_MS@
+daemon must run as root, the logical place to put this file is in
+.Pa /.rnd
+or
+.Pa /root/.rnd .
If the file is not available or cannot be written,
the daemon exits with a message to the system log and the program
exits with a suitable error message.
.Ss Cryptographic Data Files
-All other file formats begin with two lines.
-The first contains the file name, including the generated host name
-and filestamp.
-The second contains the datestamp in conventional Unix date format.
-Lines beginning with # are considered comments and ignored by the
+All file formats begin with two nonencrypted lines.
+The first line contains the file name, including the generated host name
+and filestamp, in the format
+.Pa ntpkey_ Ns Ar key _ Ar name . Ar filestamp ,
+where
+.Ar key
+is the key or parameter type,
+.Ar name
+is the host or group name and
+.Ar filestamp
+is the filestamp (NTP seconds) when the file was created.
+By convention,
+.Ar key
+names in generated file names include both upper and lower case
+characters, while
+.Ar key
+names in generated link names include only lower case characters.
+The filestamp is not used in generated link names.
+The second line contains the datestamp in conventional Unix
+.Pa date
+format.
+Lines beginning with
+.Ql #
+are considered comments and ignored by the
.Nm
program and
.Xr ntpd @NTPD_MS@
daemon.
-Cryptographic values are encoded first using ASN.1 rules,
-then encrypted if necessary, and finally written PEM\-encoded
-printable ASCII format preceded and followed by MIME content identifier lines.
.Pp
-The format of the symmetric keys file is somewhat different
-than the other files in the interest of backward compatibility.
-Since DES\-CBC is deprecated in NTPv4, the only key format of interest
-is MD5 alphanumeric strings.
-Following hte heard the keys are
-entered one per line in the format
-.D1 Ar keyno type key
+The remainder of the file contains cryptographic data, encoded first using ASN.1
+rules, then encrypted if necessary, and finally written in PEM\-encoded
+printable ASCII text, preceded and followed by MIME content identifier lines.
+.Pp
+The format of the symmetric keys file, ordinarily named
+.Pa ntp.keys ,
+is somewhat different than the other files in the interest of backward compatibility.
+Ordinarily, the file is generated by this program, but it can be constructed
+and edited using an ordinary text editor.
+.Bd -literal -unfilled -offset center
+# ntpkey_MD5key_bk.ntp.org.3595864945
+# Thu Dec 12 19:22:25 2013
+1 MD5 L";Nw<\`.I<f4U0)247"i # MD5 key
+2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key
+3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key
+4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key
+5 MD5 B;fx'Kgr/&4ZTbL6=RxA # MD5 key
+6 MD5 4eYwa\`o}3i@@V@..R9!l # MD5 key
+7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key
+8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key
+9 MD5 3\-5vcn*6l29DS?Xdsg)* # MD5 key
+10 MD5 2late4Me # MD5 key
+11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key
+12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key
+13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key
+14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key
+15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key
+16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key
+17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key
+18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key
+19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key
+20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key
+.Ed
+.D1 Figure 1. Typical Symmetric Key File
+.Pp
+Figure 1 shows a typical symmetric keys file used by the reference
+implementation.
+Following the header the keys are entered one per line in the format
+.D1 Ar keyno Ar type Ar key
where
.Ar keyno
-is a positive integer in the range 1\-65,535,
+is a positive integer in the range 1\-65534;
.Ar type
-is the string MD5 defining the key format and
+is the key type for the message digest algorithm, which in the absence of the
+OpenSSL library must be
+.Cm MD5
+to designate the MD5 message digest algorithm;
+if the OpenSSL library is installed, the key type can be any
+message digest algorithm supported by that library;
+however, if compatibility with FIPS 140\-2 is required,
+the key type must be either
+.Cm SHA
+or
+.Cm SHA1 ;
.Ar key
is the key itself,
-which is a printable ASCII string 16 characters or less in length.
-Each character is chosen from the 93 printable characters
-in the range 0x21 through 0x7f excluding space and the
+which is a printable ASCII string 20 characters or less in length:
+each character is chosen from the 93 printable characters
+in the range 0x21 through 0x7e (
+.Ql !
+through
+.Ql ~
+\&) excluding space and the
+.Ql #
+character, and terminated by whitespace or a
.Ql #
character.
+An OpenSSL key consists of a hex\-encoded ASCII string of 40 characters, which
+is truncated as necessary.
.Pp
Note that the keys used by the
.Xr ntpq @NTPQ_MS@
.Pp
The
.Nm
-program generates a MD5 symmetric keys file
-.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp .
+program generates a symmetric keys file
+.Pa ntpkey_MD5key_ Ns Ar hostname Ns . Ns Ar filestamp .
Since the file contains private shared keys,
it should be visible only to root and distributed by secure means
to other subnet hosts.
certificate scheme.
.sp
scheme is one of
-RSA\-MD2, RSA\-MD5, RSA\-SHA, RSA\-SHA1, RSA\-MDC2, RSA\-RIPEMD160,
+RSA\-MD2, RSA\-MD5, RSA\-MDC2, RSA\-SHA, RSA\-SHA1, RSA\-RIPEMD160,
DSA\-SHA, or DSA\-SHA1.
.sp
-Select the certificate message digest/signature encryption scheme.
+Select the certificate signature encryption/message digest scheme.
Note that RSA schemes must be used with a RSA sign key and DSA
schemes must be used with a DSA sign key. The default without
this option is RSA\-MD5.
.sp
Select the cipher which is used to encrypt the files containing
private keys. The default is three\-key triple DES in CBC mode,
-equivalent to "@code{\-C des\-ede3\-cbc". The openssl tool lists ciphers
+equivalent to "\fB\-C des\-ede3\-cbc\fP". The openssl tool lists ciphers
available in "\fBopenssl \-h\fP" output.
.It Fl d , Fl \-debug\-level
Increase debug verbosity level.
.It Fl e , Fl \-id\-key
Write IFF or GQ identity keys.
.sp
-Write the IFF or GQ client keys to the standard output. This is
-intended for automatic key distribution by mail.
+Write the public parameters from the IFF or GQ client keys to
+the standard output.
+This is intended for automatic key distribution by email.
.It Fl G , Fl \-gq\-params
Generate GQ parameters and keys.
.sp
that role, the default is the host name if this option is not
provided. The group name, if specified using \fB\-i/\-\-ident\fP or
using \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character,
-is also a part of the self\-signed host certificate's subject and
+is also a part of the self\-signed host certificate subject and
issuer names in the form \fBhost@group\fP and should match the
-\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
-\fBntpd\fP's configuration file.
+\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in the
+\fBntpd\fP configuration file.
.It Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime
set certificate lifetime.
This option takes an integer number as its argument.
.sp
Set the certificate expiration to lifetime days from now.
-.It Fl M , Fl \-md5key
-generate MD5 keys.
-.sp
-Generate MD5 keys, obsoleting any that may exist.
.It Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus
-modulus.
+prime modulus.
This option takes an integer number as its argument.
The value of
.Ar modulus
.in -4
.sp
The number of bits in the prime modulus. The default is 512.
+.It Fl M , Fl \-md5key
+generate symmetric keys.
+.sp
+Generate symmetric keys, obsoleting any that may exist.
.It Fl P , Fl \-pvt\-cert
generate PC private certificate.
.sp
The same password must be specified to the remote ntpd via the
"crypto pw password" configuration command. See also the option
-\-id\-key (\-e) for unencrypted exports.
-.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
-generate sign key (RSA or DSA).
-.sp
-Generate a new sign key of the designated type, obsoleting any
-that may exist. By default, the program uses the host key as the
-sign key.
.It Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group
set host and optionally group name.
.sp
following an '\fB@\fP' character. The host name is used in the file
name of generated host and signing certificates, without the
group name. The host name, and if provided, group name are used
-in \fBhost@group\fP form for the host certificate's subject and issuer
+in \fBhost@group\fP form for the host certificate subject and issuer
fields. Specifying '\fB\-s @group\fP' is allowed, and results in
leaving the host name unchanged while appending \fB@group\fP to the
subject and issuer fields, as with \fB\-i group\fP. The group name, or
if not provided, the host name are also used in the file names
of IFF, GQ, and MV client parameter files.
+.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign
+generate sign key (RSA or DSA).
+.sp
+Generate a new sign key of the designated type, obsoleting any
+that may exist. By default, the program uses the host key as the
+sign key.
.It Fl T , Fl \-trusted\-cert
trusted certificate (TC scheme).
.sp
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.Sh USAGE
-The
-.Fl p Ar password
-option specifies the write password and
-.Fl q Ar password
-option the read password for previously encrypted files.
-The
-.Nm
-program prompts for the password if it reads an encrypted file
-and the password is missing or incorrect.
-If an encrypted file is read successfully and
-no write password is specified, the read password is used
-as the write password by default.
.Sh "ENVIRONMENT"
See \fBOPTION PRESETS\fP for configuration environment variables.
.Sh "FILES"
Copyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
-It can take quite a while to generate some cryptographic values,
-from one to several minutes with modern architectures
-such as UltraSPARC and up to tens of minutes to an hour
-with older architectures such as SPARC IPC.
+It can take quite a while to generate some cryptographic values.
.Pp
Please report bugs to http://bugs.ntp.org .
.Pp