How to Configure NTP Server in Windows Server 2016

This article shows how to configure Windows Time Service (NTP) on Windows Server 2016 to act as an NTP server for domain client computers.

Configure Windows Time Service (NTP)

A prerequisite to having the correct time on the Windows clients is the correct time on the Windows 2016 server. So the first step is to sync server time with pool.ntp.org. Type the following commands on PowerShell:

w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL

Then apply the changes, this is done by restarting the time service. First, we stop the service and then we start it again.

Stop-Service w32time
Start-Service w32time

Now the Windows Server 2016 is an NTP client of pool.ntp.org and its time/clock is synced with the NTP pool servers (The server is at the same time the NTP server for other domain client systems).

Optional: Server is in a Hyper-V VM

If your Windows Server 2016 machine is a VM inside Hyper-V, you have to disable time sync. Go to:

M settings-> Management-> Integration Services

and uncheck:

Time Synchronization.

Otherwise, Windows Server 2016 time/clock will be synced with the Host time/clock.

Configure Windows Clients

Then go to the client machines and run the following command on PowerShell to force them to sync their time/clock with the domain controller on the Windows Server 2016.

w32tm /resync

You can check the time synchronization status using the following command.

w32tm /query /status

Check Windows time sync status

Frequently Asked Questions

What is NTP and why is it important in Windows Server 2016?

Network Time Protocol (NTP) is a protocol used to synchronize the clocks of computers to some time reference. In Windows Server 2016, it's essential for ensuring that all devices in a network are synchronized, which is crucial for security, log management, and the proper functioning of time-sensitive processes.

How do I configure my Windows Server 2016 to act as an NTP server?

To configure your Windows Server 2016 as an NTP server, you need to edit the Windows registry. Start by opening regedit and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer. Set the Enabled flag to 1. This will enable the NTP Server feature on your server.

How do I set the time source for my NTP server?

Use the command prompt or PowerShell. The command is:

w32tm /config /syncfromflags:manual /manualpeerlist:"[peers]"

Where [peers] is a space-separated list of IP addresses or DNS names of the NTP servers you wish to synchronize with.

After configuring the NTP server, how do I ensure it's working correctly?

You can check the status of your NTP server by using the command:

w32tm /query /status

in the command prompt. This will give you information about the NTP configuration and its current status.

How do I configure a Windows Server 2016 machine to use my NTP server?

On each client machine, run:

w32tm /config /syncfromflags:manual /manualpeerlist:"[server]" /reliable:YES /update

Replace [server] with the hostname or IP address of your NTP server, and then restart the Windows Time service.

Are there any security considerations when setting up an NTP server?

Yes, it's important to ensure that your NTP server is only accessible by the intended clients to prevent misuse. Configure appropriate firewall settings to allow NTP traffic (port 123 UDP) only from trusted networks or machines.

Can I use an external NTP source for my Windows Server 2016?

You can configure your server to synchronize with external NTP servers, such as those provided by national time services or large internet service providers. This is done using the same w32tm /config command with the /manualpeerlist parameter.

How do I deal with time zone differences in NTP?

NTP itself deals only with UTC (Coordinated Universal Time). Time zone differences are handled at the client level, not by the NTP protocol. Ensure your server and client machines are configured with the correct local time zone.

What if I encounter errors when trying to synchronize time?

Common issues include network problems, incorrect firewall settings, or misconfigurations in the registry settings. Check the event viewer for specific error messages and verify that your server can reach the NTP peers.

How often does Windows Server 2016 synchronize time with the NTP server?

By default, Windows synchronizes time every 7 days (604800 seconds), but this interval can be modified in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval.

These FAQs provide a basic guide to setting up and managing an NTP server in Windows Server 2016. Refer to the official Microsoft documentation or consult a network administrator for more detailed information.

Leave a Comment