DNS server IP address and LAN IP address cannot be in the same subnet, router says

Hi, i can't set the PI address in the same subnet as the LAN address where it is connected, because Router says DNS Server can't be in the same subnet, however i've seen in videos and tutorials that everybody does so.
I'd like to post an image but it seems i cant.

Expected Behaviour:

Work properly, resolve DNS, have internet on PI.

Modem IP (Huawei): 192.168.100.1
Router WAN address: 192.168.100.200
Router IP address (Archer C7) (gateway): 192.168.1.1
DHCP server activated on Router: Yes, 192.168.1.100 to 249
Raspberry PI 3b+ Address: 192.168.0.50 (because can't be .1.50)
Pi-hole address:192.168.0.50 (because can't be .1.50)

Actual Behaviour:

No internet on RB PI, No DNS resolving, no internet when pointing to pi-hole, cant set RB pi on the same subnet, router doesn't allow it.

Debug Token:

Still no internet, can't upload log, tried different ip's on PI: .0.50, .1.50, .100.50 etc.

In this forum, you can paste images directly. :wink:

Your RPi 3B+ that's hosting Pi-hole needs an address in your router's subnet, i.e. 192.168.1.50.

That error message you are quoting does not indicate that your router won't give that IP to your RPi 3B+. And since your router seems to be serving a 192.168.1.0/24 subnet, it should be possible to configure a DHCP lease reservation for 192.168.1.50 in your router, or to manually set that static IP on your RPi 3B+.

But some TP-Link router models disagree when you try to configure them to use an upstream DNS server address that falls within their own subnet range.
This seems to be what you are currently observing.

It's easy enough to avoid this (see also this TP-Link personell's answer from TP-Link's forum):
Configure your Archer C7 to use a public DNS server as its upstream (commonly, that's a WAN/Internet setting), and configure your router's DHCP server to distribute Pi-hole as local DNS server (commonly, that's a LAN/DHCP setting).

1 Like

Great, thanks, now is working like a charm. This is the image from the router error I wanted to upload, for the record.

Yes, in DHCP server I set an Address Reservation for the PI's MAC to .1.50

Indeed that was the problem.

In Network - Internet I set Cloudfare DNS, and in DHCP server I set Pi-hole as DNS Server.
Now, everything is working fine and with pi-hole working in Raspberry, PC, mobile and tv's.
Thanks Bucking_Horn !

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