5

DNS resolution appears to be inconsistent across OS X for no reason I can fathom.

$ ping example
PING example.co.uk (80.94.32.224): 56 data bytes
64 bytes from 80.94.32.224: icmp_seq=0 ttl=56 time=62.077 ms

Yet:

$ nslookup example
Server:     10.20.20.1
Address:    10.20.20.1#53

** server can't find example: NXDOMAIN

http://example/ resolves in Firefox, yet:

$ dig example

fails. I am pointing at my router's default DNS (10.20.20.1, as above). Pointing to other DNS servers does not appear to alter the above behaviour.

Zypher
  • 37,829
jnic
  • 153

3 Answers3

3

Check to see if your search domain is set. I just tried it (with my search domain set); ping and nslookup work. As does Safari and Firefox.

However, dig does not by default on MacOS X 10.6 use the search domain. To do that do:

dig +search example

And that will work correctly

tegbains
  • 1,996
0

Did you just upgraded to snow leopard? I had very similar issues. Resolved by removing all references to saved networks in the network preferences + login/keychain databases. Basically, you have to reset your entire name resolving subsystem.

lorenzog
  • 2,979
-2

The host is resolved via files or via other name service. See if it is in hosts. If not check /etc/nsswitch.conf file.

grep example.com /etc/hosts
grep hosts /etc/nsswitch.conf