OS X Yosemite: Resolve .local-Domains

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

Table of contents

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">
<dict>
    <key>Label</key>
    <string>com.fix.local</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/sbin/discoveryutil</string>
        <string>activedirectory</string>
        <string>yes</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>ServiceDescription</key>
    <string>.local discoveryd fix</string>
</dict>
</plist>

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:

dstapp@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 dstapp@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 172.30.0.175

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

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

;; Query time: 2 msec ;; SERVER: 172.30.0.1#53(172.30.0.1) ;; WHEN: Tue Sep 9 09:29:40 2014 ;; MSG SIZE rcvd: 84

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

dstapp@Davids-Mac-mini ~ % ping 172.30.0.175 PING 172.30.0.175 (172.30.0.175): 56 data bytes 64 bytes from 172.30.0.175: icmp_seq=0 ttl=63 time=0.462 ms 64 bytes from 172.30.0.175: icmp_seq=1 ttl=63 time=0.459 ms ^C 172.30.0.175 ping statistics 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.459/0.461/0.462/0.002 ms dstapp@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!