Building a GPS Referenced NTP Server Part 1

NTP is an old, but still very useful time transfer protocol. The mechanism uses NTP client software on a host computer that “asks” for time info, and a NTP server somewhere out on the network that sends out the current time and date in a specific format. “Out on the network ” usually means the Internet. Usually port 123 is used. There are many existing public NTP servers on the Internet and many are incorporated into open pools like pool.ntp.org that permit a generic url to be specified rather than a particular IP address.

So why build a NTP server and put it on your local network? If very accurate time is needed for your application, such as scientific experiments, time stamps in synced databases or radio systems, etc, a local time server can be very useful. Because of the variable latency of WAN based servers, really accurate time is hard to achieve via the Internet . The actual network time delay accessing a Internet server has some compensation in the protocol, but it’s the unpredictable jitter (phase noise being a model) and wander (random noise) due to the vulgarities of the Internet, that is not correctable.

Time servers are described by their “Stratum level” determined by their source of time reference, and also how far they are removed from the primary reference. A Stratum 1 NTP server gets it’s time from a so called primary time reference called a Stratum 0 (zero) source. So by definition, there is no Stratum zero NTP server, since the clock does not connect directly to a network. Twenty years ago, building a Stratum 1 NTP server meant using something like a very expensive cesium clock, or perhaps one based on a rubidium oscillator. Today, GPS can provide that reference with comparable specs, but as usual, the devil is in the details. More on that later.

Another time server that connects to the Stratum 1 time server to get it’s time to forward, becomes a Stratum 2 server by this convention. Still another NTP server that connects to the second server would become a Stratum 3 server. Each time you are farther removed from the primary time source, the Stratum level goes up. The accuracy and uncertainty gets worse each time because of the expected jitter in the network connection between them is accumulating.

Not long ago, establishing a true Stratum 1 time server on one’s network was an expensive proposition. Today we have several relatively inexpensive options to choose from.

We will be exploring a couple of these options over the next few weeks.

Dave, K7DMK

K7EVR Digital Amateur Radio

X