You are not logged in.

#1 2020-03-18 14:11:39

gearhead
Member
Registered: 2018-03-24
Posts: 56

resolved vs avahi-daemon

I'd like to remove avahi-daemon as I have read that systemd-resolved can also deal with mDNS and 'should replace avahi'. My experience is that is cannot, at least not yet. I have tried on 2 different machines at 2 different locations. Configured with the same nsswitch 'hosts:' line and have masked avahi-daemon and avahi-daemon.socket
"hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname"
I was unable to get a resolution of hostname.local. On one machine with the hosts line:
"hosts: files myhostname dns mdns"
My resolved.conf has the line:
"MulticastDNS=yes"
I was able to get a resolve, but it was very slow. With the same configuration on a different network, I got nothing. Is there a secret to this? I have also read a lot of cynical posts referring to the fact that Resolved 'claims' to replace avahi but cannot. Which is right? My experience is that it cannot. The Arch wiki is not as helpful for this as it could be on a number of fronts. One is that it assumes that we are using NetworkManager in a lot of spots which is not always true. I am using NetworkManager on one machine but use connman on the laptop and RPis...

Any old hands that can confirm or deny that Resolved cannot replace Avahi, as I have concluded.

Last edited by gearhead (2020-03-18 14:13:26)

Offline

#2 2020-03-20 15:04:39

gearhead
Member
Registered: 2018-03-24
Posts: 56

Re: resolved vs avahi-daemon

So, I dug into this more. Please correct me if I have any of this wrong.

I masked avahi-daemon.service and avahi-daemon.socket.
/etc/nsswitch hosts: hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
/etc/systemd/resolved: MulticastDNS=yes

With this setup, I get rapid connection to hostname.local from any browser on the LAN. This works on a Windows network or a Linux only network.

The problem is that the mdns-scan on the computer (or avahi browse on my phone) shows no advertised services as there is nothing being advertised. That is what Avahi did. So I dug a bit more and discovered (i think) that mdnsresponder is what is required so that when pinged, it will respond with whatever services it is advertising. This should work *with* resolved and not interfere. The problem is that this package does not exist for Arch or Ubuntu as they all use Avahi and this is woven through many many packages in each ecosystem. I found an old Arch PKGFILE and associated files and actually built it for armv7. For some reason, armv6 will not build. Will build it for x86-64 and see how it goes. I also found that FreeBSD (My FreeNAS runs this to advertise services) and a few others have standardized on mdnsresponder instead of avahi. With the advancements of systemd-resolved, may it be time for Arch to consider this as well? I will continue my investigation and see how far I get...

Please let me know of experiences or inaccuracies.

Offline

#3 2020-03-21 13:54:29

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: resolved vs avahi-daemon

Did you configure the network management tool you use for multicast per-connection support as described at https://wiki.archlinux.org/index.php/Sy … olved#mDNS ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2020-03-24 15:57:48

gearhead
Member
Registered: 2018-03-24
Posts: 56

Re: resolved vs avahi-daemon

@Lone_Wolf Thanks for the response. Actually, you touch on the problem. I am not using NetworkManager. I am using connman/IWD and do not have a UI. This is an audio appliance. Most of the threads I have pored over talk about NetworkManager and/or other GUI stuff that is not being used here.

I gave up on this for now. It seems to me that systemd-resolved it would be great to let resolved do what it is there for and then have Avahi just advertise/respond by using the mDNSResponder package, but it looks like the whole ecosystem was built differently and Avahi is a dependency of so many packages that I am using that this would be a huge project. As it is, I was unable to build mDNSResponder and have it run on arm. I get a core dump on armv7 and get a build error on armv6. I need both arm packages, otherwise it is not of much value to me.

Offline

#5 2020-03-25 13:39:42

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: resolved vs avahi-daemon

NetworkManager can be used without a gui through /usr/bin/nmcli .

I'd like to remove avahi-daemon as I have read that systemd-resolved can also deal with mDNS and 'should replace avahi'.

Looks like we can rephrase that now :

Systemd-resolved can function as a mDNS responder and replace avahi IF you combine systemd-resolved with systemd-networkd OR  NetworkManager   .


mDnsresponder

I guess you found it at https://github.com/aur-archive/mdnsresponder ?
It refers to an apple tool that does appear to have seen recent releases.
Check https://opensource.apple.com/tarballs/mDNSResponder/ ,  the mDNSResponder-1096.0.2.tar.gz looks like the most recent one.
Files inside it show dates of july 2019.
You could adjust the PKGBUILD to use that version and see if it runs on arm .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB