Community discussions

MikroTik App
 
zhex900
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Mon Apr 15, 2013 5:34 pm

Mikrotik-Recv-Limit. Not ending session when reached limit

Tue May 20, 2014 11:15 am

Hi,

I am trying to limit user's download with Mikrotik-Recv-Limit. However NAS does not terminate the session when the limit is reached.

Radius is working fine. It stops the user from login when the limit is reached. Accounting is working fine. Mikrotik-Recv-Limit is received by the NAS in Access-Accept. Session-timeout works. NAS will terminate the session when the time limit is reached.

MT-Recv-Limit= 1600000 (testing number)
MT-Recv-Limit-Gigawords = 0 (I tried without this in the reply item, but it made no difference)

Setup: Freeradius V.3 with a NAS (RouterOS v.6.12).

Any ideas?
You do not have the required permissions to view the files attached to this post.
 
dleo
newbie
Posts: 27
Joined: Wed Mar 11, 2009 10:49 pm

Re: Mikrotik-Recv-Limit. Not ending session when reached lim

Tue May 20, 2014 7:08 pm

Hi,

Are you using for hotspot or pppoe?

David L.
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: Mikrotik-Recv-Limit. Not ending session when reached lim

Tue May 20, 2014 7:25 pm

Are you using:
Acct-Interim-Interval - interim-update for RADIUS client. PPP - if 0 uses the one specified in RADIUS client; HotSpot - only respected if radius-interim-update=received in HotSpot server profile

http://wiki.mikrotik.com/wiki/Manual:RA ... ess-Accept
 
zhex900
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Mon Apr 15, 2013 5:34 pm

Re: Mikrotik-Recv-Limit. Not ending session when reached lim

Wed May 21, 2014 3:27 am

Hi,

I am not using PPPoe or hotspot. It is only for wireless authentication.

Do I need to set Acct-Interim-Interval in the reply item? Is 600 (10 mins) ok?

I thought NAS should terminate the session not the the freeradius' job right?

Jake He
You do not have the required permissions to view the files attached to this post.
 
zhex900
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Mon Apr 15, 2013 5:34 pm

Re: Mikrotik-Recv-Limit. Not ending session when reached lim

Thu May 22, 2014 3:46 am

Is Mikrotik-Recv-Limit is only supported by hotspot and PPPoE? If this is the case why Session-Timeout worked?

What I want to achieve is to set a data quota for each wireless user.

Can anyone help me?
 
oooscar
Frequent Visitor
Frequent Visitor
Posts: 84
Joined: Sun Jan 05, 2014 12:56 pm
Location: Spain
Contact:

Re: Mikrotik-Recv-Limit. Not ending session when reached lim

Sun Nov 30, 2014 2:21 pm

Hi,
I have the same problem, setting radius limit does not work. Even I'm using Daloradius and until finish connection on mikrotik, radius doesn't accumulate bytes in or out on radius database.
So i'm doing a work arround:
SCRIPT that logout user if it download over the limit.
If it trys to connect again then i accumulate byte form daloradius tables and show warning to the user.

In case of radius limit would work what happens:
User downloads over the limit how long the user can't connect again ? How does it Works?

Here the scripts:
#Set your dowload limit in MegaBYTES!
:local downloadlimitmb "200"

### You will not need to edit anything below this line ###
:local downloadlimit  [($downloadlimitmb  * 1048576)]
:local counter
:local datadown
:local username
:local macaddress
:foreach counter in=[/ip hotspot active find ] do={
:set datadown [/ip hotspot active get $counter bytes-out]
:if ($datadown>$downloadlimit) do={
/ip hotspot active remove $counter
:log info "Force logout user: $username - Reached download quota"
}}  
 
zhex900
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Mon Apr 15, 2013 5:34 pm

Re: Mikrotik-Recv-Limit. Not ending session when reached lim

Sun Nov 30, 2014 3:17 pm

Your script is for hotspot users. I don't use hotspot. My clients use EAP to connect directly into the network. So your script cannot help me.
 
zhex900
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Mon Apr 15, 2013 5:34 pm

Re: Mikrotik-Recv-Limit. Not ending session when reached limit

Sat Jun 13, 2015 3:28 am

Does anyone have any ideas?

Who is online

Users browsing this forum: GoogleOther [Bot], patg, quezhou, vagrik and 240 guests