Subject: Re: ntpq regression (?)
To: Frank Kardel <kardel@ntp.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: current-users
Date: 06/18/2006 19:33:50
Frank Kardel --> current-users (2006-06-18 18:11:05 +0200):
[...]
> This is not an ntpq regression but a visible effect of the minsane 
> configuration option.

That was a typo, I meant to write `ntpd regression'.


> The default distributed in NetBSD is 2. That means at least 2 
> sources
> must be configured (and be usable and be close to each other).
> But this is not suffcient because several tests are performed that can 
> remove the
> sources from the selection list before the minsane limit is checked.
> Checks are for synchronisation status, stratum, synchronisation 
> distance, loop, reachability,
> falseticker detection.
> Given the data above (with the #) the falseticker detection probably had 
> its veto here.
> Then we are left with one 'usable' peer for the remaining algorithms. 
> Thus not a chance
> for synchronisation to succeed. With this configuration it'll only work 
> if the two peers are
> sufficiently close to each other (see the example above).

The system in question indeed uses `tos minsane 2' and only two (server)
sources. One of these two sources uses the other as a (server) source:

$ ntpq -pn
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*212.254.26.76   195.216.80.207   3 u   52 1024  377    0.272   -6.041   0.614

The other source uses three (server) sources from the closest
pool.ntp.org pool.


> So we are looking at a problematic configuration (possibly by default 
> values) here.
> This configuration will only work when both sources are usable and agree 
> with each other.

Hmm, both sources are on the same network as the system in question;
all of them are connected to the same switch. The sources are always
usable and in sync... I have to admit that I don't know NTP - I only
know that this configuration seemed to work fine with ntpd 4.2.0-r.


> There are two ways to fix this:
> 1) comment out "tos minsane 2" or set it to one (ntp default for 
> historical reasons to allow
>   backward compatibility and faster synchronisation but vales below 4 
> disable byzantine agreement
>   functionality.
> 2) set "tos minsane 4 (or greater)" for working byzantine agreement and 
> configure *at least*
>   that number of synchronisation sources.
> 
> I agree that "tos minsane 2" can be very confusing especially when there 
> is no hint on how many
> sync sources to configure.


Thanks for you help so far.

Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~