Hello everyone,

first time ever posting on lemmy, feels good 😉

I have a question regarding DHCP in my local network.

My current setup is as follows:

  • DHCP provided by router (Fritz!Box 7490)
  • DNS provided by pi-hole hosted on a raspberry pi
  • DHCP pushes the IP of the raspberry via DHCP to all clients

My problem is: When the raspberry pi (running pi hole) is down for any reason, none of my devices has internet access anymore. This is due to the fact that the Fritz!Box router (aka DHCP server) has no option to push a secondary DNS as a fallback to its clients.

One option would be to buy another router which has the option to push a secondary DNS, which I would prefer to avoid, since otherwise I am happy with the Fritz!Box.

So I am looking for alternative configurations with my existing hardware. I could for example use pi holes DHCP. Or I could use the DHCP server package of a synology NAS which is also part of my local network. Or is there another option, maybe using some DHCP service on the raspberry pi or in a docker container or something like that? Does anyone have experience with one of these setups and can tell me if it is possible to provide the clients with two (prioritized) DNS options? What would you recommend? Thanks!

@pixxelkick@lemmy.world
link
fedilink
English
21Y

When the raspberry pi (running pi hole) is down for any reason

You can have 2 DNS servers provided over DHCP assignment, if this is really an issue for you (ideally it shouldnt) you should be running 2x PiHoles for failover protection, that way you can take 1 offline and all devices will auto swap to the second one for DNS.

This will also horizontally scale your DNS querying, as devices will just 50/50 flip flop between the two while both are online and it will sort of auto-load balance.

Largely speaking thats your best bet though, just 2x PiHoles for failover protection.

For DHCP just use one of the pi-holes DHCP, or your routers, or whatever, they all largely perform the same but I personally find the pi-hole’s DHCP settings to be easiest to work with (you can even super fast modify them by SSHing in and using nano/vim to text edit the config file, so instead of using a UI you can just copy-paste all the entries in quickly)

If you need to take the DHCP pi-hole offline, you can just flip DHCP on for the second one, however as long as new devices arent connecting you don’t actually need the DHCP server online once everyone has an IP assigned until their registration time is up (24 hours by default) so as long as you get the pi-hole back online quickly, you’re network typically wont even have a problem.

Kokesh
link
fedilink
English
21Y

I’d use AdGuard Home for everything.

@ChrislyBear@lemmy.world
link
fedilink
English
4
edit-2
1Y

Usually you can just send a second DNS server by separating the IPs with a comma.

That said, I’m running two PiHoles for the exact reason OP noted. These two PiHoles settings are synced with GravitySync.

If I update one PiHole or it goes down for any reason, the second one is there to pickup the slack.

Regarding DHCP: I’d probably turn off the stupid FritzBox DHCP because you really can’t set 2 DNS servers (WTF!) and instead use the PiHole(s) for DHCP.

@k86k@lemmy.world
creator
link
fedilink
English
1
edit-2
1Y

Thanks.

I think I might try the “pi hole as DHCP” option.

@rambos@lemmy.world
link
fedilink
English
41Y

Just install 2nd pihole on your synology? You can split DHCP across piholes and a router. Like one can handle IPs from 0 to 100 etc. I have 1 pihole on raspberry, another one on server and DHCP is done on the router.

@nyar@lemmy.world
link
fedilink
English
11Y

Get a better router.

@nyar@lemmy.world
link
fedilink
English
-21Y

Get a better router.

@h0rnman@lemmy.world
link
fedilink
English
21Y

If you already have pihole in your environment, I would just use that. DHCP is pretty light weight, so the pi should be more than capable, and you don’t want to complicate your core services more than you need to

The ISP router for DHCP (so when DHCP is down, the entire Internet is down and you have a much bigger problem to solve), with the DNS being your Pi-hole server

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 31 users / day
  • 80 users / week
  • 216 users / month
  • 845 users / 6 months
  • 1 subscriber
  • 1.42K Posts
  • 8.13K Comments
  • Modlog