Available Here
Main faq on queues and such
http://forum.mikrotik.com/viewtopic.php?t=58168
Very good disussion, with an excellent attachment describing how-to. (Make an address range, then mangle rules(s) to mark the traffic and make an action against the marks); then make a queue tree with 2 sub trees.
http://forum.mikrotik.com/viewtopic.php?t=58168
There was a very good writeup in an attached pdf in the last post.
I will try to paste the content below:
(sorry no images)
Bandwidth Throttling on Mikrotik Routers
The idea here is to throttle a customer, specific host or IP address range to limit the throughput for this client. You can also limit separately inbound and outbound traffic, or simply assign a limit on in and out traffic together. We will explain both scenarios.
Limit Bandwidth based 512Kb for both in and out traffic from IP address range 192.168.1.0/24
1) First you need to put the address range in an address list shown bellow:
2) Now we need to setup the connection and packet markings mangle rules in the forward chain which we will use in the queues later-on:
a. You need to create 2 rules, 1st is the connection marking:
b. In the advanced tab, we need to select our Source Address list created above:
c. Lastly, in the Action tab, we mark theses connections:
d. The 2nd mangle rule is to mark the packets that are for the connections we created:
e. Now for the Action to mark the packets: (Make sure to un-check the Passthrough for this rule)
f. This is what your mangle rules should look like now. Note that I have put in comments in each mangle rule to better understand.
3) Now we need to setup the queues. Click on Queues
a. First we need to setup the Queue Type. In this exercise, I use PCQ whish is a Mikrotik specific queuing algorithm. In this queue, I limit the bandwidth in and out to 512kb. All other settings are left default, yet you should read on Limit and Total Limit and arrange these settings as per your requirement. You can check out a nice document at http://mum.mikrotik.com/presentations/US08/janism.pdf on page 26 and 27. YOU MUST UNDERSTAND this concept or else you can seriously degrade the performance of the router depending on how many users you have. Basically, if the Total Limit is 2000 and the limit is 50, with 40 users, you can fill up the queues and start dropping packets (this is serious when you deal with VoIP). For example, total_limit of 2000 is =<4 .2mb="" 10.5mb="" 5000="" br="" is="<" need="" or="" ram.="" so="" system="" to="" you="">understand this and factor in the Routers total memory. Below is how my queue type is setup.
b. Now in queue tree, we need to setup 2 entries, 1 will be the parent of the other. Let’s start with the main one: We put the parent out as Global out because we will limit both in and our to 512k. in order to do
diferent limits on in and out separately, you will need 2 sets of trees, one will be parent of the WAN interface (for upload limit) and the other on parent Local LAN interface (for download limit).
c. Now we setup the sub tree for the main tree above where we state what is the limit itself (queue type):
d. We have completed this setup. You can test with speedtest.net or using the mikrotik BTserver on Windows client and the router. Watch your router’s memory and your Limit and Total Limit and play with those if needed.
In the bellow example, we will do 2 separate queues, one for download and 1 for upload.
See following page…
Limit Bandwidth 512Kb download and 100Kb upload for traffic from IP address range 192.168.1.0/24
1) For the Address list and mangle, do section #1 and #2 above then come back here for the rest.
2) Now we need to setup 2 queue types for download and upload.
a. For download limit of 512k:
b. Now we need to do the queue type for upload and limit to 100k:
3) Now we need to do the separate Queue trees for both download and upload limits. Remember that download is to be applied on the LAN interface and upload on the WAN interface.
a. For the download: (Note the parent is ETH5 which is my LAN interface)
b. Now to setup the sub tree with the limit:
c. For the Upload: (Note the parent is ETH1 which is my WAN interface)
d. The sub tree for the upload:
You have now completed the setup of bandwidth throttling in 2 scenarios, hopefully one of these will be of use for you.
For a more detailed explanation and how to setup different queues based on multiple different client classes, you can read this document which is how I basically started :
http://mum.mikrotik.com/presentations/US08/janism.pdf
Author : Nelson Pereira Website : www.smehome.net4>
No comments:
Post a Comment