Use Windows 10 as NTP Server
FollowDate | Author | Comment / Reason for change | Revision |
26-may-2023 | Jos van Heesen | Created | 1.0 |
05-jun-2023 | C.W. | minor clarification and text clean-up | 1.1 |
Purpose of this technical note
To improve time synchronisation 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 as NTP Server.
Open the command prompt (cmd) as administrator and issue the following commands[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
- Check if 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)
- 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
- Test the service from an external system
w32tm /stripchart /computer:192.168.0.10 /samples:4 /dataonly
(replace the IP address with that of the computer that now runs the NTP Server)
[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.
Comments
0 comments
Please sign in to leave a comment.