1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question about Tomato QoS and Robson's.

Discussion in 'Tomato Firmware' started by TVTV, Sep 5, 2008.

  1. TVTV

    TVTV LI Guru Member

    Howdy, guys!

    I'll try to be short and to the point:

    1) Hardware used: WRT54GL v1.1, running Tomato v1.21;
    2) QoS enabled, D/L limit 27000 kb/s, U/L limit 19000 kb/s (yes, i know, it's a fast line);
    3) QoS used to throttle all ports other than DNS, HTML(S) & SSH to a max. u/l speed of 2850 kb/s;
    4) I have two computers using the router, which have been assigned static IP adresses outside the routers's DHCP range;
    5) Three of my neighbours piggyback my connection, and have not been assigned static IP adresses.

    Because my neighbours are heavy p2p users, i used Robson's to limit their maximum available bandwidth by limiting the entire DHCP range (192.168.1.100->192.168.1.130) to 10000 kb/s. I've added the script to the "Firewall" tab in Tomato's Administration -> Scripts section and everything seems to be working OK.


    Questions:

    1) Do Robson's and QoS play nice together, or do they get in each other's way?
    2) Robson's should ONLY affect speeds of computers inside the range specified by the user, anything outside that range should work as if there was no Robson's running, right?
    3) Considering 2) is true, if both me (uncapped, outside of Robson's range) and one of my neighbours (capped to 10000 kb/s, inside Robson's range) start downloading at the same time, what will the outcome be (considering i have 27000 kb/s of bandwidth available)? Will i get 17000 kb/s and he will get 10000 kb/s, or will i overlap him?


    Thanks in advance for your answers. :)
     
  2. TVTV

    TVTV LI Guru Member

    Anybody? :)
     
  3. wdca

    wdca LI Guru Member

    Theoretically yes, but IMHO the scripts generated are very lame. It's smarter to use Vicek/Conanxu/TrzepakoTomato etc.
    Right
    As I said the scripts are very lame, there is no esfq/sfq etc. In the result of the user action in a specified queue what is important - the laws of nature/blood bath(it depends completely on the TOS[p2p/mail etc])
    All of this is THEORY. Better test it and see how it works on your own skin.
    Greets!
     
  4. TVTV

    TVTV LI Guru Member

    Thank you for your kind answer, wdca.

    Which of the three firmware flavors would you recommend? Which one is the most stable and in line with Jon's "sweet and simple" philosophy?
     
  5. TVTV

    TVTV LI Guru Member

    Addendum to my previous post.

    Actually, the latest version of Robson's Script Generator does seem to use SFQ. I know nada about *nix and iptables and such, but:

    1) You can enable/disable SFQ in the Advanced Options tab before generating the script (in order to increase/decrease the script's size);
    2) I've found the following lines in the script:

    So far i've regenerated the script and have included both my static IP adresses in it, just to be sure the bandwidth will be balanced correctly. I'll do some testing tomorrow, since it's 4 AM my way and i'm too tired to fire up the laptop right now.

    As a final thought, i was aware of the other flavors of Tomato and them featuring a full-fledged b/w limiter, but i don't really need all the other options they come with, so i'd rather use the original. :) I absolutelly love the "keep it short and simple" concept.
     
  6. TVTV

    TVTV LI Guru Member

    As i'm a really stubborn guy, i've just tested the d/l speeds with and without the script running. I dunno what's happening, but my d/l speed has gone down from 2.8 MB/s (average, Robson's NOT running) to 1.8 MB/s (average, Robson's running), although i'm the only one using the router right now and the top D/L limit in the script is set to 27000 bp/s (bottom, reserved, is set to 16000 bp/s).
    Either the generated scripts are faulty, or the 54GL's CPU cannot handle the extra load (i'll check tomorrow, "top" command).

    P.S. - The test machine is connected to the router through a wired connection, so it's not a matter of wireless signal strength issues etc.
    P.S. 2 - Did i mention i am really stubborn? :D

    Here's the whole script. Any ideeas, please?

    Code:
    #--------------------------------------------
    #WRT54 Script Generator v1.02
    #(C) 2006-2007 Robert "Robson" Mytkowski
    #--------------------------------------------
    TCA="tc class add dev br0"
    TFA="tc filter add dev br0"
    TQA="tc qdisc add dev br0"
    SFQ="sfq perturb 10"
    tc qdisc del dev br0 root
    tc qdisc add dev br0 root handle 1: htb
    tc class add dev br0 parent 1: classid 1:1 htb rate 27000kbit
    $TCA parent 1:1 classid 1:10 htb rate 16000kbit ceil 27000kbit prio 0
    $TCA parent 1:1 classid 1:11 htb rate 8000kbit ceil 27000kbit prio 2
    $TCA parent 1:1 classid 1:12 htb rate 3000kbit ceil 8000kbit prio 4
    $TQA parent 1:10 handle 10: $SFQ
    $TQA parent 1:11 handle 11: $SFQ
    $TQA parent 1:12 handle 12: $SFQ
    $TFA parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10
    $TFA parent 1:0 prio 2 protocol ip handle 11 fw flowid 1:11
    $TFA parent 1:0 prio 4 protocol ip handle 12 fw flowid 1:12
    iptables -t mangle -A POSTROUTING -d 192.168.3.2 -j MARK --set-mark 10
    iptables -t mangle -A POSTROUTING -d 192.168.3.3 -j MARK --set-mark 11
    iptables -t mangle -A POSTROUTING -m iprange --dst-range 192.168.3.100-192.168.3.130 -j MARK --set-mark 12
    TCAU="tc class add dev imq0"
    TFAU="tc filter add dev imq0"
    TQAU="tc qdisc add dev imq0"
    modprobe imq
    modprobe ipt_IMQ
    ip link set imq0 up
    tc qdisc del dev imq0 root
    tc qdisc add dev imq0 root handle 1: htb
    tc class add dev imq0 parent 1: classid 1:1 htb rate 19000kbit
    $TCAU parent 1:1 classid 1:10 htb rate 14000kbit ceil 19000kbit prio 0
    $TCAU parent 1:1 classid 1:11 htb rate 4000kbit ceil 19000kbit prio 2
    $TCAU parent 1:1 classid 1:12 htb rate 1000kbit ceil 2850kbit prio 4
    $TQAU parent 1:10 handle 10: $SFQ
    $TQAU parent 1:11 handle 11: $SFQ
    $TQAU parent 1:12 handle 12: $SFQ
    $TFAU parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10
    $TFAU parent 1:0 prio 2 protocol ip handle 11 fw flowid 1:11
    $TFAU parent 1:0 prio 4 protocol ip handle 12 fw flowid 1:12
    iptables -t mangle -A PREROUTING -s 192.168.3.2 -j MARK --set-mark 10
    iptables -t mangle -A PREROUTING -s 192.168.3.3 -j MARK --set-mark 11
    iptables -t mangle -A PREROUTING -m iprange --src-range 192.168.3.100-192.168.3.130 -j MARK --set-mark 12
    iptables -t mangle -A PREROUTING -j IMQ --todev 0
     

Share This Page