G’day all,
Out of the box NTP does not seem to work correctly.
we have:
[root@cf-fw ~]# cat /etc/ntp.conf
disable monitor
restrict default nomodify noquery
restrict 127.0.0.1
server 127.127.1.0 prefer
fudge 127.127.1.0 stratum 10
driftfile /etc/ntp/drift
If you want NTP to work correctly you need something like:
[root@cf-fw ~]# cat /etc/ntp.conf
disable monitor
restrict default nomodify
pool 0.uk.pool.ntp.org
pool 1.uk.pool.ntp.org
pool 2.uk.pool.ntp.org
pool 3.uk.pool.ntp.org
fudge 127.127.1.0 stratum 10
driftfile /etc/ntp/drift
I have removed
restrict 127.0.0.1
server 127.127.1.0 prefer
and added some pools
If you don’t make changed to ntp.conf you don’t get proper ntp synchronisation
Before the change on IPFire
[root@cf-fw ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*LOCAL(0) .LOCL. 10 l 11 64 377 0.000 +0.000 0.000
Note that ntp is using LOCAL source, so probably fighting the 1 hourly sync.
And a host on green:
root@nostromo:/shares/doc# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*cf-fw.coastfm.c LOCAL(0) 11 u 308 1024 377 0.212 -118.55 118.822
Note the LOCAL(0) on nostromo, I believe ntp is clever enough to say 'hey, our upstream server is using local, I have a local too! I will use my local)
Making the change, we now have:
[root@cf-fw ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
0.uk.pool.ntp.o .POOL. 16 p - 64 0 0.000 +0.000 0.000
1.uk.pool.ntp.o .POOL. 16 p - 64 0 0.000 +0.000 0.000
2.uk.pool.ntp.o .POOL. 16 p - 64 0 0.000 +0.000 0.000
3.uk.pool.ntp.o .POOL. 16 p - 64 0 0.000 +0.000 0.000
+85.199.214.100 .GPS. 1 u 60 64 377 12.028 -6.732 4.894
#time.cloudflare 10.21.8.19 3 u 1 128 377 10.509 -25.550 18.986
-time.netweaver. 85.199.214.98 2 u 128 128 377 10.988 -7.090 10.747
-ns3.turbodns.co 85.199.214.99 2 u 59 128 377 15.830 -13.917 13.064
-183.ip-51-89-15 225.254.30.190 4 u 2 128 377 10.232 -8.263 9.131
+time.cloudflare 10.21.8.19 3 u 118 128 377 10.167 -5.649 12.197
#ntp3.wirehive.n 81.187.26.174 2 u 73 128 377 11.812 -23.923 17.777
*85.199.214.98 .GPS. 1 u 3 64 377 12.389 -0.610 2.689
-ns1.luns.net.uk 157.44.176.4 2 u 67 128 377 16.633 +0.325 14.474
#x.ns.gin.ntt.ne 249.224.99.213 2 u 60 128 377 10.737 -1.304 13.492
-ntp.uk.eria.one 85.199.214.102 2 u 59 128 377 11.196 -8.670 9.665
-devrandom.pl 85.199.214.101 2 u 65 128 377 11.445 -1.382 13.179
-51.155.16.62 (5 .GPS. 1 u 38 128 377 33.163 +0.470 14.223
and on a green host:
root@nostromo:/shares/doc# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*cf-fw.coastfm.c 85.199.214.98 2 u 65 64 377 0.188 -8.333 3.349
Woot! much better, no drift and everything in sync. I am sure I have posted this before, but could not find it.
In the WUI, make ntp synchronisation manual, dont need that any more.
And having an 3 or more upstream servers is much better, 2 is worse than 1 I think, with 2 ntp does not know who is accurate.