Using Run-time variables in SQL radreply table

Alex D. listensammler at gmx.de
Wed Dec 20 22:43:49 CET 2017


Hi list,

in my lab setup i authenticate subscribers based on DHCP Option 82 
remode-id against a Freeradius 2.1.8. Our DSLAMs enrich DHCP requests 
with DSL line-informations like Actual-Up- and Downstream-Rates. I use 
these values to have a dynamic QoS configuration on my BNG. With "files" 
authentication module, this works like a charm...
Here's my current configuration in users file:
HSI/DEU.MYID.47110815 Password := "lab"
     ERX-CoS-Shaping-Pmt-Type = "T02 
%{request:Actual-Data-Rate-Downstream}",
     ERX-Virtual-Router-Name = VRF-HSI-CGN

In Access-Accept, %{request:Actual-Data-Rate-Downstream} is translated 
to the respective Downstream bandwidth:
Wed Dec 20 16:24:46 2017 - User HSI/DEU.MYID.47110815
         Packet-Type = Access-Accept
         ERX-CoS-Shaping-Pmt-Type = "T02 25693"
         ERX-Virtual-Router-Name = "VRF-HSI-CGN"

After successful testing, i tried to migrate to SQL authentication 
module. But that doesn't work because in rlm_sql 
%{request:Actual-Data-Rate-Downstream} is just a string and is not 
translated.
Is there a possibility to use run-time variables in SQL radreply table 
or is there another module i can use to reach my goal ?

Thanks in advance.
Regards,
Alex


More information about the Freeradius-Users mailing list