Using National Time and Frequency Signals as a NTP Timing Reference

  |   By

This article explores how to use national time and frequency radio transmissions for network time synchronisation.

The importance of an authenticated timing reference to synchronise a computer network to, cannot be stressed highly enough.

While there are hundreds and quite possibly thousands of internet based timing sources these can’t be authenticated leaving a system open to viruses, malicious hackers or malware.

Furthermore, a survey by MIT (Massachusetts Institute of Technology) found that nearly half of internet timing sources were offset by over ten seconds and only a third could be regarded as being ‘useful ’ also it was discovered that many were too far away from peers to provide any useful accuracy.

Most dedicated network time servers are designed to receive a timing signal from the GPS (Global Positioning System), primarily because it is the most accurate and can be received from anywhere on the globe.

However, there are situations where it may not be practical to use a GPS time server. A GPS antenna has to be situated on a rooftop and have a clear view of the sky which may prove difficult if the server is on the ground floor of a multi-storey sky-scraper. Many administrators also dislike the hassle and expense of having to run a cable up a building and install an antenna or if there are possibilities the server room maybe relocated and the process has to be repeated.

Fortunately many countries’ national physics laboratories broadcast a time and frequency signal from a radio transmitter. In the US the signal is referred to as WWVB and is broadcast by NIST (National Institute for Standards and Technology) in Colorado. In the UK the National Physical Laboratory (NPL) broadcasts the MSF signal from Cumbria and similar systems are broadcast in Germany (DCF-77), Japan (JJY) and France (TDF).

Unfortunately not every country transmits a national time and frequency broadcast so if a time server is to be located outside of the US, Germany, UK, France or Japan it may be doubtful that a signal could be received (although many of the these transmissions can be received in neighbouring countries).

Radio signals are also easily susceptible to atmospheric interference and can be blocked by mountains, sky-scrapers or other topography. However, an upside to using a radio receiver is that it will receive a signal inside a building.

While a radio transmission is not as accurate as a GPS time signal a dedicated network time server receiving a radio signal can still provide accuracy between 1 – 20 milliseconds (a millisecond is 1/1000 of a second) which is more than adequate for the needs of network synchronisation.

How to Build and Configure Your Own Radio Referenced NTP Time Server

  |   By

Many people are probably familiar with the Internet Time tab when setting their clock in Windows. This is a basic form of NTP (Network Time Protocol) called SNTP (Simple Network Time Protocol) that polls a NTP server every so often to synchronize time to. However, full NTP does a lot more, such as polling several servers to determine what is the best and most stable times source.

Creating your own NTP time server is relatively straightforward and if you are a resident of the US then the simplest way is to use a relatively cheap receiver module, set to receive the WWVB timing signal which is broadcast by NIST (National Institute of Standards and Time) at a frequency of 60 kHz.

To create your own product using the WWVB time signal, WWVB receiver modules, are readily available at low cost. When looking for a receiver module there are several points to consider:

There should be a simple interface to allow easy integration of accurate timekeeping into electronic equipment etc. The receiver should use dedicated chips designed specifically to receive the WWVB (USA) time signal. The advantage of these over other solutions is that the modules include the necessary support electronics, tuned crystals, etc and are preassembled, tested and are usually in miniature form.

When combined with a suitable Antenna the receiver module acts as a complete time code receiver, providing a serial digital data output stream for external decoding.

Once assembled and tested so the module is receiving a signal it can then be connected to your computer or server.

Once connected the time server should be configured using the registry editor. Simply follow these steps:

Locate the following subkey: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeParametersType
In the right pane, right-click Type then click Modify, in edit Value type NTP in the Value data box then click OK.

Locate the following subkey: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfigAnnounceFlags.

In the right pane, right-click AnnounceFlags and click Modify. The ‘AnnounceFlags’ registry entry indicates whether the server is a trusted time reference, 5 indicates a trusted source so in the Edit DWORD Value box, under Value Data, type 5, then click OK.

To enable the Network Time Protocol; NTPserver, locate and click: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpServer

In the right pane, right-click Enabled, then click Modify. In the Edit DWord Value box, type 1 under Value data, then click OK.

Now go back and click on: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeParametersNtpServer

In the right pane, right-click NtpServer, then Modify, in the Edit DWORD Value under Value Data type In the right pane, right-click NtpServer, then Modify, in the Edit DWORD Value under Value Data type the Domain Name System (DNS), each DNS must be unique and you must append 0x1 to the end of each DNS name otherwise changes will not take effect.

Now click Ok then locate and click the following: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpClientSpecialPollInterval

In the right pane, right-click SpecialPollInterval, then click Modify. In the Edit DWORD Value box, under Value Data, type the number of seconds you want for each poll, ie 900 will poll every 15 minutes, then click OK.

To configure the time correction settings, locate: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32Timeconfig

In the right pane, right-click MaxPosPhaseCorrection, then Modify, in the Edit DWORD Value box, under Base, click Decimal, under Value Data, type a time in seconds such as 3600 (an hour) then click OK.

Now go back and click: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32Timeconfig In the right pane, right-click MaxNegPhaseCorrection, then Modify.

In the Edit DWORD box under base, click Decimal, under value data type the time in seconds you want to poll such as 3600 (polls in one hour)Exit Registry Editor

Now, to restart windows time service, click Start, Run (or alternatively use the command prompt facility) and type:

net stop w32time && net start w32time. And that’s it your time server should be now up and running.