Devices only get Router as DNS Server

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
gmesmer
DD-WRT Novice


Joined: 19 Sep 2019
Posts: 20

PostPosted: Wed Mar 17, 2021 14:49    Post subject: Devices only get Router as DNS Server Reply with quote
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?



Screenshot 2021-03-17 103429.png
 Description:
 Filesize:  201.28 KB
 Viewed:  499 Time(s)

Screenshot 2021-03-17 103429.png



Screenshot 2021-03-17 103456.png
 Description:
 Filesize:  222.48 KB
 Viewed:  498 Time(s)

Screenshot 2021-03-17 103456.png



Screenshot 2021-03-17 104750.png
 Description:
 Filesize:  149.77 KB
 Viewed:  498 Time(s)

Screenshot 2021-03-17 104750.png



_________________
[Xfinity XB3] stock (main router)
[Linksys EA6500] 54517 (secondary)
[TP Link Archer A7v5] 54517
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16758
Location: Texas, USA

PostPosted: Wed Mar 17, 2021 14:55    Post subject: Reply with quote
It looks as if your device is configured as a wired AP/switch (wan port disabled). Which means dhcp and dnsmasq shouldn't be enabled per the wiki. I fixed your image sizes. Please refer to the forum rules and guidelines as well as the stickies / announcements, especially regarding image sizes. Thanks.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
gmesmer
DD-WRT Novice


Joined: 19 Sep 2019
Posts: 20

PostPosted: Wed Mar 17, 2021 15:05    Post subject: Reply with quote
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
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16758
Location: Texas, USA

PostPosted: Wed Mar 17, 2021 15:10    Post subject: Reply with quote
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.

*hint*
Code:
no-resolv
server=

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
gmesmer
DD-WRT Novice


Joined: 19 Sep 2019
Posts: 20

PostPosted: Wed Mar 17, 2021 15:29    Post subject: Reply with quote
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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 13880
Location: Netherlands

PostPosted: Wed Mar 17, 2021 15:39    Post subject: Reply with quote
It is always helpful if you start with telling what router and which build you are running.

To get the best out of DDWRT and the forum read the forum guidelines with helpful pointers:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

Your network setup is somewhat "irregular"

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 Smile

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
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16758
Location: Texas, USA

PostPosted: Wed Mar 17, 2021 15:46    Post subject: Reply with quote
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:

https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

EDIT: and sir egc just chimed in with something I forgot about Laughing

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net


Last edited by kernel-panic69 on Wed Mar 17, 2021 15:48; edited 1 time in total
gmesmer
DD-WRT Novice


Joined: 19 Sep 2019
Posts: 20

PostPosted: Wed Mar 17, 2021 15:48    Post subject: Reply with quote
yeah irregular to say the least, lol

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
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3778
Location: Germany

PostPosted: Wed Mar 17, 2021 17:55    Post subject: Reply with quote
Quote:
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 can also use dnsmasq to send multiple DNS servers via DHCP.

In the dnsmaq options set the following, then primary and secondary DNS server are sent to the DHCP clients.

Code:
dhcp-option=6,10.0.0.2,75.75.75.75


if you really want to
but this can lead to undesirable behavior (because clients handle this differently).
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9355

PostPosted: Wed Mar 17, 2021 19:12    Post subject: Reply with quote
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.

IOW, as you currently have it configured, having 10.0.0.2 on the Setup page for a DNS server is self-referencing and unnecessary. Presumably DNSMasq is just ignoring it.

_________________
ddwrt-bind-static-routes-to-wan.sh (UPDATED! 11/12/24) * ddwrt-blacklist-domains.sh * ddwrt-dns-monitor.sh * ddwrt-ovpn-client-backup.sh * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-server-watchdog.sh * ddwrt-ovpn-split-advanced.sh * ddwrt-ovpn-split-basic.sh * ddwrt-mount-usb-drives.sh * ddwrt-wol-port-forward.sh
wxh
DD-WRT Novice


Joined: 19 Apr 2009
Posts: 40

PostPosted: Fri Mar 19, 2021 13:20    Post subject: Reply with quote
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?
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 3778
Location: Germany

PostPosted: Fri Mar 19, 2021 13:47    Post subject: Reply with quote
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.


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?


see above
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 13880
Location: Netherlands

PostPosted: Fri Mar 19, 2021 13:49    Post subject: Reply with quote
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)

_________________
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
wxh
DD-WRT Novice


Joined: 19 Apr 2009
Posts: 40

PostPosted: Fri Mar 19, 2021 14:15    Post subject: Reply with quote
egc wrote:
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.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum