Community discussions

MikroTik App
 
kvan64
Member Candidate
Member Candidate
Topic Author
Posts: 186
Joined: Tue Apr 10, 2007 1:54 pm
Location: Brisbane Australia
Contact:

Limitting bandwith after download limit is reach - How to?

Fri May 25, 2007 4:17 pm

Hi, I am not a programmer and have never attempted any script in my entire life. I don't know how to do it correctly. Combining the scripts from others, will the following work???

Scripts
______________________
add name=shapingRate source={
:local traf;
/queue simple
:for i from=1 to= 254 do = {
:if ([/queue simple find target-addresses=("192.168.1." . $i)] != "") do={
:set traf [get [find target-addresses=("192.168.1." . $i)] total-bytes]
:if ($traf > 104857600) do = {
set [find target-addresses=("192.168.1." . $i)] max-limit= 32000/64000
}
}
}

}

add name=resetCounter source={/que simple reset-counters}


Schedules
______________________
add name=run-1h interval=1h on-event=shapingRate
add name=run-24h interval=24h on-event=resetCounter
 
kvan64
Member Candidate
Member Candidate
Topic Author
Posts: 186
Joined: Tue Apr 10, 2007 1:54 pm
Location: Brisbane Australia
Contact:

Re: Limitting bandwith after download limit is reach - How to?

Sat May 26, 2007 12:59 am

Also I have tx/rx limits set using hotspot user profiles. If the script works, will it work in this case? If I tried it anyway and it has errors, will it compromise hotspot connections? Ta
 
User avatar
meverest
Frequent Visitor
Frequent Visitor
Posts: 83
Joined: Wed Jun 30, 2004 3:27 pm
Location: Geelong, Australia
Contact:

Re: Limitting bandwith after download limit is reach - How to?

Wed Jun 06, 2007 5:43 am

Hi,

you need to use a radius server to do this, else subscribe to some admin application service like this one: http://www.viewbankrise.net.au/webministrator.htm

Cheers.

Who is online

Users browsing this forum: No registered users and 28 guests