Monitoring and Maintaining Time Synchronization

Time synchronization is very important to Novell Directory Services. All servers in a tree must be synchronized to the same time source. If they are not, collision will occur when objects are being synchronized in replicas.


Determining Time Synchronization Status


Prerequisites


Procedure

  1. At the server console prompt, load the module by typing

    LOAD DSREPAIR <Enter>

    If you have placed DSREPAIR in a directory other than SYS:SYSTEM, you must enter the full path to the utility.

    Once DSREPAIR is loaded, the Novell Directory database is locked so that information can't be accessed or updated until the operation is completed.

  2. Choose Time Synchronization.

    The Collecting Time Synchronization and Server Status screen appears. A window is available to observe the operations in process.

    Following the operation, the DSREPAIR log is displayed within a full text editor. You can annotate or modify the DSREPAIR log if you want to.

    The DSREPAIR log contains the following:

    Field Indicates

    Server Name

    All of the server names known to the local copy of the Directory database files. If this server contains a replica of the [Root] partition, then this list contains all the servers in the tree.

    Version

    The version of DS.NLM running on the server.

    Replica Depth

    The replica depth field reports -1 if no replicas are stored on the server or 0 if the server contains a replica of the [Root] partition. A positive integer indicates how many objects deep from the [Root] the first replica is on that server.

    Time Source

    The time server type. This information helps you determine if time synchronization for all the trees in the server is configured properly.

    All servers in a tree must be using the same time source.

    For example, if there are two Single time servers, then you know that all servers in the tree cannot be polling the same time source and that there is a configuration problem.

    Time in Sync

    The local time synchronization status on each server. This status should be Yes. If the status is No, then the server is not able to contact its time source.

    Time +/-

    The difference in time between the local server and the selected server in the list. All servers should be within one second of each other; if they are not, they have not been configured properly.

    This field reports up to 999 minutes and 59 seconds (which is approximately 16 hours and 30 minutes) in the form minutes:seconds. If the time difference is greater than 16 hours and 30 minutes, then the maximum value is displayed as: -999:59.

    If the difference in time is more than a few minutes, it might indicate that the servers are using different time source servers.

IMPORTANT:  Use the DSREPAIR Time Synchronization option before or after performing a repair. This option allows you to contact all servers within this server's local database to request information about Novell Directory Services (NDS) and time synchronization. If a replica of the [Root] partition is contained on this server, then all servers in the Directory tree are contacted.


Ensuring that the Server's DOS Clock Is Accurate

To ensure that the correct date and time is used when running patches that update SERVER.EXE, make sure that the DOS clock is set correctly.

If the time and date are incorrect, version control problems might arise.

Bring down the server and set the correct date and time in DOS. Booting the server sets the DOS clock to match the CMOS clock on the server.


Setting Time in NetWare 4

To change the time on NetWare 4 servers, use the TIME command at the server console.

Then use the TIMESYNC command to verify that time synchronization is correct. When using the TIME command, you should receive the following message:

TIME IS SYNCHRONIZED

If you receive the following message, determine why the time is not synchronized and resolve the problem:

TIME IS NOT SYNCHRONIZED

Time synchronization errors occur when

To verify which of these conditions exists use the following procedure.

  1. Type TIME at the console, and check the response to see if the time is correct.

    If the time is only minutes out of synchronization, TIMESYNC will soon synchronize the time. However, if the time difference is hours or days, go to ***If the time difference between servers is too great for automatic synchronization, then bring down the server using the DOWN command and exit to DOS. Then use the DOS TIME command to correct the DOS clock.

  2. If the time difference between servers is too great for automatic synchronization, then bring down the server using the DOWN command and exit to DOS. Then use the DOS TIME command to correct the DOS clock.

    Cold boot the server and make sure that the hardware clock is maintaining the correct time.

    WARNING:  Do not correct the server's time at the server console or while NetWare is running.

    Restart the NetWare 4 operating system. At the server console, type SET TIMESYNC DEBUG = 7. TIMESYNC then displays its messages on the server console.

    If the server is a Secondary time server, the messages will show it contacting a Primary server and calculating the time offset.

    If the server is a Primary or a Reference server, the message shows the name of the server it is contacting, along with a polling weight.

    The polling weight should be 1 for other contacted Primary servers and 16 for Reference servers. A polling weight of 0 indicates a communication failure.

    Check to see that the other contacted server is communicating. If it is, make sure that the routers are not restricting the TIMESYNC SAP.

    If the server is a Primary or Reference server, it must vote successfully with at least one other Primary server.

    Otherwise, if no vote is observed, the server is probably a Single Reference server.

    Use the TIMESYNC TYPE command at the server console to determine which type of time server it is.

Other causes of time synchronization errors are:


Maintaining Network Time Synchronization

Time synchronization ensures that all servers in a Directory tree report the same time and order Novell Directory Services events correctly.

NetWare 4 uses the TIMESYNC NLM, which automatically loads when the server is booted, to control time synchronization. The TIMESYNC.CFG file in SYS:SYSTEM can contain parameters for the TIMESYNC NLM, if the default settings are not adequate.

To change the time synchronization configuration on a NetWare server, use the EDIT server utility to modify the parameters in the TIMESYNC.CFG file, and then reboot the server.

IMPORTANT:  Do not put SET time synchronization parameters in the STARTUP.NCF file, because the TIMESYNC.CFG file is read after the STARTUP.NCF file.


SET Parameters for TIMESYNC

Table 24 shows the SET parameters used to configure time synchronization. The defaults are appropriate for most small networks. For large network TIMESYNC considerations, see Configuring Time Synchronization for Large Networks.


Table 24. Time Synchronization SET Parameters

SET parameter and default Recommended usage

TIMESYNC ADD Time Source

Default: None

Instead of using this parameter, use EDIT to add a time server to the time source list in the TIMESYNC.CFG file.

TIMESYNC Configuration File

Default: SYS:SYSTEM

Use this parameter to specify the file path if the TIMESYNC.CFG file is not located in SYS:SYSTEM.

TIMESYNC Configured Sources

Default: OFF

Set this parameter ON if you are using a custom-configured list of time sources.

TIMESYNC Directory Tree Mode

Default: ON

Setting this parameter OFF allows SAP packets from other Directory trees to influence time synchronization on this server's Directory tree.

TIMESYNC Hardware Clock

Default: ON

Set this parameter OFF only if this server uses an external time source (such as a radio clock). All servers in the same tree should have the same setting for this parameter.

TIMESYNC Polling Count

Default: 3 (time packets)

Do not increase this setting. Doing so adds unnecessary traffic to the network.

TIMESYNC Polling Interval

Default: 600 (seconds)

Decrease this setting if you need to poll time servers more often than every 10 minutes. All servers in the same tree should have the same setting for this parameter.

TIMESYNC REMOVE Time Source

Default: None

Instead of using this parameter, use EDIT to remove a time server to the time source list in the TIMESYNC.CFG file.

TIMESYNC RESET

Default: OFF

Instead of using this parameter, use EDIT to reset values in the TIMESYNC.CFG file and to remove the list of time sources.

TIMESYNC Restart Flag

Default: OFF

Set this parameter ON only if you want to reload the TIMESYNC NLM (because you edited TIMESYNC.CFG) without rebooting the server.

TIMESYNC Service Advertising

Default: ON

Set this parameter OFF if you are using a custom-configured list of time sources.

TIMESYNC Synchronization Radius

Default: 2000 (milliseconds)

Increase this parameter to allow a wider margin of error for time synchronization between servers. If you decrease the radius too much (below 1,000), some time servers may never achieve synchronization.

TIMESYNC Time Adjustment

Default: None

Use this parameter sparingly to correct network-wide time errors, or you may corrupt time synchronization and the order of events on your network.

TIMESYNC Time Source

Default: None

Instead of using this parameter, use EDIT to add a time server to time source list in the TIMESYNC.CFG file or display the time source list.

TIMESYNC Type

Default: Secondary

Instead of using this parameter, use EDIT to change the default time server type in the TIMESYNC.CFG file.

TIMESYNC Write Parameters

Default: OFF

Instead of using this parameter, use EDIT to change the settings in the TIMESYNC.CFG file.

TIMESYNC Write Value

Default: None

Instead of using this parameter, use EDIT to modify the TIMESYNC.CFG file.


Editing the TIMESYNC.CFG File

Time synchronization parameters are stored in their own configuration file, by default the TIMESYNC.CFG file in the SYS:SYSTEM directory.

To change the time synchronization configuration on a NetWare server, modify the parameters in the TIMESYNC.CFG file, and then reboot the server or use SET to turn ON the TIMESYNC Restart Flag parameter.

NOTE:  You can use SET or SERVMAN to change the TIMESYNC parameters; however, unless you also edit the TIMESYNC.CFG file, changes made in SET or SERVMAN will be lost the next time the server boots.


Prerequisites


Procedure
  1. At the server console prompt, type

    LOAD EDIT <Enter>

    You are prompted to enter the file to edit.

  2. At the prompt, type

    SYS:SYSTEM\TIMESYNC.CFG <Enter>

    The current TIMESYNC.CFG file appears.

  3. Use the arrow keys to move the cursor to the lines you need to edit.

  4. Modify the settings for the TIMESYNC parameters you want to change.

  5. To save your edits, press <Esc>.

    A confirmation prompt appears.

  6. To save the TIMESYNC.CFG file, choose Yes.

  7. To exit EDIT, press <Esc>.

HINT:  If you have several parameters in your TIMESYNC.CFG file, you may want to copy the file from server to server. Be sure that each copied TIMESYNC.CFG file contains the correct default time server type and configured-sources list for the server it configures.


Creating a Custom Time Source Configuration

Time servers use one of two methods to find each other on the internetwork: SAP (Service Advertising Protocol) and custom time source configuration.


SAP Method

By default, Primary, Reference, and Single Reference time servers use SAP to announce their presence on the network. Secondary time servers do not advertise, but they do listen to SAP information to find the nearest time source.

The SAP method allows for quick installation without regard to the network layout. It also allows automatic reconfiguration if new servers are added to the network.


Custom Time Source Method

The custom time source method lists specific, authorized time servers that each server contacts to determine network time. In a custom time configuration, servers do not listen for SAP information from other time servers, and they do not advertise with SAP.

A configured-sources list resides in the TIMESYNC.CFG file of each time server on the internetwork. The order of the server names in the list is the polling order the server follows to get the correct time.

The custom configuration method requires careful planning before NetWare installation, but it gives the network supervisor complete control of the time synchronization environment.

In most circumstances, you can use the default SAP method and do not need to create a custom time source configuration. However, you may need a custom configuration if

Use this procedure to create a custom time source configuration. These steps must be repeated for each time server on your network.


Prerequisites


Procedure
  1. At the server console prompt, type

    LOAD EDIT <Enter>

    You are prompted to enter the file to edit.

  2. At the prompt, type

    SYS:SYSTEM\TIMESYNC.CFG <Enter>

    The current TIMESYNC.CFG file appears.

  3. Add the following parameters to the TIMESYNC.CFG file:

    Type = x

    Service Advertising = OFF

    Configured Sources = ON

    Replace x with this server's time server type (Reference, Single Reference, Primary, or Secondary).

  4. Add the list of time sources for this server as follows:

    Time Source = x

    Time Source = y

    Time Source = z

    Replace x with the name of the first time server this server should contact (probably a Reference server or the nearest Primary time server). Replace y and z with the name of the other time servers this server should contact, in order of importance.

    NOTE:  The order of the time servers in the time source list determines their priority when advertising network time.

  5. To save your edits, press <Esc>.

    A confirmation prompt appears.

  6. To save the TIMESYNC.CFG file, choose Yes.

  7. To exit EDIT, press <Esc>.

    HINT:  If you have several parameters in your TIMESYNC.CFG file, you may want to copy the file from server to server. Be sure that each copied TIMESYNC.CFG file contains the correct default time server type and time source list for the server it configures.

For more information about See

SAP

Service Advertising Protocol in Concepts

Time server types

Planning the Time Synchronization Strategy in Guide to NetWare 4 Networks

Time synchronization

Time synchronization in Concepts


Adjusting a Fast or Slow Reference Time Server

If your Reference time server is inaccurate by several minutes, all other time servers in your network will also be inaccurate.

To correct the time on the Reference server (and therefore, network-wide), type the following SET command at the Reference server's console:

SET TIMESYNC Time Adjustment=[+|-] hour:minute:second at month/day/year hour:minute:second [AM|PM] <Enter>

For example, if your Reference Server is 10 minutes fast and you want to adjust the time at 2:00 a.m. on May 1, 1996, you would type

SET TIMESYNC Time Adjustment=-00:10:00 at 5/1/96 2:00:00 AM <Enter>

IMPORTANT:  Adjusting network time affects the order of Novell Directory Services events. It is best to schedule time adjustments during low-usage periods, such as late evening or early morning.

To cancel a time adjustment, type the following SET command at the Reference Server's console:

SET TIMESYNC Time Adjustment = cancel <Enter>

IMPORTANT:  The cancel command must be issued before the scheduled time adjustment and at the same server where the original time adjustment was set, or it will not cancel the time adjustment.


Configuring Time Synchronization for Large Networks

Some of the default settings for TIMESYNC are not suitable for large networks. This section explains time synchronization considerations for configuring large installations.


Time Providers and Time Consumers

Time synchronization servers are either time providers or time consumers. Secondary servers are time consumers. Single Reference, Reference, and Primary servers are time providers.

Reference and Primary servers must be able to exchange information with another time provider in order to synchronize. A Reference or Primary server cannot claim to be synchronized if it is the only time provider on the network, because it requires at least one other time provider to synchronize with.

The Single Reference server is, as its name implies, a special type of Reference server that does not need another time provider in order to synchronize.

Secondary servers (time consumers) require at least one time provider.


Time Synchronization and the Directory Tree

Although time synchronization and Novell Directory Services are independent features of NetWare 4, time synchronization can be configured to follow the Directory tree structure.

The default NetWare 4 installation makes the [Root] server in a Directory tree a Single Reference time server and all other servers in the tree Secondary time servers.

The default time synchronization parameter, SET TIMESYNC Directory Tree Mode = ON, recognizes the Directory tree structure and only synchronizes time within that tree.

In a large installation with more than one Directory tree, the network supervisor can change the defaults to configure time synchronization across Directory trees.

The default does not require custom time synchronization parameters during installation. However, the default relies on a Single Reference server, thus permitting only a single point of failure and increasing network traffic at that server.

In addition, the default installation relies on Service Advertising Protocol (SAP) packets to identify the time providers.

On a large network, relying on SAP is not only inefficient, butt can also lead to errors, especially if it is common for test servers (which may be misconfigured) to come and go on the network.

The custom time source method described under Custom Time Source Method is recommended for large networks because it does not rely on SAP.

The time synchronization algorithm always attempts to contact explicitly named time sources before listening to SAP. This makes it possible to synchronize across Directory trees, because the Directory Tree Mode only applies to SAP packets.

Network supervisors with custom-configured time sources may choose to eliminate the use of SAP entirely.


Using an .NCF File to Configure Multiple Time Servers

One easy way to configure several servers is to create a custom .NCF file containing the SET parameters required to configure time sources.

Using the custom .NCF file avoids repetitive typing at each server console. Include the SET TIMESYNC Write Parameters = ON parameter in the custom .NCF file to save the time source parameters to each server's TIMESYNC.CFG file.

Most servers will have identical TIMESYNC configuration parameters with the exception of the time source list, where the first entry in the list likely varies from server to server.

To change the first server in the time source list, edit the TIMESYNC.CFG file or issue the SET TIMESYNC Time Source parameter from the server console before saving the configuration parameters.


Avoiding SET TIMESYNC Parameter Inconsistencies

Several of the SET TIMESYNC parameters interact with each other. Because these parameters are set on each server, it is important to configure the entire network consistently.

Understanding the relationship of the parameters described here can help avoid time synchronization problems on large networks.


SET TIMESYNC Service Advertising = ON/OFF

When ON, time providers advertise using SAP. This parameter has no effect on time consumers (Secondary time servers). When OFF, time providers do not advertise.

We recommend all servers be configured the same (ON or OFF) in order for this parameter to be effective.


SET TIMESYNC Configured Sources = ON/OFF

When ON, time servers do not listen to SAP information. They listen only to the time providers in the configured sources list (initially read from the TIMESYNC.CFG file). When OFF, time servers listen for SAP information.


SET TIMESYNC Directory Tree Mode = ON/OFF

When ON, time providers do not advertise under the name of the host server. Instead, they advertise under the name of their Directory tree. When ON, servers listening for SAP packets will reject packets that are not from within their own tree.

When OFF, time providers advertise under their host server name, and listening servers will accept packets from any time provider.

This parameter also interacts with the SET TIMESYNC Service Advertising and the SET TIMESYNC Configured Sources parameters. Directory Tree Mode has no effect if Service Advertising is OFF and Configured Sources is ON.


SET TIMESYNC Time Source and SET TIMESYNC Add Time Source

These parameters identify a time provider by server name. When configured sources are listed in a server's TIMESYNC.CFG file, their time information is always used before any SAP information is considered.


SET Default Time Server Type

This parameter provides a method to override the default TIMESYNC type, which is Secondary, without using a TIMESYNC.CFG file.

However, when present, the SET TIMESYNC Type parameter always overrides the SET Default Time Server Type parameter.

If you use INSTALL to change the default type, it may have no effect if you have already created a TIMESYNC.CFG file with the overriding TIMESYNC Type parameter in it.


Example of Synchronizing Two Directory Trees

Suppose you have two Directory trees on your network and you want all the servers in both trees to synchronize to the same time.

You used the default installation, so the [Root] servers of each tree (ROOT1 and ROOT2) are Single Reference servers, Directory Tree Mode is ON, and Service Advertising is ON.

Each tree is synchronized within itself, but time between the trees differs by a few minutes. To synchronize both trees together, create a custom .NCF file containing the following commands and execute it on the respective servers:

Server ROOT1:

SET TIMESYNC Type = REFERENCE

SET TIMESYNC Time Source = ROOT2

SET TIMESYNC Write Value = 3

SET TIMESYNC Write Parameters = ON

Server ROOT2:

SET TIMESYNC Type = PRIMARY

SET TIMESYNC Time Source = ROOT1

SET TIMESYNC Write Value = 3

SET TIMESYNC Write Parameters = ON

The root servers of both trees will synchronize, which in turn will synchronize all of the other servers in both trees.

Since the roots are now both time providers, it is necessary to change the TIMESYNC Types from Single to Reference on Server ROOT1 and from Single to Primary on Server ROOT2.

Server ROOT1 is a Reference server so that there will be a central point for controlling time on the network.

The Write Parameters command causes the TIMESYNC.CFG file to be rewritten so the changes will be in place if the servers are rebooted.

HINT:  When you synchronize two Directory trees, you basically double the size of the time synchronization network. You should examine the physical layout of the network and add other Primary servers, or consider hand-configuring the time sources and eliminating the use of SAP.

For more information about See

Time server types

Planning the Time Synchronization Strategy in Guide to NetWare 4 Networks

Time synchronization

Time synchronization in Concepts

SAP

Service Advertising Protocol in Concepts



Previous | Next