[ntp:questions] Client doesn't drop failed source

unruh unruh at wormhole.physics.ubc.ca
Tue Jan 12 00:24:25 UTC 2010

On 2010-01-11, Michael Moroney <moroney at world.std.spaamtrap.com> wrote:
> Can anyone point me to anything similar to "How to explain NTP to Project
> Managers" esp. explaining how a preferred clock server is included even
> though the LAN cable is known to be dangling from the rack.  Most of which
> I find with Google is too technical.  This is confusing to me as well,
> with the algorithm tracking round trip times, compensating for offsets, 
> drift, jitters etc., plus this is all new to me.

The procedure is
Once every poll interval ( say 2^poll seconds, or 1024 seconds for poll
10) a packet is sent out to a server. The result of that packet is put
into the filter pool. then the lowest roundtrip time packet of the last
8 is selected as the time from that peer. Thus, there is always a
possible selection even if the line has been disconnected for 7000 sec
(2 hr). 

ntp does NOT contiuously test the line to see that there is a connection
to the remote server. ntp does not throw its hands into the air and give
up if it misses one or two responses. 

Now you could always put in a little program to continuously ping the
server, and if it comes down, remove that server line from /etc/ntp.conf
and tell ntp to reread its config file, but ntp does not do that for you. 
One of its design criteria is to have as little on the net as possible. 

Note that since it is your own server, you could always tell your
machines to poll it every 16 sec. (maxpoll 4, minpll 4) 
That way you would have to wait for at most 2 min before it would
realise that the site had gone down. It is your own server, so you
really do not care if you send packets to it that often. (The maxpoll of
10 is desinged so that you do not swamp the large NIST servers for
example). Your network can take it, and unless your server is an IPhone,
it can take it as well.

> What I was asked to do is pretty much as follows: Track Clocks A and/or B
> as long as either are available, otherwise track Clocks C and/or D.
> All 4 clocks are GPS clocks (stratum 1) and clocks C and D belong to 
> another group and are supposed to be "backup" while A and B are "our"
> clocks.
> Manager expects that if the LAN cable to A is pulled, A will be dropped 
> and system will synch to B and vice versa.  The "disconnect antenna" test
> worked perfectly since the clocks changed their stratum to 16 and the
> system dropped them as a source on the next poll.  I do understand that in
> actuality all the available Stratum 1 Clocks will be used, and I understand
> that the actual NTP client and clocks don't care who "owns" them.

More information about the questions mailing list