What's new

Adding config for a local DNS causes slow connections

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

kensey

New Around Here
I recently set up a Raspberry Pi as the internal DNS for my lab that my RT-AX3000 is the gateway for. The intent here was to have queries for internal lab hostnames recursively forwarded to this DNS but use my ISP's DNS for regular outbound queries. So I turned on the "Enable JFFS custom scripts and configs" option and put this in /jffs/configs/dnsmasq.conf.add:

server=/my.internal.domain/10.100.0.2

then restarted the router. Almost immediately I noticed initial queries to websites slowed way down. Tonight, looking at it in more detail, I noticed lots of log entries like this scrolling by:

Nov 28 00:23:15 dnsmasq[1421]: Maximum number of concurrent DNS queries reached (max: 150)

As a first troubleshooting step I disabled the "custom scripts and configs" option, rebooted the router again, and the issue (and the log messages) went away completely.

Is my dnsmasq config line wrong for what I'm trying to do, or is something else going on here?
 
Is this with Pi-Hole or just a plain DNS server in the Pi? Pi-Hole with Conditional Forwarding can cause those messages on the router. Otherwise make sure there is no lookup loop between router and Pi DNS.
 
It’s just a regular Pi running Raspbian that I set up dnsmasq on. I’ll check the config on it later today and see if it might be looping —it *shouldn’t* be, but then again I set it up early one recent AM and well, I probably wasn’t 100% awake when I finished...
 
There *is* a loop, but I'm not sure why it's happening. In the Pi's dnsmasq logs, I see nothing after I start dnsmasq till a query comes in from the router asking it to look up metadata.google.internal.my.internal.domain. It forwards that query back to the router, which then asks the Pi to resolve it, etc.

I think something on my internal network must be asking for the metadata query. I think I know how to chase that down...
 
On the Pi, have a config line to prevent dnsmasq from forwarding the local domain back to the router.
Code:
local=/my.internal.domain/
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top