
I haven't dug into it too deeply, but I suspect that this config setting isn't fixing this or at least, not directly. Both commands are otherwise fully self sufficient e.g., the /etc/nf file is the only thing not in the binary file that they use. Only the host command uses the search list in the /etc/nf file dig does not, which is why one must always give dig FQDN to resolve anything. NOTE: Host and dig both read the nameserver list from /etc/nf unless they are given a specific nameserver to talk to. In this way, they are excellent diagnostic tools in cases where the system resolver is malfunctioning. By doing this, the host and dig commands always function the same way that the system resolver does for whatever OS they are built for, but they do not rely upon it.
#Set ping for limited pings, os x mac os
The system resolver is a collection of functions in the standard C library of a UNIX or UNIX-like system (on Mac OS X, these functions are part of the netdb library). They statically link in the system resolver functions. The host and dig commands were created as the "rewrite" for nslookup. Sometimes, this would produce some rather different results. What started happening was that system resolvers on different platforms worked differently from nslookup. nslookup was the command, but it had it's own implementation of all it's resolver routines. (Props to and, where I found my answers to this problem.)īasic history. Now, if you check your running mDNSResponder process, you should see it running with your new argument: ps auxww | grep mDNSResponder Sudo launchctl load -w /System/Library/LaunchDaemons/ sudo launchctl unload -w /System/Library/LaunchDaemons/ This will add the "-AlwaysAppendSearchDomains" argument to the mDNSResponder startup plist file (and save a backup copy), but since this is controlled by launchd, that system needs to be told to restart mDNSResponder. Either should work, but the tabs fit the spacing of the original file better.)
#Set ping for limited pings, os x how to
(There should be two tab characters at the start of the second-to-last line above, but I couldn't figure out how to get this little editor to insert tabs, so I added 16 spaces. orig '/ProgramArguments/,// ' /System/Library/LaunchDaemons/ Here's a quick way to fix it: sudo sed -i. For some reason, the version of mDNSResponder in Lion needs the "-AlwaysAppendSearchDomains" command line option to behave as it did in Snow Leopard (at least). Host's main job is to do DNS name resolution, so it implements its own recursive resolver.Īpple's recursive resolver is mDNSResponder.

The hostname lookup functionality is just a side effect of the job and handed off to the system's recursive resolver (I believe - I haven't verified by checking linked libraries or anything of that sort). Ping is a simple (although very helpful) diagnostic utility for dropping packets on the wire that should get echoed back to you. I don't know why things work for host, but not ping, but I think it has to do with the nature of these two utilities.

Why they made this change, I don't know, but it's driven me crazy for a while.
