[SOLVED] Using managed switch to create new VLan

bonjurkes

Honorable
Jan 30, 2014
12
0
10,510
Hello all, I am using Rasp Pi as DNS (pi-hole) on my network, but I can't set the Rasp pi's address as DNS to my router because it doesn't accept DNS address from same subnet.

Here is my home network : ISP Router -> TP-Link AC1750 -> Rasp Pi and other devices connected to router

My Rasp-pi has a static IP 192.168.0.10 but when I try to use this address as my DNS IP on AC1750 it refuses to use this IP as it's on same subnet. So my (possible) solution is getting a managed switch and connecting switch to my AC1750 and Rasp pi and creating a new VLAN and giving Rasp pi 192.168.1.1 kind of IP address, so hopefully I can use it as my default DNS at router level.

Is it possible to do this if I buy a smart managed switch with VLAN support, like Netgear GS308e? Can my devices on 192.168.0.x subnet talk with 192.168.1.x subnet if I put the rasp pi behind a switch while some of the devices still connected to my router (instead of switch) ? I know it's an overkill but it's black friday and I found some affordable managed switch offers. Just want to be sure that it's someting possible to do before buying a switch.

Thank you!

Here is the screenshot of the error (and trying to find solution) : View: https://imgur.com/U6FNmwu
 
Solution
You really only need to identify the PIHole as the DNS in the DHCP server of the router. That is really all that happens when you use the PIHole as the DHCP server also. Let the router have a public DNS, but set the DNS server in the DHCP to be the PIHole rather than the router. Any devices with static IPs will have to be manually updated.
pi-hole can perform 2 functions - that of DNS and DHCP.
Suggest setting it to do both. That way all your traffic goes through the Pi to get DNS and is then passed along to your router. For this you would then disable the DHCP function on your router.
This is how I have my network running at home.
 

kanewolf

Titan
Moderator
You really only need to identify the PIHole as the DNS in the DHCP server of the router. That is really all that happens when you use the PIHole as the DHCP server also. Let the router have a public DNS, but set the DNS server in the DHCP to be the PIHole rather than the router. Any devices with static IPs will have to be manually updated.
 
Solution

TRENDING THREADS