Networking

Clients keep DHCP leases but lose local mDNS/hostname resolution until home router reboot

aliceadmin
1mo ago
Environment

Environment

Home network: OpenWrt 22.03 router (ath79), LAN 192.168.1.0/24, DNSMasq for DHCP/mDNS support, multiple clients (macOS, Linux, Android). DHCP leases renew successfully, but Avahi/Bonjour/mDNS and local hostname resolution fail intermittently until router is rebooted.

Symptoms

Symptoms

Devices retain IP addresses (ip addr shows same), can ping gateway by IP, and reach internet, but resolving local hostnames (device.local) times out. Avahi on clients shows limited discovery; nmap shows UDP/5353 replies inconsistent. Restarting router restores name resolution for hours before recurrence.

Observations

Observations

Router logs show occasional 'dnsmasq: ignoring query from <LAN IP>: REFUSED' entries and high load on dnsmasq when the issue starts. mDNS multicast (224.0.0.251) traffic seen on LAN but with packet loss spikes. Disabling IGMP snooping on switch reduces but does not eliminate the issue.

Already attempted

Already attempted

Restarted Avahi on clients, flushed DNS cache, rebooted router (temporary fix), updated OpenWrt packages, disabled firewall forwarding between LAN clients, enabled multicast flooding, captured tcpdump on router and a client during failure window.

Question

Question

What configurations or router bugs cause mDNS/name resolution to stop working on a LAN while DHCP remains valid, and how can I make local hostname resolution robust without frequent router reboots?

COMMUNITY RESPONSES

Verified community troubleshooting

1 reply
0
stella_stack Answer
user
Posted 1mo ago • 0 confirmations

Short fix: check and raise dnsmasq limits and stop IGMP snooping while you troubleshoot. Edit /etc/config/dnsmasq on the router to increase cache-size (e.g., 1000) and disable query rate limiting, then restart dnsmasq. Temporarily disable IGMP snooping on any managed switch and the router so mDNS multicast reaches all nodes. Verify by running 'avahi-browse -a' on a client; if names return, gradually re-enable features with tuned settings. If issues persist, collect tcpdump on UDP/5353 from both client and router and update OpenWrt/dnsmasq — rebooting is only a bandage.

Showing 1 of 1 community responses
AI DIAGNOSTICS

Incident analysis

Updated 1mo ago• Trouble ID

Most likely causes

dnsmasq hitting resource limits (max cache, query rate limits) or leaking state causing it to refuse/respond incorrectly to mDNS queries 60%
IGMP snooping or multicast routing on switch or router caching stale group memberships, dropping mDNS packets to some ports 45%
Router firewall or UPnP/IGD module misclassifying mDNS and blocking requests under load 30%

Summary

mDNS is multicast‑based and can fail when the router's dnsmasq, IGMP snooping, or firewall blocks multicast or when dnsmasq reaches resource limits and refuses queries. The 'REFUSED' log suggests dnsmasq treating queries as unsupported (e.g., queries forwarded to the internet or rate-limited). Packet-loss spikes indicate either a multicast suppression feature or CPU overload on the router at failure time. Reboot clears transient state, pointing to resource exhaustion or leaking mappings in dnsmasq.

Suggested Fixes

Diagnostic step 1
Increase dnsmasq limits: bump cache-size, query-port, and disable query logging; check /etc/config/dnsmasq and restart service after changes
Diagnostic step 2
Disable any multicast filtering/IGMP snooping on managed switch and router temporarily to see if problem stops; if so, add static IGMP groups or tune snooping settings
Diagnostic step 3
Enable verbose dnsmasq logging, capture tcpdump for UDP/5353 at both router and a client when issue occurs to confirm whether packets reach router

Continue troubleshooting

Matched from the title, description and tags