How to Setup a Windows 2008 R2 SNTP/NTP Server

1 minute read,

Gee, setting up an SNTP/NTP server in Windows is not intuitive.

The good news is: When configured correctly, you can use the Windows Time (W32Time) service as an SNTP/NTP server for both windows and non-windows SNTP/NTP clients.

Here’s how to do it:

  1. Click Start, click Run, type regedit, and then click OK.

  2. Locate and then click the following registry entry:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\

  3. In the right pane, right-click AnnounceFlags, and then click Modify.

  4. In the Edit DWORD Value dialog box, under Value data, type 5, and then click OK.

  5. Enable NTPServer.

    1. Locate and then click the following registry subkey:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\

    2. In the right pane, right-click Enabled, and then click Modify.

    3. In the Edit DWORD Value dialog box, type 1 under Value data, and then click OK.

  6. Exit Registry Editor.

  7. At the command prompt, type the following command to restart the Windows Time service, and then press ENTER:

    net stop w32time && net start w32time

This should get you setup with minimal registry hack impact.

Tips

  • Make sure W32Time is set to Automatic startup mode.
  • Make sure UDP 123 is allowed through your firewall.
  • Use this InternetTime program to help you debug connectivity to your SNTP/NTP server. internettime.zip

Hope that helps,
Brian Chavez

Comments

verypsb

More info: How to configure an authoritative time server in Windows Server
http://support.microsoft.com/kb/816042

Steve

I can make a 2008 Server do one or the other , but not both at once.

It appears that if
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags

Is set to a it will be set as a NTPClient to receive time from a valid NTP
Event Viewer
The time provider NtpClient is currently receiving valid time data from time.windows.com,0x9 (ntp.m
0x9 0.0.0.0:123->65.55.21.23:123).
The time service is now synchronizing the system time with the time source time.windows.com,0x9 (ntp.m
0x9 0.0.0.0:123->65.55.21.23:123).

Is set to 5 it will be set as a NTPServer to advertise a valid NTP
Event Viewer
The time service has started advertising as a time source.
The time service has started advertising as a good time source.


What I need is a way that a and 5 are combined.

Tony Wall

Using built-in commands:

w32tm /config /syncfromflags:manual /manualpeerlist:europe.pool.ntp.org /reliable:yes /update

w32tm /resync

…where europe.pool.ntp.org is your preferred time (NTP) server. I find NTP.org more reliable than time.windows.com which is probably overloaded because it was the default in Windows desktop versions for a long time.

Didn’t need to add a firewall exception, was probably included in the Active Directory Services or File Server roles I added. Otherwise of course UDP 123 outgoing would have to be enabled.

Most important is setting the syncfromflags to manual otherwise you are not allowed to use an external time source.

The best practice should be using default workstation to domain to forest root sync hierachy, and only performing these steps on the forest root server(s) to get the atomic time from an external source, then the whole domain has atomic time with minimal settings and maximum defaults (minimum maintenance effort).

SilverClawD

I have a server that pulls data from a production network but itself is connected to the domain/forest as well. I need to use that 2008 server to make sure the devices sending it data are in sync with it for data accuracy. Since it is not a domain controller or anything will making it an sntp/ntp cause any issues on the forest/domain side?

WinAdmin

If you set it on the standalone W2008 server (but domain joined) does it have any affect for its normal behavior when pulling time sync from the Domain Controller?

http://technet.microsoft.com/en-us/library/cc784191%28v=ws.10%29.aspx

TG

I set it up to provide time to our Netgrae GS748Tv4 switch, but the switch only received the date, not the time. Is there a time zone setting to update?

RFSTech

Worked perfectly on Windows Server 2008 R2 SP1. Only clarification I would add is the W32Time service is named “Windows Time”.

Makinbacon

You can set your network to sync time with the domain and/or your server in group policy. You can set how often it will sync. Most Admins create separate OU’s for groups of PC or users. Set your servers to sync with an NTP service like time.windows.com or pool.ntp.org then set the PCs OU group policy to sync to the domain(Domain Controller) or the server if you use a workgroup. The method described here is much faster.

Tomten

I cannot do the changes.
I got the server to pull the time from europe.pool.ntp.org by using the GUI.
There is no domain included and I would like for the rest of the network to pull the time of the windows 2008r2 server as having the same time is even more important that correct time, imho.

Usually you can pull the time from a DC with sntp/ntp.

When I try to use w32time or regedit to change any values I get - access denied.
I do have admin rights.

Any ideas ?

//T

guillaume pelletier

Setting up the NTP server easilly thank’s to your explanation.
Our Azure Roles are now synchronized with this machine as secondary NTP server.
Thank’s

Siraj

I do not have internet in my network and there is NTP server running on Domain Controller. How should I configure the Windows Server 2008 R2 to sync time with NTP server.
Please help.

Ariel Gonzalez

How to configure a client ubuntu 10.04.2 with ntpdate, only ntpdate -d [IPSERVER]? for test, is compatible with w2k8 r2 vs ubuntu 10.04.02?

PLanders

This is actually a very great help. I was able to setup one of our servers with this procedure. From there I added the 004 option in our AD DHCP along with an OU policy. This also keeps our Digital Clocks that are POE to the correct time. We have a couple around the library.

reza

Thanks for great guide.

I wan to know, how many client can use this kind of NTP server that rub by W32time? is there any limitation for usage?

thanks in advanced

Gh

how I can setup win server 2008 to synch. with more than time server in local network , also make it synch. every 5 mints?

Satya

I need to configure NTP server with authentication like MD5 or SHA. Could you please guide me step by step configuration

Leave a comment

Your email address will not be published. Required fields are marked *

Loading...