Community discussions

MikroTik App
 
variable
Member Candidate
Member Candidate
Topic Author
Posts: 217
Joined: Wed Apr 13, 2005 4:36 am

connection bandwidth limiting

Mon May 08, 2006 1:33 am

I am having users who are downloading large files and then it fills their simple queue(which is all i currently have setup) and then they fill up my entire main line. I cant drop their rates because then downloads AND web would go slower. Is there a way I can make each connection be managed. IE. connection gets 500k for first 5s and after that is dropped to 256k or something like that. that way a web connection or short download gets 500k and a continous download is limited to 256k. Also I would like to make it so that they cannot occupy more than 256k for longer than 5s. If that makes sense?

thanks, I hope this (or something better) is possible
 
variable
Member Candidate
Member Candidate
Topic Author
Posts: 217
Joined: Wed Apr 13, 2005 4:36 am

Mon May 08, 2006 2:17 am

now that i think about it, it might actually be better to prioritize based on connection time? so that is the connection is less than 5s than make it highest and a little less for each bit of time over 5s it is.
 
advantz
Member Candidate
Member Candidate
Posts: 187
Joined: Thu Jul 08, 2004 4:11 am

Mon May 08, 2006 8:00 am

you would want to setup squid proxy caching server as their feature can limit based on url or protocol, as well as time and day
 
variable
Member Candidate
Member Candidate
Topic Author
Posts: 217
Joined: Wed Apr 13, 2005 4:36 am

Mon May 08, 2006 8:12 am

but that would mean a box seperate from mikrotik correct? how would that work with mikrotik?
 
advantz
Member Candidate
Member Candidate
Posts: 187
Joined: Thu Jul 08, 2004 4:11 am

Mon May 08, 2006 8:24 am

if you want to use mikrotik then a complex mangle setup using various command of /ip firewall mangle :

list of mangle parameters :

action dst-address new-connection-mark protocol
address-list dst-address-list new-mss psd
address-list-timeout dst-address-type new-packet-mark random
chain dst-limit new-routing-mark routing-mark
comment dst-port new-tos src-address
connection-bytes hotspot new-ttl src-address-list
connection-limit icmp-options nth src-address-type
connection-mark in-bridge-port out-bridge-port src-mac-address
connection-state in-interface out-interface src-port
connection-type ipv4-options p2p tcp-flags
content jump-target packet-mark tcp-mss
copy-from limit packet-size time
disabled log-prefix place-before tos



you see time and limit parameter there?? :D
 
variable
Member Candidate
Member Candidate
Topic Author
Posts: 217
Joined: Wed Apr 13, 2005 4:36 am

Mon May 08, 2006 5:50 pm

wow that is complex, i really dont see any time limits or anything in there but i dont know where to look?

What if all I really want to do is make http connections change priority. so if the http connection runs for 5s or less it gets priority 1 and for 5s-60s priority 2 and greater than 60s priority 3 if that is possible? does that make sense. that way web loads quick and downloads get pushed aside for web viewing on port 80.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Mon May 08, 2006 6:36 pm

you can try to set up burst time in simple queues.

SFQ queue type can be used but it is a bit dangerous, becose users with many connections can gain more traffic as they should.

look here what can be better for you
http://www.mikrotik.com/docs/ros/2.9/root/queue
 
onowojemma
Member Candidate
Member Candidate
Posts: 129
Joined: Sun Sep 11, 2005 5:27 pm
Location: Nigeria

Tue May 23, 2006 9:55 pm

I need some help before now my network was very bad untill us use the config below it work but there are some site that don't just work and are not able to sign in to http://www.mail.yahoo.com hotmail .com gmail.com and yahoo messenger when i increase the pcq rate thelink will be slow and can't even open a webpage
what i get from my ISP is 256/512 kbps and i have up 230 computer on my network
/ queue type

add name="pcq-download" kind=pcq pcq-rate=64000 pcq-limit=50 \
pcq-classifier=dst-address pcq-total-limit=2000
add name="pcq-upload" kind=pcq pcq-rate=34000 pcq-limit=50 \
pcq-classifier=src-address pcq-total-limit=2000
add name="default-small" kind=pfifo pfifo-limit=10
/ queue tree
add name="Upload" parent=internet packet-mark=users limit-at=0 \
queue=pcq-upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="Download" parent=dhcp packet-mark=users limit-at=0 \
queue=pcq-download priority=8 max-limit=0 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
[admin@SCPC] queue>
 
cibernet
Long time Member
Long time Member
Posts: 610
Joined: Fri Jan 28, 2005 7:22 pm
Location: Marcos Juárez, Córdoba, Argentina
Contact:

Wed May 24, 2006 1:14 am

I need some help before now my network was very bad untill us use the config below it work but there are some site that don't just work and are not able to sign in to http://www.mail.yahoo.com hotmail .com gmail.com and yahoo messenger when i increase the pcq rate thelink will be slow and can't even open a webpage
what i get from my ISP is 256/512 kbps and i have up 230 computer on my network
/ queue type

add name="pcq-download" kind=pcq pcq-rate=64000 pcq-limit=50 \
pcq-classifier=dst-address pcq-total-limit=2000
add name="pcq-upload" kind=pcq pcq-rate=34000 pcq-limit=50 \
pcq-classifier=src-address pcq-total-limit=2000
add name="default-small" kind=pfifo pfifo-limit=10
/ queue tree
add name="Upload" parent=internet packet-mark=users limit-at=0 \
queue=pcq-upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="Download" parent=dhcp packet-mark=users limit-at=0 \
queue=pcq-download priority=8 max-limit=0 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
[admin@SCPC] queue>
230 PC... way toooo much...(for given bw) enable webproxy, QoS with mangle and queue tree

Regards...