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: Hous68 on Dec 14, '02 06:06:39PM

I have this entry in my /etc/hosts file too.

In addition, I have another DNS issue with Jaguar...

On my local network, I have my own DNS (Bind9) doing split horizon DNS (internal requests get results from one view, external requests get results from another view). In my Network PrefPane, I have my internal DNS listed first followed by two provided by my ISP. On a boot/restart everything works fine; my Mac gets DNS resolutions properly. But after the Mac goes to sleep, or sits for an extended period, it forgets about the internal DNS server and queries external servers. A re-apply in the Network PrefPane resolves the problem until the next time the Mac sleeps. No other non-Mac on my network has this problem (Win, Linux, *BSD).

Bizarre.



[ Reply to This | # ]
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 | # ]
Mixed DNS servers
Authored by: ptwithy on Oct 28, '03 06:33:05AM

DNS servers are not ordered, have no priority. If you have more than one server, they must all present the same view of the DNS. This same issue arises with a VPN: you cannot have DNS servers that know about the VPN mixed with those that do not, or you will get inconsistent results.



[ Reply to This | # ]