0

For a ntp demon, what happens if I have this configuation in ntp.conf:

pool 0.pool.ntp.org burst iburst minpoll 4

server europe.pool.ntp.org

?

How will ntp be configured?

I don't know there to be any way to query ntp for its active configuration - so as to know which server or pool, and which options are being used in a given moment.

2 Answers2

1

Yes, you can use both pool and server configurations in your ntp.conf. The server will always be included in the running configuration, and the pool members will be added and removed as determined by ntpd. Note, however, that this is unlikely to be any better than simply using pool for both entries. The main reason for using a configuration like the one you proposed would be to include an NTP server on your local network.

To see the list of active peers, use ntpq -np. You can find more information about interpreting the output in the NTP docs (under the description of the peers command), or in my blog post.

Note: You should NOT be using burst or minpoll 4 with the pool. This is considered bad form and might get you rate limited or blocked by specific servers. Please use just iburst - unless you have major problems with bandwidth or buggy hardware, ntpd will be able to sync your system's clock just fine without burst or minpoll.

Paul Gear
  • 4,367
  • 19
  • 38
  • <> If that's the case, and the value in "pool" is `0.pool.ntp.org` while the "server" is `192.168.4.4`, then, if there's a discrepancy in the time given by the two of them, then which of them will be the one to give me the time? – user1828163 Apr 08 '20 at 07:26
  • 1
    @user1828163: There are always discrepancies. NTP's purpose is to work out the real time from all your sources, despite those discrepancies. You can find out more about how it does that at http://doc.ntp.org/current-stable/warp.html, specifically the parts about the Clock Filter Algorithm, Clock Select Algorithm, and Clock Cluster Algorithm. – Paul Gear Apr 08 '20 at 09:59
0

Can I use both pool and server configurations in ntp?

Yes. Multiple, and every one will be sent NTP packets.

To ensure a given configuration, copy in your desired ntp.conf and restart the service.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
  • And, if I want to include a NTP server on my local network, then I should use "server" instead of "pool", right? – user1828163 Apr 08 '20 at 14:01
  • pool is the same as server, except it resolves one name into several addresses and uses them all. You may use this on NTP servers you control, such as a ntp.example.org with multiple AAAA records, or point it at all domain controllers via AD DS's domain name. – John Mahowald Apr 08 '20 at 18:07