DHCP lease release?
Moderator: Moderators
DHCP lease release?
Would it be possible to end a DHCP lease before the lease time?
Re: DHCP lease release?
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?
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?
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/
This comes in handy for decoding it.
https://www.epochconverter.com/