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

Asus WL-500gp and script for bandwidth control

Discussion in 'Tomato Firmware' started by CBR900, Jan 14, 2008.

  1. CBR900

    CBR900 LI Guru Member

    Hi...

    I tried this script and it did not work can u help me please:

    #--------------------------------------------
    #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 960kbit
    $TCA parent 1:1 classid 1:10 htb rate 415kbit ceil 960kbit prio 2
    $TCA parent 1:1 classid 1:11 htb rate 415kbit ceil 960kbit prio 2
    $TCA parent 1:1 classid 1:12 htb rate 130kbit ceil 130kbit prio 2
    $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 2 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 2 protocol ip handle 12 fw flowid 1:12
    iptables -t mangle -A POSTROUTING -d 192.168.1.2 -j MARK --set-mark 10
    iptables -t mangle -A POSTROUTING -d 192.168.1.4 -j MARK --set-mark 11
    iptables -t mangle -A POSTROUTING -d 192.168.1.3 -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 32kbit
    $TCAU parent 1:1 classid 1:10 htb rate 10kbit ceil 32kbit prio 2
    $TCAU parent 1:1 classid 1:11 htb rate 10kbit ceil 32kbit prio 2
    $TCAU parent 1:1 classid 1:12 htb rate 10kbit ceil 10kbit prio 2
    $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 2 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 2 protocol ip handle 12 fw flowid 1:12
    iptables -t mangle -A PREROUTING -s 192.168.1.2 -j MARK --set-mark 10
    iptables -t mangle -A PREROUTING -s 192.168.1.4 -j MARK --set-mark 11
    iptables -t mangle -A PREROUTING -s 192.168.1.3 -j MARK --set-mark 12
    iptables -t mangle -A PREROUTING -j IMQ --todev 0
    iptables -I FORWARD -s 192.168.1.2 -p tcp -m connlimit --connlimit-above 70 -j DROP
    iptables -I FORWARD -s 192.168.1.4 -p tcp -m connlimit --connlimit-above 70 -j DROP
    iptables -I FORWARD -s 192.168.1.3 -p tcp -m connlimit --connlimit-above 10 -j DROP
     
  2. der_Kief

    der_Kief Super Moderator Staff Member Member

    Hi,

    first of all: WHAT did not work ?
    second: did you read the FAQ's ?
    third: ...

    der_kief
     
  3. CBR900

    CBR900 LI Guru Member

    after puting the script first in firwall and later in Init tabs my speed droped to 1 KB. :(

    note: I did not enable Qos

    help
     
  4. der_Kief

    der_Kief Super Moderator Staff Member Member

    Hi,

    script has to put in the firewall script section !
    Did you enable "secure your network against IP/MAC changing and illegal connections" in the Advanced Options of Script Generator ?
    You should read this part of the FAQ !

    der_Kief
     
  5. CBR900

    CBR900 LI Guru Member

    I did not enable"secure your network against IP/MAC changing and illegal connections"

    I just enabled "generate bandwidth managment script using dev (vlan1)"

    it seems working

    10x
     

Share This Page