[ntp:questions] how to configure ntp for conditional use of servers, depending on my LAN status?

Rob nomail at example.com
Fri Jan 11 09:34:45 UTC 2013

dar8757 at eml.cc <dar8757 at eml.cc> wrote:
> hi,
> i'm running ntp-4.2.6p5-3.10.1.x86_64 on linux/64.
> i've a question about proper configuration/use of fallback on a roaming
> laptop.
> the laptop boots to a no-network configuration.  connection is
> chosen/enabled as needed after KDE desktop launch ...
> i'd like to configure ntpd.conf so that
> (1) at machine boot, ntp starts up using the machine's local time, in
> the absence of network access.  i think i'd use this:
> 	server
> 	fudge stratum 10

Useless!!  Remove it.
This config is not useful when your machine is not a time server for
other machines in the network.

> (2) once network connection is made, if my IP is on my local LAN
> (, then use my local LAN's time server.  for that,
> 	server   ntp-server-f.q.d.n  iburst prefer
> 	restrict ntp-server-f.q.d.n
> (3) if my IP is not on my LANB, then use some external servers.  e.g.,
> 	server clock.isc.org             iburst prefer
> 	restrict clock.isc.org
> 	server ntp1.sf-bay.org           iburst
> 	restrict ntp1.sf-bay.org
> i'm not sure if/how to implement this conditional fallback 'logic' for
> ntp's server selection.

Just put all three servers in the config and NTP will use them

More information about the questions mailing list