Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Under what conditions would the following occur? From a given OSX machine on an internal network:

$~ cat /etc/resolv.conf
nameserver 10.102.120.7
nameserver 10.102.120.2

From the same machine:

$~ dig @10.102.120.7 in.local
<snip> ...
;; QUESTION SECTION:
;in.local.                      IN      A

;; ANSWER SECTION:
in.local.               43200   IN      A       10.102.123.30
<snip> ...

And yet, this workstation cannot ping in.local, nor load pages hosted by apache on that machine. 10.102.123.30 is definitley up (2 OSX machines I know fail to resolve in.local - but other machines on the network can). I have also checked their /etc/hosts to see if anything there might interfere... Not sure what else to check...

share|improve this question

4 Answers 4

up vote 6 down vote accepted

The .local tld is first resolved on MacOS X by Multicast DNS Bonjour/Rendezvous. That means if you are trying to use a DNS server with the .local tld, it will not be resolved using the DNS server.

Some private networks also use ".local" domains for hosts registered with their internal DNS server, even though it is not a valid top-level domain on the public Internet. If your Mac is connected to such a network, you may want it to look up host names that end in ".local" by using Unicast DNS to speak to a DNS server, the same way that it looks up host names such as "www.apple.com" on the Internet.

See: http://support.apple.com/kb/HT3473 and: http://support.apple.com/kb/TA20999

share|improve this answer

OS X has an OS-level DNS cache that you might need to flush - like nscd on solaris/linux/bsd.

Try dscacheutil -flushcache (on Leopard) or lookupd -flushcache (on 10.5.1 and before).

share|improve this answer

You just discovered why using .LOCAL is a bad idea.

share|improve this answer

The only thing I can think of is that you're not using DNS for name service, or the name is cached.

I'm more familiar with Linux, but you might be looking for the nsswitch.conf (or equivalent) file in the /etc/ equivalent for OSX, or the caching daemon (nscd in Linux) configuration (nscd.conf) or state.

nsswitch.conf controls how names are resolved. DNS is only one mechanism. Others include files (/etc/host), LDAP, and (I think) NIS.

nscd is a name cache that helps resolve names faster when you get repeated requests for the same name (e.g. you load 300 pages from a web server) by caching the response an appropriate length of time (e.g. 43200 seconds from your example dig output)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.