A n00bs guide to QoS
QoS or Quality of Service as is defined by Wikipedia states :
In the field of computer networking and other packet-switched telecommunication networks, the traffic engineering term quality of service (QoS) refers to resource reservation control mechanisms rather than the achieved service quality. Quality of service is the ability to provide different priority to different applications, users, or data flows, or to guarantee a certain level of performance to a data flow. For example, a required bit rate, delay, jitter, packet dropping probability and/or bit error rate may be guaranteed. Quality of service guarantees are important if the network capacity is insufficient, especially for real-time streaming multimedia applications such as voice over IP, online games and IP-TV, since these often require fixed bit rate and are delay sensitive, and in networks where the capacity is a limited resource, for example in cellular data communication.
In layman’s term QoS is the process by which you set some pre-defined rules which determines which data packets are to be allowed first based on their priority level.
For example consider yourself to be an avid Bit-Torrent as well as a VOIP user. Now suppose you want your VOIP experience to be of excellent quality (i.e. of the same level when you are not downloading anything) even when your Bit-Torrent is running in the background with heavy downloads. How do you do it? Simply by configuring QoS in a fashion that it gives the VOIP traffic a higher priority level than the Bit-Torrent traffic.
Now i give you a real case scenario. I surf a lot and at the same time would like to have my Bit-Torrent running at full force in the background without hampering my surfing experience.I am on Reliance UL 400kbps plan. So practically i get anything between 40~55kbps on torrents with the average being around 38~48kbps (applicable for well seeded torrents also). Now previously with no QoS configured my surfing experienced sucked big time. Pages would take a long time to load as most of my bandwidth was blocked by the Bit-Torrent traffic. After configuring QoS (as per my needs) my pages load as if there is nearly no Bit-Torrent traffic hogging but at the same time the torrent download continues in full fledged.
I use a Linksys WRT54GL Wireless-G Broadband router. I flashed my router with the Tomato firmware since its implementation of QoS is far better than the stock firmware of Linksys.
P.S : The images shown below are for the BSNL UL 256kbps plan that i was using previously. Right now since i have shifted to Reliance UL 400kbps. So the images might have a bit of discrepancy in the data [I will notify of the discrepancy as and when required].
Also i am using Tomato 1.23 since that is the latest version and i upgraded to that.
WRT54GL running Tomato 1.19
This is my break up of the QoS traffic classification which works best for me.
Now majority of my traffic is generated by the Bit-Torrent, so i have set all the Bit-Torrent, eMule and other bulk Traffic as Lowest class.
Also since i want my surfing experience to be of top-notch quality hence i have set the DNS query port to the Highest class and the HTTP,HTTPS,FTP and Telnet ports to the High class.
This effectively translates that even with torrents running at full blast any DNS query made for any site is always allowed first to be resolved followed by the display of the page and then the Bit-Torrent Traffic is allowed to pass-through. This improves your surfing experience a lot since the request for the web pages always gets priority over the Bit-Torrent traffic.
Since its been a long time i have not played on-line, so my configuration does not include any for the games or Steam.
In case you want your gaming experience to be good in spite of downloads going on make sure you set the port required by Steam or the game to the Highest/High class.
Setting QoS Outbound/Inbound rate
The below setting show my outbound and inbound rate for my connection. As you might have known the UL plans from Reliance have symmetrical upload and download speeds. So as per that my outbound and inbound max bandwidth should have been 400kbps. But keeping in mind the real world scenario i have put the values at 90% of the max/advertised values which comes for my case to be 360kbps. This is because mostly the end-user gets around ~90% of the advertised bandwidth.
P.S: The images below show the Outbound and Inbound Max Bandwidth as 230kbps since the images were taken when i was using the BSNL UL 256kbps plan. After I changed my plan to Reliance UL 400kbps and upgraded the Tomato Firmware to 1.23 i felt lazy and did not take the latest screen shots. So do bear with the old images.
Another way you can set the inbound rate is to set all the class limits to none. This basically means inbound filtering is turned off and all the classes get maximum inbound bandwidth.
The above screen shot shows WRT54GL with Tomato 1.19 and with no inbound filtering configured in QoS.
I have tried to make this guide as precise and easy as possible and in the process may have missed out on some finer points.
If you happen to have found out anything missing do point it out so that I can add it to the post and make it much more enhanced.
Lastly hope that this guide will help you guys set up QoS on your routers if it supports and you can use this as a reference for your router settings.