ntp / ntpdate

Artyom V. Viklenko artem at mipk-kspu.kharkov.ua
Mon Mar 31 21:52:50 PST 2003


Arie J. Gerszt wrote:
> Hi List
> 
> How do you update your servers with ntp? I have seen ntpd, ntpdate, xntpd
> and
> are a bit confused. Aside that, ntpdate never seems to work ( get the
> offset,
> but the time stays the same, securelevel -2, done as root).

My approach is as follows.

1. Run ntpdate:

    ntpdate -b time-server-address ...

This make current time as on time-server. With option -b you can
step time more than 1 second immediately.

2. Start ntpd daemon. In config file /etc/ntp.conf you should provide
at least one time server. But much better two or three. Use 'server' 
keyword.

Place in your /etc/rc.conf file:

ntpdate_enable="YES"
ntpdate_flags="-b time-server-1 time-server-2 time-server-3"
xntpd_enable="YES"

and replace 'time-server-x' with yours addresses.
You can use, for example, time-a.nist.gov, time-b.nist.gov.
Your Internet provirer may be allos have local time server.

init sets securelevel after executing ntpdate and ntpd.

I have small router (for testing) on 486-based machine with Y2K problem
in hardware clock. Using metod described above it's possible to
maintain correct time on it.

-- 
        Sincerely yours,
                          Artyom V. Viklenko.
======================================================
System Administrator        artem at mipk-kspu.kharkov.ua
------------------------------------------------------
IIAT NTU "KhPI" 21, Frunze Str., Kharkov Ukraine 61002
Phone: +380 (572) 400026        Fax: +380 (572) 474062
======================================================



More information about the freebsd-isp mailing list