Use Windows 10/11 as NTP Server

Purpose of this technical note

To improve time synchronization between the Signature and the computer it is useful to use the NTP time protocol.

When using an Advanced Navigation GNSS this is not advised; in that case, switching to NTP would degrade the system, as the GNSS provides PTP synchronization.

Use Windows 10/11 as NTP Server.

Open the command prompt (cmd) as administrator and issue the following commands[1]:

  1. Enable the NTP server service:

    net stop W32Time
    
    reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Config” /v LocalClockDispersion /t REG_DWORD /d 0 /f
    
    reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters” /v LocalNTP /t REG_DWORD /d 1 /f
    
    reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\TimeProviders\NtpServer” /v Enabled /t REG_DWORD /d 1 /f
    
    reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Config” /v AnnounceFlags /t REG_DWORD /d 5 /f
    
    sc config W32Time start=auto
    net start W32Time
  2.  Check that the NTP server is enabled:

    w32tm /query /configuration

    Check the 2nd to last line in the output; Enabled: 1 (local) is correct.

    [...]
    NtpServer (Local)
    DllName: C:\Windows\system32\w32time.dll (Local)
    Enabled: 1 (Local)
    InputProvider: 1 (Local)
    [...]
  3. Add a rule to the firewall configuration to allow this service:

    netsh advfirewall firewall add rule name=”NTP Server” dir=in protocol=udp localport=123 profile=any enable=yes action=allow
  4. Ideally, you would have one or more other NTP server(s) available on a network that this computer is connected to, too. Typically, these other NTP servers would be higher in the hierarchy, for use as remote time server(s) to synchronize the system clock of our new NTP server with. To configure the new NTP server with these "peers":

    w32tm /config /update /manualpeerlist:"xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy" /syncfromflags:manual

    where xxx.xxx.xxx.xxx and yyy.yyy.yyy.yyy are the IP addresses of those other NTP servers.

    If you do not have one or more other local NTP servers, but you do have a continuous network connection to the rest of the world (including access to a DNS server), you could configure one or more of the standard NTP servers, e.g. pool.ntp.org.

    If you have no other local NTP server and no permanent network connection to the rest of the world, you can skip this peer-configuration step. In that case, you can still synchronize instruments with this NTP server, but this NTP server will not be synchronized to the global official UTC time.

  5. Test the service from an external system
    (if needed, replace the IP address with that of the computer that now runs the NTP Server)

    w32tm /stripchart /computer:192.168.100.1 /samples:25

Further and more detailed advice (both on NTP and on w32tm configuration) is available on the internet.


[1] If you want to copy-paste these commands, be careful with the commands that, in this note, continue over a second line. Be especially careful with the registry-editing commands: messing up your registry may have serious consequences, and in bad cases render your computer inoperable.

Also beware of trying to copy-paste a complete block of commands in one go. Do only one line at a time.

Updated