How does NTP calculates its next polling interval

ntp
mrAnderson picture mrAnderson · Jun 12, 2014 · Viewed 8.2k times · Source

I tried reading NTPv4 RFC 4905. I cant seem to understand on what basis it is calculating next polling interval to send NTP request packets to its peer. What is the role of ppoll and hpoll in finding polling time? Also how does polling interval varies between MINPOLL and MAXPOLL?

Answer

apache picture apache · Jul 21, 2017

The good explanation about poll interval can be found here and below is an excerpt.

NTP uses an intricate heuristic algorithm to automatically control the poll interval for maximum accuracy consistent with minimum network overhead. The algorithm measures the incidental offset and jitter to determine the best poll interval. When ntpd starts, the interval is the default minimum 64 s. Under normal conditions when the clock discipline has stabilized, the interval increases in steps to the default maximum 1024 s. In addition, should a server become unreachable after some time, the interval increases in steps to the maximum in order to reduce network overhead. Additional information about the algorithm is on the Poll Program page.

The default poll interval range is suitable for most conditions, but can be changed using options on the Server Commands and Options and Miscellaneous Options pages. However, when using maximum intervals much larger than the default, the residual clock frequency error must be small enough for the discipline loop to capture and correct. The capture range is 500 PPM with a 64-s interval decreasing by a factor of two for each interval doubling. At a 36-hr interval, for example, the capture range is only 0.24 PPM.

In the NTPv4 specification and reference implementation, the poll interval is expressed in log2 units, properly called the poll exponent. It is constrained by the lower limit minpoll and upper limit maxpoll options of the server command. The limits default to 6 (64 s) and 10 (1024 s), respectively, which are appropriate for the vast majority of cases.

hpoll : It is the current polling interval being used for the host. The value is incremented for each time the server is unreachable.