-1

Issue Summary

Open NTP - Version 4.2.6p3 - Clock is not syncing to low stratum server.

Issue Description

  1. I am running a NTP Unicast Client in my Ubuntu system.
  2. I have 3 servers, Server1-Stratum=13, Server2-Stratum=5, Server3-Stratum=4.
  3. Clock is not syncing to Server3 rather it is syncing to Server1.

Queries

  1. Whether this is a expected behavior ? Because as per my understanding NTP Client should sync to Low stratum server.
  2. How NTP Daemon will decide server for sync, by configuration order or by stratum ?

Outputs of ntpq -np

Client

root@hmllab:~# ntpq -np
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
x172.31.112.136  LOCAL(0)        13 u   14   16  377    0.255  -27.571   0.340
x172.31.112.139  LOCAL(0)         5 u    5   16  377    0.211  -126229   3.221
x172.31.112.142  LOCAL(0)         4 u    5   16  377    0.160  -946075   1.078
root@hmllab:~#
root@hmllab:~#
root@hmllab:~# date
Wed Jan  1 01:46:06 UTC 2020
root@hmllab:~#

Server 1

root@hmlpc136 ~ $
root@hmlpc136 ~ $ntpq -np
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*127.127.1.0     .LOCL.          12 l   47   64  377    0.000    0.000   0.001
root@hmlpc136 ~ $
root@hmlpc136 ~ $
root@hmlpc136 ~ $date
Wed Jan  1 01:46:13 UTC 2020
root@hmlpc136 ~ $

Server 2

[root@hmlpc139 ~]#
[root@hmlpc139 ~]# ntpq -np
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*127.127.1.0     .LOCL.           4 l   13   64  377    0.000    0.000   0.000
[root@hmlpc139 ~]#
[root@hmlpc139 ~]# date
Fri Jan  1 01:53:44 UTC 2016
[root@hmlpc139 ~]#
[root@hmlpc139 ~]#

Server 3

root@hmllab-OptiPlex-3020:~#
root@hmllab-OptiPlex-3020:~# ntpq -np
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*127.127.1.0     .LOCL.           3 l   12   64  377    0.000    0.000   0.000
root@hmllab-OptiPlex-3020:~#
root@hmllab-OptiPlex-3020:~#
root@hmllab-OptiPlex-3020:~# date
Sun Jan  1 01:53:35 UTC 2017
root@hmllab-OptiPlex-3020:~#
Hakkim Ansari
  • 119
  • 3
  • 10

1 Answers1

0

Your ntpq -np is showing with the x at the start of the line that all three of your servers are falsetickers. Basically, none of your servers agree with each other, so none are chosen. See the discussion at ntp.org. You would be better off with one server!

Perhaps after a few hours your stratum 4 server will be chosen. Of course, the date may still not change as the time difference is too great. It depends on your config.

meuh
  • 11,500
  • 2
  • 29
  • 45
  • Hi meuh thanks for the details, can you please clarify the following points, – Hakkim Ansari Sep 09 '15 at 16:04
  • 1. When the servers will agree with each other ? **I tried with 1 minute difference between servers** `(Server-1-Clock=9:10:00, Server-2-Clock=9:11:00 and Server-3-Clock=9:12:00)` at that time also it shows all are false tickers. – Hakkim Ansari Sep 09 '15 at 16:05
  • 2. _Perhaps after a few hours your stratum 4 server will be chosen_ When it will happen ? I waited for 4 hours... – Hakkim Ansari Sep 09 '15 at 16:06
  • You really need the 3 servers to sync between themselves, instead of being standalone, then they will all merge into a time standard that any client will be happy to sync to. Sorry, I'm not an ntp expert, but using a local clock that is just the cpu of a pc is not a good clock. – meuh Sep 09 '15 at 16:30
  • Hi meuh, thanks for your support, clock selection mechanism may be changed please verify http://bugs.ntp.org/show_bug.cgi?id=2093 – Hakkim Ansari Sep 09 '15 at 16:43
  • HI meuh, it seems **jitter** playing the major role in selecting the time source - http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#AEN2484 – Hakkim Ansari Sep 09 '15 at 17:24
  • Interesting article. Did you know some linux distributions, like Fedora, are now moving over to [chronyd](http://chrony.tuxfamily.org/) instead of `ntpd` to sync between machines? It uses the same protocol but claims to be "better" for machines which are not often connected to the internet. – meuh Sep 09 '15 at 17:38