Building a GPS Referenced NTP Server Part 2

The kernel used in Linux and BSD operating systems has historically derived it’s timing accuracy from an oscillator, normally an inexpensive crystal oscillator present on the system board. From this oscillator, all the system clocks needed for the CPU and various buses are generated. In addition, most computers have a real time clock chip (RTC) powered by a battery that keeps time in non-volatile ram. This clock is often synchronized with NTP and OS time as a start-up process. Early NTP clocks concentrated efforts solely on providing more accurate and stable system oscillators.

More recently, many Unix-like kernels have included a mechanism for disciplining it’s timing by an outside reference. Most modern implementations of Linux and BSD have this feature. This allows very fine adjustment of kernel timing and subsequent time keeping without having to make hardware modifications to the system board. The NTP server software, likewise has an internal timing module generally based on a modeled PLL oscillator, that allows external references of both NMEA time data and precise 1 pps time pulses to be applied. The combination of kernel disciplining and external references for NTP allow very accurate time information to be served.

PPS Correction

Two interesting software distributions that can used to create Swiss-army knife network appliances for firewalls/UTM’s, routers and VPN gateways are PFSence and OPNSense. Both have the ability to provide a highly accurate NTP time server when locked to an external reference, in addition to many other network tasks. So in this case, a dedicated computer is not needed exclusively for a NTP server.

In the first experiment, an existing installation of PFSense currently acting as a firewall and VPN gateway was modified to add an accurate, low latency NTP server to the LAN. The PFSense software is running on a small rack mount SuperMicro mini-server with a dual core D525 Atom CPU. It’s an ideal machine for this purpose since it has an unused serial port and requires less than 25 watts of power to operate. It’s LAN side is already connected to the network by a Gigabit NIC. The NTP server will be setup to allow time requests on the LAN port only.

In part 3, we will discuss the considerations of selecting an appropriate GPS external reference, and the kind of results one might expect with various classes of GPS receivers.

Dave, K7DMK