NTP Server with no connection to the internet

I have a small LAN that has no connection to the internet. It consists of two ubuntu servers clustered together providing NFS services to two IP cameras.

I need to synchronize the time on all the equipment. The Cameras support NTP so my plan was to run NTP on the server cluster.

Can I configure NTPD to just use the system time until this project gets funding to add a 3G/4G connection?

This is actually going to be harder than I thought. I'm running a heartbeat cluster with DRBD. I'm going to need to have my primary server provide NTP to the two IP cameras and the other server in the cluster. If my primary server fails I need the secondary server to take over the NTP time server.

What do you guys suggest I do here??


Solution 1:

Your best-bet is to create a time cluster. A set of three (or more) systems, configured with peer associations. The cluster will negotiate a common consensus of time and should defend against clock-drift on all of them. It won't be truly accurate, for that you'll need a radio clock like you already know.

peer 192.168.62.4
peer 192.168.62.12

Solution 2:

If you're offline but want actual time, connecting any run-of-the-mill GPS receiver to your systems will keep time synched to within a second. You'll notice a relatively high jitter, but you'll keep regular time.

For some effort on your part, acquiring a GPS with a pulse-per-second feature will provide fantastic time keeping. In particular, the Garmin 18x LVC can be purchased for under $65. For the effort of giving it a 5 volt power supply and a serial port on the bare wires, you can have an accurate time keeping system for a very low impact on the budget.

There are plenty of tutorials on this subject if you search for "Garmin 18x NTP" or some other variation.