http://wiki.mikrotik.com/wiki/Limiting_a_user_to_a_given_amount_of_traffic
pls did anyone tried this
how to add it to the system scheduler to be run every 15 min
http://wiki.mikrotik.com/wiki/Limiting_a_user_to_a_given_amount_of_traffic
pls did anyone tried this
how to add it to the system scheduler to be run every 15 min
I use http://wiki.mikrotik.com/wiki/Limiting_a_user_to_a_given_amount_of_traffic_with_user_levels and I even extend it to more options. Works fine.
How to add something in scheduler?
save script under name, for isntance: traffic-shaper
execute:
/system scheduler add name=“shape-groups” on-event=traffic-shaper interval=15m
thank you
i prefer to give the option of having 100 mb on a very high speed
i i will try it and get back to you many thanks
pedja i did this
2 scripts
still need to wait if system will make counters reset at midnight
0 name=“traffic-shaper” owner=“admin” policy=ftp,reboot,read,write,policy,test,winbox,password
last-started=feb/17/2007 23:47:23 run-count=7 source=
:local traf;
/queue simple
:for i from=1 to= 254 do = {
:if ([/queue simple find target-addresses=(“10.1.1.” . $i)] != “”) do={
:set traf [get [find target-addresses=(“10.1.1.” . $i)] total-bytes]
:if ($traf > 10485760) do = {
set [find target-addresses=(“10.1.1.” . $i)] max-limit= 32000/64000
}
}
}
1 name=“counter-reset” owner=“admin” policy=ftp,reboot,read,write,policy,test,winbox,password
last-started=feb/17/2007 22:13:29 run-count=1 source=/queue simple reset-counters-all
2 name=“high-traffic” owner=“admin” policy=ftp,reboot,read,write,policy,test,winbox,password
last-started=feb/17/2007 23:46:31 run-count=2 source=
:local traf;
/queue simple
:for i from=1 to= 254 do = {
:if ([/queue simple find target-addresses=(“10.1.1.” . $i)] != “”) do={
:set traf [get [find target-addresses=(“10.1.1.” . $i)] total-bytes]
:if ($traf < 10485760) do = {
set [find target-addresses=(“10.1.1.” . $i)] max-limit= 32000/256000
}
}
}
hi i tried your script but still its not working . do i have to add any simple queue ? or just run 3 scritps. like one for low trafic then counter reset then one for high trafic ?
please any bit explain details would be appriciate . i m new . thanks
of course simple que is a must
every user and ip
i made the script and working fine
i need to allow free trafffic between midnight and morning to not be counted in the counters is it posssible ?
Kust add simple queue before queue used for counting and set it to work in predefined time frame.
pedja thx for your help , you mean i have to add 2 simple queue for each customer ?
Yes, just place the one which is time limited before the one that should work always.
total bytes is not always counting total download of customer is 200 mb and total bytes are 11 mb how i can solve this
i need to type in sript instead of total-bytes , downloaded bytes