2. Time Standards and Distribution
Since 1972 the time and frequency standards of the world have been based on International Atomic Time (TAI), which is currently maintained using multiple cesium-beam clocks to an accuracy of a few parts in 10^12 [BLA74]. The Bureau International de l’Heure (BIH) uses astronomical observations provided by the U.S. Naval Observatory and other observatories to determine corrections for small changes in the mean solar rotation period of the Earth, which results in Coordinated Universal Time (UTC). UTC is presently decreasing relative to TAI at a fraction of a second per year, so corrections in the form of leap seconds must be inserted from time to time in order to maintain agreement. The U.S. and many other countries operate standard time and frequency broadcast stations covering most areas of the world, although only a few utilize a broadcast timecode suitable for computer use. The U.S. and Canadian timecodes provide UTC time-of-day, day-of-year and related information, but not either the year or advance notice of leap seconds, which must be determined from other sources.
A synchronization subnet is a connected network of primary and secondary time servers, clients and interconnecting transmission paths. A primary time server is directly synchronized to a primary reference source, usually a timecode receiver. A secondary time server derives synchronization, possibly via other secondary servers, from a primary server over network paths possibly shared with other services. Under normal circumstances it is intended that the synchronization subnet of primary and secondary servers assumes a hierarchical master-slave configuration with the primary servers at the root and secondary servers of decreasing accuracy at successive levels toward the leaves.
Following conventions established by the telephone industry, the accuracy of each time server is defined by a number called the stratum, with the root level (primary servers) assigned as one and each succeeding level towards the leaves (secondary servers) assigned as one greater than the preceding level. Using existing stations, available timecode receivers with propagation-delay corrections and allowing for sample accumulations up to a week or more, accuracies in the order of a millisecond can be achieved at the network interface of a primary server [MIL89b]. As the stratum increases from one, the accuracies achievable will degrade depending on the network paths and local clock stabilities. In order to avoid the tedious calculations [BRA80] necessary to estimate errors in each specific configuration, it is useful to assume the measurement errors accumulate approximately in proportion to the total roundtrip path delay to the root of the synchronization subnet, which is called the synchronizing distance.
Again drawing from the experience of the telephone industry, which learned such lessons at considerable cost, the synchronization subnet should be organized to produce the highest accuracy, but must never be allowed to form a loop, regardless of synchronizing distance. An additional factor is that each increment in stratum involves a potentially unreliable time server which introduces additional measurement errors. The selection algorithm used in NTP uses a variant of the Bellman-Ford distributed routing algorithm [BER87] to compute the minimum-weight spanning trees rooted on the primary servers. With the foregoing factors in mind, the distance metric used by the algorithm was chosen using the stratum number as the high-order bits and synchronizing distance as the low-order bits.