NTP, short for Network Time Protocol, is a protocol that synchronizes time across network devices. It listens on UDP port 123 and always ensures that time inconsistencies across the server and client systems are mitigated and that client systems are always in sync with the server. NTP server refers to a network device or a service that fetches time from an external time source and syncs the time across the network using the NTP protocol. This guide will focus on installing NTP service on Windows server 2019.
Being a protocol, NTP requires a client-server architecture. The NTP client residing on a Windows PC, for example, initiates a time request exchange with the NTP server. A time-stamp data exchange happens between the server and client and this helps in adjusting the clock on client’s systems to the highest degree of accuracy to match the time on the NTP server. In this guide, we will walk you through the installation and configuration of NTP server on Windows Server 2019.
Configure NTP Server to provide time synchronization service to Clients.
If the computer that is an Active Directory Domain Controller, NTP Server feature has already been enabled automatically. So the example follows is for computers to enable NTP Server feature in Work Group Environment.
- Configure NTP Server
- Configure NTP Client
Configure NTP Server
Step 1: Run PowerShell with Admin Privilege and Configure.
Step 2: Follow the Commend. #Get-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpServer”
Step 3: #Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\Services\w32time\TimeProviders\NtpServer” -Name “Enabled” -Value 1
Step 4: #Set-ItemProperty -Path “HKLM:\SYSTEM\CurrentControlSet\services\W32Time\Config” -Name “AnnounceFlags” -Value 5
Step 5: #Restart-Service w32Time
Step 6: #New-NetFirewallRule
NTP Server Host also needs to synchronize time with other Hosts as an NTP Client.
Configure NTP Client
Configure NTP Client to synchronize time with NTP Server.
NTP Client setting is configured with NTP Server [time.windows.com] by Windows default, so If Internet connected environment computer, time and date is already synchronizing.
Furthermore, if computers are in Active Directory Domain, NTP Client setting is also configured like follows, so generally it does not need to change settings.
- Domain Controlers synchronizes time with PDC in the Domain
- PDC in a Domain synchronizes time with PDC that is in Parent Domain or synchronizes time with other Domain Controlers
- Client Computers synchronizes time with Domain Controler that Clients now logons
In Work Group Environment Computers, it’s possible to change default NTP Server to others like follows.
Step 1: Run PowerShell with Admin Privilege and Configure.
Step 2: If a Computer is in Active Directory Domain Environment and he is a Forrest Root, synchronization target is often configured to Local CMOS Clock (Hardware Clock), then, if you’d like to change settings from Local CMOS Clock to other network NTP server, set like follows.