[avahi] Avahi dnsconfd (and a bit about running avahi)

Lennart Poettering mzzhgg at 0pointer.de
Sun Jul 3 05:28:32 PDT 2005


On Sat, 02.07.05 18:07, Steev (steev at steev.net) wrote:


> I am not sure it requires dbus, but the "after avahi" ensures that if
> you type /etc/init.d/avahi-dnsconfd and avahi isn't started, it will
> start both.

avahi-dnsconfd doesn't require DBUS. Only avahi-daemon does.

This graphic should explain the dependencies:

http://freedesktop.org/~lennart/overview.png

> eth0      Link encap:Ethernet  HWaddr 00:40:D0:33:FD:E1
>           inet addr:169.254.209.79  Bcast:169.254.255.255  Mask:255.255.0.0
>           inet6 addr: fe80::240:d0ff:fe33:fde1/64 Scope:Link
>           UP BROADCAST MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>           Interrupt:11 Base address:0x2000

Looks fine.

> steev at mebius ~ $ netstat -gn
> IPv6/IPv4 Group Memberships
> Interface       RefCnt Group
> - --------------- ------ ---------------------
> lo              1      224.0.0.1
> eth0            1      224.0.0.1
> ppp0            1      224.0.0.1
> lo              1      ff02::1
> eth0            1      ff02::1:ff33:fde1
> eth0            1      ff02::1

Is this when avahi-daemon is running? It didn't join the mDNS
multicast groups 224.0.0.251 or ff02::fb on any interface. Either you
didn't run avahi at this point or it didn't detect eth0 as a
"relevant" interface. 

> 
> steev at mebius ~ $ sudo netstat -upln
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address
> State       PID/Program name
> udp        0      0 0.0.0.0:5353            0.0.0.0:*
>         24571/avahi

This looks fine.

> 
> HOWEVER
> when I run avahi-discover...
> 
> steev at mebius ~ $ avahi-discover
> *** WARNING: Detected another IPv4 mDNS stack running on this host. This
> makes mDNS unreliable and is thus not recommended. ***
> New relevant interface eth0.2 (#4)
> Enumeration complete

This looks fine.

> steev at mebius ~ $ netstat -gn
> IPv6/IPv4 Group Memberships
> Interface       RefCnt Group
> - --------------- ------ ---------------------
> lo              1      224.0.0.1
> eth0            1      224.0.0.251
> eth0            1      224.0.0.1
> ppp0            1      224.0.0.1
> lo              1      ff02::1
> eth0            1      ff02::1:ff33:fde1
> eth0            1      ff02::1

This time the IPv4 multicast group 224.0.0.251 has been
joined. However: since you're running both avahi-daemon and
avahi-discover (right?) the refcount should be 2.

> 
> steev at mebius ~ $ sudo netstat -upln
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address           Foreign Address
> State       PID/Program name
> udp        0      0 0.0.0.0:5353            0.0.0.0:*      26729/avahi-discove
> udp        0      0 0.0.0.0:5353            0.0.0.0:*      24571/avahi
> udp        0      0 :::5353                 :::*          26729/avahi-discove

You disabled IPv6 for the avahi daemon right? 

This looks fine, though.
> 
> and I get the following in /var/log/messages
> 
> Jul  2 17:16:24 mebius avahi[24571]: Recieved packet from invalid interface.
> Jul  2 17:16:24 mebius avahi[24571]: Recieved packet from invalid interface.
> Jul  2 17:16:26 mebius avahi[24571]: Recieved packet from invalid interface.
> Jul  2 17:16:30 mebius avahi[24571]: Recieved packet from invalid interface.
> Jul  2 17:16:38 mebius avahi[24571]: Recieved packet from invalid
> interface.
> 
> 
> So, does mDNS/avahi NOT work with link-local ?

It looks like avahi-discover detected all relevant interfaces and
works fine, but avahi-daemon didn't. Which is interesting since both
use the same code for detecting network configuration. The difference
is probably that you started avahi-daemon before configuring your
network and avahi-discover after it. (Which is what you did, correct?)
It seems you spotted a bug in the netlink code of avahi. 

Please restart avahi-daemon after configuring the network once and see
if it works than.

I'll need to analyze this further.

Lennart

-- 
name { Lennart Poettering } loc { Hamburg - Germany }
mail { mzft (at) 0pointer (dot) de } gpg { 1A015CC4 }  
www { http://0pointer.de/lennart/ } icq# { 11060553 }


More information about the avahi mailing list