<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; I) [Netscape]"> <title>NTP on Windows NT</title> </head> <body> <h1> NTP 4.x for Windows NT</h1> <h2> Do not try to compile NTP-4.0.99i under WINNT, it will not work. Fixed NTP-4.0.99i; look for next release to be functional. Sven - May 11 2000 </h2> <h2> Download NTP-4.0.99g for the last stable WINNT port. I am working on adapting the major changes starting with 99i and getting things running again. Sven - April 25 2000 </h2> <h2> Introduction</h2> The NTP 4 distribution runs as service on (i386) Windows NT 4.0 and Windows 2000. The binaries work on dual processor systems. This port has not been tested on the Alpha platform. <p>Refer to System Requirements and Instructions for how to compile the program. <h2> Reference Clocks</h2> Refernce clock support under Windows NT is tricky because the IO functions are so much different. The following reference clocks are supported by Windows NT: <p><a href="../driver1.htm">Type 1</a> Undisciplined Local Clock (LOCAL) <br><a href="../driver29.htm">Type 29</a> Trimble Navigation Palisade GPS (GPS_PALISADE) <h2> Functions Supported</h2> All NTP functions are supported with some constraints. See the TODO list below. <h2> Accuracy</h2> Greg Brackley has implemented a fantastic interpolation scheme that improves the precision of the NTP clock using a realtime thread (is that poetic or what!) which captures a tick count from the 8253 counter after each OS tick. The count is used to interpolate the time between operating system ticks. <p>On a typical 200+ MHz system NTP achieves a precision of about 5 microseconds and synchronizes the clock to +/-500 microseconds using the <a href="http://www.trimble.com/products/ntp">Trimble Palisade</a> as UTC reference. This allows distributed applications to use the 10 milliseconds ticks available to them with high confidence. <h2> Binaries</h2> Recent InstallShield based executable versions of NTP for Windows NT (i386) are available from: <br><a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a> and <a href="http://www.five-ten-sg.com/">http://www.five-ten-sg.com/</a> <h2> ToDo</h2> <ul> <li> MD5 authentication causes problems with DNS. If you use encryption/authentication, you have to use IP numbers in <tt>ntp.conf.</tt></li> <li> NMEA refclock support is in development.</li> <li> See if precision can be improved by using CPU cycle counter for tick interpolation.</li> <li> Make precision time available to applications using NTP_GETTIME API</li> </ul> <h2> Compiling Requirements</h2> <ul> <li> <tt>Windows NT 4.0 or 5.0 (2000)</tt></li> <li> <tt>Microsoft Visual C++ 6.0</tt></li> <li> Some version of the archiving program <tt>ZIP</tt>.</li> </ul> <h2> Compiling Instructions</h2> <ol> <li> Unpack the NTP-4.x.tar.gz</li> <li> Open the .\ports\winnt\ntp.dsw Visual C workspace</li> <li> Batch build all projects</li> </ol> <h2> Configuration File</h2> The default NTP configuration file path is %SystemRoot%<tt>\system32\drivers\etc\. </tt>(%SystemRoot% is an environmental variable that can be determined by typing "set" at the "Command Prompt" or from the "System" icon in the "Control Panel"). <br>Refer to your system environment and <tt>c</tt>reate your<tt> ntp.conf</tt> file in the directory corresponding to your system installation. <br><tt>The older <WINDIR>\ntp.conf </tt>is still supported but you will get a log entry reporting that the first file wasn't found. <h2> Installation Instructions</h2> The <tt>instsrv</tt> program in the instsrv subdirectory of the distribution can be used to install 'ntpd' as a service and start automatically at boot time. Instsrv is automatically compiled with the rest of the distribution if you followed the steps above. <ol> <li> Start a command prompt and enter "instsrv.exe <pathname_for_ntpd.exe>"</li> <li> Clicking on the "Services" icon in the "Control Panel" will display the list of currently installed services in a dialog box. The NetworkTimeProtocol service should show up in this list. Select it in the list and hit the "Start" button in the dialog box. The NTP service should start.</li> <li> View the event log by clicking on the "Event Viewer" icon in the "Administrative Tools" group, there should be several successful startup messages from NTP. NTP will keep running and restart automatically when the machine is rebooted.</li> </ol> You can change the start mode (automatic/manual) and other startup parameters correponding to the NTP service (eg. location of conf file) also in the "Services" dialog box if you wish. <h2> Removing NTP</h2> You can also use <tt>instsrv</tt> to delete the NTP service by entering: "instsrv.exe remove" <h2> Command Line Parameters and Registry Entries</h2> Unlike the Unix environment, there is no clean way to run 'ntpdate' and reset the clock before starting 'ntpd' at boot time. <br>NTP will step the clock up to 1000 seconds by default. While there is no reason that the system clock should be that much off during bootup if 'ntpd' was running before, you may wish to override this default and/or pass other command line directives. <p>Use the registry editor to edit the value for the ntpd executable under LocalMachine\System\CurrentControlSet\Services\NTP. <p>Add the -g option to the ImagePath key, behind "%INSTALLDIR>\ntpd.exe". This will force NTP to accept large time errors (including 1.1.1980 00:00) <h2> Bug Reports</h2> Send bug reports to <a href="news://comp.protocols.time.ntp">news://comp.protocols.time.ntp</a> and Sven_Dietrich@Trimble.COM <h2> Change Log</h2> <h3> Last revision 16 February 1999 Version 4.0.99e.</h3> <b>by Sven Dietrich (sven_dietrich@trimble.com)</b> <p><b>Significant Changes:</b> <ul> <li> Perl 5 is no longer needed to compile NTP. The configuration script which creates version.c with the current date and time was modified by Frederick Czajka [w2k@austin.rr.com] so that Perl is no longer required.</li> </ul> <h3> Last revision 15 November 1999 Version 4.0.98f.</h3> <b>by Sven Dietrich (sven_dietrich@trimble.com)</b> <p><b>Significant Changes:</b> <ul> <li> Fixed I/O problem delaying packet responses which resulted in no-replys to NTPQ and others.</li> <li> The default configuration file path is <tt><WINDIR>\system32\drivers\etc\ntp.conf. The old <WINDIR>\ntp.conf </tt>is still supported but you will get a log entry reporting that the first file wasn't found. The NTP 3.x legacy <tt>ntp.ini</tt> file is no longer supported.</li> </ul> <b>Known Problems / TODO:</b> <ul> <li> MD5 and name resolution do not yet get along. If you define MD5, you cannot use DNS names, only IP numbers.</li> </ul> <h3> Last revision 27 July 1999 Version 4.0.95.</h3> This version compiles under WINNT with Visual C 6.0. <p>Greg Brackley and Sven Dietrich <p>Significant changes: <br>-Visual Studio v6.0 support <br>-Winsock 2.0 support <br>-Use of I/O completion ports for sockets and comm port I/O <br>-Removed the use of multimedia timers (from ntpd, others need removing) <br>-Use of waitable timers (with user mode APC) and performance counters to fake getting a better time <br>-Trimble Palisade NTP Reference Clock support <br>-General cleanup, prototyping of functions <br>-Moved receiver buffer code to a separate module (removed unused members from the recvbuff struct) <br>-Moved io signal code to a separate module <h3> Last revision: 20-Oct-1996</h3> This version corrects problems with building the XNTP <br>version 3.5-86 distribution under Windows NT. <p>The following files were modified: <br> blddbg.bat <br> bldrel.bat <br> include\ntp_machine.h <br> xntpd\ntp_unixclock.c <br> xntpd\ntp_refclock.c <br> scripts\wininstall\build.bat <br> scripts\wininstall\setup.rul <br> scripts\wininstall\readme.nt <br> scripts\wininstall\distrib\ntpog.wri <br> html\hints\winnt (this file) <p>In order to build the entire Windows NT distribution you <br>need to modify the file scripts\wininstall\build.bat <br>with the installation directory of the InstallShield <br>software. Then, simply type "bldrel" for non-debug <br>or "blddbg" for debug executables. <p>Greg Schueman <br> <schueman@acm.org> <h3> Last revision: 07-May-1996</h3> This set of changes fixes all known bugs, and it includes <br>several major enhancements. <p>Many changes have been made both to the build environment as <br>well as the code. There is no longer an ntp.mak file, instead <br>there is a buildntall.bat file that will build the entire <br>release in one shot. The batch file requires Perl. Perl <br>is easily available from the NT Resource Kit or on the Net. <p>The multiple interface support was adapted from Larry Kahn's <br>work on the BIND NT port. I have not been able to test it <br>adequately as I only have NT servers with one network <br>interfaces on which to test. <p>Enhancements: <br>* Event Logging now works correctly. <br>* Version numbers now work (requires Perl during build) <br>* Support for multiple network interface cards (untested) <br>* NTP.CONF now default, but supports ntp.ini if not found <br>* Installation procedure automated. <br>* All paths now allow environment variables such as %windir% <p>Bug fixes: <br>* INSTSRV replaced, works correctly <br>* Cleaned up many warnings <br>* Corrected use of an uninitialized variable in XNTPD <br>* Fixed ntpdate -b option <br>* Fixed ntpdate to accept names as well as IP addresses <br> (Winsock WSAStartup was called after a gethostbyname()) <br>* Fixed problem with "longjmp" in xntpdc/ntpdc.c that <br> caused a software exception on doing a Control-C in xntpdc. <br> A Cntrl-C now terminates the program. <p>See below for more detail: <p> Note: SIGINT is not supported for any Win32 application including <br> Windows NT and Windows 95. When a CTRL+C interrupt occurs, Win32 <br> operating systems generate a new thread to specifically handle that <br> interrupt. This can cause a single-thread application such as UNIX, <br> to become multithreaded, resulting in unexpected behavior. <br> <p>Possible enhancements and things left to do: <br>* Reference clock drivers for NT (at least Local Clock support) <br>* Control Panel Applet <br>* InstallShield based installation, like NT BIND has <br>* Integration with NT Performance Monitor <br>* SNMP integration <br>* Fully test multiple interface support <br> <p>Known problems: <br>* bug in ntptrace - if no Stratum 1 servers are available, <br> such as on an IntraNet, the application crashes. <h3> Last revision: 12-Apr-1995</h3> This NTPv3 distribution includes a sample configuration file and the project <br>makefiles for WindowsNT 3.5 platform using Microsoft Visual C++ 2.0 compiler. <br>Also included is a small routine to install the NTP daemon as a "service" <br>on a WindowsNT box. Besides xntpd, the utilities that have been ported are <br>ntpdate and xntpdc. The port to WindowsNT 3.5 has been tested using a Bancomm <br>TimeServe2000 GPS receiver clock that acts as a strata 1 NTP server with no <br>authentication (it has not been tested with any refclock drivers compiled in). <br>Following are the known flaws in this port: <br>1) currently, I do not know of a way in NT to get information about multiple <br> network interface cards. The current port uses just one socket bound to <br> INADDR_ANY address. Therefore when dealing with a multihomed NT time server, <br> clients should point to the default address on the server (otherwise the <br> reply is not guaranteed to come from the same interface to which the <br> request was sent). Working with Microsoft to get this resolved. <br>2) There is some problem with "longjmp" in xntpdc/ntpdc.c that causes a <br> software exception on doing a Control-C in xntpdc. Be patient! <br>3) The error messages logged by xntpd currently contain only the numerical <br> error code. Corresponding error message string has to be looked up in <br> "Books Online" on Visual C++ 2.0 under the topic "Numerical List of Error <br> Codes". <p>Last HTML Update: November 17, 1999 <br><a href="mailto://sven_dietrich@trimble.com">Sven_Dietrich@Trimble.COM</a> </body> </html>