In this tutorial, I am going to show you how to create a local NTP – Network Time Protocol server.
This server is very useful when you need to synchronize two devices when you have a raspberry for example and you need it to have the current date and time. You just need to know the IP of the server you create and then you will have the same date and time on any other device that can connect to it.
You can add new time servers using Control Panel, but the list only allows you to store one new entry. If you want to add multiple addresses (servers) to the list, you will need to use the Windows Registry.
ATTENTION: You need to be careful when you editing the Registry because if you do something wrong you can damage your Windows system.
1- Press Windows Key + R to open the Run Command Windows;
2- Type “regedit“, and click OK, as you can see in the following figure:
3- Browse the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\
4- Double click on the key labelled “AnnounceFlags” on the centre panel. This opens a configuration dialogue window.
5- Enter “a” into the Value data text box and click “OK”.
3- Browse the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\
4- Double click on the key labelled ‘Enabled’ on the centre panel. This opens a configuration dialogue window.
5- Enter “1” into the DWORD value data text box and click “OK”.
6- Close the Registry editor.
OK!!!! The NTP server is configured, but you need to change some network settings. these settings are still made on the machine where you configure the NTP Server.
7- Use ‘Widows Key + X’ and Open the ‘Device Manager’. Double click on ‘Network Adapters’.
- Make note of the PCI Ethernet Controller in the list, it will most likely be the adapter that W32Time\NtpServer will use.
- Open the Network Connection window
- Select the appropriate Network Adapter that was found in the Device Manager list
Right click on the adapter and select ‘Status’.
- Click on the button labeled ‘Use the following IP address’ in the Internet Protocol (TCP/IP) Properties’ window.
- Enter the IP address to be used for the NTP Server (i.e., 192.168.2.199)
- Click on OK to close the Internet Protocol (TCP/IP Properties’ window. .
- Click on OK to close the ‘Local Area Connection Property’ window.
- Disable any extra connection related items (i.e., QoS, Sharing, IPV6, etc.) that does not need to be running on the NTP Server.
- Click ‘Start\Run’
- Enter the following into the command prompt:
net stop w32time && net start w32time
- Click on OK
- Note: This restarts the NTP system time settings and loads the new registry values for your Windows server.
- A new NTP server was created!!!