0

I have two computers. One is running Linux (NI Linux Real-Time), and the other is running Windows 10. The Windows 10 computer has two network interface cards. The 1st NIC is configured so that the Windows 10 computer can directly sync its time with an NTP server. The 2nd NIC is configured so that it can communicate with a specific set of local devices, such as the Linux computer. The Linux computer only has 1 NIC, and it is setup locally so it can only communicate with a specific set of local devices, such as the Windows 10 computer.

I need the Linux computer to be syncing its NTP with the same NTP server that the Windows 10 computer is using. However, the network does not allow for the Linux computer to communicate directly with the NTP server. I have tried syncing the Linux computer's NTP with the Windows 10 NTP, but the syncing never happens and the offset between the computers continuously grows.

Does anybody have any experience indirectly syncing a Linux computer's NTP like how I am describing? If so, are there any useful posts out there that could help me solve my problem?

I have taken a look at the following links, but I have not yet found a solution that works for my problem.

Windows NTP server with Linux clients

https://docs.microsoft.com/en-us/answers/questions/364785/how-can-i-set-up-an-independent-local-ntp-server.html

https://www.interfacett.com/blogs/creating-standalone-ntp-server-windows/

bmb
  • 1
  • The easy way? Have a local machine act as a NTP server, which synchronise its time with Internet and let all other hosts on the network synchronise their time with the local NTP server. – Lasse Michael Mølgaard Dec 15 '21 at 22:12
  • How exactly do the resources you posted not solve your problem? – John Mahowald Dec 16 '21 at 14:52
  • @LasseMichaelMølgaard That is exactly what I am trying to do. However, as I mentioned in the post, NTP fails to synchronize with the Windows 10 machine. I can lower the offset by manually syncing with `ntpdate`, but the offset will just continuously increase thereafter. I am looking for help on getting the synchronization to work. – bmb Dec 16 '21 at 15:02
  • @JohnMahowald I wish I knew, that is why I posted this question. Please see my above comment for some more info. – bmb Dec 16 '21 at 15:03
  • The way your question was written I didn't find it obvious that the grab bag of links was related to how you tried to configure NTP. Consider editing your question to add the relevant configuration you did in line with the problem description: the chrony.conf on the Linux box, PowerShell equivalent to what you did the Windows box. – John Mahowald Dec 16 '21 at 15:15

1 Answers1

0

The clocks on general purpose computers are garbage at accurate time over a long interval.

Run an NTP daemon (chronyd, ntpd) on the Linux boxes, to discipline the clock and learn the skew rate. ntpdate or similar in cron will have big jumps and is not ideal compared to an actual NTP implementation.

When you have an AD DS domain that hosts can reach over IP, the domain controllers are running NTP service by default. This applies to Linux (or other not-Windows) clients as well, use the AD domain name in their chrony.conf (or ntp.conf)

pool ad.example.net

Even outside a domain, Windows can still serve time. Enable w32time service, aka "Windows Time". Allow it through the firewall.

Or, there are third party NTP servers. Meinberg built NTP for Windows. Or there exist NTP hardware appliances that only serve time, and might have antennas to get sat nav signals that don't require internet access.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32