I have a .local website at: mysite.myname.local
If I try to http mysite.myname.local in a browser, nothing happens.
If I 'ping mysite.myname.local', it reports 'ping: cannot resolve mysite.myname.local: Unknown host'.
If I 'nslookup mysite.myname.local', it will report the correct IP Address.
If I 'host mysite.myname.local', it will also report the correct IP Address.
However, if I leave off myname.local from the ping and http:// address, 'ping mysite' and http mysite will both work as expected.
I used tcpdump to see if it would tell me anything and the only clue I spotted in there was:
0:36:07.466728 IP (tos 0x0, ttl 64, id 52932, offset 0, flags [none], proto UDP (17), length 67, bad cksum 0 (->221a)!) 192.168.4.122.59479 > 192.168.4.1.domain: [bad udp cksum 0x8a0c -> 0x7ba3!] 27737+ A? mysite.myname.local. (39) 10:36:07.467151 IP (tos 0x0, ttl 64, id 6826, offset 0, flags [none], proto UDP (17), length 97) 192.168.4.1.domain > 192.168.4.122.59479: [udp sum ok] 27737* q: A? mysite.myname.local. 1/1/0 mysite.myname.local. [1m] A 192.168.4.235 ns: mysite.myname.local. [1m] NS mysite.myname.local. (69)
so, it looks like there is a bad cksum somewhere.
In order to be able to specify the complete address, I found the discussion Trouble to access ".local" domain in which someone suggested the following command 'sudo discoveryutil mdnsactivedirectory yes'
Once I execute this command, 'ping mysite.myname.local' and http'ing to mysite.myname.local both work.
I have couple of questions:
Is there a way to modify /System/Library/LaunchDaemons/com.apple.discoveryd.plist to turn on mdnsactivedirectory after a reboot? If so, what do I need to add to the plist?
Can anyone explain what is going on? I am not sure I understand what the problem really is or why that discoveryutil command fixes it.