[ntp:questions] Side effects of using prefer on server?
Markus Schöpflin
no.spam at spam.spam
Wed Sep 14 12:20:25 UTC 2011
Hello,
the following behaviour has been observed using ntpd 4.2.6p3 on all involved
servers and clients.
Given the following configuration on the client:
---%<---
# driftfile
driftfile /var/lib/ntp/drift
# keys
trustedkey 1
requestkey 1
keys /etc/ntp/keys
# server
server WRB1 version 4 iburst minpoll 5 maxpoll 5 prefer
server WRB2 version 4 iburst minpoll 5 maxpoll 5
--->%---
I'm observing that when the preferred server becomes unreachable, it takes a
really long time to switch to the second server:
ntpq> peer
remote refid st t when poll reach delay offset disp
==============================================================================
*WRB1 ntp1 3 u 365 32 0 0.08 -0.219 7940.09
+WRB2 ntp1 3 u 19 32 377 0.08 0.081 2.33
ntpq> peer
remote refid st t when poll reach delay offset disp
==============================================================================
WRB1 ntp1 3 u 424 32 0 0.08 -0.219 15937.5
*WRB2 ntp1 3 u 9 32 377 0.08 0.198 1.52
When removing the prefer keyword, I get the following:
ntpq> peer
remote refid st t when poll reach delay offset disp
==============================================================================
*WRB1 ntp1 3 u 238 32 300 0.08 -0.047 442.04
+WRB2 ntp1 3 u 32 32 377 0.08 0.040 2.84
ntpq> peer
remote refid st t when poll reach delay offset disp
==============================================================================
+WRB1 ntp1 3 u 247 32 200 0.08 -0.074 942.00
*WRB2 ntp1 3 u 6 32 377 0.08 0.040 3.10
This surprises me a lot, as per
http://www.eecis.udel.edu/~mills/ntp/html/prefer.html#prefer using prefer has
an effect on the cluster algorithm (phase 4), but shouldn't phase 2 result in
the preferred server being already excluded because of its zero reachability
and horrendous dispersion?
Regards,
Markus
More information about the questions
mailing list