[ntp:questions] ntp client: keep all servers at startup

[ntp:questions] ntp client: keep all servers at startup

Post by Vaidotas J » Thu, 05 May 2005 16:39:15



morning,

maybe You should try something like this
server 192.168.1.x prefer ?

best regards,
Vaidotas J.
LITNET NOC
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by Ralf Fasse » Thu, 05 May 2005 17:33:10

* "Vaidotas J." < XXXX@XXXXX.COM >
| maybe You should try something like this
| server 192.168.1.x prefer ?

Already tried that, no success. The server is not listed. The 'true'
attribute does not help either. Thanks anyway for the suggestion.

I guess I will have to scan the output of 'ntpq -c pe' and check that
the required host is listed, and give a warning else, so the user can
take appropriate steps.

R'

 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by mike » Thu, 05 May 2005 20:21:58

You might consider configuring the server as a broadcast server, and
the client as a broadcast client. That way the client will be listening
for incoming packets at startup. If none arrive, or the server does not
respond, it should just stay in the listening mode. So if the server
isn't up/responding it should not affect the capability of the client to
aquire good time once the server is back online.
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by maye » Thu, 05 May 2005 21:57:33

----- Original Message Follows -----

It will not show up in the list of associations until the server is
reachable, whether it's set up for broadcast or as a server. The daemon
will keep trying at regular intervals until it's available, sets up
the association and then looks to see where it fits within the other
associations that it has. Just because it doesn't show up doesn't mean
that it's not trying to reach it.

Danny
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by mike » Fri, 06 May 2005 01:15:27


That's what I thought. But in a quick test it did not appear to be the case.

ntp.conf test
# my DCF lashup
server 127.127.28.0 # use the shared memory reference clock driver.
# two of the servers from ntp.org pool
server enigma.wiredgoats.com maxpoll 12
server mx2.gs.washington.edu maxpoll 12

pull the ether connection
stop/start ntpd
wait a bit (ntpdate times ot very slowly) and put back the ether cable:

run ntpq -p in a 65sec cycle

Wed May 4 17:47:06 CEST 2005
remote refid st t when poll reach delay offset jitter
==============================================================================
*127.127.1.0 LOCAL(0) 10 l 41 64 17 0.000 0.000 0.001
127.127.28.0 .DCF. 0 l 42 64 13 0.000 -6.200 4.467
............
Wed May 4 18:05:16 CEST 2005
remote refid st t when poll reach delay offset
jitter
==============================================================================
127.127.1.0 LOCAL(0) 10 l 35 64 377 0.000 0.000 0.001
*127.127.28.0 .DCF. 0 l 35 64 177 0.000 -1.886 20.032

So the two external servers don't get picked up (after 15mins)

from the ntpq command interface

ntpq> lassociations
ind assID status conf reach auth condition last_event cnt
===========================================================
1 36188 9024 yes yes none reject reachable 2
2 36189 9624 yes yes none sys.peer reachable 2
ntpq>
ntpq> lpeers
remote refid st t when poll reach delay offset
jitter
==============================================================================
LOCAL(0) LOCAL(0) 10 l 59 64 377 0.000 0.000
0.001
*SHM(0) .DCF. 0 l 60 64 375 0.000 -0.961
18.930
ntpq>

the pool.ntp.org servers are not listed

But both are responding to queries: Heres one -
[mike@quark mike]$ ntptrace mx2.gs.washington.edu
mx2.gs.washington.edu: stratum 3, offset -0.000430, root distance 0.000755
omega.cac.washington.edu: stratum 2, offset 0.000120, root distance 0.000359
bigben.cac.washington.edu: stratum 1, offset -0.000008, root distance
0.000000, refid 'USNO'
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by Ralf Fasse » Fri, 06 May 2005 01:39:19

* mike < XXXX@XXXXX.COM >
| That's what I thought. But in a quick test it did not appear to be the case.
--<snip-snip>--
| pull the ether connection
| stop/start ntpd
| wait a bit (ntpdate times ot very slowly) and put back the ether cable:
--<snip-snip>--
| the pool.ntp.org servers are not listed

That's exactly the problem. After some initial timeout, the server is
simply not considered at all any longer. Only the LOCAL clock is
listed in the ntpq output, and the server does not magically come back
into the listing after some time. In comparison, if the server is
reachable at startup and becomes unreachable later, it keeps getting
listed, though with a reach of 0 (or was that "-"?).

I will have a look at the broadcast suggestion you mentioned in the
other posting. Sounds like that might work.

Thanks
R'
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by Ronan Floo » Fri, 06 May 2005 02:18:08


Is that ntpd timing out on initial DNS resolution of the server names,
though? What happens if you use the IP address(es) for the server(s)
in ntp.conf?

Also might be helpful to know the version of ntpd and what OS you're
running.

--
Ronan Flood < XXXX@XXXXX.COM >
working for but not speaking for
Network Services, University of London Computer Centre
(which means: don't bother ULCC if I've said something you don't like)
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by Ralf Fasse » Fri, 06 May 2005 04:15:57

* Ronan Flood < XXXX@XXXXX.COM >
| Is that ntpd timing out on initial DNS resolution of the server
| names, though? What happens if you use the IP address(es) for the
| server(s) in ntp.conf?

I thought that too, first, but using the numeric IP does not change
anything. The server does not get listed in 'ntpq -c pe' if I start
ntpd while the network is unplugged.

| Also might be helpful to know the version of ntpd and what OS you're
| running.

For testing here:
Client: Binary NTP distribution ntp-4.2.0a, Windows XP SP2.
Server: NTP 4.1.0, SGI IRIX.

The final installation will have both machines Windows, ntp-4.2.0a.

R'
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by maye » Fri, 06 May 2005 06:10:13

----- Original Message Follows -----


What did you expect? You gave them names and not IP addresses. Since the
DNS query fails it will never try to connect to them. The scenario that
I was talking about was when the ntpd daemon itself is down, not when
you
are unable to get the IP addresses. Try this with IP addresses instead
of names. I can tell you that it will keep retrying the address if it
has it. It won't do anything if it can't get the address.

Danny
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by maye » Fri, 06 May 2005 06:12:50

----- Original Message Follows -----


That is exactly the problem. Pulling the ethernet plug is not a good
test of this.


All versions will do the same thing.

Danny
 
 
 

[ntp:questions] ntp client: keep all servers at startup

Post by Ronan Floo » Fri, 06 May 2005 22:51:24


Odd, that's not my experience: I've just tried it with XXXX@XXXXX.COM
under Solaris 8 with the network interface turned off (ifconfig down)
and the resolver stopped for good measure, and the server IP addresses
stay listed, as I would expect. I generally use "ntpq -n -c pe" to
avoid DNS lookups for the list output.


Hmm.

--
Ronan Flood < XXXX@XXXXX.COM >
working for but not speaking for
Network Services, University of London Computer Centre
(which means: don't bother ULCC if I've said something you don't like)