[ntp:questions] NTP makes a time jump
unruh
unruh at invalid.ca
Thu Jul 4 17:19:40 UTC 2013
On 2013-07-04, karpekin at gmail.com <karpekin at gmail.com> wrote:
> Hello,
> I have a problem with NTP configuration when the client loses uplink connection for some time and then re-establishes it.
> ntp.conf:
>
> tos maxdist 4
> server 10.9.2.80 iburst
> server 10.10.2.101 iburst
> server 10.10.52.111 iburst
> server 127.127.1.0
> fudge 127.127.1.0 stratum 12
You have these last two lines in there why? They should NOT be there.
Get rid of them.
>
> I do the following:
> 1. kill the NTPD process,
> 2. disconnect the uplink to real servers,
> 3. change the local clock time to +3 sec
AGain, why in the world should ntpd behave rationally when you present
it with an irrational situation?
> 4. reboot the system.
> System comes up and after a while syncs to itself. After it starts to provide my "fake" time reference (+3sec) to clients downstream, I plug in the uplink, so my client is able to see the 3 servers defined in the config above. And as soon as it established the connection and peered to one of them, I see the -3 sec time jump. I was expecting that NTPD will slowly start to correct the time, but it jumps.
ntpd jumps if the time is out by more than 128 ms ( that is thousandths
of a second).
With ntpd's limit of 500PPMM, it would take over 2 hours to slew away a 3
second time difference.
If you want different behaviour, use chrony instead (on Linux or BSD).
You can tell it to slew instead, and it does not have a 500PPM limit on
the slew rate.
> Can you please explain if that behavior is by NTP design? Maybe I have something misconfigured, and if so, how to force NTPD not to make jumps?
Don't present it with irrational situations?
> Thank you,
> Igor.
More information about the questions
mailing list