Register now or log in to join your professional community.
Windows using a time service called ‘Windows Time’, which is automatically installed in the service list and the executable is known as ‘w32time.exe
First, make sure all machines have UDP port123 open.
In Windows domain network only the Primary Domain Controller (PDC) synchronizes with a time reference.All other servers and workstations in the domain sync to the PDC using Windows proprietary protocol.Only the PDC needs to be configured to synchronize to an external time reference.
Run in elevated cmd
w32tm /resync
or
net time /set
Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks.
Applies to:Microsoft Windows Server2008Microsoft Windows Server2003
To configure a Windows PDC to synchronise with an external NTP server requires registry entry changes. When modifying registry settings, it is always a good idea to backup the current settings beforehand. Backup and modification of the registry is easily achieved using the ‘regedit’ utility, which can be run from the command line. You can revert back to previous settings if any problems occur with registry changes. Use the registry editor ‘regedit’ to change the following entries:
1. Change the server type to NTP.Registry Key: HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\Parameters\\TypeChange value data to: NTP
2. Set announce flags.Registry Key:HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\Config\\AnnounceFlagsChange value data to:5
3. Enable NTP serverRegistry Key:HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpServerChange value data to:1.
4. Specify the time sources.Registry Key:HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\ParametersChange value data to: <peerlist><peerlist> is a list of space-delimited NTP peers from which time can be received. If DNS names are used, you must append ‘,0x1’ to each DNS name. Alternatively, a list of IP addresses can be specified.
5. Select poll interval.Registry Key:HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\TimeProviders\\NtpClient\\SpecialPollIntervalChange value data to: <period><period> is the time in seconds between each poll. Microsoft recommends a value of900, which equates to a polling frequency of once every15 minutes.
6. Set the time correction settings.These settings specify a time frame to validate time stamps received from an external reference. Only if the received timestamp falls between these registry settings will they be accepted. It provides a facility to reject timestamps that are too far away from the hosts system time. Microsoft recommends a setting of1 hour (3600) or30 minutes (1800).Registry Key:HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\Config\\MaxPosPhaseCorrectionChange value data to: <seconds>Where <seconds> is the maximum positive offset of the received time stamp from the system time.
Registry Key:HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W32Time\\Config\\MaxNegPhaseCorrectionChange value data to: <seconds>Where <seconds> is the maximum negative offset of the received time stamp from the system time.7. Restart the windows time service.Stop and restart the Windows Time Service using the ‘net stop’ and ‘net start’ commands:net stop w32time && net start w32timeSynchronizing a Windows Workgroup
Applies to:Microsoft Windows XP.Microsoft Windows Vista.Microsoft Windows7.
When Windows for Workgroups is deployed, you have to manually configure time synchronization settings. You need to specify the time server that the Windows Time Service is to use as a reference clock. This is a very straightforward process; simply specify the time reference that the host is to synchronise with using the ‘net time’ command:
Net time \\\\<ntpserver> /set /yes
Where <ntpserver> is the DNS name or IP address of the time reference.
Alternatively, you can utilize the date and time properties applet from the control panel. Select the ‘Internet Time’ tab from the applet, check ‘Automatically Synchronize with an Internet Time Server’ and enter the DNS name or IP address of the server. If you select ‘Update Now’ the time service will attempt to contact and synchronise with the time reference immediately.
Typical responses are:
‘The time has been successfully synchronized with <ntpserver>’This indicates that the time reference was contacted successfully and synchronisation has been successful.
‘An error occurred while Windows was synchronizing with <ntpserver>’An attempt was made to contact the specified time reference, but no response was received.
‘An error occurred while Windows was synchronizing with <ntpserver>. The time sample was rejected because: The peer’s stratum is less than the host’s stratum.’This indicates that contact was made with the specified time reference, but a problem was detected. Generally, it is because the time reference was in an unsynchronized state.
The applet will also periodically automatically synchronize with the specified reference. The next time synchronization is due to commence is displayed at the bottom of the applet’s window.