[ntp:questions] Re: ntp client: keep all servers at startup

CBee I.Dont at want.your.spam
Thu Jun 16 14:49:19 UTC 2005

Ralf Fassel wrote:

> I have two isolated computers (no internet connection on both),
> needing synchronized time to each other.  One is the
> NTP-master-server, the other acts as client only.
> Now when the client boots, the master might not be reachable (network
> down, master down).  In such a situation when I later ask ntpq to show
> the peers, only LOCAL is listed, most probably because the server did
> not survive the 'initial sanity check' mentioned in the NTP Docs.
> How can I convince ntpd on the client to keep the 192.168.1.x machine
> in the ntp-server list, even if it is not reachable on startup?
> A workaround could be to use ntpdc to add the server when the network
> connection is up and running, but I'd rather use this as a last
> resort.

I think your problem is that if the ntp deamon does not find any server, it 
stops workin.

Now to get your machies a fail-save reference clock, best to define the internal 
clock (at and define it with a relative high stratum. Most default 
configurations come with something like that for the default settings.

======== on
server pool.ntp.org
fudge stratum 8
======== on
server prefer
fudge stratum 10

For your situation, I'd define both machines as peers, not one for server and 
one for client. THen both machines are equal. However, I donnot know what 
happens to the order since there is no external reference and all references are 
somehow in a loop...

peer prefer	# machine 1
peer prefer	# machine 2
server     # local clock
fudge stratum 10

I might make an error here: If peer machines automatically get a lower stratum 
than server machines. then the peers should also be server, you can see details 
with `ntpq -p`. If this does not work, drop back to the above.

You might also add your local ntp-server (or pool.ntp.org) for the moment it 
effectively has a network connection.

More information about the questions mailing list