Sunday, October 19, 2014

Windows server 2008 / 2008 R2 AD Time Sync with External NTP Server

As AD servers provide time to machines in a domain it is important to have AD servers synchronized with an reliable time source.

On AD server, you should run command prompt with administrative rights (right click / run as administrator).

First check difference between your server and external time source (in my example 192.168.0.1)

w32tm /stripchart /computer:192.168.0.1 /samples:5 /dataonly

Example:
 

C:\>w32tm /stripchart /computer:192.168.0.1 /samples:5 /dataonly
Tracking 192.168.0.1 [192.168.0.1:123].
Collecting 5 samples.
The current time is 20/10/2014 7:50:58 AM.
07:50:58, +00.1643852s
07:51:00, +00.1643980s
07:51:02, +00.1644108s
07:51:04, +00.1644236s
07:51:06, +00.1801061s

Confiure your server to use external NTP time source for sync:
 

w32tm /config /manualpeerlist:192.168.0.1,0×8, /syncfromflags:manual /update

Example:
 

C:\>w32tm /config /manualpeerlist:192.168.0.1,0×8, /syncfromflags:manual /update

The command completed successfully.

Force sync immediately:


w32tm /resync

Now retry the first command to see the results:



Example:

C:\>w32tm /stripchart /computer:si.pool.ntp.org /samples:5 /dataonly
Tracking 192.168.0.1 [192.168.0.1:123].
Collecting 5 samples.
The current time is 20/10/2014 7:51:50 AM.
07:51:50, +00.1803420s
07:51:52, +00.1647293s
07:51:54, +00.1647421s
07:51:56, +00.1647549s
07:51:58, +00.1647677s

No comments:

Post a Comment