• mic_check_one_two@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      19 hours ago

      You specifically shouldn’t run two DHCP servers on the same network. It can cause IP conflicts when two servers assign the same address to different devices. Because the device doesn’t care which DHCP server gave it an address; It just listens to whichever one happens to respond first. And each DHCP server will have its own table of reserved/in-use addresses. And if those tables don’t match, IP conflicts can occur.

      Device 1 connects to the network, and requests an IP address. DHCP server 1 checks its table of available addresses, and responds with “your address is 192.168.1.50.” It marks that address as in-use, so it won’t assign it to anything else in the meantime. Device 2 connects to the network, and requests an address. DHCP server 2 checks its table of available addresses (which doesn’t match server 1’s table) and responds with “your address is 192.168.1.50.” Now you have two devices occupying the same IP address, which breaks all kinds of things.

      The largest reason to run two is because DNS queries are split amongst the primary and secondary DNS servers. If you only have a primary pihole, you’ll still occasionally get ads when devices use their secondary DNS servers.

      • Not a replicant@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        12 hours ago

        I’ve got two piholes running on the home network, and they are both DHCP servers - with different ranges, i.e. #1 serves 192.168.0.11 - 100, and #2 serves 101-200. Each uses option 6 to specify DNS servers, and they both reference each other. It doesn’t matter if one goes down because each client will have the both piholes specified as DNS servers. I’ve never had an address conflict problem.

        • mic_check_one_two@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          10 hours ago

          I suppose as long as your subnet mask is set properly, this would work? Each one could only support half as many devices, but that’s not likely to be an issue on a small home network with less than a hundred devices.

          You’d only have half of your devices listed under either pihole’s DHCP client list. But at least you would have (kind of) redundant DHCP service.

      • bean@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        19 hours ago

        Sorry, uh… I didn’t mean run them at the same time. I had to have a DHCP server stand in for it when I had to take that device itself down (the pi). That was ages ago. But I was still starting out!