How to Setup a Windows 2008 R2 SNTP/NTP Server
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:
-
Click Start, click Run, type regedit, and then click OK.
-
Locate and then click the following registry entry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\
-
In the right pane, right-click AnnounceFlags, and then click Modify.
-
In the Edit DWORD Value dialog box, under Value data, type 5, and then click OK.
-
Enable NTPServer.
-
Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\
-
In the right pane, right-click Enabled, and then click Modify.
-
In the Edit DWORD Value dialog box, type 1 under Value data, and then click OK.
-
-
Exit 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
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
Michel
Hi, why do you not just use the “net time /setsntp:servername” command to enter the new SNTP server?
Bye
Michel
EvilEmuofDoom
Worked beautifully! Thanks for the great post with quick and clear instructions.
verypsb
@Michel
Because this command isn’t available anymore in Windows 2008 R2?
verypsb
More info: How to configure an authoritative time server in Windows Server
http://support.microsoft.com/kb/816042
Steve
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
The time service is now synchronizing the system time with the time source time.windows.com,0x9 (ntp.m
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).
ahmad zia
ah
Abdullah
also work perfectly for windows 2003 server…
javad pourhosaini
tnx alot
worked correctly
for all windows and non-windows NTP clients
rb122756
Thanks Brian. Great instructions.
korvarn
thanks man, worked like a charm! :)
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?
Botsha
Worked perfest, Thanks.
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
Mun
Usually you need to add an exception in windows firewall on UDP port 123. By default it is closed.
Diego Romero
Great post Thanks!!!
ThankYou
Worked like a charm! thank you.
An Pham
It works! Thanks so much!
EJJ
Works like a champ. Thanks!
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
Lee Wonseung
Great Tips!!!
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
Vijay
Mr.Brian Chavez,
Thank you great article.
Dave
Thanks, this did the trick. It really is not very intuitive.
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.
h
greattttttttttttttttttt ;)
taha
thanks bro its working
thanks
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?
cisco guy
Awsome! this worked. Thanks
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
KSA
Thank you very much great work appreciated….. highly…
cherry
It worked perfectly….thank you!
Mohammed Zayan
Great tips
working very good
alex
great post
appreciate your work:)
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?
Mustafa
Thankssssssssssssssss
Satya
I need to configure NTP server with authentication like MD5 or SHA. Could you please guide me step by step configuration
Tom C
In my registry there is no W32Time Key.
Claver
Thanks a mil. your article is well written and understandable.
keep up the good work bro.
Claver
Far
I wanted to use MY DC as a source for NTP for my Cisco switches but it didn’t work, it connects but never do the validation. I read a Doc from Cisco that instead of w32tm I need to install NTP 4.x on the DC, any idead and info about that please?
the Cisco article is here:
www.cisco.com/…/108076-ntp-troubleshoot.html#wtm
User anonymous
Thanks a lot for your help…
Dusan
Excelent!!!
himanshu
Thanks alot
brian
Wow!…You should be writing the manuals.Thanks!!
mehdi
Thanks very good
Leave a comment
Your email address will not be published. Required fields are marked *