[ntp:questions] [Embedded system] Synchronization between two nodes

Jason Rabel jasonrabel99 at gmail.com
Tue May 14 13:25:49 UTC 2019

Disclaimer: This is all in theory, you will have to test it out
first-hand to see what the actual results are....

You could fudge Node A so it's local clock is a stratum 10 when there
is no other valid source. Seeing as how that would be the only clock
for Node B, it should sync to that:

fudge stratum 10

When Node B boots, it should then sync right away, either via ntpdate
or 'ntpd -g'...

So Node B would end up as a Stratum 11 until GPS syncs up, which then
it would be a Stratum 1.

I *think* the best way would be to have each node use a regular
"server" line for each other, and not try to do peering. Reason being,
in theory the following should happen:

Node-A - Stratum 10
Node-B - Stratum 11 (Sync's to A)

GPS Locked:
Node-A - Stratum 2 (Sync's to B)
Node-B - Stratum 1 (Sync's to GPS)

You will undoubtedly need to utilize the "tinker" command in your
configs due to probable large time jumps as clocks go from
free-running to GPS, and depending on how fast you want large
adjustments to happen you *might* need to adjust stepping & slewing

One problem might be that Node A won't receive a response from Node B
if it's powered down, so it will slowly increase the polling periods
and could be quite some time before it syncs after Node B comes online
and has GPS time. You might also need to adjust the minpoll/maxpoll
settings and clamp them down to lower numbers if you want things to
sync up faster.

Seeing as how these are going to be free-running a lot, possibly
powered-down, and other limited access to proper time, you *may* want
to look at Chrony as it has more options to help keep correct time in
these situations.

More information about the questions mailing list