[avahi] Only IPv6 services are visible

Marc Heerdink marc.heerdink at gmail.com
Thu Mar 11 16:09:53 PST 2010


Hi,

First of all, thanks for the great tool that Avahi seems to be.
Unfortunately, it isn't being so great for me so far, which is why I'm
mailing. I'm trying to set up Avahi in my local network, using
(currently) just two computers, a HTPC and a laptop. Both of them are
running very recent installations of Gentoo, using the latest stable
packages and Avahi 0.6.25. The only difference is that the laptop
version is compiled with mono support and the HTPC version not, but I
suspect that isn't causing my issues.

Basically, the problem is that only the IPv6 services on the HTPC are
visible to the laptop, while I'd like to use the IPv4 version (eg XBMC
web server, SSH), The HTPC, on the other hand, can sometimes 'see' the
IPv4 services on the Laptop and sometimes not. To either computer, all
local (IPv4 & IPv6) and IPv6 services of the other computer are always
visible. For example:

[Laptop]
marc at MarcLaptop ~ $ avahi-browse -a
+ wlan0 IPv6 marc at MarcLaptop
_pulse-server._tcp   local
+ wlan0 IPv4 marc at MarcLaptop
_pulse-server._tcp   local
[..]
+ wlan0 IPv6 MarcLaptop [00:13:02:68:f6:b1]
_workstation._tcp    local
+ wlan0 IPv4 MarcLaptop [00:13:02:68:f6:b1]
_workstation._tcp    local
+ wlan0 IPv6 htpc                                          _ssh._tcp
        local
+ wlan0 IPv6 htpc [00:27:0e:0a:d2:18]
_workstation._tcp    local
+ wlan0 IPv6 XBMC Web Server at htpc                          _http._tcp
        local
+ wlan0 IPv6 XBMC HTTP API at htpc
_xbmc-web._tcp       local
+ wlan0 IPv6 XBMC Event Server at htpc
_xbmc-events._udp    local
+ wlan0 IPv6 SFTP File Transfer on htpc
_sftp-ssh._tcp       local

and

[HTPC]
+ eth0 IPv6 marc at MarcLaptop
_pulse-server._tcp   local
+ eth0 IPv4 marc at MarcLaptop
_pulse-server._tcp   local
+ eth0 IPv6 XBMC HTTP API at htpc
_xbmc-web._tcp       local
+ eth0 IPv4 XBMC HTTP API at htpc
_xbmc-web._tcp       local
+ eth0 IPv6 XBMC Web Server at htpc                          _http._tcp
       local
+ eth0 IPv4 XBMC Web Server at htpc                          _http._tcp
       local
+ eth0 IPv6 XBMC Event Server at htpc
_xbmc-events._udp    local
+ eth0 IPv4 XBMC Event Server at htpc
_xbmc-events._udp    local
+ eth0 IPv6 MarcLaptop                                    _ssh._tcp
       local
+ eth0 IPv6 htpc                                          _ssh._tcp
       local
+ eth0 IPv4 MarcLaptop                                    _ssh._tcp
       local
+ eth0 IPv4 htpc                                          _ssh._tcp
       local
+ eth0 IPv6 SFTP File Transfer on MarcLaptop
_sftp-ssh._tcp       local
+ eth0 IPv6 SFTP File Transfer on htpc
_sftp-ssh._tcp       local
+ eth0 IPv4 SFTP File Transfer on MarcLaptop
_sftp-ssh._tcp       local
+ eth0 IPv4 SFTP File Transfer on htpc
_sftp-ssh._tcp       local
+ eth0 IPv6 MarcLaptop [00:13:02:68:f6:b1]
_workstation._tcp    local
+ eth0 IPv6 htpc [00:27:0e:0a:d2:18]
_workstation._tcp    local
+ eth0 IPv4 MarcLaptop [00:13:02:68:f6:b1]
_workstation._tcp    local
+ eth0 IPv4 htpc [00:27:0e:0a:d2:18]
_workstation._tcp    local


The puzzling part is that the configuration of Avahi is identical on
both machines, as is the version and configuration of most other parts
(esp kernel version 2.6.33 and its network configuration), so the
obvious causes are ruled out.

I've spent a few hours looking for a solution, trying everything I've
found using Google that looked slightly related:

* Tried ifconfig allmulti & promisc on both of the machines, because
they're using different network interfaces (iwl3945 & e1000e) and the
driver could be the problem. No difference, however.
* Tried to disable ipv6 support in the avahi config, which led to the
laptop not seeing any services on the HTPC, everything else working.
* Compiled multicast support into the kernel; no difference (since the
HTPC was already finding the IPv4 services on the laptop before
compiling in this option, I suspect it isn't needed)
* Tried Avahi 0.6.24 & 0.6.25

A clue might be that the HTPC defaults to resolving IPv4 addresses,
while the Laptop defaults to IPv6 addresses (using
avahi-resolve-host-name).

[laptop]
marc at MarcLaptop ~ $ avahi-resolve-host-name MarcLaptop.local
MarcLaptop.local        fe80::213:2ff:fe68:f6b1

[HTPC]
htpc avahi # avahi-resolve-host-name htpc.local
htpc.local      192.168.1.71

I've also tried to force IPv4 lookup (using -4), which results in a
timeout on both the Laptop and the HTPC when looking up the other
machine. Looking up all other addresses (own IPv4, own/other IPv6)
always works. Earlier tonight, IPv4 lookup of marclaptop.local was
also working on the HTPC, returning the IPv4 address, but I'm not sure
why it fails now.

Anyway, because I think this contains a clue, I'd like to know if
there's something that determines whether Avahi prefers IPv6 over IPv4
addresses? Or maybe if you have any more suggestions that I could try
to get this to work?

Thanks for any input (and sorry for the horribly formatted email),

Best
Marc


More information about the avahi mailing list