[ntp:questions] Re: NTP does not sync when using pool.ntp.org

Danny Mayer mayer at gis.net
Thu Oct 9 12:40:05 UTC 2003

Adrian 'Dagurashibanipal' von Bidder <grazdan at fortytwo.ch> wrote in message news:<213093017.enY7ydF0rI at altfrangg.fortytwo.ch>...
> Clinging to sanity, Dale Worley mumbled in his beard:
> > My recollection is that if you have one address listed as a server
> > twice, one of them will "reach" and the other won't.  OTOH, you *are*
> > getting timing information from clock2.redhat.com, so it's OK.  The
> > real problem is that pool.ntp.org is giving you the same address
> > twice.
> This is a problem we can't solve without ntpd knowing about DNS round robin
> explicitly (to my knowledge, nobody is working on this right now, though).
> This behaviour depends heavily on your local resolver library (and possible
> cache daemon) and the caching nameservers in the chain from your site to
> the authoritative servers for pool.ntp.org.
> This is one of the reason why I recommend use of pool.n.o as default config
> for those who want ntp to 'just work', but recommend manually selecting
> timeservers for anybody interested enough to tweak their ntp.conf (the DNS
> zones at pool.n.o can be a good starting point for this, though).
> (Hmm. One thing you might want to try: have a wrapper script around ntp
> startup to change resolv.conf before starting ntpd to use one of the
> pool.ntp.org nameservers directly, and then changing it back after ntpd has
> made its DNS lookups).
> greets
> -- vbi

This is not a round-robin issue per se. NTP will read the conf file and
parse each line and look up each IP name and make a call to the resolver
and get an address. It calls the resolver each time it gets an address;
it's not smart enough to remember that it had previously looked up that
address. However, the resolver may well remember and have cached the
answer in which case it will return the same answer each time. In addition,
the DNS being used as a nameserver may return the same answer from cache
for each of these lookups.

In summary, you can't depend on NTP getting different IP addresses each
time it looks up a name. It depends on the O/S, the resolver, and the
nameservers being used by the system, each of which may be different.


More information about the questions mailing list