Tomato QoS Setup

TomatoOn my previous article I talked about how I’ve upgraded from DD-WRT to Tomato and how much of an improvement it was over DD-WRT. While I’m still tweaking my setup I thought I’d provide a quick tutorial on how to setup QoS in Tomato.

For those of though who don’t know, QoS (Quality of Service) provides different priorities to different users or data flows, or it can guarantee a certain level of performance to a data flow in accordance with requests from the application program or the internet service provider policy. In Tomato’s case we are going to set it up to give priority to data flows. In a nutshell QoS tries to guarantee that important network protocols are given priority over non-important protocols. For example, http has priority over BitTorrent.

I’d like to start off my mentioning that there isn’t just one correct way to setup QoS. This guide is only intended to give you a basic idea on how to setup your own.

TOMATO QoS CONFIGURATION

Enabling QoS

  • Log into your router (default IP is 192.168.1.1) by opening up your web browser and going to http://192.168.1.1.
  • On the left side, click on QoS and it will open up the Basic Settings.Now click the checkbox to Enable QoS.Tomato QoS Setup
  • I changed some of the default settings. A large amount of my bandwidth is usually dedicated to P2P, mainly BitTorrent (only legal stuff, I swear).
    • I unchecked Prioritize ACK. BitTorrent sends many ACK packets and if you tend to use BitTorrent a lot, the router can get flooded with ACK requests. If you don’t use any type of BitTorrent client, you can leave this checked.NOTE: This is somewhat debatable. Some people argue that ACK packets only take up a small amount of bandwidth, and because they are important to TCP, dropping ACK packets will force a TCP connection to resend packets that have arrived already but not ACK. The arguement is that this can degrade your download performance without much of a gain.

      I recommend you try it with and without it and see if you notice a difference. Feel free to comment on your results.

    • I changed the default class from Low, to Lowest. Again, because a large amount of my traffic is from BitTorrent, I want it be classified as Lowest. You’ll understand when we move on to the other settings.

Setting up Outbound Rate /Limit

  • Max Bandwidth: Set this to what your max upload speed is provided by your ISP. If you aren’t sure, go to the following sites and get an average. For me, while my ISP advertises 768kbps, on average I got around 400. I’m still playing with that number.
  • Next I changed the default settings to reflect something that I feel works better.Tomato Outbound QoS
  • I wanted to be sure that I changed my outbound to give Highest the most bandwidth. By default, it goes 80% to 100%. I wanted to give it a little more so I changed it to 90% to 100%. For most users, your outbound traffic is pretty small. The most common outbound traffic is to resolve host names (DNS). More on that later.

Setting up Inbound Limit

  • Max Bandwidth: You’ll end up playing with this number several times before getting it just right. Again, use speedtest sites I cited above to get your average.Tomato Inbound QoS
  • I want Highest to have no bandwidth restrictions so I set this to None (I think that might be default). I will be setting up DNS to use this setting. Also, if you use some sort of VoIP device you’d want it to be set to Highest as well.
  • For all the rest of the setting, as you see, I just went down from 98% to 90%. I’ve had good luck with these settings. If you notice some of your lowest priority applications using too much bandwidth while High or Highest applications are running you can adjust it accordingly.

Now that we’ve setup the basic QoS settings, click Save and go to Classification.

Setting up Classification

  • This is where you define which protocols get which priority. Depending on what applications you use, or which games you play, your setup might be longer than mine.Tomato QoS Classification
  • As you can see, I have given DNS the Highest priority. I want names to resolve as quickly as possible.
  • Next, I gave some of the common protocols the High priority. Feel free to add any additional ports or protocols. You get the idea.
  • I setup IPP2P: BitTorrent to the Lowest priority. For example, I’m downloading something via uTorrent and I decide I want to browse a website. Because the listing of priorities says that port 80 gets the High priority it will “steal” bandwidth from BitTorrent.

    I recommend keeping Tomato updated.  Usually with every release the author includes updated filters for L7.

  • And lastly, I have “Bulk Traffic” set to Lowest.

That is all it takes to setup QoS on Tomato. Remember that this guide is only intended to give you the basic idea. If you go with these setting you should be alright. Tweak the numbers and test to get the best performance from your router and internet connection.  It might take a few days or weeks to get it exactly right.

If you have any suggestions or anything that isn’t accurate, please post a comment.

Possible Related Posts:


- DD-WRT vs. Tomato: Winner is Tomato
- Using Firefox To Block Ads
- Lesser Known Windows Freeware
- Geek Squad - The Rise And Fall

92 Responses to “Tomato QoS Setup”


  1. 1 Michael R

    My XBOX 360 is connected to my router. Will this help with latency?

  2. 2 Mark

    As you see, I setup Xbox Live to have a High priority, to be allowed the most bandwidth use.

    The best way to answer your question is to have NOTHING else using your internet connection (stop all web browsing, downloads, etc) and just play on Live. If you still have lag, might be your internet connection.

    If you only have lag when people are using the internet, then this will help you for sure.

  3. 3 ontguy

    Thanks for the write up. I will give this a try this evening.

    For your max Outbound Rate /Limit, do you just set it to the max? In a few articles/FAQs/forums I’ve read, they suggest setting it 90% of the max. I think the way you have juggled the percentages may have compensated for that.

    Have you upgrade 1.10 as yet?

  4. 4 Mark

    ontguy wrote:

    Thanks for the write up. I will give this a try this evening.

    For your max Outbound Rate /Limit, do you just set it to the max? In a few articles/FAQs/forums I’ve read, they suggest setting it 90% of the max. I think the way you have juggled the percentages may have compensated for that.

    Have you upgrade 1.10 as yet?

    Well, my ISP advertises that I get 768kbps, but when I do random speed tests I get an average around 400 or so.

    I wasn’t able to find a definite answer. I’ve read what you’ve read that you take 85% - 90% of your total inbound and outbound, and those are the numbers you enter.

    I actually spent a good amount of time testing those numbers out specifically for my ISP (Comcast, sigh). I didn’t want to take 90% of 768, because in every single speed test I did (and I did about 20) I got an average of 400 or so. I thought I’d just use the full 100% of what my average upload (outbound) speed was, since I would sometimes get above 400.

    As for my inbound, I get 6mbps, but again I wasn’t getting that on my 20 speed test. I was averaging about 5200-5600, so I took 90% of the 5600.

    I played with these numbers for awhile, testing http and ftp speeds with BitTorrent speeds, and after a few changes these numbers gave me the best results.

    I have no upgraded to 1.10 yet — it was a small upgrade and what issues it resolved didn’t relate to me. Plus, as easy as it is, I can be lazy. :cool:

  5. 5 Mark

    I meant to add.. the 85% - 90% of your total bandwidth is a good measurement tool, but I wouldn’t simply take what your ISP advertises, do some math and plug those numbers in.

    Do what I did.. do 10 speed tests on different servers and take the averages of those. That will give you a really good idea of your general inbound/outbound speeds. Then take 90% of that number.

    Too many variables come into play when trying to determine your speed, but as you know, you rarely if ever get all the speed that is advertised.

    Let me know how it works out.

  6. 6 ontguy

    I still experimenting with numbers, my ISP is getting the speed of my DSL line tweaked.

    I like how responsive the internet is with your setup.

    I wanted to get your thoughts on a few things:
    - is it a good idea to prioritize ICMP? I don’t couldn’t find a reason to. (http://www.linksysinfo.org/forums/showthread.php?t=52537)
    - in that thread it brought up the idea of a “whitelist”, using the “Default Class” as a catch all for the low(est) priority traffic; I might give this a try
    - have you found any drawbacks to setting the outbound/inbound limit used by the classification for torrents to a 100%? ideally the bandwidth shuold be utilized 100% of the time; when using the internet is gets the bandwidth it needs, when it’s torrents, etc. they get the bandwidth available

    1.11 is out now

  7. 7 Mark

    I don’t see a need to give ICMP any type of priority. You can, I doubt it would cause any performance issues. ICMP messages are typically generated in response to errors in IP datagrams (as specified in RFC 1122) or for diagnostic or routing purposes.

    Yes, if you look at my setup, I did that as well. All traffic that I don’t define will be considered “Lowest” (default Tomato sets this to Low as the default). Though I specifically tell Tomato make torrent traffic the lowest priority as well.

    Well, setting your out/in at 100% can cause other things to get throttled. That is why most people recommend the 85%-90% range, to avoid that. But it isn’t almost impossible to get 100% of your advertised bandwidth, too many factors. I just took the average numbers of about 20 different speed tests. This is the most effective way in my opinion to find out your average download and upload speeds.

  8. 8 ontguy

    Thanks for the reply.

    I wanted clarify my last question.
    the scenario:
    - the out/in max bandwidth is set to 85%-90% range
    - torrents are put in the lowest priority
    - the percentages for the lowest priority is 2% - 70% for in and 95% for out

    I take this to mean torrents would never get more than 70% of the out and 95% of the in. Have you experienced performance issues with setting the percentages closer to 100%?

  9. 9 Mark

    Oh, I see what you’re asking.

    To be honest with you, I picked 70% because I thought that was a good enough number to have my torrents use for outbound traffic (how much I’ve upload to other users). I was afraid I’d bottleneck my upload speeds if I picked anything higher. I haven’t tested it too much. Feel free to adjust that number, it will only effect the amount of bandwidth that is used when people are connected to you downloading.

    But as you see, I set Lowest at the Inbound level (downloading) to 95%, leaving 5% of my connection open. I felt that 95% of my total bandwidth was enough to not make other services (www, ftp, etc) be slow until the bandwidth shifted towards those higher priority services.

  10. 10 Shiki

    Hi possible to set the QOS/firewall to block completely on p2ptv such as ppstream or sopcast with this tomato firmware ???

  11. 11 Tomsa

    Hi
    I have to day flashe’d my WBR2-G54 with Tomato 1.1 - marvellous software. Now i can stop my ‘boy’ to sit on the PC all night long. The software has a very good func. - and i am very pleased.
    Thanks to the author.

    Best regards from Norway
    T. Sandberg

  12. 12 Darren

    Mark, I’m on Comcast as well and am getting really wacky speed test results:

    Service Server DownloadUpload

    DSLR FtWorth 9061 1131
    DSLR Miami 13530 1281
    DSLR SanFran 3230 1502
    STNET FtWorth 8280 2036
    STNET Miami 7345 2029
    STNET SanFran 17293 1909
    EASY Dallas 10220 2029
    EASY Atlanta 13786 2206
    EASY SanFran 6225 1936

    I’m not sure if this is because if SpeedBoost or what, as well one of the speed test sites gave me an “upload compression detected, your upload speeds may be inaccurate” message. I’m having a really hard time picking what my down/up should be - I don’t want to waste available bandwidth. Any suggestions?

    Thanks, Darren

  13. 13 Tomato fan

    Tomato is really awesome. I’ve tried DD-WRT as well and it’s QoS doesn’t even compare to Tomato’s.

    It’s interesting that your ISP advertisers 768 kbps and only gives 400 kbps. I use 90% of advertised speed (which is really the same as actual, woohoo) and it works just fine.

  14. 14 Allen

    Hi.. I installed the latest tomato firmware and did all the settings above. But when I run my bittorrent on wireless connection for a while my connection suddenly dies and my computer couldn’t find the whr-g54s anymore. I had to restart the router and it still dies on me. Does anyone know why this is happening?

  15. 15 Enzymes

    Fantastic article! I’d only learnt about QoS recently, got a Linksys router, installed DD-WRT (which was fun to configure but did nothing for me on the QoS front).

    Installed Tomato and was making some progress, but this article has set things up perfectly for me! I’m able to use P2P and run a backup to an online backup service that otherwise hogged my bandwidth.

    Fantastic! Thanks! The end of a very long quest to get QoS to work!

    :lol: :lol: :lol:

  16. 16 Matthias

    I disagree with not prioritizing ACK packets..
    Ack packets take up a small amount of bandwith, while at the same time are very important to tcp transfers. Dropping ack’s will force a tcp connection resend packets that have arrived already but not ack’ed, so it will degrade your links performance remarkably, without any significant gain otherwise.

  17. 17 Mark

    Matthias wrote:

    I disagree with not prioritizing ACK packets..
    Ack packets take up a small amount of bandwith, while at the same time are very important to tcp transfers. Dropping ack’s will force a tcp connection resend packets that have arrived already but not ack’ed, so it will degrade your links performance remarkably, without any significant gain otherwise.

    I agree with you if you’re not going to do any torrent downloading. With it enabled (in my case anyway) it would drop connections and severely slow download speeds.

  18. 18 Ryan

    I have a similar problem to Allen. My Linksys WRT54G will lockup usually after a few hours of Bittorrent downloading. I can’t pull up any web pages and internal network traffic dies. I tried changing a most of the QoS settings. QoS definately helps though, after just 10 mins with torrents dling and no QoS I can’t access a web page.

    What I would really like to see in QoS/Tomato is some way to constantly monitor in/out bandwidth and make adjustments to the limits. Dream big.

  19. 19 Eric

    Thanks for this! Tomato is great, but the documentation is… sparse. This was exactly the tutorial I was looking for.

  20. 20 Scott

    What I’m trying to understand, and can’t find anywhere, is a description of what the Rate/Limit settings do… Limit is the high end and Rate is? How do they work together?

  21. 21 Painman

    To those who are getting a router lockup with Torrents, make sure you change your Max connections limit to 2048 (found in Tomato’s Advanced settings). You may be maxing your connection limit and this would explain why you can’t get any further connections externally or internally.

    You may also want to increase the Max TCP connections in Windows XP (default =10). If you check your Event log and see “EventID 4226: TCP/IP has reached the security limit imposed on the number of concurrent TCP connect attempts” you definitely want to increase this to 50. Here’s a link to a patcher that will do the trick… http://www.lvllord.de/?lang=en&url=tools

  22. 22 Mike

    Thank you for the posting of Tomato firmware, it sounds like something we should investigate as a good alternative to DD-WRT.

    One answer I have been diligently searching for is which firmware actually modifies the packet with the appropriate QoS / Tos bits to priorotize the packets on the network?

    Although I understand the priotitization in my local router, I don’t understand how I set / where I set the QoS bits in the packet so the Internet routers can do the same once the packet leave my router.

    Can anyone shed some light on this for me. Is it done by this firmware on the outbound side? Is it just not done even though the protocol defines it?

    Thank you for your help.

  23. 23 Mike

    Update:

    For those of you who would like the technical details on how the Cisco routers handle this stuff, you can refer to the following link for details on the DiffServ Field.

    Notice the last two lines at the bottom where it states that if this field is not set on the way in (into the Internet), then the field will remain 0 (normal treatment in the internet).

  24. 24 Mike
  25. 25 chris

    I used this to set mine up. Now I can play Team Fortress 2 even when everyone else is using Bittorrent, and have a constantly great ping.

    Thanks a lot.

    Only thing I had to get rid of is the Bulk Traffic thing… isn’t that basically limiting EVERYTHING to lowest? Cause as soon as I removed that, and set the TF2 port to High, everything cleared up.

    Or is Bulk Traffic meant to be left at Lowest, and then individual ports set to High override that??

    Either way, its working a LOAD better with my current setup than when we used Linksys firmware.

  26. 26 Philip

    I like to thank Mark for this website and its all about the QoS and Tomato.

    I have the WRT54GL for 2 days now and I flash to the new Tomato last night.

    I been playing with the numbers and trying to get the best settings.

    It end up that I may not use the QoS.

    It seem like it is limiting myself to get the most bandwidth.

    For example, with my QoS off, I am downloading from my ISP newsgroup at the maximum speed. When I put in the QoS into play, it seems to slow the download down, even if I put it in high priority.

    I suggest is if you want to do voice, games, websurfing, just stop your newsgroup and torrent download, then put it back on when you are done with your high priority.

    Your thoughts on this?

  27. 27 Mark

    I don’t think I’d use QoS if I didn’t do many p2p transfers via bit torrent.

    In my opinion, most small home networks don’t always need QoS, it all depends on the type of things that are being done. I helped someone setup the WRT54GL router with Tomato, but based on how they used the internet (strictly email, www, and xbox live), I opted to go with no QoS and they haven’t had any complaints regarding speed.

    It’s when you have 10 items queued up in your bit torrent client, and your fiancee wants to browse the internet while you’re playing CoD4 on Xbox Live, that is when having QoS setup vs. not having it setup will show.

  28. 28 Philip

    I found that newsgroup doesnt give out alot of outbound traffic.

    The killer is p2p. It generate alot of outbound traffic.

    I found that you do not want to put your advertised outbound speed. I get around 290 kbp u/l, so that is the speed I use.

    For inbound traffic, why do we need QoS? We cant control this.

    While my newsgroup is d/l, I tweak my QoS.

  29. 29 Philip

    This site below have great info about QoS.

    It talk about your QoS upstream if set it too high or too low.

    Good stuff:

    http://vonage.nmhoy.net/qos.html

  30. 30 bbobbo

    great tutorial.

    just one minor quibble–ssh is port 22; telnet is port 23.

  31. 31 Fred

    Thanks for the Article.

    here is a screenshot for my qos. maybe can help.

    http://frederico-araujo.com/tomato-QOS.png

  32. 32 Maximus

    Hello. I want to setup QoS, but there is one problem. I live in Republic of Georgia. Our ISP is shaping only traffic outside our country, on local internet (Georian) I have symmetrical 10Mbits Upload Download, but outside Georgia 2400kbits Download and 96kbits upload. I have Georgian IP ranges is it possible somehow to make these IP ranges bypass QoS and maximum upload speed?

  33. 33 ontguy

    How about an update for v1.19.1463? :)

    There is a new option to prioritize small packets with these control flags ACK, SYN, FIN and/or RST. Is it worth checking any of these?

  34. 34 secure

    thanks for your idea
    i don’t know what to do about 1 month that i buy wrt54gl

  35. 35 ghostwind

    Maximus wrote:

    Hello. I want to setup QoS, but there is one problem. I live in Republic of Georgia. Our ISP is shaping only traffic outside our country, on local internet (Georian) I have symmetrical 10Mbits Upload Download, but outside Georgia 2400kbits Download and 96kbits upload. I have Georgian IP ranges is it possible somehow to make these IP ranges bypass QoS and maximum upload speed?

    Trafic shaping takes place on your ISP’s routers. if they are shaping all forms of traffic, there isn’t much you can do…

  36. 36 LordMelkor

    Do these QoS settings apply for those connected wirelessly? A lot of times my network slows down a lot since there is heavy bittorrent traffic over the wireless, and I was looking for a way to have web=browsing take priority over that.

  37. 37 Mark

    LordMelkor wrote:

    Do these QoS settings apply for those connected wirelessly? A lot of times my network slows down a lot since there is heavy bittorrent traffic over the wireless, and I was looking for a way to have web=browsing take priority over that.

    Sure do. The QoS settings apply to all the data wireless or not.

    With these QoS settings, web browsing will take priority over anything else.

  38. 38 LordMelkor

    Ok thanks!

  39. 39 Paul

    I have a Motorola WR850g, using Vbuzzer for VOIP,
    How to set the QoS or Classification high for my VOIP?
    Thanks
    Paul

  40. 40 callous

    Firmware: DD-WRT v24 (05/24/08) std is actually better than Tomato v16 (with the ND), for QoS.

    Tomato seems to be working better because it kind of cheats. By default the lowest QoS priority uses 2-95% of the available upload bandwidth. Those of you putting BT rules in will put BT into lowest, which means you will never get the max BW even if it is available and not used. Putting the lowest to 1-100% makes the situation worse.

    DD-WRT doesnt artificially limited the total amount (max amount) of BW used. This means the max amount if available to any process, even if it is at the lowest priority (bulk).

    You can easily test this by running a BW intensive game and running BT in the background.

    With DD-WRT I can BT upload and download much higher than with Tomato while playing SupCom for example. It is a noticable difference.

  41. 41 callous

    BTW, if you’re using Tomato, it’s best NOT to create a rule for Bittorrent, and let it default to unclassified / bulk. So make rules for everything except BT and BT will default to whatever is your default speed for an unknown application. This way, you use less cpu cycles on the router.

    For DD-WRT, you must make a QoS for http, and for BT you have to make one as well, but create a rule yourself (based on tcp/udp and port(s) used for BT) and dont use the default provided “bittorrent” on list. Because the default provided forces the router to analyze the data packet to determine if it is BT or not so that uses cpu cycles and can be fooled by BT encryption.

    Browsing website is as fast as tomato if you create the http and bt QoS rules.

  42. 42 chrisL

    I’m on a network with 8 people. QOS works amazingly well for giving each of us the bandwidth we deserve… nobody can steal all the bandwidth.

    I changed the settings a LOT from the suggested ones up top. I got rid of the “bulk traffic” thing. Got rid of Bittorrent prioritizing. Instead, I classified things that needed classifying, and for each user on our network that heavily uses bittorrent, I gave them their own class with their own designated bandwidth. It works great, and other people can be using Bittorrent now while I play games online.

  43. 43 Mark

    chrisL wrote:

    I’m on a network with 8 people. QOS works amazingly well for giving each of us the bandwidth we deserve… nobody can steal all the bandwidth.

    I changed the settings a LOT from the suggested ones up top. I got rid of the “bulk traffic” thing. Got rid of Bittorrent prioritizing. Instead, I classified things that needed classifying, and for each user on our network that heavily uses bittorrent, I gave them their own class with their own designated bandwidth. It works great, and other people can be using Bittorrent now while I play games online.

    That’s great. Like I said, the guide I provide is just a basic QoS guide. You got to change it for what works for your environment.

    I’m due to take another look at my QoS setup to see what I can do to improve it, and maybe post a new guide.

  44. 44 callous

    I just found out that TCP Vegas beats using qos for either dd-wrt or for tomato. It completely replaces qos.

    http://www.dd-wrt.com/phpBB2/viewtopic.php?t=28816&postdays=0&postorder=asc&start=0

    Does tomato have the ability to run vegas as per the link? I no longer have tomato installed.

    Also, does tomato have ability to save the above script into the startup of r outer, so that it auto runs upon power up?

  45. 45 Paul T

    Excellent article - I’ve got a WRT54GL, bought because I heard about it’s upgradeablity, but never got around to it. This article has sealed it’s fate - it’s getting Tomato installed on it tomorrow…

  46. 46 Paul T

    Success so far - very impressed. Only snag is that for some reason my wired connection to the router drops out asnd the ip needs releasing/renewing if I play with the router settings too much (not necessarily anything relevant to it’s ip address) - the wireless connections stay up & stable though!

  47. 47 Douirc

    Great article. Thanks.

    Question - the latest release of Tomato includes new options for prioritizing small packets (SYN, FIN, RST). Have you played with these and have you seen any advantage to turning them on/off?

    Thanks!

  48. 48 Douirc

    just thought i’d report my results with these settings. i haven’t yet found a configuration that concurrently handle bittorrent, web and voip until this article. i run into zero problems so far and couldn’t be happier. thanks again for taking the time. glad to see someone has figured out how to optimize the settings.

  49. 49 Paul T

    Paul T wrote:

    Success so far - very impressed. Only snag is that for some reason my wired connection to the router drops out asnd the ip needs releasing/renewing if I play with the router settings too much (not necessarily anything relevant to it’s ip address) - the wireless connections stay up & stable though!

    Sorry, I failed to update this to say that Tomato has been incredibly stable no matter what I do to it. It seems that I had to do a total reset and configure the basic settttings from scratch and now it’s fine

  50. 50 manny

    Thanks for the write up,but can you guys help me with my slingbox?
    trying to setup the best upload and download speeds,need some setting you guys are using.
    Working out of town all the time so i need max upload speed.

    isp download is max at 3000kbs
    upload is max at 250 kbs
    thank you

  51. 51 Jim

    I have tried all sorts of settings on the WOL page including L7 as xbox live, src mac as xbox’s mac, src IP as xbox’s ip, and destination port as 3074 (if that’s the xbox one I forget. I had it correct).

    Despite all this, on tomato 1.19 on a buffalo whr-hp-g54, when I go under QOS details, i find that all connections made to the IP issued to my xbox live still are classified as low although I’ve all the while been trying to classify them as highest. Am I missing something?

  52. 52 John

    Mark, first off. awesome tutorial. i recently flashed my stock linksys firmware to tomato and i really love the features. but i have a quick question about those upload/download speed tests. our isp is cox and we pay $40 a month. i checked out cox’s website and we seem to be under the preferred package where download is capped at 10 Mbps & upload is capped at 2 Mbps. but when i run the test Speakeasy SpeedTest 3 times, i averaged the following: 23345 kbps (download) & 3835 kbps (upload). so i basically did the exact same setup as you, but i took .90 of 3835 kbps because i read elsewhere that using 100% is not advisable when using VoIP. what i want to know is are those values that i obtained from the tests correct. Should i put for Outbound Rate / Limit max bandwidth as 3451 kbit/s & inbound Rate / Limit max bandwidth as 23345 kbit/s? Appreciate any info. thanks

  53. 53 Jonathan

    This is great. Thanks for the tutorial. I’m finally able to not limit my torrent bandwidth and actually use the Internet! I also don’t need to worry about my uploads killing my download speeds. All seems to be working fine together.

  54. 54 Jason

    Thanks so much for this dude! I’m definitely going to do this I only have one question. I did the speed tests and I’m getting an average of 251.4kb/s down and 46kb/s so for the inbound rate I see you have 5000 do you really get 5000 up? so what number do I use? 46?

  55. 55 Dempa

    Is there a way to use this to lower the amount of bandwidth that my brother’s computer can use so mine will increase? He is a bandwidth hog.

  56. 56 Andrej

    Great article that saved me time. But I was wondering why set rules for Lowest Classification?

    By Tomato wiki whatever is not classified is given the Default Class. In your case this means Classification for ‘Bulk traffic’ and ‘BitTorrent’. Or am I missing something? :???:

    @Dempa: you can limit brother speed with MAC address

  57. 57 Tom

    I set a few QoS rules on the my router running Tomato, but noticed I was still getting unclassfied traffic through, I was wondering how that would be possible as I was pretty sure I had covered everything…(I wanted to be able to limit my flatmates connections as he really doesn’t respect any kind of torrenting limitations leading to our bandwidth getting limited by our ISP, and the network slowing a little, although nowhere near as badly on Tomato firmware compared to Linksys stock firmware.)

    The problem being, some traffic still isn’t getting classfied, I even deleted all the rules and set just one up so that no IP, protocol, port, or other filter was selected, and whilst the majority of the traffic then fell under this category, some did not. (And it wasn’t just the traffic from my PC to the router HTTP gui, which I could understand not getting classfied) but traffic from me and my flatmate to the internet

    Has anyone got any ideas as to why that may happen?

  58. 58 wlanwahn

    whatever the specific reason is somebody will swith over to tomato, i can just say that i wasted a couple of days with DD-WRT which was not running stable, reset itself randomly, thereby forgettings it SSID and password settings… since tomato, everything runs smoothly, i tried to fiddle with the QOS settings but it didnt work, but really i dont care: the rest works perfectly.

  59. 59 Jon

    Thank you, your article really helped me. :!:

  60. 60 Bill

    I’ve been using DD-WRT for about two years, and getting frustrated with the problems, so I switched to Tomato. Seems to be working much better. Sane defaults are a wonderful thing.

    Shouldn’t we just set the max speed to the actual max speeds? It doesn’t say “average speed”, it says “max speed”. Can’t you just get these values from the bandwidth page? Verizon says I should be getting 3.0 Mbps/768 kbps, while Tomato says my max is 2.46 Mbps/764 kbps, which isn’t too far off.

    “I setup IPP2P: BitTorrent to the Lowest priority. … updated filters for L7.”

    No explanation of what this means? I can select bittorrent under both IPP2P and L7. Which should I use? What do each of these mean? I can also select “All IPP2P filters”. Wouldn’t this be better for most people? I use both eDonkey and BitTorrent.

    If I put “flash” at High priority, will it reduce lag while playing iminlikewithyou.com? ;)

    Should we enable TCP Vegas at the same time? Things I have read say to enable both.

    How would I set it to prioritize connections to the router setup page itself, to ensure I can always connect to it to change the rules?

  61. 61 Bill

    Oh, duh. I guess if I want traffic to a specific game site to be high, I should just specify the site rather than the type of traffic.

    Also read up on IPP2P and L7. These are two different ways to detect types of traffic, so they overlap. L7 uses regexps and is in user space, though, so it is slow and IPP2P is a better choice if applicable.

  62. 62 x

    chrisl is wrong about not having a bt rule saving cpu cycles. i have my bt rule as the first one–if the ip matches my lan ip, and the udp/tcp src port matches the one i use for bt, it sets the priority to “low”. once that rule matches, no further rules are processed.

    if i didn’t have that rule in place, tomato would read all my rules, one by one, and then assign the default priority at the very end. but instead of reading one rule and assigning a priority, it would have read/compared a slew of rules and only then assigned a priority.

  63. 63 iPhone Torrents

    Hey, great article, I am huge torrent fan!

  64. 64 rhine

    I am trying to check out how useful the Qos is in the Tomato implementation. I like to test these scenarios to ensure the Qos really works just as it should and not just some fancy GUI with overheads.
    Can one of you GURUs help me chalk out few test cases where I can really see the Qos in action? example how do I see KAZA, BITTORRENT, FILE UPLOADS etc to pick up steam in throughput with Qos enabled? Any/every help is much appreciated!!
    regards
    rhine2@yahoo.com

  65. 65 Morris O'Donagan

    QoS is extremely useful but the power of the system is limited by the accuracy of Bandwith measurements. Instead of using speed test websites to measure the bandwith I rely on tomato itself to give information about the real bandwith. Speed test websites are pretty unreliable since their own load and the distance to the server are not taken into account.
    I usually let tomato run a day with heavy dl/ul and then use the peak values in “Bandwith > Last 24 hours” as a starting point for the QoS configuration. I take 85% of these peek values since actual DSL-Speeds vary heavily depending on time of the day (they depend on network load in your neighbourhood).

  66. 66 Ummm

    Uhh… if you set your max speed to 85% of your actual max, you’ll be wasting 15% of your bandwidth. Tomato will never use more than 85% of your available bandwidth, even if it’s available. Seems like a stupid move to me.

  67. 67 "ummm"?

    Read what he said. Peak values vary. He is correct. Its not a stupid move.

  68. 68 Uh

    Yes, so you’re artificially limiting yourself to 85% of your actual bandwidth. That doesn’t make any sense.

  69. 69 The Dude

    It does make sense to limit yourself by 15%. You cannot saturate a pipe that isn’t dedicated without increasing latency. You want to restrict yourself to improve your latency. If all you care about is download speeds, then do not limit your pipe. If you care about Quality of Service for things like gaming and VOIP, then you need to restrict yourself to improve your QoS and latency. Just the way it works with residential ISP.

  70. 70 Michael

    chrisL wrote:

    That’s great. Like I said, the guide I provide is just a basic QoS guide. You got to change it for what works for your environment.

    I’m due to take another look at my QoS setup to see what I can do to improve it, and maybe post a new guide.

    That’s great news. I hope you can address one issue I have; QoS is not really improving torrent speed at my network rig, as much as it allows my to surf while utorrents downloads at max capacity. In my experience, just getting another device to split the routing and modem tasks, makes a landmark change.

    ps. note; 20 megabit up/ 1 megabit down. DSL configuration. (common in europe)

  71. 71 Phil

    You set Bulk traffic (port: 1064 to 65535) to lowest priority. Is this going to put your AIM port 5190 to lowest too? Or it leaves this port at a medium priority. good tutorial though.

  72. 72 Irha

    I followed the guide and set the classification and %ges identical but don’t see it working favorably. I currently have a download going at above 300K/s, hogging all my bandwidth (and causing any voip call to stutter, if it were to take place right now). After I applied the qos, I expected the download speed to continue at the same rate, as there is currently no other internet activity going on (no voip call or no video views etc.). However, as soon as I saved the qos settings, the download drastically went down to about 40K/s. Shouldn’t the qos give max to the download when there is nothing else to rob that bandwidth?

    All I want is my bandwith to work as it is, until some other higher priority bandwidth starts needing it, but I am having a real difficulty trying to get this to work. Tomato either cuts off the bandwidth from a classification permanently or doesn’t want to help at all. The %ges or so confusing as they don’t add up to 100. I can’t find a single guide/blog which seem to understand and explain the real meaning and how it is supposed to work.

  73. 73 bulk

    So, the only thing that is COMPLETELY wrong with this guide is “Bulk Traffic”. I was running the standard config, and had lots of problems, because EVERYTHING was getting classified into the same area. Then I removed Bulk Traffic, and everything was getting classified correctly!

    Why the hell would you use “Bulk Traffic” to classify basically EVERY SINGLE PORT YOU HAVE to the same classification? Don’t you realize that this is basically eliminating the entire purpose of QOS?

  74. 74 Paul

    Wow, took your advice and removed the bulk traffic classification and everything is a lot faster
    Thank you

  75. 75 Jimmy Bryant

    This was exactly the information I was looking for, thanks so much, it cleared up a lot of the questions I had been asking for so long, great article, good job…

  76. 76 Rob

    I am specifically after a QoS setup but my question is way back on the physical network setup. In order for QoS to prioritize traffic, shouldn’t my ISP’s router be connected to the WAN port of the WRT54GS?

    I can’t get anything in or out of my WAN port.

    If I connect the ISP’s router to one of my LAN ports, packets get passed but I “assume” that’s only because the LAN ports are just a HUB. Is this a correct assumption?

    For QoS work with an ISP’s router upstream from the WRT54GS, and multiple Ethernet devices downstream from the WRT54GS, what should the network configuration look like? And is there a blog or How To for this kind of setup somewhere?

    Rob

  77. 77 Sergey

    callous wrote:

    BTW, if you’re using Tomato, it’s best NOT to create a rule for Bittorrent, and let it default to unclassified / bulk. So make rules for everything except BT and BT will default to whatever is your default speed for an unknown application. This way, you use less cpu cycles on the router.

    For DD-WRT, you must make a QoS for http, and for BT you have to make one as well, but create a rule yourself (based on tcp/udp and port(s) used for BT) and dont use the default provided “bittorrent” on list. Because the default provided forces the router to analyze the data packet to determine if it is BT or not so that uses cpu cycles and can be fooled by BT encryption.

    Browsing website is as fast as tomato if you create the http and bt QoS rules.

    Could you please provide what dd-wrt firmware have you been using ?

  78. 78 Blagoj

    Hi,

    I manage small hotell and have LinkSys WRT54GS router that cover all rooms. I have problem with some guest that use a lot of download. If I upgrade it with tomato firmware, can I using QoS limit download of Any users to max 256kb/s ??

  79. 79 chris

    Blagoj wrote:

    Hi,

    I manage small hotell and have LinkSys WRT54GS router that cover all rooms. I have problem with some guest that use a lot of download. If I upgrade it with tomato firmware, can I using QoS limit download of Any users to max 256kb/s ??

    Yes, you would simply set each IP to a separate class, and each class to 256kb/s.

  80. 80 Doches

    I realize this is quite an old posting, but the comments still seem to be active…

    Setting the inbound rate limit in Tomato is probably not functioning as you imagine — that is, it will in no way limit the incoming bandwidth you are using. All Tomato will do if this limit is enabled is *drop* packets, ultimately increasing your average latency and upping the amount of bandwidth used.

  81. 81 Irha

    I gave up trying to cap uploads and downloads and now simply trying to increase the priority for voip. I set several individual rules such as
    - match by macid of voip adapter
    - match by ip address of the same
    - match by sip layer7 protocol
    - match by port

    After all these rules, tomato still fails to classify the voip traffic. While on a call with no other significant internet activity, I can clearly see that 100% of the traffic is “unclassified” and clicking on it shows several connections to the sip port and other criteria that I matched to classify as highest. Can someone make me understand why none of the rules failed to catch my voip traffic?

    I don’t know if this will still help me though, as tomato can’t reduce the download speed anyway, so if a download is hogging all the traffic and a voip call starts up, it probably can do nothing to make sure download will slow down to give room to voip. All the qos stuff seems to be more like a joke to me with the consumer grade routers (unless I am completely missing to see some advantages). I can’t find good information anywhere on the web.

  82. 82 Roger Dahl

    Hi Mark,

    Thank you for this tutorial. Did you know that it shows up as the first hit in Google on “tomato qos”? :)

    If I understand things directly, there is no need to set any classifications for class Lowest since you have set Lowest as the default class. So you can get rid of both the BitTorrent and the Bulk Traffic classifications.

    Thanks,

    Roger

  83. 83 Julian

    Irha: I am just above a novice with routers and I just flashed my new ASUS WL-520UG with teddy_bear’s tweak of Tomato (tomato-NDUSB-1.27.8745.01-Ext.trx). I played around with this and put my VOIP’s MAC address as both “Highest” and as “Class E” and I also pushed it to the top, only DNS is before it in the list (top to bottom) and I immediately see a difference. I also see it reflected in the graphs.

    If you are not seeing this. Are you sure you clicked save? Did you perhaps over complicate it with all of those filters? Did you reboot the router? I would just use MAC address and push it to the top of the list. Then try again.

    BTW, you are correct, if a huge download is coming in there is nothing that can stop it if the ISP doesn’t throttle it for you. So, yes, QoS is not a perfect solution. These folks who claim they run torrents and VoIP at the same time must be limiting their torrents such that they do not consume 100% of the download bandwidth. I still don’t understand how to control this. I see the QoS slowing my uTorrent’s upload, but I don’t see impact on the download, at least not the impact that others seem to claim.

  84. 84 Chris

    Julian: You can limit your torrents by setting the default class to “Lowest”, and cut down Lowest’s speeds to like 60%. Don’t try to manually filter torrents into a specific category - just leave them unclassified, and put default class to Lowest, and they’ll all be thrown in there.

    I’m in an 8 person house, where almost everyone uses torrents, and I’m still able to play games lag-free thanks to this.

    The downside to this is that every single random application you use must be sorted into something above Lowest. For example, we have all games and web browsing set to High.
    So if you connect a new device to your network, like xbox 360, it will be extremely laggy unless you manually set it to something above lowest, because with the default class as lowest, every undefined device goes there.

  85. 85 rick

    a friend sent me the link here ,, im not ignorant to pc’s n routers , but still have loads to learn ,,, the problem i have is on 3 machines here i run winmx (chat) and one here on a lap top , new n strong , (total 4 pc’s now on line, and when i count them all its 7 pc’s on line plus phone) ok in a nut shell 6 pc’s will run winmx , not bad i get good speed , dont take forever for what i type in the room to appear , no lag ,,, one pc here , well his lappy goes into face book , IMVU , porn sites and everything in the house lags , how do i block facebook and limit IMVU thru the router , linksys BEFSR81 with 8 port switch ? i appoligise if i sound ignorant , but i pay for the internet and got one takin all the band width , and im still learnin new everyday

  86. 86 Julian

    Hi Rick, I am still quite new at this, but I would recommend that you setup a rule for that troublesome PC based on its MAC Address. I would push this rule up above the port 80/443 rules is in the list. I would also assign it to “CLASS E” and I would set it up with some good restrictive limits.

  1. 1 links for 2008-01-24 « Donghai Ma
  2. 2 Eddie Adams’ weblog » Blog Archive » Tomato traffic shaping
  3. 3 FW|Base » Tech » Links Tomato QOS
  4. 4 links for 2008-12-30 « cygweb
  5. 5 Configuring QOS On Your WRT Router With Tomato | Tech Krunch
  6. 6 Tomato para tu router (si te dejan) | Geekotic

Leave a Reply

Quote selected text