DHCP lease release?

Suggest improvements and new features for Gargoyle.

Moderator: Moderators

Post Reply
rockyd
Posts: 115
Joined: Tue Oct 22, 2019 5:49 am

DHCP lease release?

Post by rockyd »

Would it be possible to end a DHCP lease before the lease time?

rockyd
Posts: 115
Joined: Tue Oct 22, 2019 5:49 am

Re: DHCP lease release?

Post 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?

rockyd
Posts: 115
Joined: Tue Oct 22, 2019 5:49 am

Re: DHCP lease release?

Post 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/

Post Reply