[ntp:questions] Confused about pool rotation

E-Mail Sent to this address will be added to the BlackLists Null at BlackList.Anitech-Systems.invalid
Wed Feb 6 19:27:59 UTC 2013


On 2/6/2013 10:59 AM, no-one at no-place.org wrote:
> I am trying to get to know SNTP by doing some
>  Winsock programming.  In particular, I am using
>
> getaddrinfo("pool.ntp.org", "123", &hints, &gaires);
>
> where hints has been set up to define a socket type
>  of SOCK_DGRAM and family of AF_INET.
> As expected, the Internet address returned in
> *gaires does change from time to time.
>  But it seems that it often returns the same value
>   if I call it again after a short time.
>  But if I wait a minute or two then I get a different address.
>  What is the rotation mechanism and why doesn't it give me
>   a new address every time?

You are likely using a caching DNS server in that PC's
 internet configuration?

 When the DNs server you are using queries the pool's
  DNS servers it will get back up to 4 A records;
   {Usually 4, however int he past some zones didn't
     have that many servers}
 Then your DNS server returns those A records to you;
  Caching DNS servers remember the last answer for a period of time,
    and just return it the next time you ask them,
     instead of doing a new query to the DNS for the pool;
   After some time your caching DNS server when asked
    for a pool query, will have expired the cached answer,
    and will query the pool DNS servers again,
    and get another set of 4 A records (likely non-overlapping).


BTW, if you are going to distribute an application with
 the ntp pool as a default config,
 you're supposed to get a vendor zone?
 <http://www.pool.ntp.org/vendors.html>

 e.g. Using 0.vendor.pool.ntp.org
      ... 0.no-place.pool.ntp.org
      instead of the root pool.ntp.org

-- 
E-Mail Sent to this address <BlackList at Anitech-Systems.com>
  will be added to the BlackLists.



More information about the questions mailing list