[ntp:questions] NTP refuse to sync

Charles Elliott elliott.ch at comcast.net
Fri Feb 12 14:20:41 UTC 2016


>*         Inner NTP Server- 1 was used to be synced only to its Local, that
way inner 2 and inner 1 had a > minor offset. I must maintain this behavior.

I don't understand this sentence completely.  Is having Server-1 sync only
to its local clock something you did in the past and are now not doing since
you are using an external NTP server/client?

>*         Once adding the external sync- we would like to support 5 min
offset as maximum (running ntpd >in slew mode -x under inner 1), Inner NTP
server-1, accept the external NTP as a valid source >synchronization, and
starts a synchronization process with the external ntp. While NTP server-1
is >synching (offset is getting down in a rate of not more then 0.5 MS per
second), Server NTP 2 refuse to >sync for a while, getting to gain offset
from inner NTP-server1 - which I must avoid. (after 13 hours >running we get
low offsets(I have all outputs...))

I don't think you will ever make NTPD tolerate a 5 minute offset between
computers.  Upon reboot or start up, NTPD is setup to reset the clock to the
current time and restart itself when it is more than a few second offs from
the server; I don't remember the exact tolerance value, and I can't find the
-x option.  Where did you see that?  The NTPD -g command line option ("allow
big initial time step") controls this, and most people use it.  OW, NTPD
just exits when there is a big time difference between the client and the
server. 

How long server-2 takes to sync to server-1 depends on 1) whether server-1
thinks it has good time from the external server (that takes a few minutes
after a reboot), and 2) how recent a version of NTPD you are using; more
recent versions of NTPD converge much faster than older ones, and 3) the
accuracy of the computer clock on server-1 and server-2.  You don't say what
O/Ss you are running, and I can't help much with Linux.  Windows 8, 8.1 has
a clock precise to 100 nanoseconds; the Windows 7 clock is all over the map,
and you never will be able to sync a Windows 7 machine to less than several
hundred microseconds.  The recency of the CPU and motherboard also matter.
More recent CPUs have a timestamp counter (TSC) that does not vary with the
CPU frequency, while older ones don't.  That matters because NTPD can use
the TSC for interpolation between clock ticks (whose interrupt period is
15.625 msecs).  You cannot let your computers sleep; NTPD cannot work if the
CPU enters certain sleep states.  I use and much prefer using the High
Performance Event Timer (HPET) to the TSC for interpolation since it has a 3
times higher frequency than the TSC.  Others may say that the HPET has a
higher latency than the TSC, which is true.  How you set up the computer to
do this depends on the O/S.  Under Windows 7 and later "run cmd as admin and
paste 'bcdedit /set {current} useplatformclock Yes'" (w/o the single or
double quotes).  My copy of FreeBSD always chooses the HPET; I am not sure
what Linux uses for a performance counter for timing.

>*         Is there any why to force NTP server-2 to trust NTP server-1 no
matter what?

The NTP Cheat Sheet here
(https://www.meinbergglobal.com/english/sw/ntp.htm#ntp_cheat_sheet) lists a
true option for the conf file, as in

server 192.168.0.5 iburst minpoll 4 maxpoll 4 true

While I have never used this option, the Cheat Sheet says it makes the host
computer think the server is always a true chimer.

>*         Is there any why to run under Inner NTP server-1 , two services
of ntpd(one as client and one >for server). The server will sync externally,
and the client will serve  Inner NTP server-2 by syncing to >it's
disciplined clock.

No, I don't think so.  NTPD completely takes over the computer's clock by
changing the nominal interval between clock ticks (the time adjustment
factor), so every time the clock interrupt hits, more or less time is added
to the current time.  I don't think there is any why more than one program
could control the time adjustment factor.

Charles Elliott

-----Original Message-----
From: questions
[mailto:questions-bounces+elliott.ch=comcast.net at lists.ntp.org] On Behalf Of
Natalie Abravanel
Sent: Wednesday, February 10, 2016 12:55 PM
To: questions at lists.ntp.org
Subject: [ntp:questions] NTP refuse to sync

Hey,
I have the following requirements for syncing:

*         External NTP : it can be any configuration, active directory,
Centos, virtual machine.

*         Inner NTP server-1 sync only to one server source (the external
NTP above), and also uses orphan mode in case the external is not reachable.

*         Inner NTP server -2 - sync only to one server source (the inner
NTP 1)
Description & questions

*         Inner NTP Server- 1 was used to be synced only to its Local, that
way inner 2 and inner 1 had a minor offset. I must maintain this behavior.

*         Once adding the external sync- we would like to support 5 min
offset as maximum (running ntpd in slew mode -x under inner 1), Inner NTP
server-1, accept the external NTP as a valid source synchronization, and
starts a synchronization process with the external ntp. While NTP server-1
is synching (offset is getting down in a rate of not more then 0.5 MS per
second), Server NTP 2 refuse to sync for a while, getting to gain offset
from inner NTP-server1 - which I must avoid. (after 13 hours running we get
low offsets(I have all outputs...))

*         Is there any why to force NTP server-2 to trust NTP server-1 no
matter what?

*         Is there any why to run under Inner NTP server-1 , two services of
ntpd(one as client and one for server). The server will sync externally, and
the client will serve  Inner NTP server-2 by syncing to it's disciplined
clock.

I have Inner1+ inner2 configurations (and also a running results) if needed!



10x,

In advanced, I will appreciate any ideas!



_______________________________________________
questions mailing list
questions at lists.ntp.org
http://lists.ntp.org/listinfo/questions



More information about the questions mailing list