Ubuntu nslookup works ping doesn’t

Published on February 11, 2013 by Stuart Feeser

The nslookup works!
example@someserver:/etc/network$ nslookup www.aura.alta3.local
Server: 10.10.90.80
Address: 10.20.20.32#53

… but ping does NOT work:
example@someserver:/etc/network$ ping www.aura.alta3.local
ping: unknown host www.aura.alta3.local.

Cause: Your top level domain = “.local” and therefore Ubuntu is using “AVAHI” to use mDNS to do the DNS lookup rather than using a normal DNS query

Typical FIX: Edit /etc/nsswitch.conf
change this: hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
to this: hosts: files dns

BETTER FIX: Edit /etc/avahi/avahi-daemon.conf
Add this entry: domain-name=.alocal (or whatever, just not a top level domain that you intend to serve with a DNS server)

Here are the details: AVAHI

Keywords:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>