Archiv der Kategorie: Software

Openvswitch and Avahi

If you want to run Avahi on an Openvswitch interface, make sure it has multicast enabled.

Yesterday i finaly got my NAS Server with ubuntu 14.04 running, and stumbled across some issues while trying to get netatalk to work. Since it requires Avahi to announce it’s services, i was a little confused, since it hasn’t been woorking out of the box. Digging a little deeper, i found that Avahi was only taking my physical interface p3p1 as a relevant interface. This was a little unfortunate, since „p3p1“ is just connected to an internal openvswitch bridge „br0“, from where I created an internal interface „mgmt“, which has an actual IP from my internal network.

In the avahi config „/etc/avahi/avahi-daemon.conf“ one can set „allow-interfaces=mgmt“, but still, the „mgmt“ interface won’t get recognized, since it does not have the MULTICAST interface flag set. As I was unable to find out, how to set it with ovs-vsctl I found that the „ip“ command just would do the trick.

/bin/ip link set dev mgmt multicast on

Putting this in your /etc/rc.local just does the trick. And don’t worry about Avahi startig before rc.local gets executed, if a new network interface with multicast support appears in the system, Avahi will use it, even if it’s already running.