In Ubuntu, I have this line present in /etc/resolv.conf
:
search example.com uk.example.com se.example.com
Now when I type host svr1.uk
I get the record for svr1.uk.example.com
If I ping svr1.uk
, I see pings from svr1.uk.example.com.
However, If I try to ping svr1.uk
on a mac with the same search
line present in /etc/resolv.conf I get "ping: cannot resolve svr1.uk: Unknown host"
although I do see the record for srv1.uk.example.com from the host
command.
Does any one have a way to make whichever lookup method ping
uses properly resolve the domain suffixes in the order presented in /etc/resolv.conf
?
OSX does not use /etc/resolv.conf for DNS configuration. Instead check out networksetup.
To set the search domains:
To list the network interfaces/services: