Macvlan and multicast between host and guest


I’m currently having an issue with LXD and mdns / multicast.

I’m running some linux machines in a network with a poor router, which properly does the routing job and DHCP, but doesn’t put the DHCP clients into a DNS domain. I’m therefore using mdns for the machines to find each other.

One of the machines is a server, running several virtual servers with LXD. I had connected them and the host to a virtual linux bridge with the hardware interface, and things worked (more or less, avahi-daemon not really reliable and flawless).

Now I have replaced the bridge with macvlan.

Like before, the other machines in the network can find and contact the virtual servers.

But the host itself cannot find it anymore. The problem seems to be that mdns uses multicast requests and macvlan devices on the same machine don’t seem to see eath other’s multicast packages.

I’ve seen discussions on forums about docker having a similar problem, but there seems to be some solution. e.g.

Some older docker versions didn’t flag the virtual interface with IFF_MULTICAST, but I think that’s been fixed for a while.

Has anyone had this problem? Any way to fix? Or should I go back to bridging?


I’ve found a comment on

that macvlans can be used in four different modes, and in “private” mode the macvlan interfaces on the same physical interface cannot communicate with each other.

But there’s a bridge mode, which is a simplified form of the regular bridge, and doesn’t have to learn.

How would I select this mode for LXD?

The macvlan ( NIC type uses bridge mode.

I’m not sure about multicast support I will need to spend some time looking into it.

I have a fix for this here: