Huntgroups with NAS-Port-Id or NAS-Port

Jan Hugo Prins jhp at jhprins.org
Fri Oct 18 15:52:03 CEST 2019


In the past I created something to update some variables in the request
for some corner cases. Is this what I should do here as well?

Create a policy that is something like:

update_NAS_Port_Id {
    if (NAS-IP-Address == "192.168.203.126") {
        update request {
            &NAS-Port-Id := "%{request:NAS-Port}"
        }
        updated
    }

And include this policy in the authorize section of my config?

Jan Hugo Prins



On 10/18/19 3:00 PM, Alan DeKok wrote:
> On Oct 18, 2019, at 8:25 AM, Jan Hugo Prins <jhp at jhprins.org> wrote:
>> As you can see:
>> the NAS-Port-Id looks like a Cisco port number with blade/port.
>> the NAS-Port looks like the number of the port in the stack.
>   That's common.
>
>> When I try to put NAS-Port in the huntgroup name I can't seem to define
>> a range,
>   Ranges aren't supported in v3.
>
>> and if I use the NAS-Port-Id and put the number values of
>> NAS-Port in it as a range it is not recognized.
>    What does that mean?
>
>> If I put the value "3/1"
>> in the huntgroup definition it seems to work, but then I have to create
>> 192 huntgroup lines.
>>
>> What is the correct solution to fix this?
>   Don't use huntgroups.  Use "unlang"
>
> 	if (NAS-Port > 15 && NAS-Port < 32 && NAS-Port-Id == "3/1") {
> 		...
> 	}
>
>   Alan DeKok.
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>





More information about the Freeradius-Users mailing list