You don't need to have the info in config 1, there is no point. If you are not on a network then ntp doesn't have any clients and you don't want it changing the clock.

The cleanest way to do the other two is to have two separate config files and restart ntpd with the correct config file depending on the network topology at the time.

However, you could just configure all the servers. The ntpd process will try to resolve the server names and will continue trying to do so periodically until it succeeds. It will then try to send packets periodically until it succeeds. So, when you are not on the right network the packets will just not get there.

On 1/9/2013 2:21 PM, [email protected] 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 127.127.1.0
        fudge 127.127.1.0 stratum 10

(2) once network connection is made, if my IP is on my local LAN
(10.10.50.0/24), 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.  reading the docs, i think stratum can be used
-- but really am not certain.  thought i should check before abusing
some servers inadvertently.

any guidance would be appreicated!

thanks,

daryl
_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions

_______________________________________________
questions mailing list
[email protected]
http://lists.ntp.org/listinfo/questions

Reply via email to