[Kea-users] Enable lease affinity with MySQL backend

Marcin Siodelski marcin at isc.org
Fri Sep 14 07:02:47 UTC 2018


Tim,

Kea has a built in support for keeping an expired lease around for a
configurable amount of time, which is driven by
"expired-leases-processing" parameters described in the Kea User's
Guide. In other words, if the lease expires (client does not renew the
lease), the server won't remove this lease from the database
immediately, but will rather wait a configured amount of time before it
removes it. This doesn't preclude other clients from getting the lease
if they request it, but in most cases the expired lease will simply be
re-assigned to the client who had been using it before.

Having said that, this doesn't work for cases when the client sends a
Release to indicate that it stops using the lease. In such cases, the
lease is removed from the database upon receiving the Release. There are
no configuration knobs to keep the lease in the database for the client
after the client releases the lease.

The only possibility I see to address your use case at the moment is to
write a simple hooks library which drops the received Release packets.
The server won't process them and the leases will be left to expire in
the database. When the client reboots it should get the same lease. That
involves C++ coding though.

Kind Regards,

Marcin Siodelski
DHCP Engineering
ISC

On 13.09.2018 23:40, Tim St. Pierre wrote:
> Has anyone been able to get lease affinity to work with a MySQL backend?
> 
> I am using 1.3 for dhcpv4 and dhcpv6, and whenever a client issues a
> release, the entry is immediately removed from the database.  I would
> like the lease to be retained at least until it expires so that the
> customer will get the same address and prefix when their CPE comes back
> up.  Without it, they get a new delegated prefix and public address any
> time their equipment reboots, which causes their whole network to
> renumber.  
> 
> I don't want to go through the trouble of creating a host for each
> customer, I just want them to keep the address they get as long as they
> renew it from time to time.
> 
> I can see lots of references to a remove_lease variable, but I can't
> seem to find the configuration variable to set it to false.
> 
> -Tim
> 
> 
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
> 




More information about the Kea-users mailing list