I recently bought an RB2011UAS-2HnD-IN for my adsl at home. Following the wiki I managed to use my adsl modem/router as a modem via bridging. Trust me, for someone that has none to little knowledge on setting up network gear, it was a bit painfull! None the less, the connection is up and running, enabled NAT , disabled DHCP (since I prefer assigning my address manually) and eth looks good. Some things I managed via Telnet , some via the Winbox utility.
To the hard part now.
I want to prioritize my gaming traffic. To be more specific I have 3-4 online games that I play (League Of Legends, Dota 2, Heroes of Newerth) which I would like to have the best latency possible (stable -no packet loss - no spikes), while my wife is downloading/browsing via other devices (laptop,tablet,etc). From the various wiki/guides I realized that the easy way to accomplish this is :
Use the “ip firewall mangle”, so I can put labels on the packets that hit the specific gaming ports (ex. LoL uses TCP 2099,5222,5223,5000-5500)
Use queues, to give priority 1 (which is the best?) to the packets that have the above labels and priority 8(bucket?) to all the rest of the traffic
Somehow though I totally fail to accomplish this.
Any clues/guides that I can munch on would be greatly appreciated!
You are on the right path about mangling and queuing.
Now, you have to choose how to apply the queues. It could be simple queues or tree queues. The term simple queues means that it is used primary for simple tasks (does not mean that the queue in itself is simple). I would recommend that you go by simple queue since you still need to get familiar with ROS and winbox, later on you can choose to apply a bit more complex tree queue.
Now for the priority to work, you would need a parent queue, otherwise queues with no parent will work independently no matter what priority you have assigned. The parent queue should be for the whole traffic, for example:
I am assuming that the ISP is providing 2M upload and 6M download. You should change it accordingly to your own connection bandwidth. Now you can add your simple queues created by using packet marks in mangle, assigning the priority and as parent use the above queue. You would need to assign also limit-at for these queues.
What will happen is that first all traffic will be captured by the parent queue, which then will distribute it to the child queues. First it will guarantee that limit-at for the child queues is fulfilled, and then will look at the priority of the child queues, prioritizing them accordingly.
Great. I’ll try it out first thing when I get home. Any specific hints on how to mangle the ports I already mentioned ? I used Winbox to create the mangle rules with the very basing settings such as :
General Tab
Chain : Prerouting
Protocol : (6) tcp
Any Port : 2099
In.Interface : ppoe_internet
Action Tab
Action : Mark Packet
New Packet Mark : prio_packet
Passthrough ticked
P.S : Forgot to mention that when I set the mangule rule, I select as In.Interface the ppoe I’ve created for the modem. Is this correct or should I use the ethernet port that I’m using to connect my switch (in my case eth5) with the rb2011 ?
It all depends on what traffic are you trying to isolate, capture. If it is an inbound, coming from internet to you, you should use the internet interface, and vice versa. The more specific the rule, the easier on CPU it will be.
For example, you want to capture the traffic generated by your pc to the outside on port 2099:
But you may want to capture also the response from the server, which will come back. This is a bit trickier because the response will hit the internet interface with destination port randomized, after it passes the interface it will change to the appropriate port, so you would need to specify out-interface=LAN:
and so on
Notice I used first mark connection and then mark packet. This way is lighter on the CPU. passthrough=no means that connections are no longer processed further down the other rules.
Great. It seems to be working like a charm. And the CPU load of the RB2011 doesn’t go much above 10% with http+torrent downloads while I’m gaming.
I’ve created the Parent Queue you mentioned with my DSL specs and created 2 queues below that. One for my gaming labeled packets, giving priority 1 and the full mentioned b/w available, and a second one for the rest of the packets that have no label, with half the b/w and priority 8.
Dear vaylane and all who want to help, i just bought a rb751u i have connect it with my previous router ( in bridge mode my old one) can you post what exactly rules have you configure because i want to play LoL when my sister watches videos without lag and i cant understand exactly how ques and mangle works. its my first mikrotik router . A quick guide explains how ques and mangle works would be so usefull!