Posted: Wed Feb 24, 2010 6:26 Post subject: Script Generator Help
Hello. I've been trying to limit the speed of my roommates computer but have only been able to limit the download speed. Here is the script I'm trying to use for upload:
Code:
TCAU="tc class add dev imq0"
TFAU="tc filter add dev imq0"
TQAU="tc qdisc add dev imq0"
SFQ="sfq perturb 10"
insmod imq
insmod 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 960kbit
$TCAU parent 1:1 classid 1:10 htb rate 200kbit ceil 400kbit prio 2
$TQAU parent 1:10 handle 10: $SFQ
$TFAU parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
iptables -t mangle -A PREROUTING -s 192.168.1.101 -j MARK --set-mark 10
iptables -t mangle -A PREROUTING -j IMQ --todev 0
I've tried using it in both Firewall and Startup with no luck. I'm using a WRT54GS2 router, and the firmware build is DD-WRT v24-sp2 (10/10/09) micro. Thanks!
Telnet to the router and get the output from these commands.
ifconfig imq0
tc -s class show dev imq0
iptables -t mangle -vnL PREROUTING _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Chain PREROUTING (policy ACCEPT 154K packets, 132M bytes)
pkts bytes target prot opt in out source destination
The script's iptables commands are missing. Do you still have the entire script in your firewall? Try running them via telnet and then check again if they get added correctly. _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
It looks fine now. 192.168.1.101 should be limited to 400kbps up. _________________ Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)