Posted: Wed Mar 17, 2021 14:49 Post subject: Devices only get Router as DNS Server
There seems to be conflicting and outdated information on the forum and in the wiki.
My clients only receive the router as the dns server and don't get any secondary backup servers (I believe I have dnsmasq as the server).
What is the correct way to assign the secondary servers? I was under the impression that they would get read from the basic setup page.
I have attached pictures of my setup pages as well as the config files which are loaded into /tmp
What do I need to do so clients receive the 10.0.0.2 dns server as well as 75.75.75.75 so if my router goes down they can still get dns requests?
You are correct, the main router which is connected via WAN to the internet is my comcast router which I have no control over. I've forced that router to have a forever lease dchp server and only given it 2 addresses and set those statically.
All my clients correctly get assigned ip addresses from the dchp server on my secondary router (the one we are talking about here). the only problem I have is the only DNS server that is advertised to clients is the 10.0.0.2 server and not either of the other two servers which I would like to have as backup. _________________ [Xfinity XB3] stock (main router)
[Linksys EA6500] 54517 (secondary)
[TP Link Archer A7v5] 54517
Joined: 08 May 2018 Posts: 16758 Location: Texas, USA
Posted: Wed Mar 17, 2021 15:10 Post subject:
And I saw no signs of additional dnsmasq options entered (see the wiki). This is not a new topic of discussion. I honestly don't know why you're running your network this way, *but* there is a thread about this very thing, at least one, anyway.
Well I have to keep the comcast router (rented) unless I want to purchase my own (it would have to be the same router since we also have phone over coax) and I have bad reliability, swapping out the router once a year so I'm stuck. I can't set the comcast router to bridge mode as I also need it for wifi
I wanted to try out dns caching hence why I reconfigured the network to run this way _________________ [Xfinity XB3] stock (main router)
[Linksys EA6500] 54517 (secondary)
[TP Link Archer A7v5] 54517
this is a WAP which is usually a secondary router used as a switch.
It is not impossible to use DNSMasq form the WAP like you are doing but at this moment you have two DHCP servers running on the same network that is not a good idea.
I know you have restricted the other one but still that is asking for trouble.
As you are now not only using the WAP to take care of DNS but you are also handing out the WAP as gateway for the clients so effectively everything is still going through the WAP so why not us this router as Gateway so connect its WAN to the ISP router?
Anyway that is up to you
Now on to your question.
You are using DNSMasq for DNS (and also for DHCP because that is what it does).
That means DNSMasq is pushing its own address to your clients, DNSMasq is then forwarding those requests to the servers in Static DNS 1,2,3 so Static DNS 1 is wrong in this setup.
Of course you do not have to use DNSMasq for DNS.
In that case disable it in the GUI then the DNS servers from static DNS 1,2,3 will be pushed to the clients.
You have to be aware that not all clients will handle multiple pushed DNS servers the same, some will use the first one pushed others will use the one which responds the fastest.
So the smart thing to do is to let DNSmasq handle everything that also gives you control over your clients for add blocking, parental control etc.
But of course it is entirely up to you _________________ Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399 Install guide R7800/XR500:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614 Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Joined: 08 May 2018 Posts: 16758 Location: Texas, USA
Posted: Wed Mar 17, 2021 15:46 Post subject:
Well, I just re-checked, and dnsmasq by default hands out the router IP as dns server, but the router itself can be configured to not be a resolver and use upstream dns servers of your choice. I think I also use all-servers in the options and strict order, but I can't remember if there is more that can be done on this. I just haven't bothered with it in months. Perhaps the man page will shed some light:
I would do as you suggested and connect its WAN to the ISP router BUT, I do use the ISP router (its a modem/router/wifi combo unit) so not really an option there as I like all my devices on the same subnet and whatnot.
I ended up just going back to letting my ISP router handle dhcp and dns server pushing as my dd-wrt router would infrequently crash and reboot itself which basically killed the network while it was rebooting... if I can solve this rebooting problem I'll come back to this _________________ [Xfinity XB3] stock (main router)
[Linksys EA6500] 54517 (secondary)
[TP Link Archer A7v5] 54517
There's no need to specify 10.0.0.2 in the list of static DNS servers on the Setup page. 10.0.0.2 *is* the DNS server that will be assigned to your clients, specifically DNSMasq, because that's the LAN ip of the router. Within DNSMasq itself, the DNS servers you specified on the Setup page will get added as public DNS server.
Note, if you do not use DNSMasq for DNS, the router sends out as DNS servers via DHCP (in order starting with primary): It's own IP address, any static DNS servers you have configured, WAN DNS servers.
If you check to ignore WAN DNS, then it sends it's own IP followed by any static servers you configured.
In either configuration above, my client sent DNS query request first to the router and it responded back with an ICMP Port unreachable error. Perhaps it shouldn't send the router IP In DHCP offers in this case?
Note, if you do not use DNSMasq for DNS, the router sends out as DNS servers via DHCP (in order starting with primary): It's own IP address, any static DNS servers you have configured, WAN DNS servers.
no it does not, if you disable "use DNSMasq for DNS" it does not send the router IP as DNS via DHCP.
wxh wrote:
If you check to ignore WAN DNS, then it sends it's own IP followed by any static servers you configured.
no it does not, if you disable "use DNSMasq for DNS" it does not send the router IP as DNS via DHCP.
wxh wrote:
In either configuration above, my client sent DNS query request first to the router and it responded back with an ICMP Port unreachable error. Perhaps it shouldn't send the router IP In DHCP offers in this case?
Joined: 18 Mar 2014 Posts: 13880 Location: Netherlands
Posted: Fri Mar 19, 2021 13:49 Post subject:
wxh wrote:
Note, if you do not use DNSMasq for DNS, the router sends out as DNS servers via DHCP (in order starting with primary): It's own IP address, any static DNS servers you have configured, WAN DNS servers.
If you check to ignore WAN DNS, then it sends it's own IP followed by any static servers you configured.
In either configuration above, my client sent DNS query request first to the router and it responded back with an ICMP Port unreachable error. Perhaps it shouldn't send the router IP In DHCP offers in this case?
No the router does not send its own address if you do not enable "Use DNSMasq for DNS" it only sends Static DNS 1,2,3 and WAN DNS unless you enable Ignore WAN DNS (and if you use VPN it can also send out DNS server acquired from the VPN).
If the router also sends its own DNS address you made an error in your setup (as always leave Gateway and Local DNS at its default 0.0.0.0 when the router is in gateway mode)
Yes, I had the router's IP in Gateway and Local DNS. Thanks.