Windows 7 as NTP Time Server

42,283

According to Microsoft, "the Windows Time service is not an exact implementation of the Network Time Protocol (NTP)." It works well enough as a time server for other Windows machines, but it should not be used as a time server for Linux clients with an expectation that time will be kept in sync precisely. The deficiencies of W32Time are laid out in Microsoft's KB939322 article:

We do not guarantee and we do not support the accuracy of the W32Time service between nodes on a network. The W32Time service is not a full-featured NTP solution that meets time-sensitive application needs. The W32Time service is primarily designed to do the following:

  • Make the Kerberos version 5 authentication protocol work.
  • Provide loose sync time for client computers.

Kerberos version 5 requires computers to be synchronized within 5 minutes -- a very low standard of accuracy! W32Time may get you within a few seconds most of the time, but Microsoft absolutely does not guarantee this level of performance.

The solution is to use a real NTP server, which is to say, use ntpd. Normally, your time server would be one of your Linux machines, but Windows ports of ntpd are available if needed.

Share:
42,283

Related videos on Youtube

Anatoly Rugalev
Author by

Anatoly Rugalev

Updated on September 18, 2022

Comments

  • Anatoly Rugalev
    Anatoly Rugalev almost 2 years

    Trying to get Windows 7 box to act as an NTP Time Server for linux clients

    From here:

    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. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\VMICTimeProvider\ In the right pane, right-click Enabled, and then click Modify In the Edit DWORD Value dialog box, type 0 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

    Turned off firewall on Win7 box.

    EDIT 2 - This is working

    enter image description here Using Meinberg NTPD

    EDIT

    enter image description here

    Just after I posted I noticed the service had stopped... still the time doesn't sync on the linux box

    enter image description here

    however looking at the traffic on Microsoft Network Monitor I see that port 123 is unreachable.

    Maybe I should try using NetTime? http://www.timesynctool.com/

  • Anatoly Rugalev
    Anatoly Rugalev about 12 years
    Thanks to you and ChrisS. I switched over to Meinberg's NTPd. thetimenow.com/cst/central_standard_time (edited) this helped to give exact time. As did setting my Win7 box to talk to localhost for its own clock (NTPd is talking to some authoritative NTP server).
  • ThatGraemeGuy
    ThatGraemeGuy about 12 years
    i.imgur.com/fm2ZU.png - here's a screenshot showing a linux box and a Windows box. We point all our linux boxen at our AD domain name (i.e. all DCs) for NTP. As you can see their time is pretty well synced. Can you elaborate on what the issues are with doing this? Just curious to know if I'm sitting on a ticking timebomb here. We've been doing this for 3+ years already.
  • Hecter
    Hecter about 12 years
    Added more detail above. Not a time bomb, but W32Time's minor inaccuracies can be very frustrating when comparing syslog/eventlog data for related events between different hosts on a Windows network.
  • ThatGraemeGuy
    ThatGraemeGuy about 12 years
    I'm still not seeing the need to point my linux boxes elsewhere. They're synced to within 1 second accuracy, where is the problem?
  • Hecter
    Hecter about 12 years
    @GraemeDonaldson In your case, the Bert Lance Rule may prevail.
  • Mr Heelis
    Mr Heelis over 7 years
    this is not an answer that relates to a time server, it's a time client answer.