Windows Time Service Registry Key for NTP Ports
This article outlines the specific Windows Registry paths responsible for configuring the Windows Time service (W32Time) and its Network Time Protocol (NTP) settings. By understanding these registry locations, administrators can view and modify time synchronization parameters, protocol behavior, and network communication settings across Windows environments.
The Primary Windows Time Registry Key
The primary registry key that stores all operational and protocol configuration parameters for the Windows Time service is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time
Within this main branch, specific subkeys govern different aspects of time synchronization protocols, network listening, and server behavior.
Key Subkeys for Protocol and Port Settings
Windows Time standardizes on UDP port 123 for NTP communication. The
protocol parameters and operational states are controlled through the
following subkeys under W32Time:
1. Time Providers (Protocol Handlers)
The TimeProviders subkey contains the configuration for
both the NTP client and NTP server components:
- NTP Server Configuration:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer- Enabled: A
DWORDvalue that determines whether the machine listens on UDP port 123 to serve time to other clients (1for enabled,0for disabled). - InputProvider: Determines if the server can accept input requests.
- Enabled: A
- NTP Client Configuration:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient- Enabled: Enables or disables the client’s ability to send NTP synchronization requests to external time sources.
- SpecialPollInterval: Controls the polling frequency in seconds when specific flags are set.
2. Service Parameters
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
- NtpServer: Contains the list of upstream NTP peers
or IP addresses along with connection flags (e.g.,
time.windows.com,0x9). - Type: Defines how the system synchronizes. Common
values include
NTP(synchronizes with external servers),NT5DS(synchronizes from the Active Directory hierarchy), orNoSync.
3. Global Configuration
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config
This subkey controls global operational algorithms, including: * MaxPosPhaseCorrection: Maximum positive time correction allowed in seconds. * MaxNegPhaseCorrection: Maximum negative time correction allowed in seconds. * AnnounceFlags: Controls whether the host advertises itself as a reliable time server to the network.
Applying Registry Changes
After modifying these keys in regedit, the Windows Time
service must be restarted to apply the changes. This can be done via the
Command Prompt:
net stop w32time
net start w32time
w32tm /resync