Change Options based on Client

Arran Cudbard-Bell a.cudbardb at freeradius.org
Mon Apr 16 19:35:47 CEST 2018



> On Apr 17, 2018, at 1:27 AM, Alan DeKok <aland at deployingradius.com> wrote:
> 
> On Apr 16, 2018, at 9:17 AM, Paul via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
>> I have 2 Clients configured named "Cisco" and "Unifi" and want to assign different VLANs based on the requesting client for each User individually.
> 
>  You can look at Packet-Src-IP-Address to see which client it is.
> 
>  Or, you can look at the fields of "client" via an expansion:
> 
> 	if "%{client:shortname}" == "cisco") {
> 		...
> 	}
> 
>  But you do have to set the "shortname" field.

You can set your own fields too i.e.

client {
	...
	my_arbitrary_field = foo
}

%{client:my_arbitrary_field} -> foo

-Arran


More information about the Freeradius-Users mailing list