How do you synchronize the machines on your network to the same time? This articles describes how to set up an NTP Server and configure Windows, Linux, and MacOS computers to use it.
In a world where timing is everything, time servers, especially GPS integrated NTP (Network Time Protocol) Servers, address real needs and have immense benefit for an array of applications. The current mass-scale and ongoing proliferation of our connected world (e.g. smartphones, tablets, PCs, automation and IoT devices) is, in large part, made possible through networked time synchronization. This is often accomplished with NTP and through time servers. There’s common use in banking and Point of Sale (POS) systems, remote sensing, distributed IoT, automation, industrial controls, biotech, high-speed sensor fusion, cloud computing and security networks.
The What and Why on NTP Time Servers?
NTP (Network Time Protocol) is a network protocol that enables you to synchronize clocks on devices over a network. It works by using one or more NTP servers that maintain a highly accurate time, and allows clients to query for that time. These client devices query the server, then automatically adjust their own internal clock to mirror the NTP server. The NetBurner NTP server obtains highly accurate time by synchronizing it’s local clock to GPS satellites. Once plugged in to your network, the NTP device will allow your devices to maintain synchronized time.
Whenever and wherever there’s a need for highly accurate and even auditable timestamps and data streams — NTP using a GPS Stratum 1 Time Server can be your best friend (more on that Stratum jargon in just a few). For example, in transportation, financial, billing, or security applications, logging and correlating events with highly accurate timestamps is critical to making well informed decisions and actions – even of legal or catastrophic consequence. In fact one, one the first applications of NTP was in air traffic control, allowing distant networked air traffic control systems to accurately correlate radar signals and display aircraft positions with parity across all stations and towers in the control network.
The NetBurner GPS NTP server obtains highly accurate time by synchronizing its local clock to actual GPS satellites and their incredibly precise atomic clocks. Once the device is connected to your network, the server will allow any number of your devices to synchronize to its very accurate Coordinated Universal Time (aka UTC time), as it is called.
Now, back to the business of stratum. NTP Servers are generally categorized into several tiered categories with respect to timing accuracy. These categories are referred to as stratum. As the stratum number increases, the accuracy of the time generally decreases. The NetBurner GPS NTP Server is a Stratum 1 device connected directly to a GPS time module.
- Stratum 0 devices are devices such as atomic, GPS, and radio clocks. These devices offer the highest accuracy, but are not usually publicly accessible.
- Stratum 1 devices are network servers that are connected directly to stratum 0 devices. Some public stratum 1 devices can be found, but they often come with usage restrictions, including limiting the number of requests and limiting usage for commercial devices.
- Stratum 2 devices are network servers that synchronize their time to one or more stratum 1 or 2 devices. Public, open use NTP servers often fall in to this category.
Stratum numbers can keep increasing, up to a theoretical stratum 256 device. However, any device listed as stratum 16 or greater should be considered inaccurate.
Do I really need my own NTP server?
For many types of applications having your own NTP server is unnecessary. For example, you do not need one if you want to use the protocol and can reliably access and synchronize with 3rd party NTP servers over the internet (more on those resources below). However, in high-demand, timing-critical, remotely located or bandwidth constrained applications, these may be too unreliable, or worse yet, not work at all. It’s also useful for when you have a high number of client devices on the same network that require accurate synchronization. These cases are where having your own NTP server synchronized to GPS time can be essential.
According to Wikipedia, “NTP can usually maintain time to within tens of milliseconds over the public Internet, and can achieve better than one millisecond accuracy in local area networks under ideal conditions. Asymmetric routes and network congestion can cause errors of 100 ms or more.” That sure sounds like a compelling use of local NTP servers for timing critical applications, right?!
If you are lucky enough to make due with the latencies and higher error associated with Internet NTP servers we have a few pointers. When selecting a publicly accessible NTP server, it is important to follow the access guidelines provided by the server. These restrictions include, but are not limited to:
- Service only to clients within a specified service area
- Service only for non commercial use
- Maximum number of clients
- Minimum polling interval
A large list of publicly accessible devices worldwide is provided by ntp.org, the online home for the NTP project. Usually you want to pick a server nearest your client device to reduce latencies.
How do I set up the NetBurner NTP Time Server?
Configuration options, status screens, and XML output can be reached on the PK70 NTP device by pointing your web browser to the IP address of the device. If you are unsure of the local IP address of your NetBurner NTP server, download our IPSetup tool, which will scan your local network for NetBurner devices and display a host of information about the device, including the IP address. Copy and paste this address into your browser to find the device’s configuration interface.
The 4-step setup of the NetBurner NTP server could not be easier. Unbox the device, plug in the power cable, plug in the network cable, and attach the included GPS antennae. For optimal performance, the antenna receiver should be placed next to a window with a clear view of the sky – as it is literally communicating with the GPS constellation in Earth’s orbit. Once the device powers up, the red LED light will turn green, indicating the device is GPS stratum 1 synchronized. DONE. Now go grab a coffee and work on saving the world.
Windows 7/10 Configuration
- Open the Windows Control Panel and select “Clock, Language, and Region” (Win 7) or “Clock and Region (Win 10). In the Classic Windows Control Panel there is also link called “Date and Time.”
- Click on “Set the time and date” or “Date and Time” depending on your Windows environment.
- Select the “Internet Time” tab in the new window that opens up
- Click on “Change Settings…” and input the new server address you wish to use
- Click “Update now”.
Upon success, you will see a message indicating that the clock was successfully synchronized. Further management in unnecessary; Windows will automatically and indefinitely synchronize with the specified server at a predetermined interval.
- Open System Preferences and click on “Date and Time”
- Check the option “Set Date and Time Automatically”
- Input one or more NTP server URLs, separating multiple URLs with a comma
Upon success, OSX will begin tracking all NTP servers that have been inputted. Using a smart algorithm, OSX will automatically pick the best NTP server to use and synchronize with it automatically at a predetermined interval.
Typical Linux distributions include
ntpd, the daemon for syncing to an NTP server. If you are missing ntpd, then you should install ntpd with your favorite package manager.
- From the command line, use sudo privileges to edit the /etc/ntp.conf file.
sudo vi /etc/ntp.conf
- Input one or more ntp servers, one per line. Prepend “server” to every URLExample ntp.conf file
server time.apple.com server time.nist.gov server 10.1.1.78
3. Restart ntpd, usually accomplished with
Once restarted, you can monitor ntpd with the command
ntpq -p. This will list all of the NTP server in use, and include diagnostic information for all known NTP servers. It may take several minutes for an NTP server to be selected and synchronized with. Once an NTP server is selected, it will be indicated with a
* in the ntpq output.
We hope it’s pretty obvious why accurate and synchronized time is a good thing. Using a local GPS NTP Time Server is really nice for more serious applications where timestamp accuracy and clock parity over a network of discrete devices is tantamount. Using NetBurner’s low cost and easy to use GPS NTP servers is a great way to get up to speed with your timing needs!