Configuring ASUS Router to use custom Bind9 and DHCPd on LAN
Let’s say I have a Raspberry Pi set up to be a client on the network and I want it to use 192.168.2.2 while the router uses 192.168.2.1, what’s the necessary router configuration to use the Pi’s dhcpd and bind DNS?
In this case, I want to turn off the router’s DHCP server and run the Pi’s dhcpd and dns server instead.
Is it set by simply leaving everything but the DNS server blank, or does it involve setting both the Gateway and DNS to the Pi address at 192.168.2.2, and running the Pi with a static IP address of 192.168.2.2?
Simply turn off its internal DHCP server and that's it – the router does not need to be told about external DHCP servers. (Client devices do not ask the router about where the DHCP server is – in fact it works the other way around; they ask the DHCP server about where the router is.)
Do not change the router's "Gateway" setting. Your RPi being a DHCP or DNS server does not make it a gateway. (Here 'gateway' specifically means an IP router, and your ASUS still performs that task between your LAN and your ISP.)
You can change the router's "DNS Server" setting to point to the RPi, but it will only affect the router itself (e.g. online update checks) and perhaps clients with old static configurations – but it will have no effect on DHCP-using clients.
I'm not exactly sure what you are asking, but the relevant steps are :
-
Set up the Pi with a static IP of 192.168.2.2 with a gateway of 192.168.2.1
-
Disable the DHCP server on the router and enable the DHCP server on the Pi
-
Ensure the Pi hands out the name server 192.168.2.2 in its DHCP leases.
Because you are not running a DHCP server in the router, other then for the router itself nothing is going to use its DNS server. If you have the option to, there is no harm in setting its name server to 192.168.2.2 provided the Pi does not rely on DNS from the router.