QOS Setup?

Discussion in 'Tomato Firmware' started by travanx, Sep 26, 2006.

  1. travanx

    travanx Network Guru Member

    Can someone explain how I set up QOS? I just installed v .5 and messing around with this since dd-wrt doesnt seem to work correctly with QOS.

    I am constantly downloading from the newsgroups from my pc but I would rather give priority to browsing the web from all the pc's; my pc, family room pc and my wireless laptop. How do I set this up so that normally the newsgroups are getting my full 100% bandwidth but when someone uses the web it automatically slows the newsgroups down so they can get as fast as possible? I am on a 768k speed dsl so I don't have too much bandwidth to spare.
  2. turbo53

    turbo53 Network Guru Member

    QOS is most useful on the upload side, not the download.

    SInce you have 786Kb DL, that means your internal network, running at 54Mb (or 11 Mb for any 802.11b computers you have) is far faster than your internet connection. So the router can dispatch the data as soon as it arrives. Nothing should be getting backed up at the router.

    Since QOS can't change the order in which the data arrives at your router from the internet, I don't think this will help you.
  3. lboregard

    lboregard LI Guru Member

    i'm not sure this is actually correct.

    what i understand is that, given a 768kbps dsl line, the first poster wants to mostly download from newsgroups (he uses his pc with ip to do this), but when someone in his other network's pc is browsing, he wants to ensure they get a smooth experience. i think this is the definition of qos.

    i still haven't found how to correctly configure this in tomato, but it's definitely possible.
  4. dankim831

    dankim831 Network Guru Member

    i definately agree.. the idea is that when the WAN interface is saturated because he is downloading at 100% from usenet that when there is another use trying to access another service, say http, that the router can slow down the usenet connection. now if in the incoming QOS, http is set at a higher priority then NNTP then the router will try to throttle back the NNTP connection by slowing down that connection and giving the HTTP request the chance to increase in speed.

    again this is what my other post is about. dd-wrt does this well so i hope that tomato will also implement this.
  5. dvaskelis

    dvaskelis Network Guru Member

    I think you might have a little bit of a misconception around how routers handle inbound QoS. Have you seen Nate Hoy's often quoted QoS article? It's a fantastic introduction to the topic.

    First, I've not compared the QoS in DD-WRT vs. Tomato, but since they're both based on the same general sources, I'll bet their QoS implementations are similar under the covers. I'm sure there are many minor differences in the details of their implementation, but the biggest difference is in the user interface. Tomato has brought us one "killer feature": a revolutionary real-time UI to let users tweak QoS to their heart's content and pretty much see the results immediately right from their browser.

    In any case, imagine the problem conceptually. The inbound packets have arrived at the router, as you can't make them not arrive, and they continue to arrive. The example of delaying an outbound ACK packet (not inbound) is somewhat valid for TCP packets, and you can prioritize your outbound ACKs with a check-box in Tomato which will have some effect on inbound traffic as a side-effect. Note that this won't help with non-TCP protocols that don't use ACKs. But even with TCP, it doesn't quite work like you are imagining it, as this is not packet-by-packet synchronous communications. TCP doesn't send one packet, wait for an ACK, and just keep doing it again. Instead, the TCP packets comes streaming in, often out of order, in burts and fits and starts to get reassembled by the receiving station, not the router. What does the router do with all of the packets that do arrive that go over their inbound QoS bandwidth allocation or get "squeezed" out by a higer class of inbound QoS? The answer: inbound QoS means dropping packets. And the other side, in the case of TCP, will dutifully resend the packet again, after figuring out that some didn't make it. So you get more packets for the router that might not be delivered to the destination.

    This doesn't mean that downstream QoS has no value, but that its value is limited, and overly burdening the purpose of TCP: guaranteed packet delivery. With the problem mentioned of one NNTP session and one or more HTTP sessions, without any QoS you'll probably see everyone's bandwidth go down a bit if everyone is downloading at the same time. If you configure Tomato's outbound QoS (for destination port 119 for nntp, and destination ports 80/443 for http/https) to favor http/https over nntp along with the prioritizing of outbound ACKs, I bet you'll more-or-less get the results you're looking for, without your connection looking to the other side like one that's dropping packets and requiring lots of resends... because it won't be. Would it hurt to try?

    If I were you, I'd put Tomato's real-time QoS UI to work. I'd try configuring Tomato keeping inbound QoS turned off, but do set it up for outbound QoS and to prioritize ACK packets. Then try turning on incoming QoS with full bandwidth for all classes. I bet you'll get smoother end-user results and lower CPU on the client PCs without inbound QoS. Then, just for fun try limiting the bandwidth on the lower priority inbound QoS classes. I bet that'll more-or-less give you what you want, I also bet the outbound-only QoS will still be closer to the results you're looking for.

    I'd be curious about your results.
  6. NateHoy

    NateHoy Network Guru Member

    iboregard -

    This might help explain why QoS is not effective on download/downstream data: http://vonage.nmhoy.net/qos.html

    Inbound QoS, when implemented on any consumer-grade connection where you do not have control of the other side of the connection, can only do one thing - delay or throw away packets AFTER they have already consumed bandwidth. In some applications, like HTTP, this might have the aftereffect of slowing down acknowledgment packets and effectively act as a "poor man's QoS", but of course you will still get spurts of activity until the lack of ACK packets slow down the HTTP datastream. This will work, somewhat, with most TCP based applications.

    UDP and other non-TCP applications do not generally get an acknowledgment. therefore, the data will come in at the stream speed the server is sending it at. This includes things like VoIP and some streaming video protocols.

    Regardless, "incoming QoS" is not QoS. It is throttling. And it happens only after the packets are already in your fast router and have traversed the bottleneck. So "incoming QoS" as implemented on any router you or I is likely to ever see in our homes in the next decade is of very limited effectiveness.
  7. dankim831

    dankim831 Network Guru Member

    thanks for that awesome reply!
  8. lboregard

    lboregard LI Guru Member

    dvaskelis/natheoy, thanks for the replies. i agree with you, i never meant to advocate for "incoming qos" or throttling as you best put it, i don't like the idea of dropping packets.

    my proposal is as mentioned by dvaskelis, that is, setup outbound categories to specific ports (http, nntp, etc.) and let the router prioritize based on this. this is pretty much what the tomato interface offers. i won't fiddle with "inbound qos" settings.

    i already tried this and it seems to be working fine ... the only thing is that the ui will not report the classes correctly.

    as per default tomato classification,:

    53 = highest
    80,443 = high
    everything else = low

    i added
    119 = medium

    it seems to work ok, but on the current connections list, connections to port 80 appear as unclassified ... not sure why, maybe a bug ?
  9. Reiper

    Reiper LI Guru Member

    Check your Dst IP for the "unclassified" connections and I bet it is your router. When your talking to your router (i.e. looking at the cool interface) it will connect using port 80 and will fall into the unclassified catagory. However, if your Dst IP for the "unclassified" connections is the gateway IP or outside IPs then there is a problem. Mine is woking ok here though.
  10. dankim831

    dankim831 Network Guru Member

    QOS seems to be working fine here as well.. i'd agree, check your QOS rules. I believe SRC is your LAN side and DST is the WAN side in your rules. and try to classify using ports if you can ,its less work.
  11. lboregard

    lboregard LI Guru Member

    yes, all connections to the router on port 80 appear as unclassified.

    but there are some others to different ip/80 that still appear as unclassified.

    the question is ... is qos implemented via iptables ?

    because i changes the default iptables rules, so maybe that's interfering.

    the strange thing is that my nntp connections (119 = medium) do appear as medium ..

  12. bourlas

    bourlas Network Guru Member

    qos does not work
    i have submitted two screen shots from my setup
    at this momemt i am downloading slax a 200mb iso, checking email, surfing linksysinfo and leech two torrents why 100% is unclassified?

    Attached Files:

  13. turbo53

    turbo53 Network Guru Member

    The experience of others here is that it DOES work

    I have to ask a basic question. You didn't show a screen shot of the "QOS | Basic Settings" page. Did you check the "Enable QOS" box on that page?
  14. bourlas

    bourlas Network Guru Member

    yep i have checked it,
    given all the jobs that i mentioned before , surf,torrents, email, ftp download qos probably work but the graph do not represent the inner workings of the qos
  15. Reiper

    Reiper LI Guru Member

    What firmware did you come from? Did you do a Clear NVRAM reset and re-key your settings?
  16. bourlas

    bourlas Network Guru Member

    i used to have dd-wrt 23 sp2 and i did reset the modem (holding the reset switch for 30-40 seconds) and then I applied the settings mainly disable dhcp and use static address the router is wrt54gs v1.1
  17. lboregard

    lboregard LI Guru Member

    are you applying any custom iptables rules ? i used to do that and it wiped clean the qos settings, so everything came off as unclassified. try and check that.
  18. bourlas

    bourlas Network Guru Member

    i have not applied any custom ip tables rules, moreover i upgraded to the last version and again the same, i am thinking that it has to do with the svg viewer
    and is not a problem of the actual firmware
  19. bourlas

    bourlas Network Guru Member

    moreover i tried the configuration option "erase all data in nvram memory" and again the same happens the qos pie charst show 100% unclassified
  20. dvaskelis

    dvaskelis Network Guru Member

    I know you attached screenshots, but you didn't include your QoS: Basic Settings screen. Could you have selected something wrong there?

    I'm guessing you have something wrong there, as it does seem to be working for most people. I've put it on four WRTs so far and set up QoS without any tricky settings or issues.
  21. bourlas

    bourlas Network Guru Member

    i have an attachment of the qos basic seetings

    Attached Files:

  22. bourlas

    bourlas Network Guru Member

    i have emailed the tomato firware developer team and they found what is the problem.

    my provider is only supporting PPPoA so I do not use bridging with my other router that actually logins on the net.

    Therefore i can not use the wan port, i just use any other port.
    Thus router thinks everything is unclassified because it thinks it is lan traffic.
  23. digitalgeek

    digitalgeek Network Guru Member

    As I have been reading through this forum, I have been looking at my own setup...

    I have not realy changed anything exept the max outbound limit. I have a lot of unclassified activity???

    Attached Files:

  24. turbo53

    turbo53 Network Guru Member

    Take a look at the "View Details" screen. In my case, unclassified activity is normally traffic to the router from the PC I am using to look at the QOS screen. Ironically, there are more unclassified connections when you are looking at the gui since your web browser itself opens the connections!!

    Kinda like the Heisenberg Uncertainty Principle for routers :) Looking at something changes it.
  25. digitalgeek

    digitalgeek Network Guru Member

    thanks... just a thought? what would wds traffic due to qos?
  26. jochen

    jochen Network Guru Member

    Why is in the factory default setting outbound bandwidth much higher than inbound? Isn't outbound=upload and inbound=download?
  27. der_Kief

    der_Kief Super Moderator Staff Member Member

    Hi @ All,

    Does somebody know which QoS - algorithm tomato use ? HFSC or HTB ?
    I didn't find any information about it .

  28. digitalgeek

    digitalgeek Network Guru Member


    if you are reffering to the linksys factory default, we all know from experience how well this works. the Tomato default is 230 out, 1000 in (in settings are disabled)
  29. masterbeto

    masterbeto Network Guru Member

    if this settings help anything

    if this settings help anything
  30. masterbeto

    masterbeto Network Guru Member

    sry image excede limit :´(
  31. der_Kief

    der_Kief Super Moderator Staff Member Member

    OK i got the answer from Jon by email.

    .... Just simple HTB + SFQ...

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice