<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows Time Service : Registry Settings</title><link>http://blogs.msdn.com/w32time/archive/tags/Registry+Settings/default.aspx</link><description>Tags: Registry Settings</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Configuring a Standalone NtpServer</title><link>http://blogs.msdn.com/w32time/archive/2008/04/02/configuring-a-standalone-time-server.aspx</link><pubDate>Wed, 02 Apr 2008 20:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8351953</guid><dc:creator>Ryan Sizemore</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/w32time/comments/8351953.aspx</comments><wfw:commentRss>http://blogs.msdn.com/w32time/commentrss.aspx?PostID=8351953</wfw:commentRss><description>&lt;P&gt;Recently, I had a customer ask if they can use w32time as a time source for other computer &amp;amp; devices on their network. The Windows Time Service is fully capable of acting as a time source for anything that is NTPv3 compliant. Before we start firing up w32tm to configure the service, we will examine how the service operate to know if we need to do anything at all.&lt;/P&gt;
&lt;P&gt;For the purposes of this exercise, we can think of the time service as being composed of two parts: The 'client piece' and the 'server piece'. The client piece is responsible for locating another time source and keeping the local clock synchronized. When the 'client piece'&amp;nbsp;makes a request for a time sample, the sample that is returned will be used to improve the accuracy of the local clock, assuming that the sample passes all validation steps. The server is responsible for answering requests from other NTP clients. When another computer or device makes a request for a time sample, the 'server piece' will formulate a response based on the clock of the local computer, which is (hopefully) being made more accurate by the 'client piece'. The point here is to show that although the 'client piece' and the 'server piece' are encapsulated into the same service, they can be seen as two separate entires linked together by the clock on the local machine.&lt;/P&gt;
&lt;P mce_keep="true"&gt;By default, the 'server piece' is turned off, but in some cases the w32time service may already be configured to act as a time source (having the 'server piece' turned on). Specifically, &lt;U&gt;if the machine is acting as a domain controller&lt;/U&gt;, then the 'server piece' is already turned on. When a machine is promoted to a domain controller, part of the dcpromo process it to enable the 'server piece' time service. You can verify if the server is turned on by running the following command:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;w32tm /query /configuration&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Keep in mind that you will need to be elevated to run this command. When you execute this, you will get back a laundry list of configuration settings. We are specifically interested in the NtpServer section:&lt;/P&gt;
&lt;P mce_keep="true"&gt;NtpServer (Local)&lt;BR&gt;DllName: C:\Windows\system32\w32time.dll (Local)&lt;BR&gt;Enabled: 1 (Local)&lt;BR&gt;InputProvider: 0 (Local)&lt;BR&gt;AllowNonstandardModeCombinations: 1 (Local)&lt;/P&gt;
&lt;P mce_keep="true"&gt;The third line will specify whether or not the NtpServer (aka the 'server piece') is turned on. If Enabled is 1, then it's on. If you see that Enabled is 0, then it is off. If you aren't running Vista or Server 2008, you can query the registry directly:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;reg query HKLM\system\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;You should see an entry that looks something like the following:&lt;/P&gt;
&lt;P mce_keep="true"&gt;Enabled&amp;nbsp;&amp;nbsp;&amp;nbsp; REG_DWORD&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1&lt;/P&gt;
&lt;P mce_keep="true"&gt;As before, 1 is on, 0 is off. You can turn on the NtpServer at any time by running the following commands:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;reg add HKLM\system\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer /v Enabled /t REG_DWORD /d 0x1 /f&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;w32tm /config /update&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The first command will change the Enabled flag in the registry to 1 (turning on the NtpServer), then the second command will tell the w32time service that the configuration in the registry need to be re-read, to make the changes active. You can confirm that the NtpServer is in fact running by calling w32time again:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;w32tm /query /configuration&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;If you see enabled is 1, then you are good to go. If not, take a look at the registry using either regedit or the reg command to ensure that the change really made it into the registry.&lt;/P&gt;
&lt;P mce_keep="true"&gt;As usual, If you have specific thoughts or questions about this post, please feel free to leave a comment. For general questions about w32time, especially if you have problems with your w32time setup,&amp;nbsp;I encourage you to ask them on&amp;nbsp;&lt;A class="" href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17" mce_href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17"&gt;&lt;FONT color=#0065e2&gt;Directory Services&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;section of the &lt;A class="" href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17" mce_href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17"&gt;&lt;FONT color=#0065e2&gt;Microsoft Technet forums&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8351953" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/w32time/archive/tags/Registry+Settings/default.aspx">Registry Settings</category><category domain="http://blogs.msdn.com/w32time/archive/tags/Service+Interop/default.aspx">Service Interop</category></item><item><title>Configuring the Time Service: Max[Pos/Neg]PhaseCorrection </title><link>http://blogs.msdn.com/w32time/archive/2008/02/28/configuring-the-time-service-max-pos-neg-phasecorrection.aspx</link><pubDate>Fri, 29 Feb 2008 01:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7938282</guid><dc:creator>Ryan Sizemore</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/w32time/comments/7938282.aspx</comments><wfw:commentRss>http://blogs.msdn.com/w32time/commentrss.aspx?PostID=7938282</wfw:commentRss><description>&lt;P&gt;In the last few months of the Windows Server 2008 development, a good friend of mine was discussing a problem they have been seeing with customers. The problem, lovingly titled as the "Large Time Jump" issue involves a machine in the domain (usually the PDC) making a large jump in time, either forward or backwards. Regardless of the direction of the jump, the results are equally catastrophic.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How it all happens&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Lets look at how this can happen. Some of the causes are more likely than you think. Here is a quick list:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Hardware changes. It is quite common for a company to have a hardware failure for a DC, even the PDC. Assume a situation where the motherboard in the PDC fails.&amp;nbsp;After the hardware is all installed, the technician boots the machine back up. As hoped, the machine looks to be running just fine. However, the part that the manufacturer shipped out is considered an "after market" part, so the BIOS isn't configured correctly. By default, the BIOS date is set to the manufacture date of the motherboard - sometime in the past. Of course, when the technician gets the new part, he sees that everything &lt;EM&gt;looks&lt;/EM&gt; to be in order, but he neglects to notice that the date it wrong.&lt;/LI&gt;
&lt;LI&gt;Bad external time source. Sometimes, the time source that you are syncing the PDC with (such as a network device, like a high-end router) can get a wild hair and jump to an invalid time.&lt;/LI&gt;
&lt;LI&gt;Bad CMOS battery. Every once in a while, a BIOS battery in a computer will fails. After all, they don't last forever. If the PDC isn't configured to sync with an external time source, it will by default use its own internal clock, which is based on the BIOS clock. A computer cannot maintain it's time across a reboot, so it stores the current time in the BIOS. If the CMOS battery has failed, the time after the reboot will be incorrect.&lt;/LI&gt;
&lt;LI&gt;User error. It is not outside of the realm of possibility for someone to log onto the root PDC and change the clock. It sounds unlikely, but it is still possible.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Fixing the glitch&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The real problem here is that in a domain environment, domain controller &lt;EM&gt;completely and utterly trust&lt;/EM&gt; the time that they get from another DC. The root PDC is a special case, but it still counts.&lt;/P&gt;
&lt;P&gt;The solution is to do a "sanity check" on the time that any domain controller gets from anywhere. In this way, you are ensuring that if a domain controller gets out of whack, it will not spread that time to other DCs. This is done by setting the MaxPosPhaseCorrection and MaxNegPhaseCorrection values.&lt;/P&gt;
&lt;P&gt;MaxPosPhaseCorrection and MaxNegPhaseCorrection limit the allowable offset taken from a time sample. When any instance of w32time polls another machine for the time, it will determine the offset between the time source and itself. This value is known as the "Sample Offset". Before the samples is used by the time service, it will be compared to the phase correction limits. If the sample offset is greater than the phase correction limit, then sample will be thrown out and a "TOO BIG" event will be generated. The event contains all of the information about the time sample, including who sent it. The purpose of doing this is to isolate domain controllers in the network who get into a bad time state. In this way, the other DCs will log and error about the time samples being too big rather than blindly accepting it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Knowing your limits&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The next question is: What is an acceptable limit of phase correction? After much analysis and debate, we are advising a value of &lt;STRONG&gt;&lt;U&gt;48 hours&lt;/U&gt;&lt;/STRONG&gt;. If a domain controller receives a sample that says it is more than 48 hours off, either in the future or in the past, the domain controller will throw it out. However, every customer should evaluate their own situation to be sure.&lt;/P&gt;
&lt;P&gt;This is advised for both limits, both forward and backwards. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A packaged solution&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Here is an example of a registry entry that you can merge on-demand to apply a 48 hour limit to the phase correction:&lt;/P&gt;
&lt;P&gt;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config]&lt;BR&gt;"MaxNegPhaseCorrection"=dword:0002a300&lt;BR&gt;"MaxPosPhaseCorrection"=dword:0002a300&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;As usual, If you have specific thoughts or questions about this post, please feel free to leave a comment. For general questions about w32time, especially if you have problems with your w32time setup,&amp;nbsp;I encourage you to ask them on&amp;nbsp;&lt;A class="" href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17" mce_href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17"&gt;Directory Services&lt;/A&gt;&amp;nbsp;section of the &lt;A class="" href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17" mce_href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17"&gt;Microsoft Technet forums&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7938282" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/w32time/archive/tags/Registry+Settings/default.aspx">Registry Settings</category><category domain="http://blogs.msdn.com/w32time/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/w32time/archive/tags/Domain+Sync/default.aspx">Domain Sync</category></item><item><title>Configuring the Time Service: Enabling the Debug Log</title><link>http://blogs.msdn.com/w32time/archive/2008/02/28/configuring-the-time-service-enabling-the-debug-log.aspx</link><pubDate>Fri, 29 Feb 2008 00:38:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7937734</guid><dc:creator>Ryan Sizemore</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/w32time/comments/7937734.aspx</comments><wfw:commentRss>http://blogs.msdn.com/w32time/commentrss.aspx?PostID=7937734</wfw:commentRss><description>&lt;P&gt;The debug log is&amp;nbsp;a powerful tool in the W32Time bag of tricks when you need to figure out why something isn't working. The debug log tell you (for better or worse) what the Time Service is doing under the hood. Where it is connecting to, how long it is waiting between polls, etc.&lt;/P&gt;
&lt;P&gt;In Windows Vista/Server 2008, we added the /debug option to the w32tm.exe command. This is the quickest and easiest way to configure the time service, and should be used if possible. A secondary option (if you are running XP/W2k3) is to edit the settings in the registry. Both will have the same effect, but using the w32tm command will keep you from having to get your hands dirty with registry editing. We will take a look at the w32tm command first:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using the w32tm.exe command&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To enable the w32time debug logging:&lt;/P&gt;
&lt;P&gt;w32tm /debug /enable /file:C:\windows\temp\w32time.log /size:10000000 /entries:0-300&lt;/P&gt;
&lt;P&gt;The command uses the following options:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;/debug - This tells w32tm that you will be changing the debug log settings&lt;/LI&gt;
&lt;LI&gt;/enable - We are turning on the debug log (as opposed to turning it off)&lt;/LI&gt;
&lt;LI&gt;/file&amp;nbsp;- Here we are specifying the full path of where the log file will be created; in this case: "C:\windows\temp\w32time.log"&lt;/LI&gt;
&lt;LI&gt;/size: The maximum size of the log file, in bytes; in this case, it is 10 Mb. When the log is full, the w32time service will wrap to the top of the log file&lt;/LI&gt;
&lt;LI&gt;/entries: This field is a mask, where you can mask off certain types of entries. More about this later.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Turning off the debug log is just as easy:&lt;/P&gt;
&lt;P&gt;w32tm /debug /disable&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Using the registry&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In essence, the w32tm.exe command shown above does exactly what we are about to do here. The only real difference is that when you use w32tm, it handles the reloading of the config, which will actually apply the values found in the registry. Since we will now be making the changes ourselves, we will need to reload the config ourselves.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Note: If you just want a&amp;nbsp;quick&amp;nbsp;.reg file that you can modify and merge, skip to the bottom of this post.&amp;nbsp;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;To get started, fire up the Windows registry editor:&lt;/P&gt;
&lt;P&gt;Start -&amp;gt; Run -&amp;gt; Regedit.exe&lt;/P&gt;
&lt;P&gt;Next, browse to the w32time config key, where we keep all of the w32time configuration:&lt;/P&gt;
&lt;P mce_keep="true"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config&lt;/P&gt;
&lt;P mce_keep="true"&gt;Here, you will be creating the following three keys (if they do not exist):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;FileLogName (REG_SZ)&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;FileLogSize (REG_DWORD)&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;FileLogEntries (REG_SZ)&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;Once they are created, go ahead and add the values that you want. &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;FileLogName should point to the full path where you want to store the log file. C:\windows\temp is the preferred location. Just ensure that a service running as LOCAL_SYSTEM has write access to the directory. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;FileLogSize should be the maximum size of the log file, in bytes. Remember to convert to hex as needed 10Mb in hex would be 0x989680.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;FileLogEntries is a numerical mask of the entries that you want to have logged in the log file. Each number in the range 1 - 300 represents a particular logging entry, such as polling intervals, packets received, etc. For the sake of simplicity, you should enable all logging. This is really only useful if you need to track a particular entry over a long period of time, and you don't want all of the other logging to clobber your file. Using 0-300 will guarantee that everything possible will be logged.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;Once you apply the changes to the registry, you need to tell the w32time service that it needs to re-read the configuration information. To do this, you can use the following command:&lt;/P&gt;
&lt;P mce_keep="true"&gt;w32tm /config /update&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Example .reg file&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Here is an example .reg file you can modify to simplify the process:&lt;/P&gt;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config]&lt;BR&gt;"FileLogName"="C:\\windows\\temp\\w32time.log"&lt;BR&gt;"FileLogEntries"="0-300"&lt;BR&gt;"FileLogSize"=dword:00989680 
&lt;P mce_keep="true"&gt;As usual, If you have specific thoughts or questions about this post, please feel free to leave a comment. For general questions about w32time, especially if you have problems with your w32time setup,&amp;nbsp;I encourage you to ask them on&amp;nbsp;&lt;A class="" href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17" mce_href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17"&gt;Directory Services&lt;/A&gt;&amp;nbsp;section of the &lt;A class="" href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17" mce_href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17"&gt;Microsoft Technet forums&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7937734" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/w32time/archive/tags/Registry+Settings/default.aspx">Registry Settings</category></item><item><title>Configuring the Time Service: NtpServer and SpecialPollInterval</title><link>http://blogs.msdn.com/w32time/archive/2008/02/26/configuring-the-time-service-ntpserver-and-specialpollinterval.aspx</link><pubDate>Wed, 27 Feb 2008 02:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7911263</guid><dc:creator>Ryan Sizemore</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/w32time/comments/7911263.aspx</comments><wfw:commentRss>http://blogs.msdn.com/w32time/commentrss.aspx?PostID=7911263</wfw:commentRss><description>&lt;P&gt;One of the most talked about configuration options for W32Time has to be the list of time sources that W32Time connects to for synchronization. It is important to note that W32Time will only actively synchronize with one time source at a time, even though you are able to list more than one time source. The reason for this is simple: If your favorite time source goes down, it would be good to have a backup, or possibly a list of backups.&lt;/P&gt;
&lt;P&gt;W32Time configures the list of time sources through the following key:&lt;/P&gt;
&lt;P&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer&lt;/P&gt;
&lt;P&gt;The NtpServer key is a space-delimited list of time servers, either as DNS address or as IP addresses. Each server in the list can optionally have a set of flags, which are denoted as a hex value at the end of the address, separated by a comma. We will get to the flags in a moment. Here are a few examples of NtpServer values:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;time.windows.com,0x01&lt;/P&gt;
&lt;P&gt;time.windows.com,0x01&amp;nbsp;time.nist.gov,0x01&amp;nbsp;my.time.server.com,0x02&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In the&amp;nbsp;first example, we are specifying a time source of time.windows.com, with the 0x01 and 0x08 flags. In the&amp;nbsp;second example, we are specifying 3 time sources, each with a different set of flags (0x01 &amp;amp; 0x08;&amp;nbsp;0x01; 0x02 respectively).&lt;/P&gt;
&lt;P&gt;Now lets take a look at the flags. We have 4 possible flags:&lt;/P&gt;
&lt;DIV class=intro&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=0 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=listBullet vAlign=top class="listBullet"&gt;•&lt;/TD&gt;
&lt;TD class=listItem class="listItem"&gt;
&lt;P&gt;0x01 SpecialInterval&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=listBullet vAlign=top class="listBullet"&gt;•&lt;/TD&gt;
&lt;TD class=listItem class="listItem"&gt;
&lt;P&gt;0x02 UseAsFallbackOnly&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=listBullet vAlign=top class="listBullet"&gt;•&lt;/TD&gt;
&lt;TD class=listItem class="listItem"&gt;
&lt;P&gt;0x04 SymmatricActive&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=listBullet vAlign=top class="listBullet"&gt;•&lt;/TD&gt;
&lt;TD class=listItem class="listItem"&gt;
&lt;P&gt;0x08 Client&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;P class=intro&gt;For 99% of cases, we only care about the first two options, so that is where we will focus. If you use the SpecialInterval flag, then you need to also set the "SpecialPollInterval" key:&lt;/P&gt;
&lt;P class=intro&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\ &lt;BR&gt;NtpClient\SpecialPollInterval&lt;/P&gt;
&lt;P class=intro&gt;Normally, W32Time will poll (make a time request) on a floating interval, based on the quality of the time samples being returned by the time source. You can however specify a static interval that the time service will syncronize on. &lt;U&gt;This value is in seconds&lt;/U&gt;. For example, if you set a of 3600, the time service will syncronize every hour (60 minutes * 60 seconds).&lt;/P&gt;
&lt;P class=intro&gt;The second flag is the UseAsFallbackOnly option. Setting this flag will tell the time service that you want to try every other time server specified before trying this one.&lt;/P&gt;
&lt;P class=intro&gt;That wraps up this one. As usual, If you have specific thoughts or questions about this post, please feel free to leave a comment. For general questions about w32time, especially if you have problems with your w32time setup,&amp;nbsp;I encourage you to ask them on&amp;nbsp;&lt;A class="" href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17" mce_href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=571&amp;amp;SiteID=17"&gt;Directory Services&lt;/A&gt;&amp;nbsp;section of the &lt;A class="" href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17" mce_href="http://forums.microsoft.com/TechNet/default.aspx?SiteID=17"&gt;Microsoft Technet forums&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7911263" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/w32time/archive/tags/Registry+Settings/default.aspx">Registry Settings</category></item><item><title>What is Windows Time Service?</title><link>http://blogs.msdn.com/w32time/archive/2007/07/07/welcome.aspx</link><pubDate>Sun, 08 Jul 2007 05:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3756037</guid><dc:creator>Ryan Sizemore</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/w32time/comments/3756037.aspx</comments><wfw:commentRss>http://blogs.msdn.com/w32time/commentrss.aspx?PostID=3756037</wfw:commentRss><description>&lt;P&gt;Welcome to the Windows Time Service blog. This blog is here to answer some of the questions about the service and show off some of the useful features that it has. Every week, I will try to cover a new topic surrounding Windows Time Service (w32time for short). If anyone has any requests/suggestions for topics, please feel free to let me know. This blog is for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;So what is Windows Time Service?&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;In short, it is a Windows service that keeps your computer clock accurate. Of course, the "how" is much more interesting than the "why", but for the sake of being the initial post, I will start with why time service exists; and for that, we require a bit of history. &lt;EM&gt;NOTE:&lt;STRONG&gt; &lt;/STRONG&gt;Most of the information about the history of w32time comes from previous knowledge, which is not very extensive. If you find a mistake, please let me know.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;In the days of Windows NT 4.0 and prior, there actually wasn't &lt;A class="" href="ftp://ftp.rfc-editor.org/in-notes/rfc1305.txt" target=_blank mce_href="ftp://ftp.rfc-editor.org/in-notes/rfc1305.txt"&gt;NTP&lt;/A&gt; support, but rather &lt;A class="" title=SNTP href="ftp://ftp.rfc-editor.org/in-notes/rfc1769.txt" target=_blank mce_href="ftp://ftp.rfc-editor.org/in-notes/rfc1769.txt"&gt;SNTP&lt;/A&gt;. This was an initial version of the time service that focused on basic time synchronization&amp;nbsp;(I believe the service was called TimeServ). SNTP doesn't support most of the features of the full NTP protocol, which would be needed in future versions of Windows.&lt;/P&gt;
&lt;P&gt;Windows 2000 brought about a wealth of new features, including Kerberos authentication. As part of the &lt;A class="" href="ftp://ftp.rfc-editor.org/in-notes/rfc4120.txt" target=_blank mce_href="ftp://ftp.rfc-editor.org/in-notes/rfc4120.txt"&gt;Kerberos protocol&lt;/A&gt;&amp;nbsp;(section 1.6, 4th bullet of the RFC), computers using Kerberos authentication need to have clocks that are "loosely synchronized", which is defined as 5 minutes by default. To meet this need, SNTP was abandoned and w32time was born. From Windows 2003 though Vista/Windows Server 2008, w32time has been upgraded &amp;amp; retrofitted to support more features, differing environments, and basically meet whatever needs customers and other internal components have.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How does Windows Time Service work?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Well, without getting into some of the messy details, w32time communicates with other computers in your network to keep the time on your local computer accurate. The overreaching goal is to keep your local clock in step with a remote clock. In this way, w32time is &lt;EM&gt;synchronizing&lt;/EM&gt; your computer's clock to that of your time source. (Keep in mind that most of this information can also found in the NTP v3.0 RFC, which w32time is based on). This is done by sampling the time on a remote system (known as the &lt;EM&gt;time source&lt;/EM&gt;). The communication between a time client and a time source looks something like this: &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The time client makes a request for a timestamp at time &lt;EM&gt;t1&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;The time source receives the request a time &lt;EM&gt;t2&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;The time source sends back a response a time &lt;EM&gt;t3&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;The time client receives the response a time &lt;EM&gt;t4&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;This is the fundamental interaction between a time client and a&amp;nbsp;time source. The astute reader would first ask the following question: &lt;/P&gt;
&lt;P&gt;Well, if the 2 computers are not currently synchronized (which is the point of this communication in the first place), then how can those time values (&lt;EM&gt;t1 - t4&lt;/EM&gt;) be useful at all?&lt;/P&gt;
&lt;P&gt;This is a great question because it demonstrates the ingenious design of NTP to be &lt;EM&gt;computer independent&lt;/EM&gt;. Without making assumptions about the relationship of the time source and time client, we can make these initial observations:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;(&lt;EM&gt;t4&lt;/EM&gt; - &lt;EM&gt;t1&lt;/EM&gt;) is the total time that is took for the time source to send out a request and get back a response (transit time)&lt;/LI&gt;
&lt;LI&gt;(&lt;EM&gt;t3&lt;/EM&gt; - &lt;EM&gt;t2&lt;/EM&gt;) is the total time that the time source spent processing the request (processing time)&lt;/LI&gt;
&lt;LI&gt;((&lt;EM&gt;t4&lt;/EM&gt; - &lt;EM&gt;t1&lt;/EM&gt;) - (&lt;EM&gt;t3&lt;/EM&gt; - &lt;EM&gt;t2&lt;/EM&gt;)) is the total transit time of the request (transit time - processing time)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Using this,&amp;nbsp;we can make the following additional observation:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;((t2 - t1) + (t3 - t4)) / 2 is the clock offset between the&amp;nbsp;two computers&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;[EDIT: The above formula has been corrected. Thanks occulations]&lt;/P&gt;
&lt;P&gt;Now that&amp;nbsp;we have the clock offset, we can start to correct the clock on the local computer (the time client). Correcting the time on a computer can be done in two ways: &lt;EM&gt;skewing&lt;/EM&gt; and&amp;nbsp;&lt;EM&gt;setting&lt;/EM&gt;. If the time difference is small enough*, we can adjust the clock gradually over time. However, if the time difference is too large* (such as hours or days), it is better to simply set the local clock to the desired time.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;* The concept of "too large" or "too small" is relative. These values are adjustable in the registry so that you can control when w32time skews, sets or does nothing at all.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The relationship between w32time and local clock (yes, they are two distinct entities) is complicated and will be explained in a later post.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Time source selection&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Aside from how the service determines the time difference, the next most common question is: How does w32time choose a time source (known as a &lt;EM&gt;peer&lt;/EM&gt;)? The service can operate in one of two possible modes:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;NTP (as defined in the original RFC)&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;NT5DS (using domain lookup mechanisms)&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;The NTP mode is straight-forward: Try to sync with&amp;nbsp;the peer specified. If you can't, wait until you can. This is the mode that non-domain joined computers use. The DNS name or IP address of the peer can be changed in the registry, but it comes as 'time.windows.com' by default. Microsoft hosts its own NTP server, which is how your computer gets correct time "out of the box".&lt;/P&gt;
&lt;P mce_keep="true"&gt;Domain joined computers utilize the NT5DS mode. This mode uses netlogon API calls to find an eligible peer to sync with. Because domains can become both large and deep, and w32time needs to operate in an optimal fashion either way, there is a complex algorithm that is used to find a peer. I will be covering this later in a seperate post (since it is such a large and involved topic), but you can find a reasonable explaination at &lt;A class="" href="http://technet2.microsoft.com/WindowsServer/en/library/71e76587-28f4-4272-a3d7-7f44ca50c0181033.mspx?mfr=true" target=_blank mce_href="http://technet2.microsoft.com/WindowsServer/en/library/71e76587-28f4-4272-a3d7-7f44ca50c0181033.mspx?mfr=true"&gt;TechNet for Windows Server 2003&lt;/A&gt;. Here is the quick overview:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Computers sync with DCs, preferably&amp;nbsp;from their own site/domain&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;DC sync with local PDC, but will go out of site/domain if needed&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;PDCs sync with other PDC, but possible DCs higher up in the forest if needed&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;At the top of the forest (at the root domain), there needs to be either a local time source or a link to an external peer that provides reliable time data. Again, this really needs a long discussion to make proper sense, but in essence the domain needs to get its time data from somewhere. The w32time service is responsible for distributing the time throughout the domain, but it needs to go to another source to get the data to distribute in the first place.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;STRONG&gt;Wrap Up&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;This should give you a brief look at the Windows Time Service and how it works. If you have topic ideas, please let me know. I'm only one man, and this isn't the &lt;A class="" href="http://shellrevealed.com/default.aspx" target=_blank mce_href="http://shellrevealed.com/default.aspx"&gt;Shell Blog&lt;/A&gt;. I have a list (and it is growing) for future topics, but if the community feels that one or more issues are more important, I will do my best to cover them first. As I said in the beginning, this blog is for you.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3756037" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/w32time/archive/tags/Algorithm/default.aspx">Algorithm</category><category domain="http://blogs.msdn.com/w32time/archive/tags/Registry+Settings/default.aspx">Registry Settings</category></item></channel></rss>