grace period support in redis and dhcp server

Alan DeKok aland at deployingradius.com
Fri May 3 12:49:51 CEST 2019


On May 3, 2019, at 6:35 AM, Chinnapaiyan, Nagamani <Nagamani.Chinnapaiyan at viasat.com> wrote:
> 
> Currently redis_ippool module has options for offer_time and lease_time.
> 
> There is another time in dhcp server concept called grace-period: A particular ip is reserved for a particular mac address after lease expired until time mentioned in grace-period(before it is made available to other mac addresses).
> 
> Is this grace period option is supported in FreeRadius dhcp server? If yes, how to enable it?

  There isn't a grace period.  The redis_ippool module is fully documented, and doesn't mention it.

  A grace period could be added, I suppose.  That would involve code changes.

  Then there's the issue of how does it work?  It's simple to say "the lease remains allocated until the grace period is up".  But what happens in all of the corner cases?  If the pool is full, does it recover leases in the "grace period"?

  Those questions are the difference between something that "mostly works", and something that *really* works.

  The good news is that you can use "unlang" to create a grace period.  Set the "lease_time" to something like 1 day.  Then, poke the lease via "unlang":

send DHCP-ACK {
	...
	redis_ippool

	update reply {
		DHCP-IP-Address-Lease-Time := "%{expr:&reply:DHCP-IP-Address-Lease-Time - 300}"
	}
	...
}

  Which sets the lease time in the server and database to be 1 day, but tells the client that it's a bit less than a day.  Which effectively gives it a grace period of 5 minutes.

  Alan DeKok.




More information about the Freeradius-Users mailing list