[ntp:questions] ntpd on dial up machine: no DNS resolving => giving up on all servers

Richard B. Gilbert rgilbert88 at comcast.net
Sat Jun 6 23:33:02 UTC 2009

Arno Wald wrote:
> Hello,
> i am using ntpd (4.2.4p6+dfsg-1; debian/sid) on a PC with dial up 
> connection. The PC is not online at boot time, but is turned online manually 
> when required via pppd.
> ntpd is started at boot time and automatically can handle interfaces that 
> are brought up or down while ntpd is running since 4.2.4p0+dfsg-1. But the 
> problem is, that ntpd cannot resolve the ntp-server names at startup 
> (because the PC is offline) and gives up on them. When the ppp interface is 
> brough up, ntpd does recognize this, but does not retry to resolve the 
> servers.
> I cannot find a configuration option to change this. Is there something I 
> can do to make ntpd look up the servers again when the PC is going online?
> An alternative was to (re)start ntpd on ip-up instead of starting it at boot 
> time. The problem with this is that (if I am not wrong) ntpd does a big time 
> step instead of just little time adjustments once. This can make the mail 
> server dovecot stop if time is set back by too many seconds. So is there an 
> option to forbid ntpd such a big time step at startup?
> Thanks,
> Arno

Whether or not ntpd steps the clock depends on how far off it is.  If 
the clock was off by 15 minutes, most people would want it corrected 
immediately rather than having the offset amortized over three or four 
days!  I believe that the default threshold is 128 seconds; less than 
that, the clock will slew.  If more than 128 seconds the clock will step.

If exact time and/or close agreement among a number of systems is 
wanted, it's best to try to keep the systems up 24x7; the reason being 
that NTPD may need as long as ten hours to synchronize the clock from a 
cold start.  Once synchronization has been achieved, NTPD should be able 
to maintain it with little effort.  Keeping the systems running also 
tends to stabilize the temperature which can be most helpful in keeping 
accurate time.

More information about the questions mailing list