I added the following line to my resolv.conf to allow for shorthand querying servers on my local domain.

search local.

If I have a server named myserver.local I can ping the server using "ping myserver", however if I try to "ping myserver.local" it stalls and fails to return an IP address. Pinging other hosts, such as google.com works as expected.

Is there a way that I can make both "ping myserver.local" and "ping myserver" work correctly?

link|improve this question
Are you sure adding local into your resolv.conf is the right place? Zeroconf != DNS. – Zoredache Feb 2 at 22:29
I'm adding local as a shortcut so I don't need to type the full fqdn in each time, I can just type the first part. The search option has documentation in the resolv.conf man page. – Justin Feb 3 at 7:30
1  
Yes, it is is a perfectly valid for DNS, but do you actually have a DNS ZONE for .local? Or are you using avahi/bonjour/zeroconf. Zeroconf is NOT DNS, so the configuration for the DNS resolver is probably not going to be very useful for you. If you actually have a DNS zone, and you have disabled any Zeroconf facilities in your systems, then ignore my comment. – Zoredache Feb 3 at 7:42
Yes, I have a bind server setup and serving out .local – Justin Feb 7 at 0:58
feedback

2 Answers

You need to remove the . after local:

search local

Assuming you have a dns resolver setup for your local domain, it should work as you're describing.

link|improve this answer
The . signifies the root level and should be valid syntax. Nevertheless I did try your suggestion and it didn't work. Thanks for the help though – Justin Feb 3 at 7:33
feedback
up vote 1 down vote accepted

It seems that this was not an issue with resolv.conf, but nsswitch.conf. There seems to be some issues with DNS resolution and mdns4_minimal if the application is 64bit. There is a few documented bugs but just to link one: Ubuntu Launchpad Bug#140663.

Uninstalling the package libnss-mdns resolved my issue.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.