Sealand Systems Ltd logo Use this link to get straight to the content if you are using a screen reader. Lancing
West Sussex
Tel: +44 1903 209367
Mobile: +44 7802 651892
Enquiries@sealand.systems

Get Adobe reader

Get LibreOffice

Even with something like an EIVA TimeBox timestamping data telegrams, networked PCs will still need accurate time, provided by NTP (Network Time Protocol).  There are simple solutions that set PC clocks using NTP, but they have drawbacks:

  • They generally only check the clock synchronisation at fixed intervals, so that an inaccurate clock might drift significantly between checks.
  • They generally only follow a single time source, rather than comparing several for sanity.
  • When there is a clock correction they can step the clock, causing a sudden time jump.
  • Some may jump the clock backwards, possibly causing anomalies in software that has to measure intervals.

Only one NTP service can run on a single PC at any time.  Simple solutions such as Time-Sync and AboutTime are adequate where clocks are only required to synchronise occasionally.  Where millisecond accuracy and stability are paramount, a solution based upon the reference code published by the NTP Project is indispensable.

Most NTP services operate as both servers and clients at the same time.  A stratum 2 server is merely a machine that was configured as a client of a stratum 1 server.  Servers may operate in a hierarchy as many as sixteen deep, but to do this without good reason could introduce points of failure.

Overview

  • NTP is the protocol used by time services.
  • Simple time services are adequate if millisecond accuracy is not needed.
  • A full implementation of NTP is needed for full accuracy.
  • More than one time service on a PC will cause unpredictable behaviour.  If more than one service is installed, all but one must be disabled.
  • Versions of Windows prior to Windows 10 and Server 2016 do not have a native full-accuracy service.

Configuring NTP throughout a network

At its most basic, all that is necessary to configure NTP on a machine is the IP addresses (or DNS names) of one or more reachable NTP servers.  In simpler clients these are usually entered in a Windows dialogue, while full implementations rely on an ntp.conf file, giving much greater control at the expense of complexity.

NTP servers

You need at least one time server on your network before you can configure lower-stratum machines to use it.  You may well already have stratum 1 servers if you are using network-connected GPS receivers like the Fugro StarPack, which provides NTP service by default, but if you cannot identify any existing servers, you will create one using a PC – probably your main Nav PC.

Once you have found your NTP servers, or created one, install the NTP service of your choice on all PCs to be synchronised, configuring each one to use the server(s) as their source(s).  If installing a full NTP implementation, you would simply find the server lines in the default ntp.conf file and change them to your list of servers, e.g.

server 192.168.1.50
server 192.168.1.51
server 192.168.1.52

Creating a top-stratum NTP server

If you have no existing time server, select a PC to be your master server.  It will need to have a reference clock, and you have three options:

  • If it is your main Nav PC, it may already be running survey software that takes a ZDA/PPS input and sets the PC clock as a side-effect.  In this case, NTP may be configured to treat the PC clock as a reference clock.  You will need to install a full NTP implementation (e.g. Meinberg's).  The local clock is represented as a server with the address 127.127.1.0 and a “fudge factor” is introduced to make it a stratum 1 source:
    server 127.127.1.0
    fudge 127.127.1.0 stratum 1
  • Better, you can configure NTP to get time directly from a reference clock, which will be more reliable than letting other software set the PC clock.  To configure NTP to use an NMEA ZDA string, the reference clock is represented as a server with the address 127.127.20.n, where n is the number of the COM port.  A “fudge factor” can be added to make the software use a PPS signal if it is available.  So for a ZDA/PPS input on COM1, the lines in ntp.conf would be:
    # mode 16 means it's running at 9600
    server 127.127.20.1 mode 16

    # fudge flag1 1 means "use the PPSAPI dll"
    fudge 127.127.20.1 flag1 1

    (In fact, the 127.127.20.n driver will accept GGA and GLL telegrams, and various other options.)

  • Failing the availability of any authoritative time source, you can configure your master PC to treat its unstabilised local clock as a valid source.  This is in fact the same configuration as the first example (where the local clock was being controlled by other software), but it would be wise not to claim to be a stratum 1 source, so:
    server 127.127.1.0
    fudge 127.127.1.0 stratum 4

NTP concepts

NTP has been running across the Internet since before the World Wide Web.  It propagates time down a hierachy of strata, using sophisticated algorithms refined over more than thirty years to determine the accurate time, and discipline local clocks to follow it.  After the initial setting, it performs any adjustment by slewing the clock gradually and will never cause it to step more than a limited amount, or step backwards.

At the highest stratum, 0, are the authoritative reference clocks, which are mostly atomic clocks or GPS receivers.  Directly connected to the reference clocks are the stratum 1 NTP servers, and below these are servers that do not have directly connected reference clocks.  Servers listen on UDP port 123 (the traditional number of the speaking clock).  Servers below stratum 1 refer if possible to three or more servers at higher strata, comparing times and using the algorithms to select the most stable source.

A server that selects a preferred source at stratum 1 becomes a stratum 2 server, and so on down the line.  On the Internet, there are now many publicly accessible NTP servers at stratum 1 and stratum 2, so NTP clients which rely on the Internet are rarely below stratum 3.  Nevertheless, NTP allows for strata from 0 to 16.

NTP is the clock synchronisation solution that Harrods would sell you – except that it is free.  But there are some hurdles to negotiate in getting the highest accuracy on Windows machines.

Windows Time

Microsoft first provided a basic native system using SNTP (Simple NTP) with the introduction of the Windows Time Service (W32time) in Windows 2000.  W32time has developed until, in Windows Server 2016 and Windows 10, Microsoft claims full accuracy but discloses that “Windows Time service is not an exact implementation of the Network Time Protocol”.

W32time is configured by default to check the clock at fixed intervals, using the Internet source, time.microsoft.com.  Finding clear and correct documentation on altering the configuration to obtain highly accurate time from a different source is challenging.

Under earlier versions of Windows, users needing fully-featured NTP had to install implementations of the NTP reference source specially packaged for Windows, with the preferred packages coming first from Trimble and, more recently, from Meinberg.  The inadequacy of current documentation on configuring Windows Time Service remains an incentive to prefer Meinberg’s implementation.

Sealand is very pleased to be a supporter of the Open Document Foundation, Linux Mint, and the Lancing and Sompting Churches’ Food Bank.

Valid HTML 4.01 Transitional

Copyright © 2006 - 2019, Sealand Systems Ltd.  Terms of use.
This page updated 11 May, 2019.  Please double-check any information before you use it.

Visit our ISP