0

What is the best approach(s)/ method(s) to synchronize the timing (clocks) of two or more distributed wireless nodes such that these are coherent with each other and not slipping cycles?

dani
  • 25
  • 3
  • 1
    What does "coherent with each other and not slipping cycles" mean? Do these need to be in sync with some signal? Or do they run independently and you need some minimum offset? – John Mahowald Nov 19 '19 at 16:39
  • @JohnMahowald, Exactly, just Min Offset. – dani Nov 19 '19 at 16:42

1 Answers1

1

Usually, we would use something like ntp, ntpdate or chrony.

apt-get install ntp
[or yum -y install ntp]

cat <<EOF >/etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift
server pool.ntp.org
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
EOF
systemctl start ntp
systemctl enable ntp
SYN
  • 1,751
  • 9
  • 14
  • `ntpdate` or SNTP clients are not the way to discipline a clock, they just step it. Which is fine for some users, but generally full NTP implementations are better when a minimum offset is to be maintained. – John Mahowald Nov 19 '19 at 16:56
  • @SYN, I do this on the provider(server) computer only or the consumer(client) as well? Also, whats next, what the command line on the client PC that I can use to update the clock? – dani Nov 19 '19 at 17:42
  • @dani : this is assuming all your serves are clients, that would sync their clock against `pool.ntp.org`, a public NTP service. You could however setup your own NTP server, though this is to be considered carefully - usually less reliable than pool.ntp.org, unless you can invest on some hardware (GPS, DCF-77, MSF, ... or some time server from bodet-time, oscilloquartz, ...). – SYN Nov 20 '19 at 10:03
  • ntpdate may be used syncing clock in edge cases. ntp have a safety threshold, beyond which it won't sync your clock, whereas ntpdate would allow this. Quite useful when your motherboard does not have a battery, or when it's dead. – SYN Nov 20 '19 at 10:05