Hiya Graeme,

If you are using an SQL database backend it is very easy to implement
this...

You setup group names in the radgroupreply table with the attributes to be
returned to the NAS for that group - you can have multiple records with the
same group name to allow multiple attributes.  Each group name would be used
for the different rates and respective burst values and whatever attributes
returned to the NAS that are specific to that group:

IE:  groupname     attribute    Value    op
         rate1            rate           500      +=
         rate1            burst         800      +=
         rate2            rate         1000      +=
         rate2            burst       1200      +=

( the '+=" op value states to add the A/V (attribute/value) pair to the NAS
response even if there is another A/V pair with the same name, if you know
for a fact there is not an A/V pair with the same name you can just use '='
instead)...

and so on for each group you are defining.

You then put the username in the usergroup table with the name of the group
the user is assigned...

IE:   Username     Groupname
          user1            rate1
          user2            rate2
          user3            rate1
          user4            rate1
          user5            rate2

ad nausium...

Freeradius should do the rest...

The nice thing is all you have to do to change the rate and bust information
for the user's assigned to a group is to change the value in the
radgroupreply table and it changes for all users defined in that group.

I think I got this right - YMMV

gm...

----- Original Message ----- 
From: "Graeme Hinchliffe" <[EMAIL PROTECTED]>
To: "FreeRADIUS list" <[EMAIL PROTECTED]>
Sent: Tuesday, July 20, 2004 5:08 AM
Subject: Additional lookup via SQL


> Hiya,
> We are adding rate limiting attributes to our radius entries on a per
> customer basis, however the rates imposed will be one of 4 predefined
> rates.  Each rate also has a burst value which is pre determined, and
> may be changed as we tweak.
>
> Ideally we would like to store a lookup of rates and their respective
> burst values, thus making changes quick and efficient.  Is there a nice
> way that freeRADIUS could perform an additional lookup to determine the
> correct burst for a given rate and add it (allong with the attribute) to
> the radius reply?
>
> Thanks in advance for your help.
>
>
> -- 
> -----
> Graeme Hinchliffe (BSc)
> Core Internet Systems Designer
> Zen Internet (http://www.zen.co.uk/)
>
> ICQ 3842605 (link)
>
> Direct: 0845 058 9074
> Main  : 0845 058 9000
> Fax   : 0845 058 9005
>
>
>
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
> ---
> [This E-mail scanned for viruses by Declude Ant-Virus Scanner]
>
>

---
[This E-mail scanned for viruses by Declude Ant-Virus Scanner]


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to