Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


localhost | 17 comments | Create New Account
Click here to return to the 'localhost' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
localhost
Authored by: dlove on Dec 16, '02 03:12:59PM

Out of curiousity, the next time your mac comes back from sleep, try running 'host some_machine your_mac' and see if you get a valid response. That should at least tell you if it's a bind/sleep issue, or an Apple resolver/sleep issue. My suspicion is that latter.

From playing around here, it looks like lookupd cycles throught the nameservers declared in /etc/resolv.conf until it finds one that works and then sticks with that nameserver until either it times out, or the modification date on /etc/resolv.conf is changed ('touch /etc/resolv.conf' as root is sufficient).

The host and nslookup commands, on the other hand, always start each query with the first server listed. That seems to be consistent with the resolv.conf man page. Yet another situation where 'ping foo' fails and 'host foo' succeeds.

So it looks like every time your system wakes from sleep, lookupd think its current nameserver choice has timed out and cycles to the next one. Since that server answers, you never get back to your internal server.

What I've done here is to setup a DNS cache machine which all the local machines use as their DNS server. The cache machine sends local queries to the local DNS server and everything else to my ISP's DNS servers. My resolv.conf only contains a single nameserver entry, so I've never hit this particular problem. Unfortunately I can't remember how to set this up in Bind (I switched to djbdns years ago), but it should be possible.

Hope this helps.



[ Reply to This | # ]