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

Steev steev at steev.net
Sat Jul 2 16:07:15 PDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On my gentoo box, I haven't submitted the patch yet, but I have an init
script for avahi-dnsconfd (it seems to work fine, I will attach the init
script itself to this mail since its just a file)

#!/sbin/runscript
# Avahi ZeroConf Daemon init script
# Many thanks to the Avahi developer's and Sebastien Estienne

DAEMON=/usr/bin/avahi-dnsconfd

depend () {
        after avahi
        need dbus avahi
}

start() {
        ebegin "Starting avahi-dnsconfd"
        $DAEMON -D
        eend $?
}

stop() {
        ebegin "Stopping avahi-dnsconfd"
        $DAEMON -k || /bin/true
        eend $?
}

reload() {
        ebegin "Reloading avahi-dnsconfd"
        $DAEMON -r
        eend $?
}


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.

I did notice something - when I change reload to restart, I get the
following, which I am not sure is Gentoo specific or not..

steev at mebius ~ $ sudo /etc/init.d/avahi-dnsconfd restart
 * Caching service dependencies ...
  [ ok ]

 * Please use 'svc_stop; svc_start' and not 'stop; start' to
 * restart the service in its custom 'restart()' function.
 * Run avahi-dnsconfd without arguments for more info.

 * Stopping avahi-dnsconfd ...
  [ ok ]
 * Starting avahi-dnsconfd ...
  [ ok ]

Now then, running avahi...

I have setup /etc/conf.d/net to enable dhcp on eth0, and i have a
fallback set to apipa, which means if dhcp doesn't respond with an ip,
an ipv4 link-local ip is set.

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

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

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

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

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

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

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 ?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCxx4j1c+EtXTHkJcRAox7AJ4j7HaKGsCzQDbyLQWQTvuWJBCvUQCfcwVq
9f0eQv/LONhkcPAqQkUhytY=
=ShnA
-----END PGP SIGNATURE-----


More information about the avahi mailing list