kb:time_sync:ntp:configuration:ntp_pool_usage

NTP Pool Usage

The NTP pool project maintains a list of public NTP servers and tries to distribute the load via dynamic IP addresses. See the NTP pool project web page:

A place for discussions for pool server admins is here:

The original approach to use one or more servers from the NTP pool was to specify several server lines in the ntp.conf file, e.g.:

server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst

The problem with this approach was that ntpd only resolves a DNS name once at startup, and afterwards only uses the initially returned IP addresses. ntpd neither tries to re-resolve the DNS name of a server entry at runtime, nor is an unreachable server kicked out at runtime. So if the server under a specific IP address went offline then ntpd just continued to try contacting it, until ntpd was restarted and thus the DNS name was resolved again.

To improve the situation the pool directive was introduced in NTP 4.2.6. The pool directive lets ntpd get the IP addresses of servers from the specified pool dynamically. When servers become unreachable they are discarded, and new servers are added on the fly, so that at any time a certain number of servers can be polled successfully.

pool pool.ntp.org iburst

The number of pool server association can be tweaked by the tos minclock … maxclock … directive, if required. See:
https://www.meinbergglobal.com/download/ntp/docs/html/miscopt.html#tos

Please note the restrict nopeer directive used without an additional restrict source can prevent the pool directive from working. Eventually this unintentionally used to work with ntpd 4.2.6, but doesn't work anymore with ntpd 4.2.8. See:

restrict source has been introduced in ntpd-4.2.7p22 (a developer version), and isn't supported by older versions.

  • kb/time_sync/ntp/configuration/ntp_pool_usage.txt
  • Last modified: 2023-01-25 10:24
  • by 127.0.0.1