OS X Yosemite: Resolve .local-Domains

published on in category OS X , Tags: discoveryd local Yosemite

If you’re running a network with a .local domain, you might experience issues running OS X Yosemite (10.10). Heres how to resolve this issue.

Run the following command in your terminal:

sudo discoveryutil mdnsactivedirectory yes

At this point resolving .local domains should already be working again, but because this changes are only session-based and not persistent, after a reboot your network will be working anymore.

As a workaround to make those changes permanent, you can register your own LaunchDaemon which runs the above command on boot time. Create the file /Library/LaunchDaemons/eu.davd.LocalDomainLookup.plist with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <string>.local discoveryd fix</string>

Double check the privileges: -rw-r--r-- 1 root wheel.

In Yosemite Apple changed the DNS lookup tool from mDNSResponder to discoveryd which already caused many issues. I already filed a bugreport a while ago, but did not get a response by now. Here’s the original report:

Since upgrading to the Yosemite public beta I’m experiencing issues resolving .local-domain names. This seems to be an issue related to the DNS lookup. But it’s a little more strange to me:

Directly pinging a .local-host does not work:

dprandzioch@Davids-Mac-mini ~ % ping blah.company.local ping: cannot resolve blah.company.local: Unknown host

But resolving the DNS through ‚dig‘ seems to work flawlessly:

68 dprandzioch@Davids-Mac-mini ~ % dig blah.company.local

; <<>> DiG 9.8.3-P1 <<>> blah.company.local ;; global options: +cmd ;; Got answer: ;; ->>HEADER< ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION: ;blah.company.local. IN A

;; ANSWER SECTION: blah.company.local. 30 IN A

;; AUTHORITY SECTION: company.local. 38400 IN NS dns.company.local.

;; ADDITIONAL SECTION: dns.company.local. 38400 IN A

;; Query time: 2 msec ;; SERVER: ;; WHEN: Tue Sep 9 09:29:40 2014 ;; MSG SIZE rcvd: 84

I’m also able to ping the resolved IP directly:

dprandzioch@Davids-Mac-mini ~ % ping PING ( 56 data bytes 64 bytes from icmp_seq=0 ttl=63 time=0.462 ms 64 bytes from icmp_seq=1 ttl=63 time=0.459 ms ^C ping statistics 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.4590.4610.4620.002 ms dprandzioch@Davids-Mac-mini ~ %

So the only issue is connecting the Host directly via it’s .local domain name. All other Macs in our company network running Mountain Lion or Mavericks are working without any problems and are able to connect to any local server.

As a workaround, adding the domain and the corresponding IP address to /private/etc/hosts solves the issue, but in a network with a bunch of people and about 30 internal servers this would be a mess to handle.

Hope this is getting fixed until the release of Yosemite cause this might be a big issue for many enterprise customers.

Thanks in Advance!

I run this site without advertisement of any kind. All information is free and my only goal is to give back something to the amazing free software development community. If you find some value in this, please consider donating me a cup of coffee using PayPal. Thank you so much!