Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Are you sure adding local into your resolv.conf is the right place? Zeroconf != DNS. –  Zoredache Feb 2 '12 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 '12 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 '12 at 7:42
    
Yes, I have a bind server setup and serving out .local –  Justin Feb 7 '12 at 0:58

2 Answers 2

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.

share|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 '12 at 7:33
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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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