[ntp:questions] What exactly happens to ntpd if it is made to run and no server address is given in the ntp.conf file?

Chuck Swiger cswiger at mac.com
Tue Sep 25 18:33:27 UTC 2012


On Sep 25, 2012, at 9:26 AM, Arpith Nayak wrote:
> Could someone give me a blow-by-blow account of what happens exactly?
> Also, does ntpd search for an NTP server in the network accessible by it if
> no server is specified? Can we implement this functionality if not
> available?

If you try to start ntpd without any valid config, it returns an error:

getconfig: Couldn't open </etc/ntp.conf>

If you have an ntp.conf which doesn't specify any timeservers, ntpd will run,
and probably will apply any drift file if one is available to the local clock,
but the time will not be disciplined further.

I believe ntpd will stay at stratum=16 unless at least the local clock, TOS orphan
mode, or some other time source is available.  I suspect that you are looking for
either the pool directive in recent ntpd versions, or maybe multicast?

Regards,
-- 
-Chuck



More information about the questions mailing list