What happened to nss-mdns package? (mdns ".local" DNS resolution)


New to using LEDE, although I've used dd-wrt before. I've been trying to setup mDNS / Zeroconf the new "LEDE / OpenWRT" way using "umdns" package as per guidance from the wiki.

After installing umdns package and enabling the daemon, I can run ubus call mdns browse and see devices that are advertising mDNS services on the network.

However, I noticed that the .local addresses are not able to resolve either on the router itself or from other machines on the LAN.

After a bit of digging, it looks like this functionality is provided by nsswitch and nss-mdns packages. This package appears to have been submitted back in 2011. Yet, it seems unavailable in LEDE?

Is this package still functional in LEDE, or is there a migration path to get .local addresses resolving using the new umdns package?

1 Like

I'm interested in this too because I'd much rather use the .local suffix for names rather than .lan

Just tried changing the .lan local suffix to use .local. This isn't a true mdns solution but appears to configure dnsmasq DNS suffix to use the same one as mDNS / Zeroconf / Avahi would use. Therefore, it's a workaround... but it works!

Now my printer works again! (it uses mDNS to advertise the ipp port and was using hostname as given by mDNS: printer-name.local)

So if .lan is still default config for dnsmasq, I'd say this is still a bug that breaks mDNS functionality in OpenWRT / LEDE. However, I had to manually install and enable umdns package even to get it working at all, and this config setting for .lan as default plus missing nss-mdns package breaks the entire idea to support .local DNS lookups.

Probably it's best to reinstate nss-mdns package to enable true .local name lookups from mDNS. The workaround only works when dnsmasq hostnames are the same as mDNS hostnames.

1 Like

So after running this for a couple weeks, it looks like there are probably more bugs in umdns that eventually cause the router to forget the printer's published service data. So, I'm being forced to reboot both router and printer to get the Airprint _ipp._tcp service to re-publish again. I've tried just rebooting the printer but this doesn't seem to work. ubus call umdns browse output does not show the printer unless I reboot both router + printer each time it "forgets".

Additionally, I've noticed that there is an issue with hostnames of local MacOS machines on the network somehow thinking that there is a host already on this network with the same name! It's weird because these all should only connect over 1 WiFi adapter always to the same SSID / AP / radio, and they are the only ones with their unique names on the network! So they probably see themselves somehow in the mDNS data and think that these hosts are a different one, then they rename themselves again and again with numeric suffix like foo-1.local, foo-2.local, ... foo-N.local. The hostname on each MacOS machine can be seen to increment the same as these mDNS names. The only workaround I've found for this problem is to run the following command to force reset the hostname to the original one without -N suffix when I notice the issue:

for h in ComputerName LocalHostName HostName ; do sudo scutil --set $h $(sudo scutil --get LocalHostName | cut -f1 -d-); done 

This problem was also in the original stock Linksys firmware for my router, and Apple support (3rd tier) said that this was a problem with my router's mDNS implementation. It's one of the main reasons I switched to Openwrt / LEDE!

If there is a working and stable solution for mDNS on LEDE, I'd be very grateful!

Possible next steps I can see are to test out:

  • avahi
  • mdnsresponder
  • OLD mdns ? (not the new one docs recommended: umdns)

EDIT: I'm trying mdnsresponder for now based on the hope & assumption that it should work with Apple products better. This package installed dependencies:

  • mdnsd
  • mdns-utils
  • mdnsresponder

We'll see how it goes...

EDIT: Still macbook is behaving the same as before with the name suffix increment. I just switched the router DHCP config to set a static IPv4 for the macbook. We'll see if this helps I guess...