Problem with the dumb AP and the DNS server

So I have the following setup:

                      internet
                          |
  ----------------- home gateway --------------------
  |                 192.168.0.1                     |
  |                       |                         |
desktop                   |                    RPi (DNS server)
computer     tp-link (wi-fi extender only)     192.168.0.100
192.168.0.24        openwrt dumb ap
                      192.168.0.2

                d-link                     phone
         (wi-fi range extender)         192.168.0.12
              192.168.0.3        

The home gateway assigns static IP to TP-Link and Raspberry Pie, and dynamic to all the other devices in the network.
All the devices are in the same subnet setup so they can see each other.
The 3 wired device from above uses the RPi's DNS (pi-hole), no problem with that, but I can't get the wireless devices that are connected to the TP-Link to use the RPi's DNS server. Instead they use the ISP's one.

/etc/config/network:
config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1 eth1'
        option proto 'static'
        option ipaddr '192.168.0.2'
        option netmask '255.255.255.0'
        option gateway '192.168.0.1'
        list dns '192.168.0.100'
root@OpenWrt:~# nslookup openwrt.org
Server:         192.168.0.100
Address:        192.168.0.100#53

Name:      openwrt.org
Address 1: 139.59.209.225
Address 2: 2a03:b0c0:3:d0::1af1:1
root@OpenWrt:~# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.ignore='1'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'

Dnsmasq and odhcpd are disabled. I used this and this guide.
On the home gateway it is not possible to set the DNS.

Any advice how can I use my DNS server from the wireless devices?
Thanks.

These are the problems

You can disable the DHCP server of the home gateway and use the dnsmasq of tp-link to server dhcp.
Use option 3 for the gateway and option 6 for the dns in advanced settings.

3,192.168.0.1
6,192.168.0.100
2 Likes

But that way all the traffic goes through the tp-link? Then the problem is that the ethernet ports on the tp-link are 100 Mbps while the home gateway has gigabit ports. So all the wired connection would be also limited to 100 Mbps, which is not the option, at least until I don't buy a router with a gigabit ports.

Then the easiest solution would be to just connect every device directly to the tp-link and to let it do all the routing.

Why would all the traffic go through tp-link? The gateway will be the home with ip 192.168.0.1

1 Like

Ok, this seems to work now. Thank you.
For some reason I thought that the routing and the dhcp server has to be on the same device.

This is because the dhcp servers of most home routers running vendor firmware are not customizable at all.
The dhcp server can pass a lot of information to the clients with the options defined in dhcp protocol. Option 3 specifies the default gateway.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.