[Pkg-utopia-maintainers] Bug#736641: avahi-daemon: mDNS /SD fails on home networks with no multicast querier

Marc Culler mcbugs000 at gmail.com
Sat Jan 25 19:08:59 UTC 2014


Package: avahi-daemon
Version: 0.6.31-2ubuntu4.1
Severity: wishlist

Dear Maintainer,

There are many reports of avahi failing with the symptom that advertised
services "disappear" after a short time.  A typical example is bug #657553.
There is a simple reason for why this happens on many home networks.  This
wishlist bug is a suggestion for how to fix it.

Here is the reason for the failure.  The  mDNS service uses multicast UDP
packets.  The multicast protocol requires that one of the routers on a network
be elected as an IGMP querier.  It should broadcast IGMP query packets at
regular intervals.  The hosts which want to belong the mDNS multicast group
(namely any computer running avahi-daemon) would then respond with its address.
However, most home routers do not provide a multicast querier.  On the other
hand, most home switches and wireless access points do support IGMP snooping.
The consequence of this is that the switch or WAP will unsubscribe hosts from
the mDNS multicast group if the switch does not hear any IGMP responses from
the host during that time.  This causes the host to "disappear" as reported in
bug #657553.

Here is the simple fix.  The avahi daemon should always start up as an IGMP
querier, sending IGMP query packets at a configurable regular interval.  The
avahi daemon should also participate in the querier election process.  That is,
if it hears a query packet from another device with a lower IP address, then it
should stop sending query packets.  This way, if there is a true multicast
router on the network the avahi-daemon will behave as it now does.  But if, as
is typical in home networks, there is no IGMP querier on the network then one
of the avahi-daemons will step in.

I have tested this on my home network by running a daemon on one of my linux
systems which sends and IGMP query packet every 60 seconds.  If that daemon is
not running I see the same "disappearing addresses" as are reported in bug
#657553.  However, with the daemon running I am able to use .local addresses
for all of my devices that support mDNS and service discovery for printers etc.
works reliably.



-- System Information:
Debian Release: wheezy/sid
  APT prefers saucy-updates
  APT policy: (500, 'saucy-updates'), (500, 'saucy-security'), (500, 'saucy'), (100, 'saucy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11.0-14-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages avahi-daemon depends on:
ii  adduser            3.113+nmu3ubuntu2
ii  bind9-host [host]  1:9.9.3.dfsg.P2-4ubuntu1.1
ii  dbus               1.6.12-0ubuntu10
ii  libavahi-common3   0.6.31-2ubuntu4.1
ii  libavahi-core7     0.6.31-2ubuntu4.1
ii  libc6              2.17-93ubuntu4
ii  libcap2            1:2.22-1.2ubuntu2
ii  libdaemon0         0.14-2build1
ii  libdbus-1-3        1.6.12-0ubuntu10
ii  libexpat1          2.1.0-4
ii  lsb-base           4.1+Debian11ubuntu4
ii  sysv-rc            2.88dsf-41ubuntu3
ii  upstart            1.10-0ubuntu7

Versions of packages avahi-daemon recommends:
ii  libnss-mdns  0.10-3.2ubuntu1

Versions of packages avahi-daemon suggests:
ii  avahi-autoipd  0.6.31-2ubuntu4.1

-- Configuration Files:
/etc/avahi/avahi-daemon.conf changed [not included]

-- no debconf information



More information about the Pkg-utopia-maintainers mailing list