I am using Freeradius to authenticate users in PEAP-GTC and I want it to give a VLAN ID to the authenticator which will be assigned to the port of the authenticated client.
The authenticator is already configured to assign the VLAN ID recieved by the radius server to the port of the client, and to create the vlan if it does not exist.
On the Freeradius server i tried several things found on the internet to send the VLAN ID to the authenticator :
In the users file :
DEFAULT Auth-Type := EAP # and also DEFAULT NAS-Port-Type == "Ethernet" Tunnel-Type = 13, Tunnel-Medium-TYpe=6, Tunnel-Private-Group-Id=5
In the eap module file :
eap { use_tunneled_reply = yes .... peap { use_tunneled_reply = yes
In the inner-tunnel sites file :
post-auth { .... update { &outer.session-state.Tunnel-Type := Tunnel-Type[*] &outer.session-state.Tunnel-Medium-Type := Tunnel-Medium-Type[*] &outer.session-state.Tunnel-Private-Group-Id := Tunnel-Private-Group-Id[*] &outer.session-state.User-Name := Use-Name[*] &outer.session-state: += &rpely: }
The authenticator keep assigning the default vlan to the connected users, freeradius doesn't seem so send the vlan id.
Do you know how can freeradius assign a VLAN to the authenticated users ?
I am using a database to store the credentials of the users. I need to configure the freeradius replies in it instead of the user file.
The table
radusergroup
link a user to a group. The tableradgroupreply
add response to the validation message sent to the authenticator to all the group member authentication.This is a sql file you can load (edit it as you need) with
mysql -u root -p database < vlan_file.sql
:Here is my tables :
When i trie with the command
radtest
i get the replies for the VLAN ID :