[ntp:questions] Local clock question with dialup connection

Nigel Henry cave.dnb at tiscali.fr
Mon Apr 16 21:09:23 UTC 2007


On Sunday 15 April 2007 18:58, David Woolley wrote:
> In article <200704151700.57526.cave.dnb at tiscali.fr>,
>
> cave.dnb at tiscali.fr (Nigel Henry) wrote:
> > ntpd is still running, but has timed out on trying to contact the
> > Internet timeservers.  If I stop, then restart ntpd, the timeservers are
> > contacted ok,
>
> I'm not sure what you mean by timed out.  If a server becomes unreachable,
> it will continue to be polled and will start to be used again when it
> becomes reachable again.  The two machines may drift apart in the time, but
> they will also drift from UTC, so there is a risk of a time step whatever
> you do.

I wish I'd never posed this question, but anyway here goes. I have 2 machines 
on a LAN. The connection to the Internet is through a Smoothwall firewall, 
which is setup on an old machine, and then from the Smoothwall to the 
Internet by means of a serial modem.

I cannot make the Internet connection before booting up a machine on the LAN, 
as I need to access the web interface for the Smoothwall to connect to the 
Internet. So I boot the machine (FC2 using ntp-4.2.0-7), and checking the 
emails I see a reply to my question. Putting brain into first gear I run 
ntpq> pe, and get "No association ID's returned". Next I stop, and restart 
NTP (and ntp was shown as running before I stopped it). Now when running 
ntpq> pe, I get the 3 internet time servers showing, and after some time they 
are set as candidat's, and sys,peer.

I've tried various things during the day, and the latest is, close the 
Internet connection, then shutdown the machine with the time servers setup 
in /etc/ntp.conf. Reboot this machine, currently with no Internet connection, 
and run ntpq> pe  .  Output as below.

djmons at localhost djmons]$ /usr/sbin/ntpq
ntpq> pe
localhost.localdomain: timed out, nothing received
***Request timed out

Now, using the web interface to the Smoothwall I connect to the Internet.

This now is really weird. I run ntpq> pe again, and only get one of the 3 
timeservers showing.

ntpq> pe
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 ntp2.belbone.be 195.13.23.6      2 u    4   64    1  149.324  -641.87   0.001

Eventually, after quite some time it shows itself as a sys.peer

ntpq> pe
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*ntp2.belbone.be 195.13.23.6      2 u   85  512   37  136.333  -11.443  21.140



Ilet this run for some time, then stopped the ntp daemon, and restarted it. 
Now I get all 3 timeservers showing, but it takes ages before they are setup 
as candidat's, and a sys.peer.

ntpq> pe
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 syrte8.obspm.fr 134.157.254.19   2 u   22   64    3  4177.71  -2123.7 500.393
 213.246.63.72   193.52.184.106   2 u   34   64    1  4265.10  -2177.6   0.001
 ntp2.belbone.be 195.13.23.6      2 u   53   64    3  4154.63  -2122.7 556.916

meanwhile back at the ranch, and some time later.

ntpq> pe
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+syrte8.obspm.fr 134.157.254.19   2 u  242  512   37  125.684   -1.304  10.116
*ns1.kamino.fr   193.52.184.106   2 u  245  512   37  132.347   -6.869   4.914
+ntp2.belbone.be 195.13.23.6      2 u  254  512   37  156.823  -27.209  17.026




>
> Adding a local clock (remembering to make the stratum as high as possible)
> to the upstream one of the pair will keep the two in step with each other,
> but may slow down the re-acquisition of the true time.  For some people,
> that is the best approach.

Well I did experiment with the local clock, but have lost all the ntpq> pe 
output as I rebooted.
>
> However, if you are on a dynamic IP address, the servers will never be
> re-acquired, and you will have to unconfigure them and reconfigure them,
> or re-start the daemon, to get their addresses resolved again, regardless
> of whether you have the local clock configued.

Thats not a problem, as both machines on the LAN, whichever distro is booted 
on them have static IP addresses, and the Smoothwall firewall is doing the 
NAT stuff.

I'll have to try all this booting FC6. This has ntp-4.2.4p0-1.fc6 on it, and 
perhaps it will work better.

Thanks for the many replies. They are appreciated.

Nigel.







More information about the questions mailing list