In our local university network, I have (obtained by DHCP) the following setup in /etc/resolv.conf:
search a.domain.com b.domain.com domain.com
nameserver x.x.x.x
nameserver y.y.y.y
The settings are the same in System Preferences as well. The following problem occurs:
nslookup server
works, and is using one of the nameservers to correctly ask for server.a.domain.com. If I try to ping however,
ping server
fails with unreachable host.
ping server.a.domain.com
works. Manually adding server with the ip address obtained by nslookup to /etc/hosts makes ping work too, but this "solution" circumvents the nameservers and is thus not ideal (and I would have to add about 20 other entries as well). Any idea what is causing this? Why does ping not use the results of nslookup/the searchdomains?
ssh server
also fails, which is the real problem/inconvenience.
I already added AlwaysUseSearchDomains to mDNSResponder, but this fix only helps the problem when using server.foo.
I'm using OS X Lion 10.7.3.