[avahi] Multiple DHCP connected interfaces, avahi-daemon only "listens" on one

Jason Heeris jason.heeris at gmail.com
Mon Jun 11 06:14:26 UTC 2018

I've got an Ubuntu 18.04 (avahi-daemon 0.7-3.1ubuntu1) machine with 
three interfaces: enp1s0f0 (PCI eth), wlp2s0 (PCI wifi), 
wlx485d601f9b83 (USB wifi). Everything's managed via Netplan (no 
Network Manager or ifupdown). The machine is used to connect an 
eth-only device to the local wifi network by masquerading over 
wlx485d601f9b83. At the moment enp1s0f0 has a static config, and both 
wifi interfaces are DHCP configured. Due to some Netplan's limitations, 
I have some duplicate routes that look like:

$ ip route show
default via dev wlx485d601f9b83 proto dhcp src 
metric 600
default via dev wlp2s0 proto dhcp src metric 
600 dev wlx485d601f9b83 proto kernel scope link src dev wlp2s0 proto kernel scope link src dev wlx485d601f9b83 proto dhcp scope link src 
metric 600 dev wlp2s0 proto dhcp scope link src metric 

My problem is this: I want Avahi to only use the PCI wifi interface 
(wlp2s0). But if I put "allow-interfaces=wlp2s0" in 
/etc/avahi/avahi-daemon.conf, suddenly I can't resolve any .local 

Before changing (ie. with no settings for either "allow-interfaces" or 

$ avahi-resolve --name -4 han.local

After "allow-interfaces=wlp2s0" and a restart of Avahi:

$ avahi-resolve --name -4 han.local
Failed to resolve host name 'han.local': Timeout reached

It still seems to be broadcasting though. Even after leaving it like 
this for hours, I can still resolve *back* to the machine itself from 
other machines, to the correct (wlp2s0) interface.

If I remove the "allow-interfaces" line, it's not a huge problem. 
Issues are simply that (a) I want to keep non-masquerade traffic off 
the interface and (b) for a brief moment during boot or restarting 
certain services, the machine's broadcast name resolves to the address 
of the wlx485d601f9b83 interface instead of the wlp2s0 interface.

But I'd really like to know what I'm doing wrong here. It seems like a 
simple config change, but it's definitely not having the effect I 


More information about the avahi mailing list