ntp client(192.168.40.232) → ntp server (192.168.41.15 with local clock)
Server
ntpd - NTP daemon program - Ver. 4.2.8p9
run ntpd with /etc/ntp.conf (only local clock) restrict default server 127.127.1.0 burst prefer fudge 127.127.1.0 stratum 0
ntp client not to sync time util server output log “refclock_transmit: at 193 127.127.1.0” (about some minutes)
ntpd: reply from 192.168.41.15: offset:-64340.016395 delay:0.002419 status:0x24 strat:1 refid:0x4c434f4c rootdelay:0.000000 reach:0x7f
ntpd: setting time to 2022-04-25 03:56:33.925032 (offset -64340.016395s)
I think it is my ntp server config problem, Someone can help me ?
Are both system clocks running on the same timezone ? I mean both runing on UTC ?
The client have an offset of - 64112 seconds to your server.
Maybe you need to set the client clock once:
-g
Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which
is 1000 s by default. This option allows the time to be set to any value without restriction; however, this
can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system
log. This option can be used with the -q and -x options. See the tinker command for other options.
Why does the minpoll/maxpoll setting help this situation?
Also, on a “usually internet connected” network, what is the use case / benefit for adding a local clock driver? My understanding was that it’s only useful if the network has long periods without access to an external clock and you’d rather have all your systems be on the same (likely incorrect) time than different (likely incorrect) times in that scenario. Are there other use cases?
I assume this was meant for an isolated or only rarely connected network.
The 127.127.1.x driver works like other refclock drivers, except it always returns a zero offset. It still needs some number of samples to be selected for synchronization. The default minpoll/maxpoll is 6, so setting it to 3 should make the interval when the server responds as unsynchronized 8x shorter.
Setting tos orphan and tos orphanwait might be a better solution.
That is correct. It’s a useless timer unless you are in the middle of nowhere with no internet at all.
Even then it makes no sense as a simple USB GPS of 10 euro does a far better job.
Therefor they do not advise it to use anywhere unless you are in a concrete-shelter with no signals or internet and nothing to do then look at the (incorrect-) time passing by.