Using Run-time variables in SQL radreply table

Alan DeKok aland at deployingradius.com
Wed Dec 20 22:48:14 CET 2017


On Dec 20, 2017, at 4:43 PM, Alex D. <listensammler at gmx.de> wrote:
> in my lab setup i authenticate subscribers based on DHCP Option 82 remode-id against a Freeradius 2.1.8.

  You should really use v3.  Especially if it's a lab system.

  Or if you need v2, use 2.2.10.  There's just no reason to use 2.1.8 from a decade ago.

> 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"

  That's good...

> After successful testing, i tried to migrate to SQL authentication module.

  There's no "sql authentication module".

  Do you mean using SQL instead of the "users" file?

> 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 ?

  Upgrade to v3.  This expansion will just work.

  It's one of the things we fixed in the last 10 years...

  Alan DeKok.




More information about the Freeradius-Users mailing list