Hi, new user here. been messing around with an RB750G for a few months now setting up simple stuff. I’m currently working on implementing something like this (quoted from another user in this forum) but cannot get anywhere. My setup is as follows:
What I’m planning on doing, is prioritize HTTP over any other traffic. FOr example, I have a 15 MBit DSL connection, and its maxed out. When browsing I need to lower the speed of all other traffix to 4Mbit (or any other number such as to allow fast browsing and downloads over http).
For downloads, at the moment I’m setting the Max Limits at 15MBit for parent, 15Mbit for HTTP and 15Mbit for Other. When other traffic is running, HTTP traffic is not getting the priority, but rather take the little bandwidth that left. When both are being used, I want http to max out, and all other bandwidth gets lowered immediately.
You are going to want to use Queue trees and not simple queues for what you want to do. Simple Queues are very simple, and basically just process their queue just like the firewall, each packet that comes in just goes down the list until it finds a queue that fits.
This is probably more what you are looking for. Adjust the interfaces and rates to be more of what you are looking for.
Max Limit is how much traffic is allowed to go through the queue at any time. Limit-at is the guaranteed rate you want to offer to that kind of traffic. You need a queue for each interface that is going to upload and download, so if you have multiple WANs or LANs you need to add in the appropriate queue trees for them.
Thanks for the quick reply! I did the changes as you posted modified to my setup but something is not working as it should. Tried limiting the HTTP traffic just to check if its working, but it keeps maxing out anyway even though I set it up to a max of 5Mbit.
Packet marking seems fine as when i tried limiting the speed with simple queues worked out fine. I also tried using both the pppoe interface aswell ether1 as parent, to no avail. Any idea?
It looks like you placed that on Ether1, is that the WAN or the LAN? By placing it on the WAN you are limiting the upload, place the rules on the LAN to limit the download. You could also make the parent Global-Download instead of the LAN, just by specifying the parent interface you are better able to control what each interface is capable of passing.
This wiki page shows you how a packet processed through the MikroTik. It is very useful and will help you understand better where and how to implement QoS rules.
I changed the parent to global in after some reading. Currently seem to have a problem with marking as everything is getting marked as http.. will see whats wrong with the setup and report back. Thanks!
Basically marking is working and traffic flow in the queue tree is showing up correctly.
Now when I have other traffic it can max out, but when theres HTTP traffic, other traffic should get lowered to 2Mbits if HTTP traffic is requesting to max out the connection right?
Its currently not doing so, when other traffic is maxed out and I start HTTP traffic, HTTP barely gets 1-3Mbits so prioritization is not occurring.
Try moving the parent interface to your LAN and see how that goes. Based off of the average rates there it’s looking like you still have rate limiting the Upload stream.
You should move the queue to the interface that is facing the clients.
If you have:
internet → ether1 routeros ether2 → clients
then you should attach the queue to ether2 (or global-out).
You can attach corresponding queues with their own limits to ether1 to limit traffic in the other direction. (unless you’re using global-out).
You may also need to increase the size of the queues in queue types tab, and/or change them to a different type of queue in the interfaces tab, but don’t worry about that for now, the defaults are probably fine.
Basically, you can’t do anything to traffic that has already been sent to you, except buffer it, but when you send it somewhere else (to your downstream clients), then you can reorder (prioritize it). I’m not really a fan of using the global-xxx options.
This is just a home setup, sorry if I didn’t mention that earlier. Basically I have the DSL modem connected to ether1 and 4 clients including a wireless AP to ports ether2-5. How should I go about setting the port pointing to the client? Should I choose ether2 since its the master port for ether3-5?
Well it looks right to me, so I’m not sure why it’s not working for you. I would be curios to try a few things.
1.) See what happens when you move the mangle rules to the forward chain
2.) See what happens when you put it on the Global-out interface
3.) See what happens when you turn off the switch chip, put a PC on Ether2 and see how that affects things.
One thing I forgot to mention is the way the rules work. All of your other connections are guaranteed 2 Mbps, but can take up to 15 Mbps. Your HTTP is guaranteed 13 Mbps and take up to 15 Mbps. However if HTTP is not taking up it’s guaranteed 13 Mbps when the connection is under full load, the other queue will borrow the left over bandwidth for it’s own uses. Just with the priority, all of your HTTP connections will go out first.
You will also probably want to prioritize DNS traffic, since your computer will not be able to or even try to go anywhere until it has resolved the domain name of where you are trying to get to.
I added more ports to cover DNS and other important traffic to get tagged with the http rule. The below point have been testing with other ports tagged aswell.
The forward chains shown in the pics are dynamic, what do you mean by this?
Tried Global in, Global out and ether2, still not prioritizing. Other data still not being lowered to 2Mbits even though I’m trying to get a large file over http (speed can max out)
The testing I’m doing is coming frmo one PC connected to the ether2 port, still nothing
In your mangle rules, change the chain from prerouting to forward.
For your test, I would open up a torch session on Ether2 and see if you are really getting the file via HTTP or some other method then. Be sure you check portocol and port and let it run.
Set up torch on ether2, tried the http download on 80 and it marked the download at 15mbit, so the test I’m trying is going through http. Also changed the mangle rules from prerouting to forward, still the same.
This is what I’m trying to test priorities maybe I’m doing something here. I’m letting a bittorrent distro run, letting it max out at 15Mbit. Then I start an http transfer of an exe, which should in theory take up the 15MBit and slow down the other transfers (barely taking 2mbit and slowly trickling down, while other transfers remain almost maxed). Am I testing it right? Or is there an other way of going through this?
Ok, that all sounds right, so lets go back to some very basics.
1.) Where are you downloading the files from? Are they on your local network, or are they out on the internet?
2.) If they are out on the internet, are you able to get full HTTP download speeds without the torrent running?
3.) Do you see the mangle rules incrementing like they should be when you start your downloads?
4.) Do you see the Queue rules incrementing like they should be when you are downloading traffic?