I just added a NAS to my home network and gave it the hostname mynas
. I tried to access the NAS from Kubuntu 20.04 (especially via Samba). It works fine when using plain hostname, but it fails when using "mynas.local".
I.e. ping mynas
works fine, ping mynas.local
does not.
I understand that .local
names are resolved using Avahi/Zeroconf (Bonjour). So I run avahi-browse -at
which properly locates the NAS. Immediately after that, ping mynas.local
works fine – for a minute. Then it stops working until the next avahi-browse -at
.
Is this a Kubuntu or a NAS problem? What can I do to permanently enable avahi name resolution?
Please note that the edits below were checked using a new Kubuntu 21.10 installation.
Edit: Content of /etc/nsswitch.conf
passwd: files systemd
group: files systemd
shadow: files
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
Edit2: $ avahi-browse -at
+ enp5s0 IPv6 mynas Web-Angebot local
+ enp5s0 IPv6 mynas Microsoft Windows Network local
+ enp5s0 IPv6 mynas Device Info local
+ enp5s0 IPv4 mynas Web-Angebot local
+ enp5s0 IPv4 mynas Microsoft Windows Network local
+ enp5s0 IPv4 mynas Device Info local
Edit3: $ systemctl status avahi-daemon.service
avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-12-30 23:27:10 CET; 2h 42min ago
TriggeredBy: avahi-daemon.socket
Main PID: 46832 (avahi-daemon)
Status: "avahi-daemon 0.8 starting up."
BTW the error I get on ping to mynas.local is "Temporary failure in name resolution"