Keeping everyoneâ€™s workstations on your network on or near the same time can be challenging. How accurately a particular device keeps the correct time dictates how often you need to update the time and the degree of error you must deal with. The Network Time Synchronization Project offers the Network Time Protocol (NTP) service as a tool to help keep your networkâ€™s workstations on as close to the same time as possible. This article will provide an overview of what NTP is, how to use it, and what youâ€™ll have to do to set it up on your network.
Understanding NTPâ€™s terminology
NTP has itâ€™s own set of terminology. The term â€œStratumâ€? refers to the particular time server location in the NTP hierarchy. A Stratum 1 NTP server is directly synchronized to the Universal Time Coordinate (UTC) through a modem connection, satellite, or radio. A Stratum 2 NTP server connects to a Stratum 1 system to obtain its time. A Stratum 3 NTP server connects to a Stratum 2 server. This relationship is an N-1 relationship. Ideally, youâ€™ll want to use the highest NTP server in the hierarchy that you can. If you connect to an NTP server thatâ€™s lower in the Stratum hierarchy, your chance of experiencing a time skew (or variance from the real time) increases. Also, your server may not have the most accurate time to give out to other servers and workstations on your network. If you provide the time service to at least 100 devices, you may qualify to be a Stratum 2 server.
A single receiver that picks up the time signal and converts it to a form usable by the NTP server could cost up to $10,000. However, you may not be in a location that receives consistent reception of the time station signal. WWV (the U.S. Government Bureau of Standardsâ€™ time station in Ft. Collins, CO) airs its time broadcasts at 5 MHz, 10 MHz, 15 MHz, 20 MHz and 25 MHz. Depending on the time of day and weather conditions, you may not be able to receive a good time signal. If this is the case, you may have to intermittently change your receiverâ€™s frequency to get a good signal.
Which NTP server should I use?
By searching available NTP information, youâ€™ll discover a list of devices that can provide you access to time signal services such as WWV and CHU (Canadaâ€™s equivalent to WWV).
Review the list of NTP servers to determine which you can use in your area (your time zone or your state) or the network youâ€™re on (e.g., NSFNET). Create a list that consists of at least one Stratum 1 and two Stratum 2 NTP servers. Use the PING command to determine which NTP server has the lowest round-trip time. Repeat this process several times a day for several days. This will help you identify a server that may reside on a path thatâ€™s congested or subject to heavy traffic loads, and may not be able to report accurate time to your site. Since the configuration of the Internet is constantly changing, you should repeat this process periodically. The NTP server thatâ€™s slowest today could be a better time source in the future.
Connecting to your NTP server
In addition to using a special radio to hear the time signals broadcast on shortwave radio, you have two other options for receiving time signals. You can either use a modem or a network connection to the Internet. The main difference between the two is how much latency in the time signal youâ€™re willing to tolerate. In some cases, the modem may be more accurate than the network connection since you may dial directly into the time server. The downside to using a modem is that, depending on how often the modem needs to dial the time service and how much difficulty is encountered with modem synchronization problems, you may end up with a high phone bill. Unless you have a full-time Internet connection, or one that can be established as needed, the dial-up modem option may be your only choice.
The Internet connectivity choice may be easier to maintain since going to a new time source is as simple as entering the new DNS name or IP address and restarting the time service on your server. The disadvantage with this option is that you can expect a one-quarter to one-half second difference between the time on your server after it has been updated and what the real time actually is on the time source.
Configuring NetWare 5 for NTP
Before you configure NTP on your NetWare 5 server, you must first install the NetWare 5.0 Support Pack 2 on your server. The Support Pack will install the updated TIMESYNC.NLM file that supports NTP. Since this is the first version of Timesync to support NTP, youâ€™ll be limited to contacting the NTP servers by their IP addresses. Itâ€™s reasonable to assume that future versions of Timesync will include support for DNS.
To configure Timesync to reference NTP servers for time, type SET TIMESYNC TIME SOURCES=10.0.0.1:123 at the command prompt (replace the IP address shown here with the IP address of the NTP server that youâ€™re referencing). To reference multiple time sources, type a semicolon after each time serverâ€™s entry. Itâ€™s very important that you follow each time serverâ€™s IP address with a 123. This tells TIMESYNC.NLM which IP port to use to contact the particular time server you are working with.
This command will immediately set your serverâ€™s time sources. Like most set variables, this command will only last as long as your serverâ€™s running. If you restart your server, your changes will be lost. To avoid having to type the command in every time you restart your server, insert the command in your serverâ€™s AUTOEXEC.NCF file.
As with any major change to the time sync configuration, you may find that you have to unload and load TIMESYNC.NLM for it to acknowledge the use of NTP servers.
You can check the activity of the NTP servers by typing SET TIMESYNC DEBUG=7 at the file serverâ€™s command prompt. This will open a window on the server that shows the NTP activity as it occurs. The current TIMESYNC.NLM file shows attempts to contact the specified NTP servers at one-minute intervals. This isnâ€™t a configurable option. When you reference more than one NTP time source (which is recommended), youâ€™ll see the time difference (delta) from your servers for each NTP server referenced. After all the time servers have been contacted, a sum of the time deltas will be used to update your serverâ€™s clock. This window is also a useful reference when a particular time server is no longer online. A message is displayed when a time server doesnâ€™t respond. By periodically checking this screen, youâ€™ll know when you need to change to a new server for NTP time service. This screen is currently your only reference to know how the NTP service is running. By using the Time Synchronization feature in DSREPAIR.NLM, youâ€™ll continue to see only the NetWare time service being reportedâ€”not NTP. To disable the Timesync tracing, type SET TIMESYNC DEBUG = 0 and press [Enter].
Optimizing the NTP service
If you have only a single reference, or reference Timesync server on your network, it would be best to place the NTP referencing feature on these servers. This way, you wonâ€™t have to configure the NTP service on multiple servers. One feature that Novellâ€™s NTP service offers is the ability to reference multiple NTP servers simultaneouslyâ€”something that Windows NTâ€™s Timeserv feature canâ€™t do. In addition, once you have the NTP service up and running, you can have the Timeserv service on the Windows NT servers point to the NetWare server as their NTP source.
Using NTP as your time reference will go a long way in the battle against those servers whose clocks always seem to drift. Itâ€™s also much cheaper than purchasing your own atomic cesium clock or having to change frequencies periodically when using a shortwave radio to listen to the time broadcasts of WWV.
References for further information
You can find out more information about NTP by checking NTP resources on the Internet. Usenet carries the comp.protocols.time.ntp newsgroup, which contains a great deal of information about NTP. You can find a list of U.S.-based time servers by going to http://tycho.usno.navy.mil/ntp.html . If you want to find out information from the creator of NTP, you can go to his Web site at www.eecis.udel.edu/~mills/ntp.htm . Finally, you can read the following Internet RFCs about NTP: RFC 1503: Internet standard NTP
RFC 1119: Definition of NTP RFC 2030: Simple NTP You can find these RFCs by going to www.cis.ohio-state.edu/hypertext/information/rfc.html .
Ronald Nutteris a senior systems engineer in Lexington, KY. He's an MCSE, Novell Master CNE, and Compaq ASE. Ron has worked with networks ranging in size from single servers to multiserver/multi-OS setups, including NetWare, Windows NT, AS/400, 3090, and UNIX. He's also the help desk editor for Network World. You can reach Ron at email@example.com. (Because of the large volume of e-mail that he receives, it's impossible for him to respond to every message. However, he does read them all.)