Windows-Server-2022
Configure and Verify Ntp Server

Procedure Manual for Configuring and Verifying NTP Server on Windows Server 2022

Table of Contents

  1. Introduction
  2. Configuring the NTP Server
  3. Verifying the NTP Server Configuration
  4. Troubleshooting
  5. Additional Notes

Introduction

This manual provides detailed steps to configure and verify the NTP server on Windows Server 2022. Network Time Protocol (NTP) is used to synchronize the time of computers over a network.

Configuring the NTP Server

Method 1: Using Command Prompt

Step 1: Open Command Prompt with Administrative Privileges

  1. Press Win + X and select Windows Terminal (Admin).
  2. If prompted by User Account Control, click Yes to allow.

Step 2: Configure Windows Time Service

  1. To set the server type to NTP, run the following command:
    w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:manual /reliable:YES /update
    Replace pool.ntp.org with your preferred NTP servers, separated by spaces.

Step 3: Configure the NTP Server

  1. Set the AnnounceFlags to 5 to enable the server as a reliable time source:
    w32tm /config /reliable:YES /update

Step 4: Restart the Windows Time Service

  1. Restart the Windows Time service to apply the changes:
    net stop w32time
    net start w32time

Method 2: Using Group Policy Editor

Step 1: Open Group Policy Editor

  1. Press Win + R to open the Run dialog.
  2. Type gpedit.msc and press Enter.

Step 2: Navigate to Windows Time Service Settings

  1. In the Group Policy Editor, navigate to:
    Computer Configuration > Administrative Templates > System > Windows Time Service > Time Providers

Step 3: Configure the NTP Server Settings

  1. Double-click on Configure Windows NTP Client.
  2. Select Enabled to enable the policy.
  3. Under NtpServer, enter your preferred NTP servers followed by ,0x9. For example:
    pool.ntp.org,0x9
  4. Configure the remaining settings as needed:
    • Type: NTP
    • CrossSiteSyncFlags: 2
    • ResolvePeerBackoffMinutes: 15
    • ResolvePeerBackoffMaxTimes: 7
    • SpecialPollInterval: 3600
    • EventLogFlags: 0

Step 4: Update Group Policy

  1. Open Command Prompt with administrative privileges.
  2. Run the following command to update Group Policy:
    gpupdate /force
  3. Restart the Windows Time service to apply the changes:
    net stop w32time
    net start w32time

Verifying the NTP Server Configuration

Step 1: Check the Current Configuration

  1. To verify the current configuration of the NTP server, run the following command:
    w32tm /query /status
  2. The output will display the current status of the Windows Time service, including the time source.

Step 2: Verify Time Synchronization

  1. To monitor the synchronization status and check the list of NTP peers, run:
    w32tm /query /peers
  2. Ensure that the list includes your configured NTP servers.

Troubleshooting

  1. Event Viewer: Check the Event Viewer for any related logs under Windows Logs > System for issues related to the Windows Time service.
  2. Sync Now: Force synchronization by running:
    w32tm /resync
  3. Firewall Settings: Ensure that UDP port 123 is open on your firewall, as it is required for NTP communication.
  4. Service Status: Ensure the Windows Time service is running by checking in Services (press Win + R, type services.msc, and press Enter).

Additional Notes

  • NTP Server Security: Consider implementing security measures, such as restricting which clients can query your NTP server.
  • Accurate Time Sources: Always configure your NTP server to use reliable and accurate time sources to ensure proper time synchronization across your network.
  • Documentation: Document the NTP server configuration and any changes for future reference.

By following these steps, you should be able to configure and verify the NTP server on Windows Server 2022 successfully. If further assistance is needed, refer to the official Microsoft documentation or support channels.