Subscribe to Windows IT Pro
February 01, 1997 12:00 AM

Time Synchronization in an NT Network

Windows IT Pro
InstantDoc ID #522
Rating: (2)

2. With what time source is the time server synchronized?

If the time server to be configured is a master time server, you must select in timeserv.ini a standard time source such as NIST or USNO. If you use an Internet link to access NIST or USNO, you must check whether the source is blocked by a firewall. Try to PING tick.usno.navy.mil or Telnet 132.163.135.130.13. One or both should respond if you have proper Internet access via TCP/IP. If you use a modem to dial the source, you must choose the COM port of the modem, the modem speed, the modem command string, and the source's telephone number. Callout A in Listing 1 shows the steps for calling a time source using a modem. If you use an NTP time server, you need to know its host name or its IP address.

If the time server is a primary time server, you need to know the NT computer name of the master time server and of any other time servers. You enter these names in a source list in timeserv.ini. You can randomly choose the time server that the primary time server synchronizes with, or you can choose by top-down order from the source list. The PrimarySource= statement at A in Listing 2 illustrates the setting for a primary server to obtain the time from a master time server. This primary server can get the time from a master server or from another primary server. The RandomPrimary= statement at C in Listing 2 shows the setting for choosing a time source randomly from a source list of servers.

If the time server is a secondary time server, you need to know whether it obtains time from the same domain or a different, secondary domain. The SecondaryDomain= statement at A in Listing 3 shows a time source in a secondary domain.

3. How often do you want the time server to request the time?

By default, a master time server using a modem requests time once a day between 6:00 am and 6:30 am (to get a low phone rate). A time server using a network link checks every 8 to 12 hours. You can easily change this setting to many times daily by increasing the synchronization frequency in timeserv.ini.

For instance, if you want your time server to obtain time every hour, you can set the configuration Period=24 in timeserv.ini. The Period= statement in listings 1, 2, and 3 show example settings for synchronization frequency.

4. Is the time server a time source?

As defined earlier, a time source is a time server in a domain that responds to time requests from a secondary time server or a client workstation searching for network time from the domain. Configure a primary time server as a time source, as shown in the Timesource= statement at B in Listing 2. The servers in listings 1 and 3 are not time sources.

5. Do you want to track time service events in the application log?

Even though the default is Off, turning the log on is a good idea, at least on the master time server and the primary time servers. An On setting lets you track time service events in the application log of Events Viewer. With the log turned on, as it is in the Log= statement in all three listings, you can monitor whether the time service is working as you want it to. Also, you can add this event to a monitoring system to automatically notify you of problems that arise.

6. Do you want the TimeAdjustment API to disable CMOS synchronization?

By default, NT regularly synchronizes the OS time to the CMOS Request to Send (RTS) when the OS time differs from the CMOS time by more than one minute. The result can be a maximum 0.45 second time drift daily if you use the default period (Period=0) in timeserv.ini. Usually, the clock in a time server will be more precise and stable when you disable the OS synchronization feature by using Tasync=no in timeserv.ini, because the NT time service obtains accurate network time for the server. Leave the default as Tasync=no unless you find time drifting more with timeserv than before. The last line in each listing shows the OS synchronization feature disabled. For more detailed information, read the Microsoft document timeserv.wri on the Microsoft Windows NT Resource Kit CD-ROM.

Installation
Installing TimeServ is straightforward. Before you take the following steps to install it on an NT machine, check timeserv.exe, timeserv.dll, and timeserv.ini from the Microsoft Windows NT Resource Kit CD-ROM and verify that you have administrative privileges on the time server.

Copy files timeserv.exe and timeserv.dll to %systemroot%\system32 in the winnt directory, and copy file timeserv.ini to %systemroot%. Edit timeserv.ini for the time server as discussed in "Configuring a Time Server."

Run timeserv -automatic or timeserv -manual, depending on whether you want to start the time service automatically or manually the next time the server starts. If the time server is a time source (i.e., Timesource=yes in timeserv.ini), reboot the server so that the time source takes effect. Otherwise, use the command NET START TIMESERV to start the time service, or start it in the Services utility in the Control Panel.

You sometimes need to modify timeserv.ini after the time service has started. You must stop the time service, edit the file, execute timeserv -update, and restart the time service.

For a large network, Systems Management Server (SMS) lets you install the time service for each time server using Microsoft SMS. If you do not have SMS, you can use NT Scheduler to install the time service on a remote time server from your NT workstation. The Microsoft Windows NT Resource Kit CD-ROM provides a Windows-based scheduler, WINAT.EXE. You will find using WINAT.EXE much easier than the command-line version AT.EXE. For workstations, you can simply add your NET TIME commands to the domain logon script and synchronize your workstation to a domain or a computer, as described in "Microsoft Network Time Command."

In Sync with Success
Microsoft's time service, TimeServ, and network time command, NET TIME, are very useful for time synchronization in an NT network. Applying these two time utilities to your NT network will keep your servers and workstations synchronized to the standard time to enhance your success in systems management and mission-critical business applications. Microsoft time utilities can scale from a small LAN with a single domain to a large WAN with multiple domains across time zones.

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    7 years ago
    Mar 25, 2005

    One of the pitfalls of NET TIME is that it does wierd things on an NT network if the 'time server' is not available. We tried this method, and it worked well until a hub went out. Then, the computers on the rest of our network was set back to 1900...we had set up a script to adjust the time automatically.
    We can't use the time service since we are on our own net and have no access (for security reasons) to either the internet or the web. So....then what?

  • Anonymous User
    7 years ago
    Mar 18, 2005

    It seems that you must use a domain account if you want to synchronize from a PDC ? Did you experienced that because using a local account doesn't work for me

  • Anonymous User
    8 years ago
    Nov 01, 2004

    If group policy is not available, you can look into NTRIGHTS (I think its part of the NT reskit), to remotely change the workstation user rights (i.e. grant time rights). There should also be a version that works for 2k.

    Once users have the appropriate perms, a simple net time command in their login script should solve sync probs.

  • dave mascall
    8 years ago
    May 19, 2004

    Grace - XP / 2k both need user rights amended for users to sync time. Try gpedit.msc & drill through from there

  • Grace Oniyama
    8 years ago
    Mar 09, 2004

    This is great, but i have a problem with net time on users with out domain admin right, however it works perfectly well for users with domain admin right, user a windows nt server and windows 200 professional workstations

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.