[ntp:questions] Clarification Required about NTP

Dave Hart davehart at gmail.com
Thu Feb 5 19:31:35 UTC 2009

On Feb 5, 6:00 am, balajisun... at midascomm.com wrote:

> Currently i am using Red Hat 7.2 Linux PC
> I have 3 Red Hat 7.2 Linux PCs for Testing
> I have using 2 Linux PC as Redundant PC
> I have configured floating IP as NTP Server on 3 Linux PCs
> Floating IP is
> PC1 IP is
> PC2 IP is
> PC3 IP is
> I have Written a script to monitoring the PC1 to PC2 vice-versa every 30
> Seconds
> Assume PC1 is currently Active and its Network is
> goes down or Shutdown the PC1 then the Floating IP will
> be host in PC2 and respectively
> *Clarification Required is*  On this situation whether i need to restart
> the ntp ser
> ver or it will automatically
> take care NTP Server IP Address changes

It depends.  Older versions of ntpd listen on all interfaces
automatically by not binding the listening UDP 123 socket to a
particular address.  Newer ntpd, at least on some platforms,
enumerates interfaces/addresses and listen (or don't) on each
individually, watching for addresses' interfaces to come up or go down
and adjusting.  The -U <seconds> command liine option configures the
timeout between scans for interface changes.  You may have ntpd syslog
messages telling you which addresses it is binding to:

5 Feb 02:23:37 ntpd.exe[6224]: Listening on interface #0 wildcard, Disabled
5 Feb 02:23:37 ntpd.exe[6224]: Listening on interface #1 Loopback
Interface 1, Enabled
5 Feb 02:23:37 ntpd.exe[6224]: Listening on interface #2 IP Interface
2, Enabled

> and if its takes automatically
> then how much
> time its take to sync with configured ntp Server

If your ntpd is listening on specific addresses you can use the -U
<seconds> command liine option which configures the timeout between
scans for interface changes.

But I would suggest you step back and reconsider your time
synchronization tree design.  ntpd clients keep state about the
servers they are configured to use, though the servers do not keep
state about the clients.  While it is possible to configure a single
IP address which is moved around in a fault-tolerant way between
servers as your time source, it does not make sense in my opinion.
Clients would have no way to know the servers have handed off the IP.
Instead, consider configuring all three servers fixed IPs as time
sources in each client.  Four would be even better, as it would allow
the clients to detect a "falseticker" server by comparing with the
others.  The traffic and CPU load of ntp are quite marginal, and the
clients would handle the selection of time source automatically using
normal NTP algorithms.  Save the fancy failover for applications that
can benefit from it.

Dave Hart

More information about the questions mailing list