Technical data

Configuring and Managing NTP
12.1 Key Concepts
12.1.1 Time Distributed Through a Hierarchy of Servers
In the NTP environment, time is distributed through a hierarchy of NTP time
servers. Each server adopts a stratum that indicates how far away it is operating
from an external source of UTC. NTP times are an offset of UTC. Stratum 1
servers have access to an external time source, usually a radio clock. A stratum 2
server is one that is currently obtaining time from a stratum 1 server; a stratum
3 server gets its time from a stratum 2 server, and so on. To avoid long-lived
synchronization loops, the number of strata is limited to 15.
Stratum 2 (and higher) hosts might be company or campus servers that obtain
time from some number of primary servers and provide time to many local clients.
In general:
Lower-strata hosts act as time servers.
Higher-strata hosts are clients that adjust their time clocks according to the
servers.
Internet time servers are usually stratum 1 servers. Other hosts connected to an
internet time server have stratum numbers of 2 or higher and may act as time
servers for other hosts on the network. Clients usually choose one of the lowest
accessible stratum servers from which to synchronize.
12.1.2 How Hosts Negotiate Synchronization
Each host has its identifying stratum number encoded within UDP datagrams.
Peers communicate by exchanging these timestamped UDP datagrams. NTP uses
these exchanges to construct a list of possible synchronization sources then sorts
them according to stratum and synchronization distance. Peers are accepted or
rejected, leaving only the most accurate and precise sources.
NTP evaluates any new peer to determine whether it qualifies as a new (more
suitable) synchronization source.
NTP rejects the peer under the following conditions:
The peer is not synchronized.
The stratum is higher than the current source’s stratum.
The peer is synchronized to the local node.
NTP accepts the peer under the following conditions:
There is no current time source.
The current source is unreachable.
The current source is not synchronized
The new source’s stratum is lower than the current source.
The new source’s stratum is the same as the current source, but its distance
is closer to the synchronization source by more than 50%.
12–2 Configuring and Managing NTP