Page 1 of 1
DHCP lease release?
Posted: Fri Feb 21, 2025 2:06 am
by rockyd
Would it be possible to end a DHCP lease before the lease time?
Re: DHCP lease release?
Posted: Fri Jun 20, 2025 6:45 am
by rockyd
I think I found a hack to do this.
Edit tmp/dhcp.leases.
It contains line for each of the hosts lease
There is some sort of time number first, MAC address, IP Address, Host name
Haven't worked out what format the time is in, but did work out by trial and error that a change of 100 in the number changes the time by about 2 minutes.
So I fiddled the number down till it was about a minute left to expire.
When it expired it renewed with the new IP address, I wanted the host to have.
Does anyone see any issue with what I have done?
Re: DHCP lease release?
Posted: Fri Jun 20, 2025 6:52 am
by rockyd
Ok Google tells me the time format is seconds since January 1, 1970, 00:00:00 UTC
This comes in handy for decoding it.
https://www.epochconverter.com/