What's new

Guide for QoS?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Namtaro

Occasional Visitor
Hello, I'm starting to configure my RT-N66U for QoS and it's quite confusing... Is there a guide of some sort for this specific router? I tried searching and I get guides for other firmwares...

I'm trying to create a rule for uTorrent, but everytime I try it just limits the download speed to 20~30KB/s
 
There's a link pointing to Asus's FAQ on the QoS configuration page - start from there.

You don't need to create a torrent rule - all unclassified traffic (meaning traffic not matching any rule) will end up with the lowest priority.
 
There's a link pointing to Asus's FAQ on the QoS configuration page - start from there.

You don't need to create a torrent rule - all unclassified traffic (meaning traffic not matching any rule) will end up with the lowest priority.
I've already gone through it. So far I've done this :

For the 'User defined Priorities' section I've so far left uploads the same, but put a rule for low priority ports to have 80% download.

In the 'User defined QoS Rules' I so far have put
Ports 80,443,8080 TCP (I don't need UDP for web browsing right?) on highest priority
Ports 6881:6889 TCP/UDP on low priority.

Can you explain to me what the 'Transferred' section does? Tried reading the balloon that pops up when I hover of it, but it's still confusing to me so I just left it blank...

What I am trying to achieve is to be able to browse the web (youtube streaming etc) while torrents are running, but sort of 'block' torrents when I reload a page or click on something. Right now when I have torrents running, browsing feels sluggish and when I try speedtest.net, my speeds are significantly slower.

I also want to thank you for your custom firmwares. The stock one wasn't allowing me simultaneously download from the internet and stream from my network for some reason and yours fixed it when I installed it! :)
 
Last edited:
Why not just limit your upload in µTorrent?

Sounds like you have upload set too high for your connection.

Also, you can not block ports once they are already open.
 
The upload limit is already set to half of my connection speed.
I've also tried setting a limit on the download speeds and it doesn't make a difference. Web browsing still feels sluggish.

The only way to make the browsing feel quick and snappy again is to stop all the torrents running.

I don't think it's the bandwidth that's the problem for me...
 
It's usually best to configure QoS with your upload speed set at 70% of your actual max speed. For example, if your upstream is 2 Mbits, set it to 1.7 Mbits in QoS. That will usually result in smoother performance when QoS has to kick in.
 
It's usually best to configure QoS with your upload speed set at 70% of your actual max speed. For example, if your upstream is 2 Mbits, set it to 1.7 Mbits in QoS. That will usually result in smoother performance when QoS has to kick in.

Do you also set your download to 70%?
 
The upload limit is already set to half of my connection speed.
I've also tried setting a limit on the download speeds and it doesn't make a difference. Web browsing still feels sluggish.

The only way to make the browsing feel quick and snappy again is to stop all the torrents running.

I don't think it's the bandwidth that's the problem for me...

What Is you upload speed and download speed?
I usally set mine to no morer than 25 KB up and no limit down
and I have no issues with a 25/4 connection with 4 computers
 
I've recently bought a RT-N66U for the specific reason that I need QoS on my home network which is heavily used for the available ADSL bandwidth of 8Mb download and 0.3Mb upload.

I have a mixture of voice traffic, IPTV, Skype, Gaming (Xbox and PS3) and web browsing traffic including downloads all to cram into a small pipe. My problem was that the voice and IPTV traffic was unusable, and the Skype user was chomping lots of bandwidth.

I started off with some problems trying to understand the QoS configuration which isn't very well explained in the Asus FAQ so here are some points that I've learned the hard way:

  • Un-matched (unclassified) traffic is assigned to the class "Low" which is not the lowest. I made quite a few tests to prove this.
  • It is important to set the QoS bandwidth values to the actual speeds you get on your service - too low and you will limit your available bandwidth to your settings, but too high and you will try to over-allocate available bandwidth with QoS and you will get bad results. My best practice has been to slightly under quote what is available - especially as my service is marginally slower at peak times. I spent lots of time running speed tests from various souces - my ISP was the best
  • Upload bandwidth settings are very important as the download is controlled by upload bandwidth sending flow control
  • I have created more variation between Highest and Lowest in the maximum bandwidth settings - I have 100%, 80%, 70%, 50%, 40% which leaves plenty of headroom always available for my critical apps, but you can close those gaps if required
  • Check, double check and tripple check that you are matching the traffic with your rules - I had a typo in one of my rules and spent ages trying to work out where I was going wrong
  • For diagnostic purposes you can set your "Low" class to 100% or 10% and run a speed test to see if you have matched to your required rule or just hit your default. I ended up setting all of my other rules to "Highest" except the rule I was testing and set that one to Lowest at 10% - this proved I had matched

So far with initial tests I am now able to hold a phone call, stream HD IPTV which my kids use Skype, Xbox/PS3 and web browse - with nobody complaining. Skype in particular was a pain as each installation uses its own port number but skype also seems to cope well with me snatching most of its bandwidth away.
 
[*]It is important to set the QoS bandwidth values to the actual speeds you get on your service - too low and you will limit your available bandwidth to your settings, but too high and you will try to over-allocate available bandwidth with QoS and you will get bad results. My best practice has been to slightly under quote what is available - especially as my service is marginally slower at peak times. I spent lots of time running speed tests from various souces - my ISP was the best
[*]Upload bandwidth settings are very important as the download is controlled by upload bandwidth sending flow control

Can you clarify that you are inputting your actual (adjusted for slowest rates as per your tests) up / down stream speeds and not the 70% for e.g. in the upstream as recommended by others in this thread?

I had assumed that the Asus QOS (which is quite lame compared to other firmwares), automatically calculated a percentage of the upstream rate and used that.

But based on what I have read on this board I calculate the 70% myself and input that into the router's QOS.
 
Can you clarify that you are inputting your actual (adjusted for slowest rates as per your tests) up / down stream speeds and not the 70% for e.g. in the upstream as recommended by others in this thread?

I had assumed that the Asus QOS (which is quite lame compared to other firmwares), automatically calculated a percentage of the upstream rate and used that.

But based on what I have read on this board I calculate the 70% myself and input that into the router's QOS.

My understanding of the main QOS upload and download bandwidth settings on this (and other brands of router I've used) are to identify the total bandwidth available for the router to optimise as it is not smart enough to know what throughput is available. It will then assign portions of this bandwidth according to the allocations in the "user-defined priority" screen.

So if I set my download bandwidth to 8mb and I have "Medium Priority" set to 50% I will only be allowed to consume 4mb of the line for the total of all traffic matching the "Medium" rules. If it is set to 100% I will be allowed to consume the whole 8mb.

To prove this I just set my main QoS to 1mb down and 100kb up - using my highest priority class - allowed 100% in both directions
1bd3a44exj7j2zhldbk0.jpg

I get the following speed test results:

7krwfggc7862hm17f57m.jpg


These are only rough results as I didn't isolate my other devices for the test, but they show that the effect of setting your main QoS values to 70% of your actual speed are that you are unable to use 30% of your bandwidth with QoS turned on.

At the same time if you over estimate your available bandwidth the router will believe that it has more bandwidth to allocate than is available, therefore you will get congestion on your link just as though you didn't have QoS enabled.

Getting these main QoS settings right is really important - so spend some time in a controlled environment to find out what your true speed is. You need to try this at peak times and ideally using a wired connection with only the one device connected. It isn't a bad idea to be slightly conservative with the numbers if the QoS is important to you, but with some thought you can also build your user defined rules to hit the problem where it hurts (by capping the throughput below 100%) and leave plenty of overhead for the priority traffic. This is what I've done to try to get the best speed from my line in off-peak use, but still leave room for my priority applications when things get busy. This seems a different approach to the Asus default rules but is working for me.

The default rules give priority to ports 80 and 443 up to 512kb per session and then drop them down to low as they are now probably downloads. Low is also the the default class (from my tests I proved this by setting all classes to 100% except for low which was set at 10% maximums. My speed tests then showed that the default ran at the 10% speeds) an so only http and https get priority - plus the control packets required for smooth gaming.

In practice I have reached the following configuration from my use:
3zlq8xupc7vy7or9lid4.jpg

with the following rules:
cc4trgoldepa1e0ooyqt.jpg


In words, I will describe the upload settings:

My Voice Gateway can always use up to 80% of my upload (although I hope it never needs that) and up to 100% if available.
My IPTV can always use 10% of my upload, and up to 85% if available
Web and HTTPS gets a minimum of 5% of my upload and is capped at using 75%
and so on......

The upload is important for sending controlling packets relating to downloads so has an effect on perceived download speed.

I have tried to leave space for my higher priorities as its important to have my telephony working well, but if there is too much traffic spread across the lower classes it can fill the link. If I over specify my upload by 10% in the main QoS screen this would mean that the router still thinks there is 10% available when the link is actually full and therefore I could still get poor performance - but hopefully the queueing algorithms would help with priority traffic.
 
How do the QoS rules work with IPv6?

Also, does anyone have sample tc commands that can be used on Asus routers (mine is an RT-N66U) to do rate limiting by IP address?
 
How do the QoS rules work with IPv6?

Also, does anyone have sample tc commands that can be used on Asus routers (mine is an RT-N66U) to do rate limiting by IP address?

tc commands make up the rules/buckets, iptables commands route the traffic into the right bucket. It takes a bit of background research and understanding of the kernel that was complied to make this work. That is why I stick with the GUI.
 
I come back to this forum for the first time in a year or two and it's funny to see my post from 2 years back bumped up haha.

I still have the RT-N66U, but I've moved on from the stock firmware and have Tomato Shibby installed. QoS has worked flawlessly for the past year.
 
Qos

It's usually best to configure QoS with your upload speed set at 70% of your actual max speed. For example, if your upstream is 2 Mbits, set it to 1.7 Mbits in QoS. That will usually result in smoother performance when QoS has to kick in.
so your saying if my upload is 15mb should set it up to 14mb and why? Why not just leave it to 15mb
 
so your saying if my upload is 15mb should set it up to 14mb and why? Why not just leave it to 15mb

I am far from a QoS expert, but the general theory is that your connection is not always the same speed, so you need to take that into account. All other calculations are based on that number, so it should be conservative. Since the point of QoS is to guarantee (within reason) a certain level of performance to certain types of network traffic, overestimating the speed of your connection could result in there being inadequate bandwidth to meet all of the "guarantees" that the router has made.
 
My understanding of the main QOS upload and download bandwidth settings on this (and other brands of router I've used) are to identify the total bandwidth available for the router to optimise as it is not smart enough to know what throughput is available. It will then assign portions of this bandwidth according to the allocations in the "user-defined priority" screen.

So if I set my download bandwidth to 8mb and I have "Medium Priority" set to 50% I will only be allowed to consume 4mb of the line for the total of all traffic matching the "Medium" rules. If it is set to 100% I will be allowed to consume the whole 8mb.

To prove this I just set my main QoS to 1mb down and 100kb up - using my highest priority class - allowed 100% in both directions

I get the following speed test results:

These are only rough results as I didn't isolate my other devices for the test, but they show that the effect of setting your main QoS values to 70% of your actual speed are that you are unable to use 30% of your bandwidth with QoS turned on.

At the same time if you over estimate your available bandwidth the router will believe that it has more bandwidth to allocate than is available, therefore you will get congestion on your link just as though you didn't have QoS enabled.

Getting these main QoS settings right is really important - so spend some time in a controlled environment to find out what your true speed is. You need to try this at peak times and ideally using a wired connection with only the one device connected. It isn't a bad idea to be slightly conservative with the numbers if the QoS is important to you, but with some thought you can also build your user defined rules to hit the problem where it hurts (by capping the throughput below 100%) and leave plenty of overhead for the priority traffic. This is what I've done to try to get the best speed from my line in off-peak use, but still leave room for my priority applications when things get busy. This seems a different approach to the Asus default rules but is working for me.

The default rules give priority to ports 80 and 443 up to 512kb per session and then drop them down to low as they are now probably downloads. Low is also the the default class (from my tests I proved this by setting all classes to 100% except for low which was set at 10% maximums. My speed tests then showed that the default ran at the 10% speeds) an so only http and https get priority - plus the control packets required for smooth gaming.

In practice I have reached the following configuration from my use:
3zlq8xupc7vy7or9lid4.jpg

with the following rules:
cc4trgoldepa1e0ooyqt.jpg


In words, I will describe the upload settings:

My Voice Gateway can always use up to 80% of my upload (although I hope it never needs that) and up to 100% if available.
My IPTV can always use 10% of my upload, and up to 85% if available
Web and HTTPS gets a minimum of 5% of my upload and is capped at using 75%
and so on......

The upload is important for sending controlling packets relating to downloads so has an effect on perceived download speed.

I have tried to leave space for my higher priorities as its important to have my telephony working well, but if there is too much traffic spread across the lower classes it can fill the link. If I over specify my upload by 10% in the main QoS screen this would mean that the router still thinks there is 10% available when the link is actually full and therefore I could still get poor performance - but hopefully the queueing algorithms would help with priority traffic.

Great post! Thanks!

also from the link @wh7qq posted

I must stress that it is an absolute necessity that you set the outgoing limit at about 85% of the MINIMUM bandwidth that you EVER observe on the line, and often even less. Note that I did NOT say "AVERAGE" - I said use the "MINIMUM" reading - and I do mean MINIMUM. If you set an averge of the readings, don't complain to me when your QOS doesn't work.

THIS IS NOT NEGOTIABLE!
You must measure the speed at different times throughout the day and night with an online speed test utility, with QOS turned off, and no other traffic - to determine the lowest speed obtained for that line. You then set 85% of this figure as your maximum permitted outgoing bandwidth useage. Just because this seems low to you, don't be tempted to set a higher figure. If you do, then the QOS system will not work. In fact, you will get BETTER performance by setting a LOWER limit, this will be covered later.


MAXIMUM BANDWIDTH LIMITS

I just want to add something to clarify what your maximum bandwidth limits should be set to.

I see several people advising to take the AVERAGE speed measurement from speedtest and then deduct, say, 15%. Several people who followed this advice have recently mailed me and told me their QOS doesn't work properly.

The AVERAGE value is NOT what is required. You stand the risk of your QOS failing.

Let us consider an example.

Suppose that you have a 1/10Mbps line and can reach full speed for 12 hours each day.

Suppose that in the evening/night, as demand increases, you can only obtain 500Kbps/5Mbps for the next 12 hours.

If you take the AVERAGE value, (75%) and add this less 15%, think about what happens:

1) In the daytime, everything is fine.
2) In the evening whenever your throughput tries to exceed 500Kbps, QOS will no longer work.

This will be noticed when you try to utilize your full bandwidth. So under some circumstances you may not notice this.

To reiterate - the figure that should be entered, IF you want your QOS to work reliably under ALL circumstances and at any time of the day, you must enter the MINIMUM figure that you obtained with your speedtests, less the usual 15%.

In the above example, we would enter 425 / 42500

http://www.linksysinfo.org/index.php?threads/qos-tutorial.68795/#post-231128
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top