mdns lookups fail over ipv6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nss-mdns (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: libnss-mdns
I have avahi running on a couple hosts (Jaunty) in my dual-stack lan. All ipv4 mdns resolution seems to work fine, but ipv6 resolution seems to be failing, even though resolving the same ipv6 hosts works fine using bind. I'm not sure exactly where in the chain the fault lies, but something seems to be amiss. Additionally, a Mac running Bonjour has no problem resolving the same hosts using IPv6.
/etc/avahi/
[server]
#host-name=foo
#domain-name=local
#browse-
use-ipv4=yes
use-ipv6=yes
#check-
#use-iff-running=no
#enable-dbus=yes
#disallow-
#allow-
[wide-area]
enable-
[publish]
#disable-
#disable-
#add-service-
#publish-
#publish-hinfo=yes
#publish-
#publish-domain=yes
#publish-
#publish-
#publish-
publish-
[reflector]
#enable-
#reflect-ipv=no
...
----------------
root@host1:/# ping host2
PING host2 (192.168.4.1) 56(84) bytes of data.
64 bytes from host2 (192.168.4.1): icmp_seq=1 ttl=64 time=0.243 ms
^C
--- host2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.243/0.
root@host1:/# ping host2.local
PING host2.local (192.168.4.1) 56(84) bytes of data.
64 bytes from host2 (192.168.4.1): icmp_seq=1 ttl=64 time=0.212 ms
^C
--- host2.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.212/0.
root@host1:/# ping6 host2
PING host2(2001:
64 bytes from 2001:X:X:X::1: icmp_seq=1 ttl=64 time=0.189 ms
^C
--- host2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.189/0.
root@host1:/# ping6 host2.local
unknown host
----------------
The kicker is, the Mac has no problem with this last lookup, meaning the issue has to be with my linux client implementation:
macbookpro:~$ ping6 host2.local
PING6(56=40+8+8 bytes) 2001:X:X:X:X:X:X:X --> 2001:X:X:X::1
16 bytes from 2001:X:X:X::1, icmp_seq=0 hlim=64 time=98.522 ms
16 bytes from 2001:X:X:X::1, icmp_seq=1 hlim=64 time=2.524 ms
^C
--- host2.local ping6 statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 2.524/50.523/98.522 ms
This works for me:
in /etc/avahi/ avahi-daemon. conf [server] section:
use-ipv6=yes
Also change nsswitch.conf:
$ diff -u nsswitch.conf /etc/nsswitch.conf
--- nsswitch.conf 2009-04-16 11:30:17.132488848 +1000
+++ /etc/nsswitch.conf 2009-04-16 11:30:28.000000000 +1000
@@ -8,7 +8,7 @@
group: compat
shadow: compat
-hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
+hosts: files mdns_minimal [NOTFOUND=return] dns mdns
networks: files
It would make sense for these changes to be the default. Avahi works well on IPV6 and IPV6 is perfect for zero configuration link local devices.