I have a problem with hostname lookups on my OSX computer. According to Apple's HK3473 document it says for v10.6:

Host names that contain only one label in addition to local, for example "My-Computer.local", are resolved using Multicast DNS (Bonjour) by default. Host names that contain two or more labels in addition to local, for example "server.domain.local", are resolved using a DNS server by default.

Which is not true as my testing. If I try to open a connection on my local computer to a remote port:

telnet example.domain.local 22

then it will lookup the IP address with multicast DNS next to the A and AAAA lookups. This causes a two seconds lookup timeout on every lookup. Which is a lot!

When I try with IPv4 only then it won't use the multicast queries to fetch the remote address just the simple A queries.

telnet -4 example.domain.local 22

When I try with IPv6 only:

telnet -6 example.domain.local 22

then it will lookup with multicast DNS and AAAA again, and the 2 seconds timeout delay occurs again.

I've tried to create a resolver entry to my /etc/resolver/domain.local, and /etc/resolver/local.1, but none of them was working.

Is there any way to disable this multicast lookups for the "two or more label addition to local" domains, or simply disable it for the selected subdomain (domain.local)?

Thank you!

Update #1

Thanks @mralexgray for the scutil --dns command, now I can see my domain in the list, but it's late in the order:

DNS configuration

resolver #1
  domain : adverticum.lan
  nameserver[0] :
  order   : 200000

resolver #2
  domain : local
  options : mdns
  timeout : 2
  order   : 300000

resolver #3
  domain : 254.169.in-addr.arpa
  options : mdns
  timeout : 2
  order   : 300200

resolver #4
  domain : 8.e.f.ip6.arpa
  options : mdns
  timeout : 2
  order   : 300400

resolver #5
  domain : 9.e.f.ip6.arpa
  options : mdns
  timeout : 2
  order   : 300600

resolver #6
  domain : a.e.f.ip6.arpa
  options : mdns
  timeout : 2
  order   : 300800

resolver #7
  domain : b.e.f.ip6.arpa
  options : mdns
  timeout : 2
  order   : 301000

resolver #8
  domain : domain.local
  nameserver[0] :
  order   : 200001

Maybe it would work if I could move the resolver #8 to the position #2.

Update #2

No probably won't work because the local DNS server on answering for domain.local requests and it's before the mDNS (resolver #2).

Update #3

I could decrease the mDNS timeout in /System/Library/SystemConfiguration/IPMonitor.bundle/Contents/Info.plist file, which speeds up the lookups a little, but this is not the solution.

  • Did you ever find an answer to this? Disabling mDNSResponder actually broke all applications that resolved hostnames (Safari, Finder etc) – jishi Aug 18 '11 at 14:58
  • No, unfortunately not yet :( – KARASZI István Aug 18 '11 at 15:01
  • Looking at the order: field I think your resolver is already the 2nd one. – Sander Steffann Aug 31 '11 at 7:02
  • Yes, the scutil says that, but the resolution is working differently! – KARASZI István Aug 31 '11 at 7:23

Have you tried defining the names in your /etc/hosts file?                ns1 ns1.local              www www.local
2001:470:20::9999       www ns1 www.example.net ns1.example.net 

What other DNS services are operating on the local subnet? You can resolve a lot of issues by serving local DNS explicitly, and quite simply - with DNSMasq, which I whole-heartedly recommend doing.

You also may simply need to flush things out with a dscacheutil -flushcache ↩ or a good ole sudo killall mDNSResponder ↩. On the extreme end of things, which I don't suggest - you can also disable mDNSResponder (Bonjour, etc) alltogether ↝

launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist
launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Post-10.5 systems provide DNS resolution via a pretty confusing chain of directives, mandated by configd, heir-apparent to the old "system kicker". To get its status ↝ scutil --dns ↩ which shows the system order of DNS resolution, such as ↯

DNS configuration

resolver #1 domain: example.net search domain[0]: example.net nameserver[0]: order: 200000

resolver #2 domain: local options: mdns timeout: 2 order: 300000

resolver #3 domain:254.169.in-addr.arpa options: mdns timeout: 2 order: 300200

resolver #4 domain: 8.e.f.ip6.arpa options: mdns timeout: 2 order: 300400

If you're still having problems, make sure this list "makes sense, for you" - and go from there...

  • I could not set the addresses in my /etc/hosts file, because they are in the company's DNS. – KARASZI István Jul 4 '11 at 9:16
  • FYI if I set an example host in my hosts file, it works and does not send mDNS requests. – KARASZI István Jul 4 '11 at 9:25
  • what do you get from entering scutil --dns? and how about showing a dig or nslookup that isn't working for you... – mralexgray Jul 4 '11 at 12:53
  • I've already pasted my sciutil --dns output to the question. (See Update). The problem is not that, that nslookup or dig is not working. But a simple lookup at telnet or Safari opening a domain.local ending page takes too much time because of mDNS lookup. – KARASZI István Jul 4 '11 at 14:13
  • 1
    on recent systems (10.6 and later for sure, maybe older), if you disable mDNSResponder you will lose all domain lookups. – Dan Pritts Aug 31 '12 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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