I am using Ubuntu 22.04. I want to be able to resolve hostname of a device connected to my local network. The device is publishing its hostname using mDNS. On my machine, I am able to ping device.local, but nslookup returns:
** server can't find device.local: NXDOMAIN
avahi-resolve also return proper address.
In nsswitch.conf I have:
hosts: files mdns4_minimal [NOTFOUND=return]
Note that the device has static IP address. The device.local is not know to my DNS server and I want to keep that in this way.
I tried various modification of nsswitch.conf and dnsmasq config modifications. I was expecting nslookup to be able to resolve address of the device but without results.
Adding entry in /etc/hosts works but I don't like this solution as address of the device could change in the future.