Multicast hostname lookups on OSX

Posted by KARASZI István on Server Fault See other posts from Server Fault or by KARASZI István
Published on 2011-07-01T15:23:17Z Indexed on 2012/04/15 11:34 UTC
Read the original article Hit count: 257

Filed under:
|
|
|
|

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] : 192.168.1.1
  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] : 192.168.1.1
  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 192.168.1.1 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.

© Server Fault or respective owner

Related posts about dns

Related posts about macosx