2

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?

Justin
  • 31
  • 1
  • 4
  • Are you sure adding local into your resolv.conf is the right place? Zeroconf != DNS. – Zoredache Feb 02 '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 03 '12 at 07: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 03 '12 at 07:42
  • Yes, I have a bind server setup and serving out .local – Justin Feb 07 '12 at 00:58

2 Answers2

1

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.

ben
  • 191
  • 4
  • 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 03 '12 at 07:33
1

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.

Justin
  • 31
  • 1
  • 4