[ntp:hackers] DNS Wizard needed

Hal Murray hmurray at megapathdsl.net
Sun May 17 21:23:56 UTC 2009

> OK - so the network services are generally what start BIND running (if
>  it is actually BIND). So the easiest way to find with startup module
> is  the issue and address this is to add the IP addresses of those
> time  servers to your /etc/hosts file and not worry about it any more.
> If you  need to use DNS to get those name resolutions - then you need
> to get DNS setup properly. In Linux this is generally done with the
> config tools  and with FreeBSD with sysinstall. 

The example is using pool servers so I can't put the answer into my local 
hosts file.

It's a Linux box.  I'm reasonably familiar with the old networking stuff.  I 
could hack around this for my usage.  I was trying to sort out the problem so 
things would just-work for other people.

There is a lot of WiFi in use these days.  Some people are going to want good 
time on their laptops.

The basic problem is that the networking ground rules have changed.  In the 
old days of systems on a local ethernet, it was reasonable for the boot 
recipe to wait until the network was up and stable.  With WiFi, that can take 
forever.  There is also a lot of interest/pressure and work going into 
speeding up booting.

Once it gets started, ntpd works OK if WiFi goes away and comes back.

>> A long time later, I poke something and the network connection gets
>> made.
>    Meaning what? you 'poke something' means what? You reprogram  /etc/
> resolv.conf to have real name servers in it and the rest of the
> network starts working?

Sorry.  I poke something in the UI that makes the WiFi connection.

The new networking stuff in Linux has NetworkManager that does a lot of 
stuff.  I don't really understand all the details.  The XO may be running an 
old version.  I think they have lots of local mods, so something in here may 
be broken too.

In this case. when I poke the UI, somebody sets up a WiFi connection, then 
NetworkManager goes through DHCP/BOOTP to setup the IP Address and update 
/etc/resolv.conf with the domain and name servers.  (That "somebody" may tell 
NetworkManager to do the actual connection setup work.  I don't know this 
area very well.)

> So what you are saying is that NTPD's NTP service interface must
> properly address the name resolution at startup since if the names
> were  not resolved properly those devices would be ignored..

Not quite.  If DNS gets a soft fail at startup, another process gets forked.  
It keeps trying until it gets an answer or a hard fail.  That takes care of 
the case where you rebooted while your internet connection was down so you 
couldn't contact the DNS servers.

All I'm trying to do is get that deferred lookup path to handle the new-rules 
(WiFi) case as well as the old-rules (wait for network connection at boot 
time).  It might be a wild goose chase in which case we should just document 
the limitation and a workaround.  It might be an easy fix.  It might be a 
bug/glitch in glibc.

These are my opinions, not necessarily my employer's.  I hate spam.

More information about the hackers mailing list