On 9 Dec 2015, at 19:47, A.L.M.Buxey@lboro.ac.uk wrote:
Hi,
Could you possibly provide a more elaborate example than that? How do I differentiate between the different groups of requests? As the tables look like this:
http://wiki.freeradius.org/guide/SQL%20HOWTO
look at usergroup - that assigns a username to a group...the groupreply can then be used.... as just one example....
personally I wouldnt use most of the default bits because unlang is much better for defining policy.....so you could use unlang to pull a group out of a DB and then use unlang to pull out VLAN assignments based on eg username/MAC address from another table and use those values...the power of %{sql:.....}
Or if you want to jump on the v3.1.x bandwagon, as a number of people are doing (maybe the message about CIT, and releases not being magical is finally getting through ;) ), you can use the mapping syntax: map sql "SELECT * FROM `my_table` WHERE user = '%{User-Name}'" { &Tunnel-Private-Group-ID := 'vlan' # Map column vlan to Tunnel-Private-Group-ID &Service-Type := 'service_level' # Map column service_level to service-type attribute } Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2