Community discussions

MikroTik App
 
prawira
Trainer
Trainer
Topic Author
Posts: 359
Joined: Fri Feb 10, 2006 5:11 am

How to limit users bandwidth on spesific connection ?

Thu Aug 18, 2011 2:07 pm

Hi all,

How to limit user bandwidth on specific connection ?
the example needs as follows :
+ if users just browse the internet, than any user can use any available bandwidth.
+ if one of the users doing download (transfer rate more than 32Kbps continuesly more than 5 minute) and add the destination server to address list with time out 1 hour, let say it will named with download-server
+ all address-list on download-server will be put on mangle and than to be limited on simple queue or queue tree.

is it possible ?

Paul
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: How to limit users bandwidth on spesific connection ?

Thu Aug 18, 2011 2:12 pm

There is no such function to limit bandwidth in the described way, but I think PCQ queue for all available bandwidth is good alternative.
For example, Internet link bandwidth is 10Mbps, you set one PCQ queue that divides 10Mbps between all clients equally. One client is online, it gets 10Mbps, two clients are online they divide 10Mbps/2, etc.
http://wiki.mikrotik.com/wiki/Manual:Queues_-_PCQ
 
prawira
Trainer
Trainer
Topic Author
Posts: 359
Joined: Fri Feb 10, 2006 5:11 am

Re: How to limit users bandwidth on spesific connection ?

Fri Aug 19, 2011 2:51 pm

Thx sergej,

Quite confuse. I think may be connection-bytes can help.

what is connection-bytes purposes ?

Paul
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: How to limit users bandwidth on spesific connection ?

Fri Aug 19, 2011 2:56 pm

Yes, you can use connection-bytes and try to make complicated setups, which could try to give you bandwidth limit to specific connection.

But PCQ solution will be much better. You can search in the forum for burst topic, that has many posts about similar problem.
 
User avatar
dasiu
Trainer
Trainer
Posts: 231
Joined: Fri Jan 30, 2009 11:41 am
Location: Reading, UK
Contact:

Re: How to limit users bandwidth on spesific connection ?

Sat Aug 20, 2011 11:33 am

It should be possible by connection-bytes - just one simple rule, if connection bytes are over - let's say - 5M (connection-bytes=5000000-0) and in-interface is WAN, then add src-address to the address list
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How to limit users bandwidth on spesific connection ?

Sat Aug 20, 2011 5:11 pm

That would rate limit ALL the user's connections, since the source address is the same for all of them.
 
prawira
Trainer
Trainer
Topic Author
Posts: 359
Joined: Fri Feb 10, 2006 5:11 am

Re: How to limit users bandwidth on spesific connection ?

Sun Aug 21, 2011 7:10 am

I got the following codes from some other forum :
/ip firewall filter add action=add-dst-to-address-list address-list=limited address-list-timeout=1h chain=forward comment="Volume Above 512K" connection-bytes=512000-0 disabled=no protocol=tcp
/ip firewall mangle add chain=forward protocol=tcp src-address-list=limited action=mark-packet new-packet-mark=limit-by-volume
/queue simple add name=limit-files max-limit=32000/128000 packet-marks=limit-by-volume
and it seems quite help.

Any advices for improvement ?

Paul

Who is online

Users browsing this forum: dawdler, Google [Bot], katongo360 and 123 guests