I have the following setup :
[Group1] : - Server 1 (Linux) - Client 1 (Windows) - Client 2 (Windows) ... - Client n (Windows) [Group2] : - Server 2 (Linux) - Client 1 (Windows) - Client 2 (Windows) ... - Client n (Windows)
All computers in group 1 are on the same switch.
All computers in group 2 are on the same switch.
Sometimes, group 1 and group 2 are connected (with an ethernet cable between the two switches).
Sometiles, they are not.
When Group 1 and Group 2 are used separatly (they are disconnected) I want every computer in group 1 to be time-synchronized and every computer in group 2 to be time synchronized (I do not care if group 1 and group 2 do not share the same time).
When Group 1 and Group 2 are used together (they are connected), I want every computer (in group 1 and group 2) to be time-synchronized.
None of the computers will ever be on the Internet.
I absolutly do not care if they do not have the "right time" (if they think it is 5:47:33 when it's actually 4:22:17) all I want is that they share the same time (if it is 5:47:33 on one computer, then it must be 5:47:33 on every connected computers).
What I managed to do this far :
- Use server 1 as a NTP server. It uses its own system time and serves it on the network.
- Sync group 1's clients with the server (using nettime).
What I tried :
- Configure server 2 as a NTP server, using server 1 as primary source and its own system time as a secondary source.
Problem : it doesn't work. And I get why : NTP is not made for that. If the two sources provides vastly different times, it has to figure out a way to "find the truth". In fact, NTP is way more complicated than what I need...
What I'm considering :
- Configure server 2's NTP server exactly like server 1's (ie telling it to use its own system time as a reference) and syncing server 2's system time on server 1's.
Problem : I cannot find a way to tell ntpd to act as a server, and only as a server, and to use another client to sync the system time.
Do you have any idea ?
Thank you !