[ntp:hackers] NTP dynamic server removal/addition state

Jānis Čoders janis.coders at gmail.com
Tue Jan 20 14:57:20 UTC 2015


Hi, I am reading ntpd source code and trying to get into NTP protocol.
I've got a situation where dynamic server removal and addition is
necessary. I can do it with ntpdc or ntpq, but I am not sure if the
state after these commands is correct.

In example, ntpd is launched as client with 3 servers and works as a
server also. It has synced with one of the servers.
Now if I remove the synced server and check status with ntpdc, the
ntpd still thinks that it is synced with the removed server.
I am just wondering if that is the correct behavior, because then
clients still receive referenceid and reference time of removed
server.
I understand, that in this situation, when time passes, the ntpd syncs
with other server, because it has 'better' data, but wouldn't it
be 'more correct' if removed peer was forgotten immediately?

AND when all servers are removed, there is no other server to sync to,
the state always stays at SYNCED with the old server.
Is that correct? Shouldn't it immediatelly go to UNSYNC mode, so that
clients know about that?

I just want to know if my described functionality would be correct if
it worked that way.


Thank you

-- 
Ar cieņu,
Jānis Čoders


More information about the hackers mailing list