If your home network is using a separate DNS server like Pi-hole, you should consider adjusting your router configuration so that the DNS server's address is only given to DHCP clients, and not used by the router itself. Why? Because if you enable a feature like Pi-hole's conditional forwarding, which allows the server to map IP addresses to names by looking them up in the router's DNS, any such queries that the router can't answer will be forwarded back to the DNS server, creating an infinite loop until the maximum number of queries per second is reached.
I found that devices which are capable of unicast DNS service discovery (e.g. Apple devices) would often check if the DNS had any services to advertise by issuing PTR queries for
b._dns-sd._udp.0.1.168.192{dot}in-addr{dot}arpa,
lb._dns-sd._udp.0.1.168.192{dot}in-addr{dot}arpa, or
db._dns-sd._udp.0.1.168.192{dot}in-addr{dot}arpa (depending on the IP address range in use). Also, since I had a custom local domain set to "home" on both the router and Pi-hole's conditional forwarding, PTR queries for
b._dns-sd._udp.home,
lb._dns-sd._udp.home, and
db._dns-sd._udp.home were also being issued and bouncing back and forth. But it's not just these automated queries that be problematic; something as simple as running
issues A, AAAA, and MX record queries, the last of which causes yet another loop because the DHCP server doesn't specify that information.
The fix was to simply set the router to only use external DNS servers in Connection > Basic, then set the DHCP server to distribute the Pi-hole IP address instead.
Code: Select all
# clear the previous setting if necessary
uci delete dhcp.lan.dhcp_option
uci commit dhcp
# set which DNS server to assign DHCP clients
uci add_list dhcp.lan.dhcp_option="option:dns-server,192.168.1.254"
uci commit dhcp
/etc/init.d/dnsmasq restart