MacOS – Discoveryd Alternative to Replace mDNSResponder Argument

dnsmacosNetwork

This is a direct follow-on to this question. Before Yosemite, I'd add the "-AlwaysAppendSearchDomains" argument to the mDNSResponder plist file so that all local resolver lookups added the search domains, regardless of whether there was a period in the label to be looked up. For example, whether I try to ssh to hostname foo.bar or foo, the search domain of baz.com should be tried, not only for the latter case, as was (and is) the default behavior.

Now, it looks like the mDNSResponder is gone, replaced with discoveryd. I cannot find a similar option to get it to always appending the search domain. Suggestions? I'd rather not go the route of using a non-default local resolver, but I'd consider it as an option. For now, I'll just type in the long FQDNs, but I'd really rather not.

Thanks,
Pete

Best Answer

Since 10.10.1, the simplest way to fix this is to add --AlwaysAppendSearchDomains to ProgramArguments in plist file /System/Library/LaunchDaemons/com.apple.discoveryd.plist

Then restart com.apple.discoveryd.plist with:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.discoveryd.plist

All this according to the help printed by:

/usr/libexec/discoveryd --help

That will do the same as it did for mDNSResponder as far as I can tell.