Is it possible to do Vlan assignment based on what nas the login request is coming from?

Alan DeKok aland at deployingradius.com
Sat Nov 30 14:47:26 CET 2019


On Nov 29, 2019, at 9:47 PM, HÃ¥vard Rabbe via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> 
> Hi
> Im testing vlan assignment on wifi. Freeradius 3 with sql. Looks like it is working ok.
> 
> But I want a user to be asigned to different vlan based on what nas the login request is coming from. Is this possible?
> 
> Like if user test log in on nas1 it gets vlan 100 and if the same user log in on nas2 it gets vlan 200


	if (Packet-Src-IP-Address == ip.of.nas.1) {
		update reply {
			Tunnel-Type := IP
			Tunnel-Medium-Type := IEEE-802
			Tunnel-Private-Group-Id := "vlan100"
		}
	}

  You'll have to double-check what your NAS needs to do VLAN assignment, but that's pretty close.

  Alan DeKok.




More information about the Freeradius-Users mailing list