1.  What is QoS?

QoS stands for "Quality of Service".  It is a means to prioritize network traffic, to help ensure that the most important data gets through the network as quickly as possible.

2.  How does it work?

QoS works by slowing unimportant packets down, or in the cases of extreme network traffic, throwing them away entirely.  This leaves room for important packets to reach their destination as quickly as possible.  Bascially, once your router is aware of how much data it can enqueue on the modem at any given time, it can "shape" traffic by delaying unimportant packets and "filling the pipe" with important packets FIRST, then using any leftover space to fill the pipe up in descending order of importance.

Since QoS cannot possibly speed up a packet, basically what it does is take your total available upstream bandwidth, calculate how much of the highest priority data it has, put that in the buffer, then go down the line in priority until it runs out of data to send or the buffer fills up.  Any excess data is held back or "requeued" at the front of the line, where it will be evaluated in the next pass.  

"Importance" is determined by the priority of the packet.  Priorities range from "Low" or "Bulk" (depending on the router), to "High" or "Premium".  The number of levels and the exact terminology depends on your router.  As the names imply, "Low"/"Bulk" priority packets get the lowest priority, while "High"/"Premium" packets get the highest priority.

QoS packets may be prioritized by a number of criteria, including generated by applications themselves, but the most common techniques you will run into with Consumer grade routers are MAC Address, Ethernet Port, and TCP/IP Port.  

MAC Address prioritizes network devices by their Media ACcess Address (MAC Address).  This is a long string associated with your network card or other network device.  Simply enter the MAC address and the priority and the router takes care of the rest.  Normally, the default priority for unlisted devices seems (in my experience) to be set to "Low".  So if you have a machine that needs higher priority access to the Internet, you'd set it to "Medium" or "High".  Taking a single device and setting it to "Low" will not have much effect.  If you want to lower the priority of a single machine, you have to instead raise the priority of the other machines on the LAN.

Ethernet Port is the simplest to configure.  Your router is equipped with a series of Ethernet sockets.  Ethernet Port priority allows you to say, for example, "anything plugged into Port 1 gets Low priority, while anything plugged into Port 2 gets High priority".  This is easier to configure than MAC Address priority, of course, but you have to be careful when you rewire things, and it doesn't work for wireless devices at all.

TCP/IP Port allows you some level of control over applications, rather than devices.  For example, you might decide that web browsing (port 80) should get priority over FTP (ports 20 and 21).  Of course, many applications like Vonage pick a random TCP/IP port for the bulk of their communications, rendering this useless for that purpose.  Setting ports 80 and 443 to "Medium", however, can keep your web surfing at least somewhat snappy while doing large FTP uploads.

In general, for a VoIP configuration like Vonage to coexist with high-bandwidth applications like BitTorrent, I recommend the following:

1. Vonage device MAC or Ethernet Port set to the highest possible priority.
2.  Any machines that are likely to use a lot of bandwidth (such as BitTorrent) set to the lowest possible priority.
3.  Machines that are not likely to use a lot of "bulk" bandwidth set to "Medium".
4.  TCP/IP Ports 80, 81, and 443 set to "Medium" (so you can still surf the web on the machines that run BitTorrent)

3.  What are the limitations of QoS?

QoS as found on any consumer router running on a standard Internet Service Provider will ONLY work on upstream/outbound data (data going from you to your ISP).  You cannot realistically control the priority of data coming TO you FROM your ISP, since you can only control the data on your side of the modem.

It is true that slowing down the download of data will slow the acknowledgments of that data in a TCP/IP connection, and will therefore slow down (eventually) the transmission of data from the remote.  However, this is not a function of QoS.  This is a function of TCP/IP.  And it will not solve contentions between VoIP and other data, since VoIP data still doesn't get priority.  You CAN help this out by limiting your bandwidth to downloading applications if theiy support it, but this is throttling and not setting priorities.

QoS Diagram
The only place where QoS is effective on a Consumer router using a regular ISP is the arrow in green.

4.  What can go wrong with QoS?

QoS depends on knowing how much data can be enqueued at any time.  This is called your "upstream bandwidth" or "upload bandwidth" allocation, and it is capped by your ISP, usually using a setting in your modem.  Unfortunately, modems do not generally report this data directly to the router, so the router has to guess at upstream allocation.  Some routers do this well, some do not.  Some modems will queue the packets, thereby fooling the router into thinking that the modem can take more than the capped bandwidth
.
PERFECT QoS:  In an ideal setting, 100% of the upstream bandwidth is used, all the time, and any packets are queued locally and discarded (if necesary) before hitting the modem when they reach their TTL (Time To Live, an indication of how long to continue attempting to deliver the packet).

Perfect QoS
Perfect QoS.  All packets that won't fit on the modem are discarded or requeued.

QoS Upstream Too High:  If your router thinks it has more upstream bandwidth than it really has, QoS becomes useless, as the router is stuffing more data into the pipe than the pipe can handle.  Since the modem itself doesn't know which packets are important, it starts delaying and dropping packets at random, including ones you think are important.

QoS Too High
QoS Too High!  The router thinks there is more bandwidth than there really is, forcing the modem (which does not know the priority of each packet) to requeue or discard at its discretion, which is first-come-first-served.

QoS Upstream Too Low:  If your router thinks it has less upstream bandwidth than it really has, QoS becomes a limiting factor on your network, since the router is artifically limiting your upstream to some figure below what your connection is actually capable of.

QoS Too Low
QoS Too Low!  You are wasting upstream bandwidth.


NOTE:  Vonage routers, such as the RTP300 and WRTP54G, use automatic upstream bandwidth calculation.  They do not have a Manual setting that I've ever heard of.  I strongly suspect, based on my experience with other Linksys routers, that in most cases their algorithm for determining bandwidth does not work well.  It's impossible to know for sure since the router doesn't even display its guess like most routers do.  There really isn't a lot you can do except get a router that has better upstream bandwidth determination for your Internet connection, or the ability to manually set the upstream bandwidth. Sorry.

If your AUTO setting on your router does not work well, but your router has a MANUAL setting, here's what you want to do:

1.  Go to www.dslreports.com/stest on an IDLE connection, with QoS turned completely OFF and nothing else on your network trying to use the Internet at all (or your computer hooked directly to your modem).  Run the Speed Test a couple of times, and write down the tested upstream bandwidth.  Run this test several times, at different times of day.

2.  Enter about 90-95% of the LOWEST number you get on your tests into the "upstream bandwidth" field on your router.  At whatever time of day is the worst for your upload bandwidth, start a large upload (start BitTorrent, or a large FTP upload, or whatever), and test the connection using testyourvoip.com or an outbound VoIP call.  And adjust this number upward until you start seeing loss on your upload results, then lower the number back down to the highest setting that gives you good results.

One criticism of this approach is that you are artifically limiting your bandwidth to the "lowest common denominator", particlularly on Internet connections that have good upstream bandwidth some of the time, and poor bandwidth at others, since you are telling your router NEVER to use any more than the LEAST of your tested bandwidth.   That is absolutely, 100% correct.  But if your router cannot get good numbers, then you HAVE to set it manually, and you'll get better useability out of an underused connection that works consistently than a connection that gets overused from time to time.  (ie. when available bandwidth drops if you set the number too high, your VoIP line will start acting up again).

AFTERNOTE:

What I am espousing is the conservative possible setting, which will pretty much guarantee that VoIP stays clean and that the important services will make it through. I wrote this as a VoIP user who really doesn't care if my BitTorrents run at 100% all the time, as long as my VoIP line ALWAYS works perfectly.

You can go a lot more liberal (set the upstream higher), and what you will find is that you take better advantage of your connection during times when your connection is faster, but that sometimes the QoS traffic shaper tries to overfill the connection and you get a slight loss in quality under heavy loads when the upstream pipe slows down. The amount of quality loss is proportional to the amount over (if your upstream is set at 10% more than your real upstream at the moment, then on average ALL services, regardless of priority, will have 10% of their packets slowed down or discarded). So running at 5% over your minimum tested bandwidth will give you potentially a 5% packet discard or loss rate on VoIP when things get slow. But it buys you an extra 5% upstream performance almost all the time.

This is a decision that you need to make based on your priorities. You can even run QoS Upstream at a number over your real tested minimum upstream, understanding that when things slow down a bit, your QoS will be less effective, but when things are running fast you take better advantage of it. Or you can be like me and artifically slow your upstream down, but knowing that your important stuff will ALWAYS get all the bandwidth they need.

Your call. There's nothing inherently wrong with either school of thought on this one.


About This Page