HI all, I'm running freeradius 1.0.2 on a debian stable. For new clients, I need to implement 2 functions: * a bandwidth limit on a per-user basis. I mean, I need to be able to set, for a user, a value for his upstream and downstream bw, which is sent by the radius as a reply attribute. Are they predefined attributes to do this? * a volume limit: I'd like to be able to set a maximum amount of data monthly downloadable for each user. I tried with rlm_slqcounter, changing the sql request to check AcctInputOctet instead of SessionTime, but the problem is that radius always reply an attribute called MaxSessionTime (or sthg like that), containing the remaining data volume for the user... is there as way to change the name of the attribute answered by freeradius?? Many thaks, Mathieu
Change it in the sqlcounter code ! First functionality shouldnt be a problem if you know your NAS ! Regards, E:S -----Original Message----- From: freeradius-users-bounces+edvin.seferovic=kolp.at@lists.freeradius.org [mailto:freeradius-users-bounces+edvin.seferovic=kolp.at@lists.freeradius.or g] On Behalf Of Mathieu Lemaitre Sent: Donnerstag, 22. März 2007 12:31 To: freeradius-users@lists.freeradius.org Subject: bandwidth and volume limit HI all, I'm running freeradius 1.0.2 on a debian stable. For new clients, I need to implement 2 functions: * a bandwidth limit on a per-user basis. I mean, I need to be able to set, for a user, a value for his upstream and downstream bw, which is sent by the radius as a reply attribute. Are they predefined attributes to do this? * a volume limit: I'd like to be able to set a maximum amount of data monthly downloadable for each user. I tried with rlm_slqcounter, changing the sql request to check AcctInputOctet instead of SessionTime, but the problem is that radius always reply an attribute called MaxSessionTime (or sthg like that), containing the remaining data volume for the user... is there as way to change the name of the attribute answered by freeradius?? Many thaks, Mathieu - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Mathieu Lemaitre wrote:
HI all,
I'm running freeradius 1.0.2 on a debian stable. For new clients, I need to implement 2 functions:
* a bandwidth limit on a per-user basis. I mean, I need to be able to set, for a user, a value for his upstream and downstream bw, which is sent by the radius as a reply attribute. Are they predefined attributes to do this?
No. See the NAS documentation. It may do this, but likely not.
* a volume limit: I'd like to be able to set a maximum amount of data monthly downloadable for each user.
There is no standard way to do that. See the NAS documentation. It may do this, but likely not. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
u can limit bandwith per users basis i am using cisco AV-pair attributes for limiting bandwidth for users upload and download u can see my document on last posted ans Alan DeKok <aland@deployingradius.com> wrote: Mathieu Lemaitre wrote:
HI all,
I'm running freeradius 1.0.2 on a debian stable. For new clients, I need to implement 2 functions:
* a bandwidth limit on a per-user basis. I mean, I need to be able to set, for a user, a value for his upstream and downstream bw, which is sent by the radius as a reply attribute. Are they predefined attributes to do this?
No. See the NAS documentation. It may do this, but likely not.
* a volume limit: I'd like to be able to set a maximum amount of data monthly downloadable for each user.
There is no standard way to do that. See the NAS documentation. It may do this, but likely not. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html $ cat ~/satish/url.txt System administrator ( Data Center ) please visit this site http://linux.tulipit.com --------------------------------- Heres a new way to find what you're looking for - Yahoo! Answers
Hi Mathieu, I'm not an expert but I had the same problem. You need upgrade freeradius to new version too. The sqlcounters in your version only reply SessionTimeout, whit new version you can reply wathever you want. You need download de source new version from ftp://ftp.freeradius.org/pub/radius/freeradius-1.1.5.tar.gz after is better if you make a package for Debian and install it. With new version you can do something like this. sqlcounter totaloctets { counter-name = Octets-Total-Limits check-name = Max-Total-Octets reply-name = ChilliSpot-Max-Total-Octets (or the attribute that your NAS know for that) sqlmod-inst = sql key = User-Name reset = never query = "SELECT SUM(AcctOutputOctets+AcctInputOctets) FROM radacct WHERE UserName='%{%k}'" } Remember when you compile your new freeradius include experimental counters. I'm not sure in this versions that is necessary but work for me. If you donŽt know how make a .deb for your debian tell me I can explain howto. Fabián Omar Franzotti
From: Alan DeKok <aland@deployingradius.com> Reply-To: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> To: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Subject: Re: bandwidth and volume limit Date: Thu, 22 Mar 2007 13:28:00 +0100
Mathieu Lemaitre wrote:
HI all,
I'm running freeradius 1.0.2 on a debian stable. For new clients, I need to implement 2 functions:
* a bandwidth limit on a per-user basis. I mean, I need to be able to set, for a user, a value for his upstream and downstream bw, which is sent by the radius as a reply attribute. Are they predefined attributes to do this?
No. See the NAS documentation. It may do this, but likely not.
* a volume limit: I'd like to be able to set a maximum amount of data monthly downloadable for each user.
There is no standard way to do that. See the NAS documentation. It may do this, but likely not.
Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
_________________________________________________________________ Get a FREE Web site, company branded e-mail and more from Microsoft Office Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
A) bandwidth limit You can use WISPr-Bandwidth-Max-Down and WISPr-Bandwidth-Max-Up attribute to limit the bandwidth. they should be inserted in radreply or groupradreply table. But you need to modify NAS firewall to force the attribute to user. I use chillispot. In the NAS I force all user Internet session to use tun0 device which is created by chillispot. This is my rule for forward chain : # iptables -P FORWARD DROP # iptables -F FORWARD # iptables -A FORWARD -o tun0-j ACCEPT # iptables -A FORWARD -i tun0 -j ACCEPT b) volume limit. I face the same problem too when dealing with freeradius 1.1.3. but after upgrade to freeradius 1.1.4, the problems solved itself, no more Session Time generated, but only AcctInputOctet. I suggest you to upgrade to Freeradius 1.1.4. but if you insist to stick on current version, you must create some perl script to help freeradius server to generate AcctInputOctet for accounting. On 3/22/07, Mathieu Lemaitre <mlemaitre@walan.biz> wrote:
HI all,
I'm running freeradius 1.0.2 on a debian stable. For new clients, I need to implement 2 functions:
* a bandwidth limit on a per-user basis. I mean, I need to be able to set, for a user, a value for his upstream and downstream bw, which is sent by the radius as a reply attribute. Are they predefined attributes to do this?
* a volume limit: I'd like to be able to set a maximum amount of data monthly downloadable for each user. I tried with rlm_slqcounter, changing the sql request to check AcctInputOctet instead of SessionTime, but the problem is that radius always reply an attribute called MaxSessionTime (or sthg like that), containing the remaining data volume for the user... is there as way to change the name of the attribute answered by freeradius??
Many thaks,
Mathieu - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Best Regards, Fadli M. Zain Leadership and Lifelong Learning
participants (6)
-
Alan DeKok -
Edvin Seferovic -
fadli -
Internet-Wifi Operador -
Mathieu Lemaitre -
satish patel