Failed to resolve specific DNS request on Asus RTAX53U with OpenWrt


I am using Asus rt-ax53u router flashed with 22.03.3 OpenWRT firmware. I have enabled stubby for DOT.
I am facing issue with one of the DNS request is not getting resolved when I use nslookup on the router itself however the same is getting resolved if I do it from one of the connected device.
After doing some analysis, what I observed is that the DNS response is getting truncated.
when the connected device receives the truncated DNS response, it re-sends the DNS request over TCP and get the response however the same is not done when I run nslookup directly on the router.
I sniffed the DNS packet at loopback interface of router and don't see any DNS packet over TCP but received the truncated flag set in DNS response.

can someone help me how to fix this specific issue? do I need to configure any option in stubby/dnsmasq to increase the packet size or enable tcp if response is truncated?

is the router and the clients using the same DNS ?

1 Like

yes, the DNS server for the clients is the router itself.

That's not the same thing, hosting <> using.

the router is configured to use stubby and all the DNS request (originating from Router or coming from the clients) are forwarded to stubby and ultimately reaching to a specific DNS resolver running with DOT.

Cool, then post a nslookup example for a local dns name request, from a client and from the router.

Hi @frollic ,
Apology for the late response, Below are the screen shots for dns resolution done from the router and from the client.
Router -->image
client -->

I mainly suspecting the UDP size/EDNS0 configuration of dnsmasq at router but not able to figure it out how to change those configuration.

is there any way to change the UDP packet size or enable edns0 option or force dnsmasq to use tcp if dns response size is more?

I captured the packet at lo interface where dnsmaqs and stubby exchange dns messages, found the response with Message is truncated with Answer count as 0.