Subject: Re: Why doesn't xntpd resynchronize?
To: Trevin Beattie <trevin@xmission.com>
From: Frederick Bruckman <fb@enteract.com>
List: netbsd-help
Date: 08/17/1999 03:07:39
On Mon, 16 Aug 1999, Trevin Beattie wrote:
> within a few minutes as expected. When I disconnect, the system log
> shows messages:
> xntpd[ddd]: sendto(xx.xx.xx.xx): No route to host
> When my system later calls back into the Internet, the log shows:
> xntpd[ddd]: Connection re-established to xx.xx.xx.xx
> but even after waiting more than half an hour, xntpd still doesn't
> synchronize to the time servers!
Synchronizing an intermittently connected machine has always been
difficult. Once you're state has changed to "4"--"PLL" (Synchronized),
you tend to reject packets that are too far off. On start-up, your
state is "1"--UNSYNC, and the daemon is more liberal about what it
will accept. Dave Mills once recommended that you simply restart the
daemon on connection. (That is, call a script in "ip-up".)
Is installing the net/ntp4 package an option for you? There are a few
features in its "bag of tricks" that the in-tree NTPv3 daemon never
had, notably "burst modes", that help resync quickly on reconnecting.
In fact, this is exactly the reason I became interested in it. All my
experimenting lately has been with NTPv4.
Another option that might also help is to set "minpoll 8" on one of
the servers. This guarantees it to be polled every 2^8=256 seconds.
(Default is 1024.) Just one is sufficient to "kick" the daemon.
Another thing is, you might actually have too many servers. Once you
have the daemon synchronized, watch the stats with "ntpq -c pe",
especially delay and offset. You might have better results if you
winnow down to few that stay close to each other.
I've got a satisfactory set-up with two machines, both now running
ntp-4.0.96p1. I'm on repeatedly for hours every night, though.