NTP Network Time Protocol

                       Network Time Sychronization & Timestamping

 

NTP Network Time Protocol (RFC 1305)

Introduction to Time in a Networked Environment

 

NTS-3000 Elproma NTP Network Time Server

 

 

 

 

An Overview of NTP

 

 

Contrary to popular belief, NTP is not based on the principles of synchronizing machines with each other. NTP is based on the principles of having all machines get as close as possible to the correct time. The effects may be similar, but this is a subtle but important distinction. The NTP algorithms and the structure of an NTP architecture clearly reflect this distinction. In addition, some of the behaviors of NTP applications can only be understood by keeping this distinction in mind. For instance, if two NTP servers are synchronized to each other as peers, what actually happens is the clocks decide among themselves which is the better source of time, and both clocks attempt to synchronize to that. The result is that the peer that is actually serving the time could change among the clocks as their accuracy changes. At the top of any NTP hierarchy are one or more reference clocks. These are electronic clocks synchronized to a common time reference (time server NTP) and each other using some methods outside the scope of NTP, for instance GPS signals, radio signals, or extremely accurate frequency control. Reference clocks are assumed to be accurate. The accuracy of other clocks is judged according to how “close” a clock is to a reference clock (the stratum of the clock, as described below), the network latency to the clock, and the claimed accuracy of the clock. The public NTP servers available on the Internet use Coordinated Universal Time (abbreviated as UTC, which does not stand for anything) as the ultimate source of time. UTC evolved from Greenwich Mean Time (GMT), and still uses the Greenwich time zone as the zero offset. GMT is based on the earth’s rotation, which is not constant enough to be used for detailed time measurements. UTC is based on a standard second length determined by the quantum phenomena. Time zones and Daylight Savings Time don’t exist as far as NTP is concerned. Time is synchronized according to time zone neutral time (as in GMT), and then the time is projected to the time zone using the time zone environment variable (TZ).

 

In environments that need more accurate time than an Internet link will allow (due to latency or other concerns), or environments that cannot rely on Internet time sources due to security implications, a radio time clock or GPS system (or cesium clock, if you happen to have one lying around), can be used to keep the primary NTP servers aligned with UTC. Synchronizing a few machines to an arbitrary time source, such as the internal clock on a given server, may be acceptable in a few rare cases, but in any sort of large installation it is critical to keep the clocks synchronized with some maintained time standard. Regardless of the configuration, an NTP server needs to be set up in order for clients to use it for synchronization.

 

 

NTP Time Networking and Strata (0-15)

 

 

NTP uses the UDP protocol on port 123 to communicate between clients and servers. Attempts are tried at designated intervals until the server responds. The interval depends on a number of factors, and ranges from about once a minute to once every 17 minutes. Using UDP prevents retries from using up network bandwidth if a time server with a large number of clients goes down. NTP works on a hierarchical model in which a small number of servers give time to a large number of clients. The clients on each level, or stratum, are in turn, potential servers to an even larger number of clients of a higher numbered stratum. Stratum numbers increase from the primary (stratum 1) servers to the low numbered strata at the leaves of the tree. Clients can use time information from multiple servers to automatically determine the best source of time and prevent bad time sources from corrupting their own time. The NTP Strata Servers that are directly connected to a reference clock are termed stratum 1 servers. A reference clock connected to a stratum 1 server is referred to as a stratum 0 clocks. Clients never communicate directly with a stratum 0 clocks; they always go through a stratum 1 time server synchronized to a stratum 0 clocks.  Regardless of the source of time for a server, it is important to remember that the accuracy of some time signals can vary widely. Just because a server is a stratum 1 server does not necessarily mean it has accurate time. In fact, a stratum 1 server could even be configured to use its own poorly running internal clock as a reference clock (some other low cost NTP server manufactures really do). This is why it is very important to use multiple time sources and verify time sources before using them. E.g Elproma NTP servers are powerd by high quality internal time generators as TCXO, OCXO, RUBIDIUM, H-MASSER or even CESIUM beam.

 

Clients of stratum 1 servers are referred to as stratum 2 clients. If they serve time to clients, they are also referred to as stratum 2 servers, and the clients they serve are stratum 3 clients. This continues to higher numbered strata. The maximum NTP stratum number for a client is 15; however, in practice it is rare to find clients with stratum numbers above 4 or 5 in most real-world configurations. According to a survey of NTP servers done by David Mills, more than half of the Internet-connected NTP clients are in stratum 3, with almost all the remainder in strata 2 and 4. It is usually best to follow this sort of a distribution in an NTP environment, as described in the next paragraph. Because of the difficulty of setting up a reliable reference clock, administrators generally want to limit the number of stratum 1 servers, or use publicly available servers (when feasible). Organizations setup public NTP servers as a public service. Setting up a large number of clients to use public external servers is a poor use of their generosity (and computing resources), so it is best to have a few servers receive accurate time readings from the Internet or a WAN, and then use each of these stratum 2 or 3 servers in localized areas (a campus or LAN). All the clients at the site can then receive updates from the stratum 2 or 3 servers at the site. An alternative to using a public stratum 1 server is to use a public stratum 2 server. In many cases, public stratum 2 servers are well synced to a set of accurate stratum 1 servers.

 

Syncing to several accurate servers minimizes the chances of the server becoming unsynced. Using an accurate stratum 2 serve which is synced to several time sources may allow for better accuracy than using an overloaded or inaccurate stratum 1 server that is not configured to communicate with other time sources. Selecting an NTP source requires careful consideration of accuracy and reliability. The process of making this choice is described further in the second article of this series.

 

Previous Ppage                                                                      Top of page                                                                                Next Page

 

 

Site Map                                                                 Copyright © 2007 ELPROMA