Keep time in sync among servers without internet connection

cavedon picture cavedon · Jun 26, 2010 · Viewed 7.1k times · Source

I have 5 servers on a LAN without Internet connection. I need them to keep the clock in sync among them.

I could configure them as NTP peers, and set a high stratum for the local clock of one of them. In this way, the other four would sync with that clock.

What I actually want, is them to agree on a time using all of the 5 local clocks (i.e. doing some kind of average), for reasons of robustness and precision. Is it possible with NTP?

PS: I do not want to use an external clock source.

EDIT: and no scripting outside NTP features, that could only make precision worse :)

Answer

Karmastan picture Karmastan · Jun 26, 2010

If you average 5 drifting clocks, the only thing you get is another drifting clock that's harder to correct. It won't be more precise. NTP uses multiple servers to increase precision because it takes network latency into account. Since all your systems are on a fast local network, you just need one server.

Set up two systems to be NTP server, one a primary, and if you feel the need, one a backup. Have all other systems synchronize to them. This will be significantly easier to set up than the clock-averaging solution, and you won't have to develop any crazy scripts.