We’re here 24/7. 365 days a year.
Ask questions. Find your answers. Connect.

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Internal DHCP question

Conversation Starter
Message 1 of 1

Hi people.


I want to know if there's a way I can set DHCP to make it easier to tweak routers and try different stuff out.


Specifically, I want to be able to tweak the gateway router - but I don't necessarily want to have all my config on just the one router. I'd like to have two or three - and I'd like to make it as easy as possible to flip all my internal devices over to a different gateway without having to bother reconfiguring or power cycling each one.


If devices have a long lease, you have to wait ages for it to expire - but if they have short leases, then frequently-changing IP addresses might disrupt some applications. So I thought, why not configure my DHCP servers to assign specific IP addresses to each MAC address of my devices, and then set my DHCP server to a short lease time (say, five minutes or so) so as to force them to check frequently? Then, when I want to swap gateway, just reconfigure the DHCP servers with the new address, power cycle the DHCP servers (one at a time), then, a few minutes later, all my gadgets will be configured with the new gateway without having to bother with each gadget separately (I have five android tablets, four smart TV boxes, two laptops and three VOIP phones if you're wondering, hence why it's much easier to reconfigure a DHCP server or two).


At first I thought it was going well, phone calls weren't dropping out and media streaming wasn't buffering through my expected lease renewals - but then I discovered that my DHCP servers are setting the leases for the reserved MAC addresses to permanent. Which means the clients aren't trying to refresh, so they won't get the gateway change, so it defeats the point.


My question is, is this the way that all DHCP servers behave? I'm using the DHCP servers on a couple of TP-Link routers, but I could use DHCP servers on Netgear routers, or Ubiquiti routers, or, with a bit more effort, I could flash a device with OpenWrt, or maybe use a Raspberry Pi as a DHCP server.


Failing that, another solution might be to script a renew - for example, by scripting the temporary creation of deliberate duplicate IP addresses and then ARP-querying them, step-by-step for each possible address in the subnet, so as to force each of the client devices to realise there's a conflict, and therefore try to get a new address (which of course will still be the same, but the side-effect is that it will also get the new gateway address). This could realistically be done on an OpenWrt router - although obviously there's only a point in this if OpenWrt DHCP server doesn't have the same unconfigurable-lease-time-for-reserved-addresses limitation as the TP-Link server.


Any comments or suggestions? Thanks.