Community discussions

MikroTik App
 
maxpz
just joined
Topic Author
Posts: 7
Joined: Fri Jul 09, 2004 11:53 am
Location: Kosova

Bandwith limiting big files...

Sun Feb 20, 2005 12:09 am

How can I apply bandwith limit only if the file is biger then ex.1MB.

I want to limit the downloads only, so my clients will have no bandwith limit when browsing the internet.

Any Idea?
 
Bill
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri May 28, 2004 4:24 pm
Location: Nevada

Sun Feb 20, 2005 2:21 am

Use the burst feature in the simple queue. Set a burst time of about 75 seconds. This will allow browsing, speed tests, email retrieval, and small file downloads to run at the maximum burst rate. If they download a large file, it will throttle them back to the maximum speed after 75 seconds and keep them there until the transfer is done. The time counter resets when the traffic stops flowing. Since most of the traffic is in bursts, this will make the connection seem very fast, but also keeps them under control if they start downloading lots of files.
 
maxpz
just joined
Topic Author
Posts: 7
Joined: Fri Jul 09, 2004 11:53 am
Location: Kosova

Sun Feb 20, 2005 11:26 pm

Thanks Bill,

But please give me an example how can I do it.

p.s.
Is this feature available also in v2.7
 
Bill
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri May 28, 2004 4:24 pm
Location: Nevada

Mon Feb 21, 2005 1:22 am

I believe you need to upgrade to 2.8 to do this. I don't think Simple Queues were in 2.7.

Here is one of my queues with burst, setup using Winbox.

All settings are on the General Tab. Settings are given as tx/rx (upload/download).

Name - 2.201/32
Target Address - 192.168.2.201/32
Limit At - 65536/131072
Max Limit - 262144/524288
Burst Limit - 393216/786432
Burst Threshold - 262144/524288
Burst Time - 90/180

This is a Simple queue for the user at IP 192.168.2.201. He is given a basic speed of 64k upload and 128k download. According to the MT manual, this is a guaranteed minimum speed, provided enough bandwidth is available. His maximum sustained speed is 256k upload and 512k download.

His speed is allowed to burst as high as 384k upload and 768k download. If his speed goes above the threshold (256/512) and stays there, the burst timer starts. After the allowed time, 90sec for upload and 180sec for download, his speed is throttled back from the burst limit (384/768) to the max limit (256/512) and held there until the traffic flow stops. When the flow stops, the timer resets, and the process starts over.

The variables are adjustable to suit different needs and situations. If you provide at least 75 seconds on the timer, most speed tests and small file transfers will complete in that time and show fast speeds. If they start a large file download, it will complete part of it fairly quick and then slow down for the remainder of the transfer so they are not hogging the pipe.
 
maxpz
just joined
Topic Author
Posts: 7
Joined: Fri Jul 09, 2004 11:53 am
Location: Kosova

Mon Feb 21, 2005 9:44 am

Thanks!
 
spavkov
newbie
Posts: 39
Joined: Mon Sep 06, 2004 11:23 am

Fri Feb 25, 2005 2:29 pm

Is there a way to give unguaranteed bandwidth to users...

for example to give to one user (ip) a unguaranteed bandwidth of 64kbps ???

if traffic is high then his speed would fall under 64kbps, but if traffic is low his speed would be maximum 64kbps...


any clues.????
 
User avatar
lastguru
Member
Member
Posts: 432
Joined: Fri May 28, 2004 9:04 pm
Location: Certified Trainer/Consultant in Riga, Latvia
Contact:

Fri Feb 25, 2005 6:40 pm

In 2.9 there is a connection-bytes property, which you can use to catch any connections which is a given byte interval large (for example, 1MB-5MB). then you can apply different treatment for these connections (for example, one speed for connections up to 1MB, then a determined speed for 1-10MB large connections, and with the least prio all the connections which are larher than 10MB)
 
Bill
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri May 28, 2004 4:24 pm
Location: Nevada

Sun Feb 27, 2005 11:08 pm

Is there a way to give unguaranteed bandwidth to users...

for example to give to one user (ip) a unguaranteed bandwidth of 64kbps ???

if traffic is high then his speed would fall under 64kbps, but if traffic is low his speed would be maximum 64kbps...
Just use the example given above and set the Limit At to 0, and the Max Limit to 65536. Leave all the Burst settings blank. This will do just what you want.
 
spavkov
newbie
Posts: 39
Joined: Mon Sep 06, 2004 11:23 am

Sun Feb 27, 2005 11:22 pm

Hi

I did this like you said, but these users then get guaranteed bandwidth !!!
if traffic is high then all other users that dont have speed limit cannot use the web and these 'limitd' users have 'smooth' speed of 8kb/s...

something is wrong here i tell you...

i been testing this for days and i get the same effect???

any clues???
[/quote]
 
Bill
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri May 28, 2004 4:24 pm
Location: Nevada

Mon Feb 28, 2005 12:25 am

If you don't put anyone in a queue, then bandwidth is given out on a first-come,first-served basis. To give someone guaranteed bandwidth, they need to be in a queue. To give unguaranteed bandwidth, leave them out of the queues. Using the queues lets you provide some QOS and enfore speed caps. If they are not in a queue, they have access to whatever is available.

Try adding queues for the guaranteed users, and removing the queues for the other users and see what happens. Putting them in a queue to try and give them 0k when it is busy and leaving all others out of the queues is going to do just the opposite of what you are trying to achieve (as you have noticed).

To properly do what you want, you need to put everyone in a queue. Adjust the Limit-At and Max-Limit numbers accordingly. The queues are there to try and make sure everybody gets some bandwidth, and those that should get a bigger slice. You can also assign a queue to a group of users, by adjusting the IP netmask (/32), and they all share what is assigned to that queue.
 
spavkov
newbie
Posts: 39
Joined: Mon Sep 06, 2004 11:23 am

Mon Feb 28, 2005 5:04 pm

Tnx for the helping words man... now its little more clear to me...
(i know im boring but this problem is really bugging me...)

i still cannot solve my problem...
it remains.... :(

this is my last attempt:
i have some customers that pay PER TRAFFIC
and i have some of them that pay PER MONTH (this users have speed limit)

i would like to setup my network so that users that pay PER TRAFFIC dont have speed limits...

all of users share small bandwidth 256kbps.... so if i have 2-3 64kbps PER MONTH users and if i limit them in queues then other users cannot use the web if PER MONTH users are downloading all day long (and they do.. all day long !!!)

and i would like that all users share the bandwith equaly if traffic is high... and if its low traffic then PER MONTH users should get the speed they paid for...

is there a way to accomplish this or no???
what if i give to PER TRAFFIC users limit of 256kbps in queues and PER MONTH users a limit of 64kbps??????

is this maybe the solution of this problem ??? what will happen then????
i dont want to try before someone tells me if its a good idea???
 
Bill
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri May 28, 2004 4:24 pm
Location: Nevada

Tue Mar 01, 2005 1:24 pm

You have the right idea. I think the best thing is to setup a queue for each user. For the users that have a speed cap, set their Max Limit to their speed limit and set the Limit At to something small like 5k. For the users that don't have a speed cap, set their Max Limit to whatever your maximum speed is and set their Limit At amount a bit higher than the other users.
 
spavkov
newbie
Posts: 39
Joined: Mon Sep 06, 2004 11:23 am

Tue Mar 01, 2005 3:34 pm

yes i think this is the best we can do...

i tried this and it looks its working... and we raised our link speed also... :)

tnx again to all people that helped in this thread...


Specially to YOU BILL !!!! tnx a million times !!!!
tnx for sharing your knowledge and tnx for having the patience :)

Thumbs Up !!!!
 
Bill
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri May 28, 2004 4:24 pm
Location: Nevada

Wed Mar 02, 2005 3:23 pm

:D
 
cheinzle
newbie
Posts: 36
Joined: Thu Oct 28, 2004 7:06 pm
Location: Nebraska

Wed Mar 02, 2005 9:56 pm

... When the flow stops, the timer resets, and the process starts over.
When you say stops, how close to zero traffic does it need to be, and for how long? If they drop to zero traffic for, say, 2 seconds, is that enough? If a customer has a 'permanant' trickle of traffic, does the burst timer reset, and after how long?
 
Bill
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Fri May 28, 2004 4:24 pm
Location: Nevada

Thu Mar 03, 2005 12:32 am

As I understand it, and in my experience, the traffic flow has to stop completely. I believe a 1 second stop is enough to reset the timer. Most of the internet traffic is in short bursts. If you give them a 60-75 second burst time, web-surfing and email will be very fast. They can also download small files very quickly. This helps somewhat to minimize congestion. They connect, get their data, and clear the pipe. If they start downloading a large file, the speed cap will kick in after the burst time to help ensure there is some capacity available for all users.
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Thu Mar 03, 2005 5:07 am

Wouldn't it just be per connection in the connection table? Seems easier to track than checking if there was no traffic for a second or less... Not really sure.

Sam
 
User avatar
djape
Member
Member
Posts: 465
Joined: Sat Nov 06, 2004 7:54 pm
Location: Serbia

Sat Mar 05, 2005 4:13 pm

Ok guys, but isn't there something like "Magic Word" like there is i Squid under the Linux?
Like that, we can block *.zip *.avi etc or give a speed for that kind of files???
Yes, we would like that :)
Cheers...
 
changeip
Forum Guru
Forum Guru
Posts: 3833
Joined: Fri May 28, 2004 5:22 pm

Sat Mar 12, 2005 10:34 pm

"Magic Word" = Firewall rule -> Advanced Tab - "Content" field. ??? Not sure, but i think thats what you want.
 
artist1
newbie
Posts: 32
Joined: Fri Mar 11, 2005 10:08 pm

Sun Mar 13, 2005 5:41 pm


Name - 2.201/32
Target Address - 192.168.2.201/32
Limit At - 65536/131072
Max Limit - 262144/524288
Burst Limit - 393216/786432
Burst Threshold - 262144/524288
Burst Time - 90/180
Im noob at mikrotik, just purchased the key, and my router rocks with settings u gave! :D
I have a question maybe in wrong thread, but anyway:
I have adsl connection, and i want my server/router to login and hold the line on it. If i set pppoe client, no username and password to enter. How can i set that my router would hold the line like clasic routers do?
 
User avatar
djape
Member
Member
Posts: 465
Joined: Sat Nov 06, 2004 7:54 pm
Location: Serbia

Mon Mar 14, 2005 10:35 am

@changeip You are right, that's it :) Under the web proxy settings...
 
User avatar
kameelperdza
Member
Member
Posts: 468
Joined: Thu Nov 27, 2008 11:45 am
Location: Oudtshoorn, South Africa

Re: Bandwith limiting big files...

Fri Jul 27, 2012 1:20 pm

Hi people

i want to throttle all the ip addresses on the 192.168.0.0/24 range.

I have the option to create rule for each ip address or only make one rule with 192.168.0.0/24 as target address.

If i create rule for each ip address then i can adjust speed per ip address if needed. But to do this i will need to add 254 rules. If i go ahead will this option will it use more cpu resources?

Any feedback greatly appreciated.

Who is online

Users browsing this forum: meetriks2, nichky, oldstudent89, sindy and 34 guests