Current Path : /usr/src/contrib/ntp/html/build/hints/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/src/contrib/ntp/html/build/hints/winnt.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>NTP on Windows NT</title> <link href="scripts/style.css" type="text/css" rel="stylesheet"> </head> <body> <h1>NTP 4.x for Windows NT</h1> <h2>Introduction</h2> The NTP 4 distribution runs as service on Windows NT 4.0, Windows 2000, Windows XP, Windows .NET Server 2003. It will NOT run on Windows 95, 98, ME, etc. The binaries work on multi-processor systems. This port has not been tested on the Alpha platform. This release now uses OpenSSL for authentication. IPv6 is not implemented yet for Win32 platforms. <h2>Authentication Keys</h2> With this release ntp-keygen is supported. See the <a href="../../keygen.html"> ntp keygen documentation</a> for details on how to use ntp-keygen. <p> ntpd can now use the generated keys in the same way as on Unix platforms. Please refer to the <a href="../../authopt.html">Authentication Options</a> for details on how to use these. <p><B>NOTE:</B> ntpd and ntp-keygen both use OpenSSL which requires a random character file called .rnd by default. Both of these programs will automatically generate this file if they are not found. The programs will look for an environmental variable called RANDFILE and use that for the name of the random character file if the variable exists. If it does not exist it will look for an environmental variable called HOME and use that directory to search for a filed called .rnd in that directory. Finally, if neither RANDFILE nor HOME exists it will look in C:\ for a .rnd file. In each case it will search for and create the file if the environmental variable exists or in the C:\ directory if it doesn't. Note that ntpd normally runs as a service so that the only way that it will have either RANDFILE or HOME defined is if it is a System environmental variable or if the service is run under a specific account name and that account has one of those variables defined. Otherwise it will use the file "c:\.rnd". This was done so that OpenSSL will work normally on Win32 systems. This obviates the need to ship the OpenSSL.exe file and explain how to generate the .rnd file. A future version may change this behavior. <p>Refer to <a href="#Compiling">Compiling Requirements</a> and Instructions for how to compile the program.</p> <h2>Reference Clocks</h2> Reference clock support under Windows NT is tricky because the IO functions are so much different. Some of the clock types have been built into the ntpd executable and should work but have not been tested by the ntp project. If you have a clock that runs on Win32 and the driver is there but not implemented on Win32 you will have make the required configuration changes in config.h and then build ntpd from source and test it. The following reference clocks are known to work and are supported by Windows NT: <p><a href="../../driver1.html">Type 1</a> Undisciplined Local Clock (LOCAL)<br> <a href="../../driver29.html">Type 29</a> Trimble Navigation Palisade GPS (GPS_PALISADE)</p> <h2>Functions Supported</h2> All NTP functions are supported with some constraints. See the <a href="#ToDo">TODO list</a> below. Note that the ntptrace executable is not supported and you should use the PERL script version instead. <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.</p> <h2>Binaries</h2> Recent InstallShield based executable versions of NTP for Windows NT (intel) are available from: <ul> <li><a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a> <li><a href="http://www.five-ten-sg.com/">http://www.five-ten-sg.com/</a> <li><a href="http://www.meinberg.de/english/sw/ntp.htm">http://www.meinberg.de/english/sw/ntp.htm</a> </ul> <a name="ToDo"><h2>ToDo</h2></a> These tasks are in no particular order of priority. <ul> <li>Create a proper install/uninstall program <li>Add sntp to the list of supported programs <li>Add support for Visual C++ 7.0 or later (.NET) <li>Add IPv6 support <li>See if precision can be improved by using CPU cycle counter for tick interpolation. <li>Make precision time available to applications using NTP_GETTIME API </ul> <h2>Compiling Requirements</h2> <ul> <li>Windows NT 4.0 Windows 2000, Windows XP, or Windows.NET Server 2003 <li>Microsoft Visual C++ 6.0. <B>NOTE:</B> VC++ 7.0 (aka .NET) is not yet supported but will probably work fine. <li>Some way of uncompressing and untarring the gzipped tar file. <li>OpenSSL must be built on the box before building NTP. Additional steps would be required to not use OpenSSL. </ul> <a name="Compiling"><h2>Compiling Instructions</h2></a> <ol> <li>Unpack and build OpenSSL according to the OpenSSL instructions for building on Windows. An environment variable named OPENSSL must be set up to specify the base path of the OpenSSL directory to be used to build the NTP package (e.g. <code>OPENSSL=C:\openssl-0.9.8b</code>). <li>Unpack the ntp-*.tar.gz archive using utilities such as WinZip. <li>Open the .\ports\winnt\ntp.dsw Visual C workspace <li>Batch build all projects <li>The built binaries can be found in the port\winnt\bin\Release subdirectory <li>In addition you will need to install the OpenSSL libeay32.dll <li>If you are shipping binaries in a kit it is strongly recommended that you ship this file (winnt.html) along with the binaries. </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>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>You can also stop and start the service by typing net start|stop NetworkTimeProtocol at the DOS prompt. <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. </ol> You can change the start mode (automatic/manual) and other startup parameters corresponding to the NTP service 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> <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)</p> <h2>Bug Reports</h2> Send questions to <a href="news://comp.protocols.time.ntp">news://comp.protocols.time.ntp</a> and bug reports should be entered in <a href="http://bugzilla.ntp.org/">Bugzilla</a> on the NTP Web site. <h2>Change Log</h2> <h3>Last revision 2 July 2003 Version 4.2.0</h3> <b>by Danny Mayer (mayer@ntp.org>)</b> <h3>Significant Changes:</h3> This latest release of NTP constitutes a major upgrade to its ability to build and run on Windows platforms and should now build and run cleanly. More importantly it is now able to support all authentication in the same way as Unix boxes. This does require the usage of OpenSSL which is now a prerequisite for build on Windows. ntp-keygen is now supported and builds on Win32 platforms. <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></p> <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. </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></p> <ul> <li>Fixed I/O problem delaying packet responses which resulted in no-replys to NTPQ and others. <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. </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. </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> <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</p> <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> <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> <p>Greg Schueman<br> <schueman@acm.org></p> <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> <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> <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> <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> <p>See below for more detail:</p> <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> <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> <p>Known problems:<br> * bug in ntptrace - if no Stratum 1 servers are available,<br> such as on an IntraNet, the application crashes.</p> <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></p> </body> </html>