ntp.conf(5) File Formats ntp.conf(5) (NAME) ntp.conf - (NTP) (SYNOPSIS) ntp.conf [--option-name] [--option-name value] . (DESCRIPTION) ntp.conf ntpd(1) . /etc ( -c ). UNIX . `#' . (whitespace) . . (dotted-quad) ( ) . . "Notes on Configuring NTP and Setting up an NTP Subnet" ( HTML /usr/share/doc/ntp) . (Configuration Options) : o (Authentication Support) o (Monitoring Support) o (Access Control Support) o NTP (Automatic NTP Configuration Options) o (Reference Clock Support) o (Miscellaneous Options) (Miscellaneous Options) . pool, server, peer, broadcast manycastclient . (Configuration Support) NTPv4 . NTPv3 . : (persistent association) . (Configuration Commands) IP . : (s) (IPv4 A B C) (b) ( ) (m) (IPv4 D) (r) (127.127.x.x). . . IPv6 ( RFC-2553) IPv4 IPv6 . (billboard) reslist ntpq(1) ntpdc(1) IPv6 . IPv6 ":" . IPv6 IPv4 IPv4 . -4 DNS IPv4 -6 DNS IPv6 . IPv6 . pool address [burst] [iburst] [version version] [prefer] [minpoll minpoll] [maxpoll maxpoll] [xmtnonce] server address [key key | autokey] [burst] [iburst] [version version] [prefer] [minpoll minpoll] [maxpoll maxpoll] [true] [xmtnonce] peer address [key key | autokey] [version version] [prefer] [minpoll minpoll] [maxpoll maxpoll] [true] [xleave] broadcast address [key key | autokey] [version version] [prefer] [minpoll minpoll] [ttl ttl] [xleave] manycastclient address [key key | autokey] [version version] [prefer] [minpoll minpoll] [maxpoll maxpoll] [ttl ttl] . address DNS IP (dotted-quad) . (association) " (Association Management)" ( HTML /usr/share/doc/ntp) . pool s . . server s r . . b m . peer s - (symmetric-active) . . . b m r . broadcast b m ( ) . () / () . . address ( ) () NTP . IANA IPv4 224.0.1.1 IPv6 ff05::101 ( ) NTP . broadcastclient multicastclient . manycastclient m . manycastserver . NTP 224.0.1.1 IANA . manycastserver / . address . server . . : autokey autokey (Authentication Support) . burst (burst) . . server s . iburst . . server s ntpd(1) -q . key key key ( ) . . minpoll minpoll maxpoll maxpoll (poll intervals) NTP . ( ) maxpoll (. ) . ( ) minpoll ( ) . noselect . . preempt (preempted). prefer . . "Mitigation Rules and the prefer Keyword" ( HTML /usr/share/doc/ntp) . true (truechimer) . . ttl ttl . (time-to-live) ttl ttl (expanding ring search) . . version version NTP . . xleave peer broadcast (interleave mode) . xmtnonce server pool (transmit timestamp) . (Auxiliary Commands) broadcastclient ( b) . / . (Authentication Support) . manycastserver address ... () ( m) . NTP 224.0.1.1 IANA . (Authentication Support) . multicastclient address ... () ( m) . / . (Authentication Support) . mdnstries number mDNS mDNS . mdnstries . ntpd mDNS . mdnstries . (Authentication Support) NTP (masquerade) . NTPv3 RFC-1305 NTP . (DES) (CBC) DES-CBC . RSA (MD5) (private key) keyed-MD5 . (message digest) (one-way hash) (key identifier) . NTPv4 NTPv3 (symmetric key cryptography) Autokey (public key cryptography) . . Autokey . X.509 (certificates) OpenSSL NTPv4 . NTPv4 OpenSSL NTP . Building and Installing the Distribution . (association) key autokey peer, server, broadcast manycastclient Configuration Options . ( ) ( ) . . NTP (MAC) . (message digest) . (replayed) . Autokey . auth . enable disable ntpdc(1) . ( ) broadcast passive . . auth falseticker . broadcast active . (multicast) manycast (troll) Automatic NTP Configuration Options . . manycast . NTP http://www.ntp.org . (Symmetric-Key Cryptography) RFC-1305 , . NTP . ntp.keys NTP . NTP ntpq(1) ntpdc(1) . ntpd(1) keys (key cache) . trusted . ntpdc(1) . (revocation) . requestkey ntpdc(1) controlkey ntpq(1) . (Public Key Cryptography) NTPv4 NTPv3 RFC-1305 Autokey . Autokey Version 2 Autokey Protocol MD5 / (digest/signature) . Identity Schemes / (challenge/response) . (spoofing) (masquerade) (clogging attacks) . Autokey NTP . (cookie) . S-KEY . Autonomous Authentication . Autokey ntp-keygen(1ntpkeygenmdoc) . (host key) (certificate) (sign key) (leapsecond) . / (digest/signature) X.509 . OpenSSL md5WithRSAEncryption MD5 RSA . NTP OpenSSL RSA DSA . NTP . (certificate trail) . Autokey . NTP . (Naming and Addressing) Autokey DNS (name servers) DNS . Autokey . subject issuer DNS . Autokey gethostname(2) . (aliases) . DNS . Autokey (masquerade) . Autokey IP (message digest) . (NAT) . NTP . (Operation) ( ) cryptotype . (peers) cryptotype . NTPv4 . cryptotype . (cryptotype) (mobilization) cryptotype . server peer key autokey key autokey Autokey . Autokey . . . . cryptotype . cryptotype cryptotype . broadcast manycast passive (mobilize) cryptotype . (override) . . Alice cryptotype . Bob Autokey . Alice Bob . Cathy Bob Bob . Bob . Bob Cathy . Bob crypto-NAK Cathy . ntpq(1) . Denise . Bob . Autokey Bob . Denise Bob . Bob . Bob ( ) . cryptotype . (Key Management) Autokey ntp-keygen(1ntpkeygenmdoc) . OpenSSL (certificate authorities) . ntpq(1) ntpdc(1) . Autokey . OpenSSL . ASN.1 X.509 Version 3 PEM OpenSSL . ASN.1 . (CN) (FQDN) subject . (extension fields) subject key identifier issuer key identifier extended key usage trustRoot;. . . (Authentication Commands) autokey [logsec] (session key list) Autokey . (association) (poll interval) . ( ) . . controlkey key ntpq(1) RFC-1305 . key (trusted key) ( ) . crypto [cert file] [leap file] [randfile file] [host file] [gq file] [gqpar file] [iffpar file] [mvpar file] [pw password] OpenSSL . . . keysdir /usr/local/etc . : cert file . ntpkey_cert_hostname . gqpar file GQ . ntpkey_gq_hostname . host file . ntpkey_key_hostname . iffpar file IFF . ntpkey_iff_hostname . leap file . ntpkey_leap . mvpar file MV . ntpkey_mv_hostname . pw password . . randfile file (random seed) OpenSSL . . keys keyfile MD5 ntpd(1), ntpq(1) ntpdc(1) . -k . keysdir path . /usr/local/etc/ . requestkey key ntpdc(1) ntpd(1) . key ( ) . revoke logsec Autokey . (brute-force) . ( ) . . trustedkey key ... ntpq(1) ntpdc(1) (trusted) . . key . (Error Codes) (trap) NTP . 101 (bad field format or length) . 102 (bad timestamp) . . 103 (bad filestamp) . . 104 (bad or missing public key) . 105 (unsupported digest type) / . 106 (mismatched digest types) . 107 (bad signature length) . 108 (signature not verified) . . 109 (certificate not verified) . 110 (certificate not verified) . 111 (bad or missing cookie) . 112 (bad or missing leapseconds table) . 113 (bad or missing certificate) . 114 (bad or missing identity) . (Monitoring Support) ntpd(1) . statistics . ./scripts . cron(8) . (Monitoring Commands) statistics name ... . name . clockstats (clock driver) . clockstats : 49213 525.624 127.127.4.1 93 226 00:08:29.606 D (Modified Julian Day) ( UTC) . (dotted-quad) . ( ) . . . cryptostats OpenSSL . . cryptostats : 49213 525.624 127.127.4.1 message (Modified Julian Day) ( UTC) . . message . Authentication Options . loopstats (loop filter) . loopstats : 50935 75440.031 0.000006019 13.778190 0.000351733 0.0133806 (Modified Julian Day) ( UTC) . () ( - PPM) RMS () (PPM) . peerstats . NTP . peerstats : 48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877 0.000958674 (Modified Julian Day) ( UTC) . . A NTP RFC 1305 . (offset) RMS . rawstats (raw-timestamp) . NTP . NTP rawstats : 50928 2132.543 128.4.1.1 128.4.1.20 3102453281.584327000 3102453281.58622800031 02453332.540806000 3102453332.541458000 (Modified Julian Day) ( UTC) . . (originate) (receive) (transmit) NTP . . sysstats ntpd . sysstats : 50928 2132.543 36000 81965 0 9546 56 71793 512 540 10 147 (Modified Julian Day) ( UTC) . . Time since restart 36000 . Packets received 81965 . Packets processed 0 . Current version 9546 NTP. Previous version 56 NTP. Bad version 71793 NTP . Access denied 512 . Bad length or format 540 . Bad authentication 10 . Rate exceeded 147 . statsdir directory_path ( ). filegen ( ) . filegen name [file filename] [type typename] [link | nolink] [enable | disable] . . . . . . ntpd . ( : .) ntpdc(1) . name statistics . file filename . prefix, filename suffix : prefix . filegen . . . loopstats peerstats statsdir . filename ( `/' ). file filegen . .. prefix . suffix . . type typename . : none . pid ntpd . ntpd(1) . `.' prefix filename (PID) ntpd(1) . day . 00:00 24:00 UTC . `.' YYYYMMdd . YYYY ( 1992). MM . dd . prefix filename.19921210 . week . (modulo 7) . : W . . month . . year . . age . a . . enable disable . link | nolink . link nolink . link (hard link) . C (PID) ntpd(1) . . . enable | disable . (Access Control Support) ntpd(1) / . / . AND AND . . "Notes on Configuring NTP and Setting up a NTP Subnet" ( HTML /usr/share/doc/ntp) . NSFnet . (clogging) . NTP . . restrict . NTP . . . (The Kiss-of-Death Packet) . . << >> "kiss-of- death" (KoD) . KoD (leap bits) (unsynchronized) (stratum) (reference identifier) . noserve notrust "DENY" limited "RATE" . "CRYP" . KoD stratum (TEST4) (log) . TEST4 . . (association) . . (Access Control Commands) discard [average avg] [minimum min] [monitor prob] limited . average log2 ( ) minimum . kiss-o'-death . monitor (MRU) . monitor . MRU . . restrict address [mask mask] [ippeerlimit int] [flag ...] address . address . mask . mask () address . . default mask . ippeerlimit (peer) IP int -1 "unlimited" () . 0 "none" () . IP IP . flag . () . : . : ignore ntpq(1) ntpdc(1). kod kiss-o'-death (KoD) . KoD discard average 8s . . limited discard . ntpd(1) . limited . lowpriotrap . ( ). ( ) . . noepeer (ephemeral peer) . ntp.keys IP . . noepeer ntp-4.4 . nomodify ntpq(1) ntpdc(1) ( ). . noquery ntpq(1) ntpdc(1). . nopeer (association) . (broadcast) . pool pool nopeer restrict source ... nopeer not . noserve ntpq(1) ntpdc(1). notrap mode 6 . ntpq(1) . notrust . ntpport . UDP NTP ( ) . ntpport IP . ntpport . serverresponse fuzz reftime (fuzz) . version NTP . ignore interface ntpport ntpd manycastclient manycast (multicast) . ( NTP ). delrestrict [source] address . ntpq(1) . source restrict source . source . NTP (Automatic NTP Configuration Options) Manycasting (Manycasting) NTPv4 . (multicast) manycast . manycast <<>> manycast . manycasting anycast RFC-1546 . manycast (redundant) . Manycasting . (PKI) . Autokey OpenSSL http://www.openssl.org . NTPv4 (broadcast) . manycast manycastclient server ( D IPv4 FF IPv6). IANA IPv4 224.1.1.1 IPv6 FF05::101 ( ) NTP . manycast (TTL) . manycast (unicast) / . Manycast manycastserver manycast . manycast manycast . manycast TTL (stratum) manycast manycast (unicast) . manycast / (ephemeral) manycast (stratum) . (Autokey) . burst . / . (intersection) (clustering) NTP <<>> . / . manycast manycast (implosion) manycast . manycastclient tos ttl . manycast minpoll manycastclient maxpolll . TTL ttl . TTL . TTL . manycast NTP minclock minsane tos . minsane minclock . (falseticker) . (legacy) minsane minclock . manycast minsane . minclock manycast maxpoll . TTL minclock manycast . maxpoll . TTL . / . IPv6 / . TTL ttl (scope) . manycast . manycast (stratum) ( ) TTL . manycast TTL TTL . tos . floor ceiling tos TTL minclock . manycast . manycast . minclock manycast TTL . manycast manycast TTL . (implosion) . maxpoll 12 (4,096 ) . manycast manycast . . NTP . multicastclient multicastserver 239.1.1.1 . GPS . tos . . floor . . (1) . . GPS (time out) . ntpd(1) sntp(1) ntpd(1) -q (cron job) . cron job . manycast ntpd(1) -q . . . Manycast Autokey manycast manycast (status word) . manycast Autokey . burst (cache) . . Autokey . / () . manycast . . (epoch) . manycast . (Broadcast Options) tos [bcpollbstep gate] . . . (replay attacks) . 0 0 4 . Manycast tos [ceiling ceiling | cohort { 0 | 1 } | floor floor | minclock minclock | minsane minsane] . manycast . : ceiling ceiling (strata) ceiling minclock . 15 1 15 . cohort {0 | 1 } manycast manycast (0) (1) . (implosion) . . floor floor floor minclock . 1 1 15 . minclock minclock (outlier) minclock . 3 1 . minsane minsane (truechimer) . (undisciplined) . (legacy) 1 . (Byzantine agreement) minsane 4 (falseticker) . ttl hop ... TTL 8 . manycast (expanding-ring) . 32 31 . (Reference Clock Support) NTP . "Reference Clock Drivers" ( HTML /usr/share/doc/ntp) . "Debugging Hints for Reference Clock Drivers" "How To Write a Reference Clock Driver" ( HTML /usr/share/doc/ntp) . PPS "Pulse-per- second (PPS) Signal Interfacing" ( HTML /usr/share/doc/ntp) . line discipline/streams . "Line Disciplines and Streams Drivers" ( HTML /usr/share/doc/ntp) . ( ) NRC NIST USNO . . . (system log) . ntpd(1) (peers) NTP . IP NTP . 127.127.t.u, t u 0-3 . . server address . key, version ttl . mode . prefer . "Mitigation Rules and the prefer Keyword" ( HTML /usr/share/doc/ntp) . minpoll maxpoll . . fudge server . address . refid stratum . fudge . (stratum) . ntpd(1) . . stratum . (PPS) . refid . . (Reference Clock Commands) server 127.127.t.u [prefer] [mode int] [minpoll int] [maxpoll int] . : prefer (preferred) . . "Mitigation Rules and the prefer Keyword" ( HTML /usr/share/doc/ntp) . mode int (mode) . ACTS parse . minpoll int maxpoll int (polling) minpoll maxpoll 6 (64 ) . minpoll 10 (17.1 ) maxpoll 14 (4.5 ) . 4 (16 ) 17 (36.4 ) . fudge 127.127.t.u [time1 sec] [time2 sec] [stratum int] [refid string] [mode int] [flag1 0 | 1] [flag2 0 | 1] [flag3 0 | 1] [flag4 0 | 1] . server . ntpdc(1) . : time1 sec . PPS . . DIP . . : PPS . enable Miscellaneous Options "Reference Clock Drivers" ( HTML /usr/share/doc/ntp) . time2 secs . "Reference Clock Drivers" ( HTML /usr/share/doc/ntp ). . stratum int (stratum) 0 15 . ( ) . refid string . . mode int (mode) . ACTS parse . flag1 0 | 1 flag2 0 | 1 flag3 0 | 1 flag4 0 | 1 . . flag4 clockstats filegen . filegen Monitoring Options . (Miscellaneous Options) broadcastdelay seconds ( ) (multicast) . . . . ( ) 0.003 0.007 . 0.004 . driftfile driftfile . -f . . . . (PPM) . . ntpd(1) . dscp value Differentiated Services Control Point (DSCP) . 46 Expedited Forwarding . enable [auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats | peer_clear_digest_early | unpeer_crypto_early | unpeer_crypto_nak_early | unpeer_digest_early] disable [auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats | peer_clear_digest_early | unpeer_crypto_early | unpeer_crypto_nak_early | unpeer_digest_early] . . ntpdc(1) . auth . enable . bclient multicastclient . disable . calibrate calibrate () . disable . kernel (kernel time discipline) . enable disable . mode7 NTP mode 7 ntpdc(1) . disable . ntpq(1) . ntpq(1) ntpdc(1) mode 6 . monitor (monitoring) . ntpdc(1) monlist . enable . ntp . . enable . peer_clear_digest_early ntpd(1) autokey crypto-NAK . crypto-NAK DoS . DoS . peerstats . enable . stats . Monitoring Options . disable . unpeer_crypto_early ntpd(1) autokey TEST9 ( ) . autokey autokey DoS . peerstats . enable . unpeer_crypto_nak_early ntpd(1) crypto-NAK . crypto-NAK DoS . DoS . peerstats . enable . unpeer_digest_early ntpd(1) (digest) . DoS . DoS . peerstats . enable . includefile includefile (include) . . ntpd(1) () ( ) . interface [listen | ignore | drop] [all | ipv4 | ipv6 | wildcard name | address [/ prefixlen]] interface ntpd(1) . . . prefixlen . ignore drop ntpd(1) . interface . . interface -I, --interface, -L, --novirtualips . nic interface . leapfile leapfile IERS leapfile TAI . IERS https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list ftp://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list . leapfile ntpd(1) leapfile ntpd leapfile . ntpd leapfile . update-leap(1update_leapmdoc) leapfile . leapsmearinterval seconds (EXPERIMENTAL) ntpd(1) --enable-leap-smear configure . . 7200 ( ) 86400 ( ) . http://bugs.ntp.org/2855 . logconfig configkeyword syslog(3) logfile . . configkeyword `=' `+' `-' `=' syslog(3) `+' `-' . syslog(3) (clock peer sys sync). : (info) (events) (statistics) (status). . all . all . : logconfig =syncstatus +sysevents ntpd(1) . : logconfig =syncall +clockall . . logfile logfile syslog(3) . -l . mru [maxdepth count | maxmem kilobytes | mindepth count | maxage seconds | initialloc count | initmem kilobytes | incalloc count | incmem kilobytes] << >> (MRU) (rate control) . maxdepth count maxmem kilobytes MRU . incalloc incmem . mru maxdepth maxmem . 1024 . mindepth count MRU. MRU mindepth . 600 . maxage seconds MRU mindepth maxage . MRU maxdepth / maxmem . 64 . initalloc count initmem kilobytes . 4 . incalloc count incmem kilobytes MRU . 4 . nonvolatile threshold threshold () driftfile ( ) 1e-7 ( 0.1 PPM). . threshold . . (nonvolatile) . phone dial ... ACTS ( 18) JJY ( 40 100 - 180) . ACTS ( 18) 10 USNO NIST . JJY ( 40 100 - 180) JJY . Hayes ATDT . . pollskewlist [poll early late] ... [default early late] (skewing) . poll 3 17 ( ) . 2^n 3 8 17 131,072 . 0 ( ) . early late . . reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer] ntpd ntpq ntpdc . rlimit [memlock Nmegabytes | stacksize N4kPages filenum Nfiledescriptors] memlock Nmegabytes . ( -i) . 32 -1 . -1 << >> . 0 << >> . stacksize N4kPages (stack) mlockall() . 50 4 (200 4 OpenBSD). filenum Nfiledescriptors ntpd . . saveconfigdir directory_path (snapshots) saveconfig . saveconfigdir saveconfig ntpd . saveconfig filename :config config-from-file filename ntpd saveconfigdir . saveconfigdir . filename strftime(3) : saveconfig ntp-%Y%m%d-%H%M%S.conf. savedconfig . . setvar variable [default] . . name=value default ( rv ntpq(1)). . . setvar . . sys_var_list . peer_var_list clock_var_list . sysinfo . sysstats . tinker [allan allan | dispersion dispersion | freq freq | huffpuff huffpuff | panic panic | step step | stepback stepback | stepfwd stepfwd | stepout stepout] . . . . . : . : allan allan (Allan intercept) PLL/FLL . log2 7 ( ) . dispersion dispersion (dispersion increase rate) .000015 s/s . freq freq (parts-per-million PPM) . . huffpuff huffpuff huff-n'-puff . 900 (15 ) 7200 (2 ) . . panic panic (panic threshold) 1000 . . step step (step threshold) 0.128 . . (step) . : (kernel time discipline) . stepback stepback 0.128 . . . : .5 . stepfwd stepfwd stepback . stepout stepout stepout 900 . . stepout . writevar assocID name = value [,...] ( ) . assocID (system variables) (peer variables) . assocID . trap host_address [port port_number] [interface interface_address] (trap receiver) . 18447 . . (multihomed) . ttl hop ... TTL . 8 . manycast (expanding-ring search) . 32 31 . . . hop ... TTL 8 . manycast . 32 31 . (OPTIONS) --help . --more-help (pager). --version [{v|c|n}] . `v' ( ) . `c' `n' . (OPTION PRESETS) not presettable ( ) : NTP_CONF_ NTP_CONF (ENVIRONMENT) (OPTION PRESETS) . (FILES) /etc/ntp.conf ntp.keys MD5 ntpkey RSA ntpkey_host RSA ntp_dh - (Diffie-Hellman) (EXIT STATUS) : 0 (EXIT_SUCCESS) . 1 (EXIT_FAILURE) . 70 (EX_SOFTWARE) libopts . autogen- users@lists.sourceforge.net . . (SEE ALSO) ntpd(1), ntpdc(1), ntpq(1) http://www.ntp.org . HTML /usr/share/doc/ntp . . (David L. Mills) Network Time Protocol (Version 4), RFC5905 (AUTHORS) (The University of Delaware) (Network Time Foundation) (COPYRIGHT) (C) - . NTP . (BUGS) . ntpkey_host . . : https://bugs.ntp.org, bugs@ntp.org (NOTES) FreeBSD . AutoGen ntp.conf . 4.2.8p18 25 May 2024 ntp.conf(5)