Respond to DHCP Lease Query requests using rlm_cache
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Sun Aug 30 17:14:57 CEST 2015
> On 30 Aug 2015, at 09:42, Alan DeKok <aland at deployingradius.com> wrote:
>
> On Aug 27, 2015, at 2:40 PM, Бен Томпсон <b.thompson at latera.ru> wrote:
>> I have configured FreeRADIUS to as a DHCP server which offers IP addresses
>> based on the option 82 values added by a DHCP relay. In cases where the
>> client sends a unicast renew request bypassing the relay, the option 82
>> values are queried from an instance of rlm_cache which have configured to
>> keep a record of leases. (This replicates the option 82 "Stash"
>> functionality in ISC DHCP Server). A bit of unlang is involved to check
>> that the lease is valid and take care of clearing out the cache, but it is
>> all fairly simple.
>
> I've pushed changes to the v3.0.x
and v3.1.x?
> branch which should help. They allow the server to encode and decode lease query packets.
>
> You will need to:
>
> - add a "dhcp DHCP-Lease-Query {...}" section to raddb/sites-available/dhcp
>
> - have the section return "ok"
>
> - have the section do:
>
> update reply {
> DHCP-Message-Type := DHCP-Lease-Assigned # or whatever you want to return
> DHCP-Hardware-Address-Length := 0
> }
>
> I think that should now work.
Neat.
I'll add a Pool-Action Status to the new rlm_redis_ippool (which will become the new rlm_ippool), then we can abstract getting the lease information back.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150830/22fa4512/attachment.sig>
More information about the Freeradius-Users
mailing list