FreeRadius Mikrotik-Rate-Limit attribute limit
Hi all, I configured freeradius (FreeRADIUS Version 2.2.2) with mysql,While testing Mikrotik NAS i found that Mikrotik-Total-Limit attribute it works upto 4gb then Mikrotik-Total-Limit-Gigawords for more than 4gb (4294967296 in bytes).If i set Mikrotik-Total-Limit value more then 3.9 GB ,it's taking random value or 0 for this attribute. Currently my hotspot ,wifi users data usage limit set in database, using store procedure it's calculating value for Mikrotik-Total-Limit and assigning other attributes. Today i tried by sending both attributes(Mikrotik-Total-Limit-Gigawords and Mikrotik-Total-Limit) in redreply, Sending Access-Accept of id 61 to 192.168.53.157 port 48563 Mikrotik-Rate-Limit = "15M/16M" Mikrotik-Total-Limit = 5242880 (this value in bytes) Mikrotik-Total-Limit-Gigawords = 1 (this value in GB) Session-Timeout = 0 Idle-Timeout = 0 Port-Limit = 1 I'm assuming that it will Terminate the session after 1026 mb usage (Mikrotik-Total-Limit + Mikrotik-Total-Limit-Gigawords), but user session not Terminating even after 1026 mb usage . I am not sure whether Mikrotik-Total-Limit-Gigawords taking value in GB or bytes. Please suggest how i can use Mikrotik-Total-Limit-Gigawords for more then 4 GB data limit. Thanks, Lalit Choudhary
Lalit Choudhary wrote:
I configured freeradius (FreeRADIUS Version 2.2.2) with mysql,While testing Mikrotik NAS i found that Mikrotik-Total-Limit attribute it works upto 4gb then Mikrotik-Total-Limit-Gigawords for more than 4gb (4294967296 in bytes).If i set Mikrotik-Total-Limit value more then 3.9 GB ,it's taking random value or 0 for this attribute.
Ask Mikrotik to fix their NAS. This isn't a FreeRADIUS problem.
Sending Access-Accept of id 61 to 192.168.53.157 port 48563 Mikrotik-Rate-Limit = "15M/16M" Mikrotik-Total-Limit = 5242880 (this value in bytes) Mikrotik-Total-Limit-Gigawords = 1 (this value in GB) Session-Timeout = 0 Idle-Timeout = 0 Port-Limit = 1 I'm assuming that it will Terminate the session after 1026 mb usage (Mikrotik-Total-Limit + Mikrotik-Total-Limit-Gigawords), but user session not Terminating even after 1026 mb usage .
Because you didn't set it to 1026Mb usage. You set it to 4100 Mb usage.
I am not sure whether Mikrotik-Total-Limit-Gigawords taking value in GB or bytes.
Look at the name. It's GIGA WORDS.
Please suggest how i can use Mikrotik-Total-Limit-Gigawords for more then 4 GB data limit.
A value of "1" in that attribute means 2^32 bytes. You already posted this question to the devel list, and were told to ask questions here. You were *also* given a URL to the list archives, where this question was previously answered. If you're going to post questions here, you need to follow the instructions we give. ALL of them. Alan DeKok.
On Tue, Feb 18, 2014 at 08:05:08PM +0530, Lalit Choudhary wrote:
I configured freeradius (FreeRADIUS Version 2.2.2) with mysql,While testing Mikrotik NAS i found that Mikrotik-Total-Limit attribute it works upto 4gb then Mikrotik-Total-Limit-Gigawords for more than 4gb (4294967296 in
As I already wrote in response to the last e-mail you just sent, this should help you do the calculations (apart from my typo on the first line of 4 instead of 6) - http://lists.freeradius.org/pipermail/freeradius-users/2013-October/068847.h... This has come up on the list multiple times; the archives have other messages with similar answers. Cheers Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
On 18 Feb 2014, at 14:35, Lalit Choudhary <lalitvc@gmail.com> wrote:
Hi all, I configured freeradius (FreeRADIUS Version 2.2.2) with mysql,While testing Mikrotik NAS i found that Mikrotik-Total-Limit attribute it works upto 4gb then Mikrotik-Total-Limit-Gigawords for more than 4gb (4294967296 in bytes).If i set Mikrotik-Total-Limit value more then 3.9 GB ,it's taking random value or 0 for this attribute. Currently my hotspot ,wifi users data usage limit set in database, using store procedure it's calculating value for Mikrotik-Total-Limit and assigning other attributes. Today i tried by sending both attributes(Mikrotik-Total-Limit-Gigawords and Mikrotik-Total-Limit) in redreply,
Sending Access-Accept of id 61 to 192.168.53.157 port 48563 Mikrotik-Rate-Limit = "15M/16M" Mikrotik-Total-Limit = 5242880 (this value in bytes) Mikrotik-Total-Limit-Gigawords = 1 (this value in GB) Session-Timeout = 0 Idle-Timeout = 0 Port-Limit = 1 I'm assuming that it will Terminate the session after 1026 mb usage (Mikrotik-Total-Limit + Mikrotik-Total-Limit-Gigawords), but user session not Terminating even after 1026 mb usage . I am not sure whether Mikrotik-Total-Limit-Gigawords taking value in GB or bytes. Please suggest how i can use Mikrotik-Total-Limit-Gigawords for more then 4 GB data limit.
See response to the developers list. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (4)
-
Alan DeKok -
Arran Cudbard-Bell -
Lalit Choudhary -
Matthew Newton