Managing Data Volume Control More Than 4GB FR & CoovaChilli

Russell Mike radius.sir at gmail.com
Wed Oct 9 10:57:13 CEST 2013


Dear Aran C. Bell

Thanks for everything, Here is update.

1.)

All-In-MB counter works. Please note, when a user has downloaded his
quota, counter
do not force log off . Saying other way, if the user is online, he would
remain online until he log off him self or stop browsing. But point to be
noted that counter prevents from login him again. user cannot login again
if he has already hit quota threshold. Please look the example of reject. This
user is allowed for 7GB, please mind that *check_item which shows
7168*is specified in
MB.

*[gigawordcounter]       expand: %{sql:SELECT SUM(AcctInputOctets) /
(1024*1024) + SUM(AcctOutputOctets) / (1024*1024) FROM radacct WHERE
UserName='quotauser'} -> 7389.1705*

*rlm_sqlcounter: (Check item - counter) is less than zero*

*rlm_sqlcounter: Rejected user quotauser, check_item=7168, counter=7389*

*++[gigawordcounter] returns reject*
Which basically means that initially authorization is done by SQL then
"max_all_mb", checks are only done once when the user makes the logon
attempt and checks are never done again. This is where i have failed. Since
you are more in to this, is there a way to perform this check
on frequent basis and send reply to NAS to logoff user? then it should
work.

Counter:

sqlcounter gigawordcounter {
            counter-name = Max-All-MB
            check-name = Max-All-MB
            reply-name = Max-All-MB
            reply-message = "You have reached your bandwidth limit"
            sqlmod-inst = sql
            key = User-Name
            reset = never
            query = "SELECT SUM(AcctInputOctets) / (1024*1024) +
SUM(AcctOutputOctets) / (1024*1024) FROM radacct WHERE UserName='%{%k}'"
}


*2.) Solution offered by You. *

I tried your recommendations also, i tried to maintain following in local
FR dictionary *"/etc/freeradius/dictionary"* and Chilli dictionary

ATTRIBUTE       Acct-Input-Octets64     3005    integer64

ATTRIBUTE       Acct-Output-Octets64    3006    integer64

Results: failed to start FR

reason for failing: : un recognized value specified in *
"/etc/freeradius/dictionary"*

reason for failing: : un recognized value specified in *
"/usr/share/freeradius/dictionary.chillihotspot"*

Thanks / Regards

RM --

On Tue, Oct 8, 2013 at 3:38 PM, Arran Cudbard-Bell <
a.cudbardb at freeradius.org> wrote:

>
> On 8 Oct 2013, at 15:40, Russell Mike <radius.sir at gmail.com> wrote:
>
> > Dear Arran C. Bell,
> >
> > Thank you very much, i am extremely grateful for your advise and
> guidelines for troubleshoot also. i am currently experimenting a different
> rlm_sqlcounter using CoovaChilli dictionary "All-In-MB". In result, i can
> store short number in db. This counter would reset at 2TB with same 32bit
> number. i have actually tested up to 6GB. it just works!!!. Next test is in
> progress to logout user when 7GB downloaded. i really appreciated your
> input and TIME.
> >
> > i will try your proposed solution as well after "All-In-MB" has tested.
> After the successful practical of both solutions. i would like to document
> this topic on one page for archives, so that it can help others. i may need
> your support incase i came across some challenges during the test of your
> solution.
>
> wiki.freeradius.org is the place to do that :)
>
> >
> > Thanks once again !!!
>
> No problem, glad I could help.
>
> -Arran
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20131009/bfb6c219/attachment.html>


More information about the Freeradius-Users mailing list