the peer to the root of the synchronization subnet. The host will not
synchronize to the selected peer if the distance is greater than
NTP.MAXDISTANCE. The reason for the minimum clamp at NTP.MINDISPERSE is
to discourage subnet route flaps that can happen with Bellman-Ford
algorithms and small roundtrip delays.
<$ELAMBDA~<M=O>
<~>an distance (peer)>; /* update system
variables */
<B> if (<$ELAMBDA~>>=~roman NTP.MAXDISTANCE>) exit;
<$Eroman sys.leap~<<-~roman peer.leap>;
<$Eroman sys.stratum~<<-~roman peer.stratum~+~1>;
<$Eroman sys.refid~<<-~roman peer.peeraddr>;
call local-clock;
if (local clock reset) begin /* if reset,
clear state variables */
<$Eroman sys.leap~<<-~11 sub 2>;
for (all peers) call clear;
endif
else begin
<$Eroman sys.peer~<<-~peer>; /* if
not, adjust local clock */
<$Eroman sys.rootdelay~<<-~DELTA>;
<$Eroman sys.rootdispersion~<<-~EPSILON~+~max ( epsilon
sub xi~+~ THETA ,~roman NTP.MINDISPERSE)>;
endif
<$Eroman sys.reftime~<<-~roman sys.clock>;
end clock-update procedure;
In some system configurations a precise source of timing information is
available in the form of a train of timing pulses spaced at one-second
intervals. Usually, this is in addition to a source of timecode
information, such as a radio clock or even NTP itself, to number the
seconds, minutes, hours and days. In these configurations the system
variables are set to refer to the source from which the pulses are
derived. For those configurations which support a primary reference
source, such as a radio clock or calibrated atomic clock, the stratum is
set at one as long as this is the actual synchronization source and
whether or not the primary-clock procedure is used.
Specification of the clock-selection and local-clock algorithms is not
an integral part of the NTP specification, since there may be other
algorithms which provide equivalent performance. However, a clock-
selection algorithm found to work well in the Internet environment is
described in Section 4, while a local-clock algorithm is described in
Section 5 and their use is recommended. The clock-selection algorithm