[ntp:questions] What happens if ntp server unavailable at start up?

Martin Burnicki martin.burnicki at meinberg.de
Fri Sep 12 07:53:41 UTC 2008


Bill,

Bill Unruh wrote:
> A question has arisen in another group-- What happens if, when ntp starts
> up, the remoter server is unavailable ( eg no DNS or no connection)?
> This is highly likely to be the case for a laptop for example, where the
> connection with the local network is only brought up by the user after a
> while, or on wakeup from a power outage when the net may be unstable or
> the router be out when ntp comes up.
> 
> If a server disappears in a running ntp, ntp keeps trying, backing off on
> the poll interval after a while. But what does ntp do if on the first try
> to a server, there is no response, or if the dns is down. Does it forever
> scrub that server? (that seems to be what happnes-- if so why?) or does it
> do the same thing as if the server disappears after a while (keep trying
> with increasing poll intervals)?
> 
> I notice that there is a keyword dynamic which is not yet implimented but
> which seems to imply the second option.

The keywaord "dynamic" had been introduced IIRC in 4.2.4. It lets ntpd retry
if a server can not be reached initially.

However, since the behaviour with the "dynamic" keyword is what users would
normally expect ntpd to do I have proposed to make the "dynamic" behaviour
the default and obsolete the "dynamic" keyword. This has been done in
current ntp-dev and int ntp-stable 4.2.4p5. 

For details see:
https://support.ntp.org/bugs/show_bug.cgi?id=841
https://support.ntp.org/bugs/show_bug.cgi?id=987

> Also what happens to ntpd if it has no servers whatsoever, not even a
> local one? Does it keep running, doing nothing, or does it exit?

What do you mean by "has no servers"? "Has no servers configured", or "has
no servers reachable"? In the latter case ntpd 4.2.4p5 just retries until a
network interface becomes available.

Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany




More information about the questions mailing list