What’s NTP?

By July 21, 2011 February 18th, 2015 IT Stuffs

NTP is network time protocol. In a company networked environment, it is common to have one NTP server to serve time information and have all the rest of the networking gears talk to the NTP server so all systems use a common time. This sounds like such a small thing to worry about, but it is actually quiet important especially for team project developments and networked applications. If everyone’s computer time is different, adding/editing the same file will become very confusing and might cause older version to overwrite the newer version. This is why many modern networked software applications will reject users from accessing the application if it detects the server’s time is different than end-user’s PC time.

In Microsoft Windows environment, we can configure One Windows Server (usually the Domain Controller) to sync with external NTP server. This is better than sync with Server’s internal clock so we can be sure the time is correct.

Here are the steps what need to be done on the Server side:

  • Click Start -> Run, type regedit, and then click OK. Now, locate the registry subkeys and edit their settings:
  • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeParametersType
    • In the right pane, right-click Type, and then click Modify.
    • In Edit Value, type NTP in the Value data box, and then click OK.
  • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfigAnnounceFlags
    • In the right pane, right-click AnnounceFlags, and then click Modify.
    • In Edit DWORD Value, type 5 in the Value data box, and then click OK.
  • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpServer
    • In the right pane, right-click Enabled, and then click Modify.
    • In Edit DWORD Value, type 1 in the Value data box, and then click OK.
  • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeParameters
    • In the right pane, right-click NtpServer, and then click Modify.
    • In Edit Value, type pool.ntp.org,0x1 in the Value data box, and then click OK.
  • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeTimeProvidersNtpClientSpecialPollInterval
    • In the right pane, right-click SpecialPollInterval, and then click Modify.
    • In Edit DWORD Value, type 900 in the Value data box, and then click OK.
  • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfigMaxPosPhaseCorrection
    • In the right pane, right-click MaxPosPhaseCorrection, and then click Modify.
    • In Edit DWORD Value, click to select Decimal in the Base box.
    • In Edit DWORD Value, type 3600 in the Value data box, and then click OK.
  • HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW32TimeConfigMaxNegPhaseCorrection
    • In the right pane, right-click MaxNegPhaseCorrection, and then click Modify.
    • In Edit DWORD Value, click to select Decimal in the Base box.
    • In Edit DWORD Value, type 3600 in the Value data box, and then click OK.
  • Quit Registry Editor.
  • At the command prompt, type the following command to restart the Windows Time service, and then press ENTER:
  • net stop w32time && net start w32time
If all your Windows PCs are already part of the Windows domain, you don’t need to do anything further because all Windows PCs always sync with Domain Controller’s time. To verify you can enter:
w32tm /monitor
This will tell you if your PC is talking to the right server.
For PCs that’s not part of the Microsoft Windows domain, you can manually point to your NTP server by doing:
w32tm /config /manualpeerlist:192.168.1.1 /syncfromflags:MANUAL

Leave a Reply