How to use an NTP server on your FloppyFW
-----------------------------------------

This is a very short introduction to the use of NTP. Full details of
all of the intricacies of NTP can be found at
   http://www.eecis.udel.edu/~ntp/ntp_spool/html/ 
which (along with www.ntp.org) are the founts of all NTP knowledge.

Step by Step
------------

Install
-------
  Get the ntp package for FloppyFW (ntp.bz2 and post-ntp.ini).

  Install the ntp.bz2 in /packages on your floppyFW diskette.

  Edit the post-ntp.ini file to add suitable external time servers for
  your geographical location from 
    http://www.eecis.udel.edu/~mills/ntp/servers.html
  Note that if you use names for these (rather than IP addresses) you'd
  better have DNS available to the floppyFW machine.

  If you don't choose to do that, you can still use the NTP server to
  synchronse the clocks of all the machines in your network to that of
  the floppyFW machine. That's not as good, though, since it's nice to
  know that you're machines are running only four steps from an atomic
  clock !

  Choose whether you want to broadcast the time internally, or simply
  serve it and set the appropriate config variable in post-ntp.ini.

  Copy the post-ntp.ini file to /packages on your floppyFW diskette.

  Reboot your floppyFW from the diskette (or otherwise install the
  package and run post-ntp.ini).

  If you're using non-default firewall then worry about the way that
  the post-ntp.ini file punches a hole to allow port 123 udp in and
  out. You may want to consolidate that to the firewall.ini.

Checking it's working
---------------------

  From some other machine internally 

   % ntptrace floppyFW

  (where floppyFW is the internal hostname of your floppyFW machine)

  After a while you should see something like this
  
  % ntptrace floppyFW
  floppyFW: stratum 3, offset -0.000370, synch distance 0.09221
  ns2.cableinet.co.uk: stratum 2, offset -0.010933, synch distance 0.06049
  tock.usno.navy.mil: stratum 1, offset -0.009437, synch distance 0.00175, refid 'USNO'
  %

  This shows that the ntp service is running on the floppyFW machine
  and that it has synched up with the external time servers.

  If it's not showing that, but something like
  % ntptrace floppyFW
  floppyFW: stratum 16, offset -0.013248, synch distance 0.00099
  0.0.0.0:	*Not Synchronized*
  wait a while. It's quite likely that it'll synch up given a bit of time.

  For more details you can use the ntpq command

  % ntpq floppyFW
  ntpq> peers
       remote           refid      st t when poll reach   delay   offset  jitter
  ==============================================================================
   192.168.0.255   0.0.0.0         16 -    -   64    0    0.000    0.000 4000.00
  *ns2.cableinet.c tock.usno.navy.  2 u  112 1024  377   11.899  -11.758   0.385
  +ice.mcc.ac.uk   sombrero.cs.tu-  2 u  263 1024  317   17.929  -10.215   0.032
  +ntp0.cis.strath ntp1.cis.strath  3 u  137 1024  377   24.104   -5.603   0.821
  ntpq> ass
  ind assID status  conf reach auth condition  last_event cnt
  ===========================================================
    1  2700  8000   yes   yes  none    reject
    2  2701  9014   yes   yes  none    reject   reachable  1
    3  2702  8000   yes   yes  none    reject
    4  2703  9014   yes   yes  none    reject   reachable  1
  ntpq> quit

  (The ass command above shows the state before synchronisation. After
  synchronisation the condition will change).
  
  Full details of these commands can be found at the first web site
  above.


Setting up the clients
----------------------

  Edit the /etc/ntp.conf files of your clients to look something like

  --- /etc/ntp.conf ---
  server 127.127.1.0
  server floppyFW
  ---------------------

  If you opted to use broadcast internally you could replace the
  "server floppyFW" with "broadcastclient"

  Restart (or start) the ntp daemons on the clients.
  The same commands can be used to verify that they're syching up as
  were used to test the server.

If you can't find it here go to the web sites above. There's a
debugging section there...

Enjoy

Jim  <jcownie@cantab.net>