1

I wish to understand following scenario with NTP server, I have 3 systems in the network and on two I have configured the NTP server (these two systems doesn't have network in between them) then on the 3rd system which is in network with both the NTP servers I have configured ntp.conf to sync with both the servers. (without preferred option) if both the NTP servers have different times then how the 3rd system is going to sync (with which server)

I hope my question is clear.

0

4 Answers 4

2

If the two time sources have different times NTP will try to work out which is most accurate and use that. With only two sources this is very difficult though - it will go with the one that jitters less but this might not be the most accurate. With three of more sources it will cope much better - default ntp.conf files from most Linux distributions list four sources from *.pool.ntp.org.

Usual recommended practice is to sync one server with public sources and sync your other machines with that local source.

1

For that very reason it really isn't a good idea to sync against two NTP servers, since you (as mentioned) really have no good way of deciding which of the NTP servers to trust. The prefered solution is probably to add one (or more) external NTP-servers in addition to these two NTP-servers. If that for some reason isn't possible, then you should only sync your third system against one of the NTP-server. If nothing else, at least you will have some consistency that way.

1

An NTP server which isn't in sync with it's upstreams is generally considered stratum 16; not synced and not able to provide subsequent clients with a reliable source. The clients should be aware of this and thus it won't be used.

1

The problem here is that you are implementing this wrong or you're not expressing the problem clearly. You cannot synchronize time with two devices that have inconsistent and incorrect times.

To implement NTP properly, you must:

  1. Configure one or two servers as stratum 1 or 2 time servers. These servers should either be connected to a definitive time source (GPS, CDMA, etc) or syncing up with a pooled NTP resource. (ie. *.pool.ntp.org)
  2. Configure all other hosts on your network to synchronize time against one of the two servers that you have configured in step 1.

If your time servers do not have network access, you must use out of band GPS or CDMA signals to synchronize time. This will be more expensive to do. You may be seeing inconsistency between time servers due to high-latency network connections... try using public servers that are geographically closer to you.

1
  • +1 and a couple of comments to add: 1) the OP doesn't mention OS, but not all init files for NTP will actually run an ntpdate against the time server before starting NTP. This is important as NTP does not instantly sync the servers. 2) use the pool.ntp.org servers and specify your geographical subdomain; i.e., if in the US, use the us.pool.ntp.org servers as outlined pool.ntp.org/en/use.html Dec 8, 2009 at 15:13

You must log in to answer this question.