This topic describes how to configure clock synchronization between the servers running Windows Server 2012 R2.
Prerequisite
The Windows Server 2012 R2 server is running properly.
Settings on the Server
Log in to the time source server as the administrator.
Click
to open the command window, and run the gpedit.msc command.The Group Policy Object Editor window is displayed.
Set Global Configuration Settings.
In the navigation tree on the left, choose .
In the pane on the left, double-click Global Configuration Settings.
The window shown in Figure 1 is displayed.
Figure 1 Global Configuration Settings
Select Enabled and enter a value in AnnounceFlags, for example, 5. The value controls whether the time source server is marked as a reliable time server.
If you do not set AnnounceFlags, the system uses the default value 10. The value 5 for AnnounceFlags equals 1 + 4, indicating that the time source server has both functions specified by 1 and 4.
Table 1 describes the available values of AnnounceFlags.
Table 1 Description of the available values of AnnounceFlags Value
Description
0
Indicates that the time source server does not advertise time service.
1
Indicates that the time source server always advertises time service.
2
Indicates that the time source server automatically determines whether it should advertise time service.
4
Indicates that the time source server will always advertise reliable time service.
8
Indicates that the time source server automatically determines whether it should advertise reliable time service.
Click OK.
The system returns to the Group Policy Object Editor window.
Start the Windows NTP server.
In the navigation tree on the left, choose .
In the pane on the right, double-click Enable Windows NTP Server.
The window shown in Figure 2 is displayed.
Figure 2 Enable Windows NTP Server Properties
Set Enable Windows NTP Server to Enabled.
Click OK.
The system returns to the Group Policy Object Editor window.
Restart the Windows time service for the preceding modifications to take effect.
Choose and run the cmd command.
Run the following commands in the command-line interface (CLI):
net stop w32time
net start w32time
The following information indicates that the Windows time server has been restarted successfully:
The Windows Time service was started successfully.
Settings on the Client
Log in to the server where you want to set time synchronization as the administrator.
Click
to open the command window, and run the gpedit.msc command.The Group Policy Object Editor window is displayed.
Configure the Windows NTP client.
In the navigation tree on the left, choose .
In the pane on the right, double-click Configure Windows NTP Client.
The window shown in Figure 3 is displayed.
Figure 3 Configure Windows NTP Client Properties
Select Enabled, enter the time source in NtpServer, and set Type to NTP. Here, 10.10.10.1,0x09 is used as a time source example.
In this example, 10.10.10.1 indicates the Domain Name System (DNS) name or IP address of the time source, and 0x09 indicates a flag that defines the polling mode between an NTP client and an NTP server. The DNS name (or IP address) and the flag are separated by a comma. If you want to specify more than one time source in NtpServer, separate the time sources by space. If you do not specify any time source in NtpServer, the system uses time.windows.com,0x09 by default. The flag 0x09 equals 0x01 + 0x08, indicating that the time source server has both functions specified by 0x01 + 0x08.
Table 2 describes the available flags.
Table 2 Flags Flag
Description
0x01: SpecialInterval
After 0x01 is selected, the system uses a user-specified polling interval, but not the default polling interval. This user-specified polling interval conserves network resources but affects the time synchronization accuracy.
You can manually change this user-specified polling interval (unit: seconds) using the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\TimeProviders\NtpClient\SpecialPollInterval. By default, the polling interval is 3600 seconds.
0x02: UseAsFallbackOnly
After 0x02 is selected, the time source is used only as a fallback time source. If all time sources that are not fallback time sources have failed, the system selects one fallback time source at random and uses it.
0x04: SymmetricActive
After 0x04 is selected, the client sends periodic messages to the time source, regardless of the reachability state or stratum of the time source in the network. The client announces its willingness to synchronize and be synchronized by the time source.
0x08: Client
After 0x08 is selected, the client sends periodic messages to the time source, regardless of the reachability state or stratum of the time source in the network. The client announces its willingness to be synchronized by, but not to synchronize the time source.
Click OK.
The system returns to the Group Policy Object Editor window.
Enable the Windows time service to start automatically.
Run the services.msc command in the CLI.
The window shown in Figure 4 is displayed.
Figure 4 Services
Double-click Windows Time.
The Windows Time Properties (Local Computer) window is displayed.
Click the General tab and select Automatic from the Startup type drop-down list box.
The window shown in Figure 5 is displayed.
Figure 5 Windows Time Properties (Local Computer)
Click OK.
The system returns to the Services window.
Right-click Windows Time and choose Start from the shortcut menu.
The Windows time service restarts in about 2 seconds. Then the Windows time service can automatically start.
Run the w32tm /resync command in the CLI to synchronize time for the server manually.

You are advised to perform this step after setting server time synchronization.
The following information indicates that the command is executed successfully:
Sending resync command to local computer... The command completed successfully.
Verification
Check whether the time on the server is the same as the time on the time source server.
If they are the same, server time synchronization is set successfully.
to open the command window, and run the 





