Generated script doesn't work as expected on DIR-600 rev B1

Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware
Author Message
F32
DD-WRT Novice


Joined: 03 Apr 2010
Posts: 16

PostPosted: Wed Apr 07, 2010 14:52    Post subject: Generated script doesn't work as expected on DIR-600 rev B1 Reply with quote
I used the Script Generator to create a script that limit 192.168.1.32's upload and download speed to 2Mbps.

However when tested, the download rate can only reach about 1.3Mbps, and upload rate can be more than 10Mbps.

"modprobe" has been replaced with "insmod"

Script here:

Code:

#--------------------------------------------
#WRT54 Script Generator v1.02
#(C) 2006-2007 Robert "Robson" Mytkowski
#--------------------------------------------
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 2048kbit
tc class add dev br0 parent 1:1 classid 1:10 htb rate 2048kbit ceil 2048kbit prio 2
tc filter add dev br0 parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
iptables -t mangle -A POSTROUTING -d 192.168.1.32 -j MARK --set-mark 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 2048kbit
tc class add dev imq0 parent 1:1 classid 1:10 htb rate 2048kbit ceil 2048kbit prio 2
tc filter add dev imq0 parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
iptables -t mangle -A PREROUTING -s 192.168.1.32 -j MARK --set-mark 10
iptables -t mangle -A PREROUTING -j IMQ --todev 0



What's the problem?
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Fri Apr 09, 2010 7:23    Post subject: Re: Generated script doesn't work as expected on DIR-600 rev Reply with quote
It's probably that the IMQ kernel modules aren't loaded, possibly because they're missing in your build even though afaik they're in all builds... The below code sets a queue for the actual WAN port instead of using an IMQ device. You should raise the rates I bolded because those rates apply to everyone.


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 2048kbit
tc class add dev br0 parent 1:1 classid 1:10 htb rate 2048kbit ceil 2048kbit prio 2
tc filter add dev br0 parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
iptables -t mangle -A POSTROUTING -d 192.168.1.32 -j MARK --set-mark 10
wanif=`nvram get wan_iface`
tc qdisc del dev $wanif root
tc qdisc add dev $wanif root handle 1: htb
tc class add dev $wanif parent 1: classid 1:1 htb rate 2048kbit
tc class add dev $wanif parent 1:1 classid 1:10 htb rate 2048kbit ceil 2048kbit prio 2
tc filter add dev $wanif parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
iptables -t mangle -A PREROUTING -s 192.168.1.32 -j MARK --set-mark 10

_________________
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)
F32
DD-WRT Novice


Joined: 03 Apr 2010
Posts: 16

PostPosted: Wed Apr 14, 2010 13:41    Post subject: The version is Reply with quote
it's build 14144
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum