How to create an NTP server?
After reading some threads here it appears that the Linode host machines are running NTP and are keeping the Linodes' clocks in synch. I thought it'd be nice to run an NTP server in my Linode that does not synchronize the clock but simply provides the time for other machines.
I'm having trouble getting this working. I set the "disable ntp" flag in ntp.conf so it won't try to change the system clock. I read in the NTP FAQ that I should add the following lines to ntp.conf to make it a "local clock" (not sure why it's necessary, but ok):
server 127.127.1.1 # LCL, local clock
fudge 127.127.1.1 stratum 12 # increase stratum
When I run ntpdate from another machine, ntpdate complains with the so-unhelpful "no server suitable for synchronization found". Okay, BUT WHY? The debug mode of ntpdate gives more information, but nothing I can understand and none of it is explained in the ntpdate documentation:
> client:# ntpdate -d linodeServer
13 Feb 17:31:58 ntpdate[18546]: ntpdate 4.1.0 Mon Mar 25 23:39:50 UTC 2002 (2)
transmit(10.10.0.4)
receive(10.10.0.4)
transmit(10.10.0.4)
receive(10.10.0.4)
transmit(10.10.0.4)
receive(10.10.0.4)
transmit(10.10.0.4)
receive(10.10.0.4)
transmit(10.10.0.4)
server 10.10.0.4, port 123
stratum 16, precision -15, leap 11, trust 000
refid [0.0.0.0], delay 0.04883, dispersion 0.00201
transmitted 4, in filter 4
reference time: 00000000.00000000 Wed, Feb 6 2036 22:28:16.000
originate timestamp: c3d7f90f.05e9d0e9 Fri, Feb 13 2004 17:31:59.023
transmit timestamp: c3d7f90f.036c8b43 Fri, Feb 13 2004 17:31:59.013
filter delay: 0.05600 0.04883 0.05693 0.05148
0.00000 0.00000 0.00000 0.00000
filter offset: -0.00368 -0.00131 -0.00427 -0.00343
0.000000 0.000000 0.000000 0.000000
delay 0.04883, dispersion 0.00201
offset -0.001310
13 Feb 17:31:59 ntpdate[18546]: no server suitable for synchronization found
It seems odd to me that it prints "stratum 16"–based on my ntp.conf I expect "stratum 12".
I'm doing this through a VPN tunnel so there are no firewall issues to get in the way.
I'm running Debian and I've got the ntp-refclock package installed.
Any suggestions?
Thanks,
Maturin
3 Replies
I redid my ntp.conf, limiting my changes to:
disable ntp
server 127.127.1.1
Instead of ntpdate on the client, I fired up ntpd and gave it plenty of time before trying:
> client# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
linodeServer LOCAL(1) 6 u 105 64 2 22.774 -1.987 0.008
That's all I really wanted, so I'm happy now.
Thanks for listening.
Maturin
Chris now ensures clocks are accureate to <1sec.