Microsoft KB Archive/314054

= How to configure an authoritative time server in Windows XP =

Article ID: 314054

Article Last Modified on 4/12/2006

-

APPLIES TO


 * Microsoft Windows XP Professional

-



This article was previously published under Q314054





For a Microsoft Windows 2000 version of this article, see 216734.



SUMMARY
'' This step-by-step article describes how to configure the Windows Time service in Windows XP to use an internal hardware clock and an external time source. This article also discusses reliable time source configuration, manually-specified synchronization, all available synchronization, and some of the key Windows Time service registry entries, such as the MaxNegPhaseCorrection and the MaxPosPhaseCorrection registry entries.''



Contents

 * INTRODUCTION
 * Configuring the Windows Time service to use an internal hardware clock
 * Configuring the Windows Time service to use an external time source
 * MORE INFORMATION
 * Reliable time source configuration
 * Manually-specified synchronization
 * All available synchronization mechanisms
 * Windows Time service registry entries
 * REFERENCES



INTRODUCTION
This step-by-step article describes how to configure the Windows Time service in Windows XP to use an internal hardware clock and an external time source.

We highly recommend that you configure the authoritative Time Server to gather the time from a hardware source. When you configure the authoritative Time Server to sync with an Internet time source, there is no authentication. We also recommend that you lower your time correction settings for your servers and for your stand-alone clients. These recommendations provide more accuracy and security to your domain.

This article contains troubleshooting tips for the most common problems and discusses reliable time source configuration, manually-specified synchronization, all available synchronization, and the MaxNegPhaseCorrection and MaxPosPhaseCorrection registry entries.

back to the top



Configuring Windows Time service to use an internal hardware clock
To configure the Windows Time service to use an internal hardware clock, you can change the announce flag on the authoritative time server. Changing the announce flag forces the computer to announce itself as a reliable time source and to use the built-in complementary metal oxide semiconductor (CMOS) clock. To configure the Windows Time service to use an internal hardware clock, follow these steps.

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.  Click Start, click Run, type regedit, and then click OK. Locate and then click the following registry entry:

 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. <ol style="list-style-type: lower-alpha;"> Locate and then click the following registry subkey:

</li> In the right pane, right-click Enabled, and then click Modify.</li> In the Edit DWORD Value dialog box, type 1 under Value data, and then click OK.</li></ol> </li> Exit Registry Editor.</li> At the command prompt, type the following command to restart the Windows Time service, and then press ENTER:

net stop w32time && net start w32time

</li> To reset the local computers' time against the time server, run the following command on all the computers except the time server:

w32tm /resync /rediscover

</li></ol>

Note You must not configure the time server to synchronize with itself. If you configure the time server to synchronize with itself, the following events are logged in the Application log: The time provider NtpClient cannot reach or is currently receiving invalid time data from 192.168.1.1 (ntp.m|0x0|192.168.1.1:123->192.168.1.1:123).

No response has been received from Manual peer 192.168.1.1 after 8 attempts to contact it. This peer will be discarded as a time source and NtpClient will attempt to discover a new peer from which to synchronize.

The time provider NtpClient is configured to acquire time from one or more time sources. However, none of the sources are currently accessible. No attempt to contact a source will be made for 960 minutes. NtpClient has no source of accurate time.

When the time server runs by using an internal time source, the following event is logged in the Application log: Time Provider NtpClient: This machine is configured to use the domain hierarchy to determine its time source, but it is the PDC emulator for the domain at the root of the forest, so there is no machine above it in the domain hierarchy to use as a time source. We recommend that you either configure a reliable time service in the root domain, or that you manually configure the PDC to synchronize with an external time source. Otherwise, this computer will function as the authoritative time source in the domain hierarchy. If an external time source is not configured or used for this computer, you may choose to disable the NtpClient.

This text notifies you that the time server is configured not to use an external time source and that the time server can be ignored.

For more information about the w32tm command, type the following command at a command prompt:

w32tm /?

back to the top

Configuring the Windows Time service to use an external time source
To configure the Windows Time service to synchronize with an external time source, follow these steps: <ol> Change the server type to NTP. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Click Start, click Run, type regedit, and then click OK.</li> Locate and then click the following registry subkey:

</li> In the right pane, right-click Type, and then click Modify.</li> In the Edit Value dialog box, under Value data, type NTP, and then click OK.</li></ol> </li> Set  to 5. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Locate and then click the following registry subkey:

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

</li> In the right pane, right-click AnnounceFlags, and then click Modify.</li> In the Edit DWORD Value dialog box, under Value data, type 5, and then click OK.</li></ol> </li> <li>Select the poll interval. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\

</li> <li>In the right pane, right-click SpecialPollInterval, and then click Modify.</li> <li>In the Edit DWORD Value dialog box, under Value data, type, and then click OK.

Note  is a placeholder for the number of seconds that you want between each poll. A recommended value is 900 Decimal. This value configures the time server to poll every 15 minutes.</li></ol> </li> <li>Enable NTPServer. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Locate and then click the following registry subkey:

</li> <li>In the right pane, right-click Enabled, and then click Modify.</li> <li>In the Edit DWORD Value dialog box, under Value data, type 1, and then click OK.</li></ol> </li> <li>Specify the time sources. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Locate and then click the following registry subkey:

</li> <li>In the right pane, right-click NtpServer, and then click Modify.</li> <li>In Edit Value, in the Value data box, type Peers, and then click OK.</li></ol> </li> <li>Configure the time correction settings. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Locate and then click the following registry subkey:

</li> <li>In the right pane, right-click MaxPosPhaseCorrection, and then click Modify.</li> <li>In the Edit DWORD Value dialog box, under Base, click Decimal.</li> <li>In the Edit DWORD Value dialog box, under Value data, type, and then click OK.

Note  is a placeholder for a reasonable value such as one hour (3600) or 30 minutes (1800). The value that you choose will depend on the poll interval, the network condition, and the external time source.</li> <li>Locate and then click the following registry subkey:

</li> <li>In the right pane, right-click MaxNegPhaseCorrection, and then click Modify.</li> <li>In the Edit DWORD Value dialog box, under Base, click Decimal.</li> <li>In the Edit DWORD Value dialog box, under Value data, type, and then click OK.

Note  is a placeholder for a reasonable value such as one hour (3600) or 30 minutes (1800). The value that you choose will depend on the poll interval, the network condition, and the external time source.</li></ol> </li> <li>Exit Registry Editor.</li> <li>At the command prompt, type the following command to restart the Windows Time service, and then press ENTER:

net stop w32time && net start w32time

</li> <li>Run the following command on computers other than the domain controller to reset each computer's time against the time server:

w32tm /resync /rediscover

</li></ol>

For more information about the w32tm command, type the following command at a command prompt:

w32tm /?

Note SNTP uses User Datagram Protocol (UDP) port 123. If this port is not open to the Internet, you cannot synchronize your server to Internet SNTP servers.

<div class="moreinformation_section">

Reliable time source configuration
A computer that is configured to be a reliable time source is identified as the root of the time service. The root of the time service is the authoritative server for the domain. Typically, the authoritative server is configured to retrieve time from an external NTP server or from a hardware device. A time server can be configured as a reliable time source to optimize how time is transferred throughout the domain hierarchy. If a domain controller is configured to be a reliable time source, Net Logon service announces that domain controller as a reliable time source when it logs on to the network. When other domain controllers look for a time source to synchronize with, they choose a reliable source first if one is available.

back to the top

Manually-specified synchronization
With manually-specified synchronization, you can designate a single peer or a list of peers that a computer obtains time from. If the computer is not a member of a domain, that computer must be manually configured to synchronize with a specified time source. By default, a computer that is a member of a domain is configured to synchronize from the domain hierarchy. Manually-specified synchronization is most useful for the forest root of the domain or for computers that are not joined to a domain. Manually specifying an external NTP server to synchronize with the authoritative computer for your domain provides reliable time. However, configuring the authoritative computer for your domain to synchronize with a hardware clock is actually a better solution for providing high accuracy and security to your domain.

Without a hardware time source, W32time is configured as an NTP type. You must reconfigure the  and the   registry entries. The recommended value should be 15 minutes or even less, depending on the time source, the network condition, and the security requirement. This is also true for any reliable time source that is configured as the forest root time source in the time sync subnet. More information about these registry entries may be found in the &quot;Windows Time service registry entries&quot; section later in this article.

Note Manually-specified time sources are not authenticated unless a specific time provider is written for them, and they are therefore vulnerable to attacks. Also, if a computer synchronizes with a manually-specified source instead of its authenticating domain controller, the two computers might be out of synchronization, and Kerberos authentication would therefore fail. Other actions that require network authentication, such as printing or file sharing, could also fail. If only the forest root is configured to synchronize with an external source, all other computers within the forest remain synchronized with each other, making replay attacks difficult.

back to the top

All available synchronization mechanisms
The &quot;all available synchronization mechanisms&quot; option is the most valuable synchronization method for users who are on a network. This method enables synchronization with the domain hierarchy and may also provide an alternative time source if the domain hierarchy becomes unavailable, depending on the configuration. If the client cannot synchronize time with the domain hierarchy, the time source automatically falls back to the time source that is specified by the NtpServer setting. This method of synchronization is most likely to provide accurate time to clients.

back to the top

Windows Time service registry entries
The following registry entries are located under

back to the top

<div class="references_section">