Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2001

Keeping Time with Win2K


RSS
Subscribe to Windows IT Pro | See More Time Synchronization Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Thanks to Windows Time Service, Win2K's time synchronization is much better than NT's

Clocks and calendars have been an annoyance on PCs since PCs appeared on the scene. On computers that ran early versions of DOS, you needed to type the time and date every time you started the system. That requirement got old very quickly and led to one of the earliest market opportunities for PC add-ons: the battery-powered clock and calendar. In 1984, manufacturers started producing PC motherboards that had onboard clocks and calendars, and clock and calendar circuits have been built in to PCs ever since.

But those built-in circuits aren't very accurate. A survey of a few dozen PCs in any office would probably reveal that the time on some PCs' clocks might be more than an hour different from the time that other PCs' clocks show, and all the computers' clocks might differ from the actual time. So, PC designers looked for more accurate and centralized time sources.

Network servers are an obvious place to keep a central time source. For years, Novell NetWare servers have automatically synchronized the time on all client computers that logged on to the server, but Microsoft products haven't done anything like that—at least, not by default. If you know a few tricks (which I discuss later), you can make Windows NT workstations synchronize their clocks with an NT server's clock, but the technique isn't well known. Furthermore, you can't synchronize an NT workstation's time to a server's time without modifying the user's default rights on the workstation.

Modern Times
Windows 2000 fixes NT's lack of time synchronization by implementing a new built-in system called Windows Time Service. This system requires almost no administration. Workstations that run Win2K Professional and member servers that run some version of Win2K Server set their system time and date to a time and date that the domain controller (DC) that authenticates the workstation or member server provides. But the workstation or server doesn't synchronize its clock to the DC's clock only at authentication time; the workstation or server resynchronizes its clock approximately every 8 hours or whenever someone logs on.

For their part, the domain's DCs synchronize their time to one particular DC in the domain that uses the Flexible Single-Master Operation (FSMO, aka Operations Master) PDC emulator role. By default, the PDC emulator FSMO is the first DC that you install in a domain. But what does each domain's PDC emulator FSMO synchronize its time with? It synchronizes with the PDC emulator FSMO of the first domain that you created in the forest (i.e., the DC that acts as a PDC emulator FSMO in the forest root domain). That forest root machine thus acts as the master clock and calendar for your entire Active Directory (AD) forest. (For those who are wondering, yes, that master timekeeper does understand time zones.)

Your question now probably is, How do I keep the top-dog master-clock computer, the forest root's PDC emulator FSMO, in sync with time in the real world? The answer is that you type in the command

net time /setsntp:
<servername>

Net Time's /setsntp option reveals that the command uses the Simple Network Time Protocol (SNTP), a standard Internet protocol. (Internet Engineering Task Force—IETF—Request for Comments—RFC—2030, dated October 1996, defines SNTP.) You can point your forest root's PDC emulator FSMO to any SNTP time server on the Internet and force the FSMO to keep its time in lockstep with that time server. Many firewall products include a time server, so your FSMO might not need to leave your intranet to synchronize with the SNTP time server. But if you do need to adjust your firewall, you might find it helpful to know that SNTP uses UDP port 123.

Finding the Time
Where do you find an SNTP server? In the United States, the navy is the official national timekeeper and runs a set of time servers, including the aptly named tick.usno.navy.mil and tock.usno.navy .mil. In my experience, most ISPs' DNS servers also seem to be SNTP servers. So, if one of your ISP's DNS servers were named ns2.bigisp.com, you could type the command

net time /setsntp:ns2.bigisp.com

to cause your FSMO to sync with that DNS server.

The Microsoft documentation about the Net Time /setsntp command says that you can specify a list of servers in the command. And you can, but with a trick: Enclose the list in quotation marks, and separate server names with a space. For example, to tell your server to look for the time first at www.acme.com and then, if necessary, at www.apex.com, you'd type

net time /setsntp:"www.acme.com www.apex.com"

If you want to use an external time source, you might like to first check that a time server exists where you expect it to. The Microsoft documentation says that you need only type Net Time to see the time on your SNTP server, but that method hasn't worked for me. To actually see what Windows Time Service does on your system, you can use the W32tm command-line tool. But first, you need to type the command

net stop w32time

to stop Windows Time Service. You can then try out your time source by typing

w32tm -once

to set the time from the time source just once (W32tm's default is to update the time regularly). The command spits out about a page of cryptic output; when the command succeeds, one of the lines will read Recv'ed from server 48 Bytes.... When you're finished, don't forget to type

net start w32time

to restart the time service.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
Home Tech? Work Tech? Increasingly, It's Just Tech

Paul discusses how the consumer market is influencing business technology in ways that are unprecedented. ...

Xbox 360 Sales Hit 28 Million

Microsoft on Tuesday announced that sales of its Xbox 360 video game console hit 28 million units by the end of 2008, a year that the company described as the console's "biggest ever." Microsoft also made the dubious claim that it has "expanded the ...

On Eve of Macworld, Microsoft Again Highlights 'Apple Tax'

With the economy in freefall, Microsoft this week continued its discussion of the "Apple Tax," what it says are the additional costs associated with using the Mac platform instead of a Windows-based PC. According to the company, the severity of the Apple ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing