Server DHCP
Server DHCP
Hey! Your modem/router box is set up to handle internet and Wi-Fi, but it’s connected to a switch that distributes the network. You’re looking to move your DHCP server away from the ISP box since it’s not ideal. If you disable the ISP box and run another DHCP server locally, it should recognize itself as the DHCP provider. You might need to adjust the default gateway on your APs to point to that new machine. For a DHCP server you can containerize, look into lightweight options like Docker Compose or a simple Node.js service.
You don't have to perform any additional tasks beyond disabling DHCP on the ISP router and reactivating it elsewhere—such as a Linux machine like RasPi. You should set up the IP range, DNS servers, and default gateway on the DHCP device itself. Changing the default gateway or IP elsewhere isn't necessary; its role remains the same—it will always point to the internet-connected router. When a client is configured for automatic, it will broadcast an IP request, and the DHCP server will provide the necessary details.
Thank you for your response. Here’s a revised version:
Your setup is quite straightforward. For IoT devices, moving the DHCP off the router can boost connectivity, and regular Wi-Fi works well too. I also considered switching my DNS provider since it’s blocked by my ISP. It’s possible to configure the DHCP server to use a custom DNS server. As for how the DHCP server obtains an IP address, it typically assigns one automatically from the router or via DHCP lease.
I appreciate your input. For this, I consulted chatgpt and suggested a double NAT configuration where I would modify the gateway settings on my APs and then route traffic through the Linux server.
This approach isn't familiar to me. What's the purpose? Current best practices suggest isolating IoT devices on separate VLANs with firewall controls to restrict access between networks. These gadgets would operate on a dedicated network featuring its own DHCP server and full private IP range. This prevents them from vying for LAN IPs belonging to your non-IoT VLANs. If your ISP's gateway or router doesn't support custom DNS settings, tools like PiHole or AGH can help manage client DNS. Keep in mind that PiHole and AGH are mainly local DNS services; enabling a DHCP server on them is optional unless you need it. Personally, I've used AGH to identify clients across different VLANs but never activated its DHCP functionality. It seems only one can be configured. Assign the network interface a fixed LAN IP outside the DHCP range. That doesn't make sense.
Double NAT is generally something you'd prefer to skip. The data must still pass through the ISP's modem/router. Inserting another device in between is unlikely to make a difference. You might configure a Pi-hole to act as both your DHCP server and a DNS cache. This setup can also block certain ads. I deploy it inside a Docker container on a small, energy-efficient Debian system. You should be able to customize the forwarding DNS settings as needed, though any restrictions from your ISP on other DNS requests will apply.