Load-Balance VLAN assignment via unlang

Cotton, Jesse Jesse.Cotton at stockton.edu
Tue Jul 17 13:57:13 CEST 2012


Using FR as a central RADIUS server. One task it performs is dot1x auth. It forwards eap requests to one of several home servers which performs the auth and returns several attributes including Tunnel-Private-Group-Id. This attribute contains multiple values indicating one of several potential vlans a client can be put on. I would like perform simple load balancing by selecting one of the vlans randomly. I have the following within the post-auth section. What am I doing wrong? I have tried several variations. I know the syntax is incorrect but google has not been helpful. Thanks in advance.





if("%{reply:Tunnel-Private-Group-Id[#]}" > 1){

                update reply {

                        Tunnel-Private-Group-Id := %{reply:Tunnel-Private-Group-Id[%{rand:%{reply:Tunnel-Private-Group-Id[#]}}]}

                }

}



Version: freeradius-2.1.12_1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20120717/3b5b2d41/attachment.html>


More information about the Freeradius-Users mailing list