Managing Data Volume Control More Than 4GB FR & CoovaChilli
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Tue Oct 8 14:06:56 CEST 2013
On 8 Oct 2013, at 10:10, Russell Mike <radius.sir at gmail.com> wrote:
> Hi List Members
>
> i have been reading archives and tying to understand for some days now, but unsuccessful. i am currently working to extend data volume control up to 10GB, which is requirement for the organization. Is anyone able to manage more then 4GB using CoovaChilli & Freeradius? Since there is no one piece of information available on the net. Until now, i am unclear about the components needs to be fine tune. i understand that FR has 32 bit integers but it is not the limitation to manage more than 4GB, if NAS supports the "Gigaword" attributes. It seems that my "sql_counter" or MySQL it self is the problem.
>
> NOTE: It is working setup up to 4GB, if i assigne 6GB to a user, counter rolls up on 4GB
>
> 1.) I came across a post where guys are tell that sqlcounter module uses 32-bit integers in it's source code. Should it be change to 64-bit integers?
Yes. I've just done this in 3.0.x and master branches. Check and reply attributes will now be treated as unsigned 64bit integers.
There's no downside to this and the change should be fully backwards compatible.
> 2.) CoovaChilli has built in support for "gigaword" attributes, which is enable.
Ok.
> 3.) is it possible by rlm_sql or rlm_perl must be used
Well yes, rlm_sql needs to be used. The default queries will correctly convert Acct-Input-Octets and Acct-Input-Gigawords into a proper 64bit value which is stored in the database.
> 4.) Counter rolls up on 4GB.
You'll need to create a local 64bit attribute to use as the check and reply items
Something like:
ATTRIBUTE Acct-Input-Octets64 3005 integer64
ATTRIBUTE Acct-Output-Octets64 3006 integer64
And specify their value in bytes.
It might actually be an idea to add those to the internal dictionary to make it a bit easier.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team
More information about the Freeradius-Users
mailing list