2

We are running a small DHCP server on Raspberry PI using DNSMASQ. We need to give out lease time based on a script that gives us the time span. This means that all clients will have a different lease time based on when they log on. The script runs just fine and we get a lease in mins or hours. How can I put this into our server to create custom lease time for all our clients? There is no domains and we have no software running on clients. There is a specific problem we need to solve using DHCP this way :-)

1
  • This sounds like an overly complex solution to a problem someone may already have solved. Please elaborate as to why you want to do this, perhaps someone can teach you another way.
    – Alex Berry
    Jun 3, 2015 at 15:21

1 Answer 1

0

Do they have to change the lease time after getting the ip or is it ok to get it first?

You can change the lease time per dhcp range. see the manpage. http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html Search for Lease

To give you a hint how one could solve this:

Personally i would go for a short lease on first connect, detect which user/device you give the ip too, and the renewal lease is the lease with the correct lease time. Though this depending on the amount of devices might have issues when you reload the configuration often (to have the new lease time read and send out)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .