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

Again using QoS to limit inbound traffic

Discussion in 'Tomato Firmware' started by jorotg, Sep 10, 2007.

  1. jorotg

    jorotg LI Guru Member

    Hi guys! I have 1 Buffalo WHR-HP-G54 /extremely good device!/ with Tomato 1.07 installed on it. I want to limit the download speed of my neighbour which is wirelessly connected to my router at 100KB and leave untouched his outbound traffic. My internet speed is 2048 kbit/s and 192kbit/s. I want to reserve 120-130KB/s speed for my needs and the rest 100KB for the neighbour(his IP address is The last is sucking my whole bandwidth by downloading movies with BitTorrent or similar software. I was wondering If this WRT54 Script Generator http://www.icpnet.pl/~robsonn/generator.zip
    would works correctly on my Buffalo + Tomato??? Here is what It generated for me:

    modprobe ipt_TTL
    iptables -t mangle -I POSTROUTING -o eth1 -j TTL --ttl-set 1
    TCA="tc class add dev eth1"
    TFA="tc filter add dev eth1"
    TQA="tc qdisc add dev eth1"
    SFQ="sfq perturb 10"
    tc qdisc del dev eth1 root
    tc qdisc add dev eth1 root handle 1: htb
    tc class add dev eth1 parent 1: classid 1:1 htb rate 2048kbit
    $TCA parent 1:1 classid 1:10 htb rate 800kbit ceil 800kbit prio 2
    $TQA parent 1:10 handle 10: $SFQ
    $TFA parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
    iptables -t mangle -A POSTROUTING -d -j MARK --set-mark 10

    Thank you for your attention. I'd be very glad If someone could help me.:smile:
  2. GeeTek

    GeeTek Guest

    Tomato itself will work fine. I use it all the time to control inbound and outbound speeds. Define a class of service such as "A" to have the up and down speeds you want. For bit torrent you should really control the out bound speed as well because it will saturate the outbound channel and cause your inbound to suffer as a result. In the outbound fields do not use a range, set both fileds to the same value, then set the inbound field of class "A" to the speed you want him to have. In the QOS rules create 2 rules, one for traffic to his IP and one for traffic from his IP. Point both rules to class "A" and he will be regulated to the speeds you define, and your network will not get clogged.
  3. jorotg

    jorotg LI Guru Member


    :confused: I did exactly what you told me but besides I added 2 more rules for my IP address with class "Highest":

    from my IP address src or dest. port 1024-65535 class Highest
    to my IP address src or dest. port 1024-65535 class Highest

    I moved this rules at the top of classification table and right below them I put my neighbour's rules.

    and the neighbouhood class A didn't appear at all in Visual Graphic Diagram :confused: Thing went wrong and my PC's bandwidth didn't increase much.

    QoS seems so complicated and there also was a big number of percents with "Unclassified". Should I leave 2 classes only? class "A" and Highest and put "None" to other classes: High, Medium, Low , Lowest???
  4. GeeTek

    GeeTek Guest

    Can you post a screen shot of your QOS clasification page ?
  5. azeari

    azeari LI Guru Member

    also, ur qos shouldn't be using source or destination, but just source alone (= although this shouldn't really cause any problems
  6. GeeTek

    GeeTek Guest

  7. jorotg

    jorotg LI Guru Member

  8. GeeTek

    GeeTek Guest

    You can use view the details of the traffic categories to see if the unclassified connections are from your address or Irena's address. On the pie charts in hte QOS section you can see what any and all of the traffic is and how it is classified. This is what you need to analyse to see where things are going. One thing you could do to help is to specify all protocols, not just tcp/udp, and also change the port range of your rule and Irena's rule to "Any Port", and not the range you are using.
  9. jorotg

    jorotg LI Guru Member

    What's your default class

    What should my default class be GeeTek??? I have 65% unclassified traffic /inbound/ based on my IP address. I obviously can't control It.:redface:
  10. Rafatk

    Rafatk Network Guru Member

    And see if the % of unclassified connections drops.

Share This Page