PDA

View Full Version : [ubuntu] Intrepid install: can ping hostname but not fully-qualified hostname



richtl
November 3rd, 2008, 07:10 PM
I just installed Intrepid on a new machine. I can ping servers by hostname, but I can't ping if the hostname is fully qualified.

E.g.

$ ping moose
PING moose.nedd.local (192.168.7.14) 56(84) bytes of data.
64 bytes from neddweb.nedd.local (192.168.7.14): icmp_seq=1 ttl=128 time=3.6

$ ping moose.nedd.local
(nothing)

$ host moose.nedd.local 192.168.2.18 (my dns)
Using domain server:
Name: 192.168.2.18
Address: 192.168.2.18#53
Aliases:
moose.nedd.local has address 192.168.7.14

I thought something might be blocking ICMP, but browsing to the above server behaves exactly the same way (hostname works, FQ hostname doesn't).

$ cat /etc/resolv.conf
# Generated by NetworkManager
domain nedd.local
search nedd.local
nameserver 192.168.2.18

$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 mybox.nedd.local mybox
...

Networking works properly on my Hardy box. I'm stumped. Ideas?

RichTL

richtl
November 4th, 2008, 03:46 PM
This is a bug in Avahi. See https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/80900.

"I have this same problem on 7.04 beta.
Avahi uses the .local as its SOA. Because you use it internally avahi causes conflict."

Disabling the Avahi daemon fixes the problem, but this has been around since Gutsy and should really be resolved.

Even better, you can leave Avahi enabled but change the host lookup order to prefer regular DNS, as I found later in the same thread:

"Changing the /etc/nsswitch.conf file's hosts line from

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

to

hosts: files dns mdns4_minimal [NOTFOUND=return] mdns4

solves the problem."