ntp and time sync
Uncle Jim
jim at jimani.com
Fri Jan 24 08:07:33 CST 2003
Hi,
On Thu, Jan 23, 2003 at 01:21:34PM -0600, Eric R. wrote:
> A while back, I asked for input on NTP. I had to go away from that
> task, but it has now returned. At this point, I'm stuck and lost. So....
>
> Is anyone synching their network using ntp? I have my ws synched, (our
> stratum 2?) I have a cron job entered that keeps it in sync. My problem
> is I can't get the other Lin boxes (stratum 3?) to sync from this one.
Yes, I keep a network in sync with ntp. However, I don't have any RedHat 7.x
boxes. My main stratum 2 time server is a RH-5.2, xntp3-5.93-14 box (if it
works, don't fix it). I also configured a RH-8.0, ntp-4.1.1a-9 stratum 2
server just to check things out. After a few minutes everything seemed to
sync up and have correct time with both servers.
The xntp3-5.93-14 stratum 2 server's /etc/ntp.conf file contains
server tock.usnogps.navy.mil # Falcon AFB, Colorado
server ntp.cc.utexas.edu # University of Texas at Austin, Austin TX
server tick.wustl.edu # Washington University at St. Louis
server tick.usno.navy.mil # U.S. Naval Observatory
The ntp-4.1.1a-9 stratum 2 server's /etc/ntp.conf file contains
restrict default ignore
restrict 207.188.139.0 mask 255.255.255.0 notrust nomodify notrap
restrict 204.34.198.41 mask 255.255.255.255 nomodify notrap noquery
server 204.34.198.41 # tock.usnogps.navy.mil
restrict 129.116.206.10 mask 255.255.255.255 nomodify notrap noquery
server 129.116.206.10 # ntp.cc.utexas.edu
restrict 128.252.19.1 mask 255.255.255.255 nomodify notrap noquery
server 128.252.19.1 # tick.wustl.edu
restrict 192.5.41.40 mask 255.255.255.255 nomodify notrap noquery
server 192.5.41.40 # tick.usno.navy.mil
The xntp3-5.93-14 stratum 3 client's /etc/ntp.conf file contains
server 207.188.139.8 # Use enfield.gallup.net
The ntp-4.1.1a-9 stratum 3 client's /etc/ntp.conf file contains
restrict 207.188.139.8 mask 255.255.255.255 nomodify notrap noquery
server 207.188.139.8 # enfield.gallup.net
Before I start ntpd I like to get the clock set close to real time because
ntp can take forever to sync up if the clocks aren't pretty darned close.
rdate -s 207.188.139.8
and then set the hardware clock so that you don't have to fiddle with this
at the next boot time.
hwclock --systohc -u # I like to keep things in UTC
I use ntpq in the interactive mode to check the status of the machine. The
pe and as commands will give you the information you need. But don't be in
a hurry, ntp takes quite a while to become happy.
--
Jim
More information about the Kclug
mailing list