You are not logged in.

#1 2026-05-29 16:51:23

airbus777neo
Member
Registered: 2025-06-03
Posts: 38

Inconsistent hostname resolution with Avahi + mDNS

I have an HP 14-ep0529sa, and recently installed debian on an old Netgear ReadyNAS Duo v2, which prompted me to actually bother with network discovery, as opposed to just using an alias for mount.cifs i had for my main share

The resolution works about half the time, but intermittently just decides to not work, so I can't always rely on using readynas-debian.local, for example

I have already installed

avahi nss-mdns

as well as other things like samba, but these are the core packages required just for network discovery

avahi-daemon

is enabled, and running; in /etc/nsswitch I have:

hosts: mymachines mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] files myhostname dns

I changed MulticastDNS to no in /etc/systemd/resolved.conf to avoid conflicts

I've allowed port 5353 by running

sudo ufw allow 5353/udp

And I can't think of much more to do, since not much more is mentioned on the wiki

I did notice however, that when i run

sudo dmesg

the journal is flooded repeatedly with stuff like this, switching between 2 addresses (apparently):

[19414.988954] wlo1: disconnect from AP 40:3f:8c:c3:0d:45 for new auth to 9c:24:72:5f:20:fe
[19415.270792] wlo1: authenticate with 9c:24:72:5f:20:fe (local address=50:2e:91:b4:31:32)
[19415.270803] wlo1: send auth to 9c:24:72:5f:20:fe (try 1/3)
[19415.272841] wlo1: authenticated
[19415.274540] wlo1: associate with 9c:24:72:5f:20:fe (try 1/3)
[19415.276638] wlo1: RX ReassocResp from 9c:24:72:5f:20:fe (capab=0x1011 status=0 aid=17)
[19415.381282] wlo1: associated
[19415.381560] wlo1: Limiting TX power to 23 (23 - 0) dBm as advertised by 9c:24:72:5f:20:fe

and when I check

nmcli dev wifi

there are 4 different BSSIDs for my network SSID - 2 starting with 9C:24:72, and 2 starting with 40:3F:8C

a few potentially useful outputs:

❯ resolvectl status
Global
           Protocols: +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: foreign
  Current DNS Server: 1.1.1.1
         DNS Servers: 1.1.1.1 1.0.0.1
Fallback DNS Servers: 9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net 1.1.1.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com
                      8.8.8.8#dns.google 2001:4860:4860::8888#dns.google

Link 2 (wlo1)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 194.168.4.100
       DNS Servers: 194.168.4.100 194.168.8.100
        DNS Domain: cable.virginm.net
     Default Route: yes
❯ getent ahosts readynas-debian.local
fe80::250:43ff:fe00:202%2 STREAM readynas-debian.local
fe80::250:43ff:fe00:202%2 DGRAM  
fe80::250:43ff:fe00:202%2 RAW    
192.168.0.215   STREAM 
192.168.0.215   DGRAM  
192.168.0.215   RAW    

(the getent is usually consistent, no matter whether hostname resolution is or not)

Last edited by airbus777neo (2026-05-29 17:07:27)


Just a computer fanatic finally beginning to etch out of his shell in experience
"The man who chases two rabbits catches none." — Confucius

Offline

#2 2026-05-29 19:15:00

-thc
Member
Registered: 2017-03-15
Posts: 1,141

Re: Inconsistent hostname resolution with Avahi + mDNS

airbus777neo wrote:

there are 4 different BSSIDs for my network SSID - 2 starting with 9C:24:72, and 2 starting with 40:3F:8C

The former belongs to "Sagemcom" (router brand) and the latter to Netgear. Two WiFi access points at the same distance?

airbus777neo wrote:
❯ resolvectl status
Global
           Protocols: +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: foreign
  Current DNS Server: 1.1.1.1
         DNS Servers: 1.1.1.1 1.0.0.1
Fallback DNS Servers: 9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net 1.1.1.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com
                      8.8.8.8#dns.google 2001:4860:4860::8888#dns.google

Link 2 (wlo1)
    Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 194.168.4.100
       DNS Servers: 194.168.4.100 194.168.8.100
        DNS Domain: cable.virginm.net
     Default Route: yes

systemd-resolved works in "foreign" mode - the file "/etc/resolv.conf" is not a symbolic link to "/run/systemd/resolve/stub-resolv.conf".

Offline

#3 2026-05-29 19:56:01

airbus777neo
Member
Registered: 2025-06-03
Posts: 38

Re: Inconsistent hostname resolution with Avahi + mDNS

ok i've had a look into the different resolve modes, not particularly certain what each is for, but I have symbolocally linked /run/systemd/resolve/stub-resolv.conf (since this appears to be the recommended)
will comment on it after a few hours of working


Just a computer fanatic finally beginning to etch out of his shell in experience
"The man who chases two rabbits catches none." — Confucius

Offline

#4 2026-05-29 20:04:09

airbus777neo
Member
Registered: 2025-06-03
Posts: 38

Re: Inconsistent hostname resolution with Avahi + mDNS

no, after about 5 ish minutes of working, i can no longer resolve .local host names again
ping fails, but the output of getent is still the same

checking dmesg shows, again, a similar switch of AP

possibly an issue on my own network i will have to investigate


Just a computer fanatic finally beginning to etch out of his shell in experience
"The man who chases two rabbits catches none." — Confucius

Offline

#5 2026-05-29 20:07:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,627

Re: Inconsistent hostname resolution with Avahi + mDNS

You can control or disable roaming depending on how you configure the network.

Offline

Board footer

Powered by FluxBB