Joined: 18 Jun 2006 Posts: 1110 Location: Kiel (54.4247,10.1721)
Posted: Mon Nov 06, 2006 23:11 Post subject:
speed_phreak wrote:
I provided this information in my first post
wrt54gs v3.0
dd-wrt v23sp2
Pagebreak, sorry... Did not read your first post completely...
Try watching the output of
./shaper.sh status
And the best way to test it will ever be to play online or talk via VOIP and upload something at full speed...
For further debugging of your problems could you attach the complete output of
ifconfig
and please do some testing...
Did you ran the script when a PPPoE connection was established? Do you use PPPoE?
Give some more information please since firmware version seems to be current...
I know that the switch port-numbers differ for the V1.1 and V3 of the GS series because the 1.1 has a BCM5325 switch and the V3 has it included in the cpu (which means the cpu is different as well) so there are some changes but they all should not matter... _________________ DD-WRT F.A.Q. Webcam Kiel
Does this mean on my non-PPPoE configuration, I have my cable modem plugged into the WAN port of my WHR-HP-G54, that I should be using device vlan1 as that's the WAN device?
Cheers.
Since you have no ppp0 device you should use vlanX, yes.
Thanks for that.
I'm still having problems getting your script to do anything though. AFAICT the tc command does nothing?
./shaper.sh status
gives no output. Calling tc with no args gives no output.
If I install the tc package and then /jffs/usr/sbin/tc it does appear to do something as I get some output. However, there appear to be some problems:
~ # ./shaper.sh
What is "ms"?
Usage: ... tbf limit BYTES burst BYTES[/BYTES] rate KBPS [ mtu BYTES[/BYTES] ]
[ peakrate KBPS ] [ latency TIME ]
RTNETLINK answers: No such file or directory
RTNETLINK answers: No such file or directory
RTNETLINK answers: No such file or directory
RTNETLINK answers: No such file or directory
RTNETLINK answers: Invalid argument
We have an error talking to the kernel
RTNETLINK answers: Invalid argument
We have an error talking to the kernel
RTNETLINK answers: Invalid argument
We have an error talking to the kernel
~ #
Joined: 18 Jun 2006 Posts: 1110 Location: Kiel (54.4247,10.1721)
Posted: Sun Nov 12, 2006 15:02 Post subject:
tc without any outputs gives no output, thats normal when using dd-wrt because most of the comments and advices are stripped out of the binarys to save space.
Btw: Which version are you using?
I tried using vlan1 here and there are no errors and no porblems when executing the script.
Edit: Oh, there really was a problem when copying the code out of the forum-post... I edited the firs post. Please try again. _________________ DD-WRT F.A.Q. Webcam Kiel
tc without any outputs gives no output, thats normal when using dd-wrt because most of the comments and advices are stripped out of the binarys to save space.
Btw: Which version are you using?
v23SP2
Quote:
I tried using vlan1 here and there are no errors and no porblems when executing the script.
It does nothing for me. As I said,
shaper.sh status
gives no output. However, when I get it to use the OpenWRT package /jffs/usr/sbin/tc then it does give me output. It seems like the tc command does nothing at all?
Quote:
Edit: Oh, there really was a problem when copying the code out of the forum-post... I edited the firs post. Please try again.
I got it directly from the download link you gave on Saturday. Has it changed since then?
Anyway, it appears to be a problem with the tc command and not your script.
Any ideas apart from a nvram reset?
I'm getting another WHR-G54s this week and will try OpenWRT on it instead.
Joined: 18 Jun 2006 Posts: 1110 Location: Kiel (54.4247,10.1721)
Posted: Mon Nov 13, 2006 12:23 Post subject:
>/jffs/etc/shaper.sh - the script itself
just means that I saved the script using the above filename
(don't forget chmod +x /jffs/etc/shaper.sh afet saving)
>/jffs/etc/config/shaper.ipup
is another script containing just those lines:
>#!/bin/sh
>
>/jffs/etc/shaper.sh start
( dont' forget chmod +x /jffs/etc/shaper.sh )
>/jffs/etc/config/shaper.ipdown
the down script containing the following lines
>#!/bin/sh
>
>/jffs/etc/shaper.sh stop
and chmod as well...
And gildenman:
I reuploaded it yesterday, try downloading again....
shaper.sh status ONLY gives output when there are priority queues, so if the script fails to start it won't list anything... _________________ DD-WRT F.A.Q. Webcam Kiel
Well, I installed the mini version to have space on the router.
Now maybe a stupid question, but how can I get the script from my XP machine into the /jffs/etc folder???
And also, I had to create the /etc folder
Is that normal? Afer the reboot the folder is gone? Has this something to do with the "clean jffs" option that I enable?
Sorry for all the questions, I hope that I dont bother you too much
Tried to use the ssh file transfer but it does not work as sftp give me an error.
I dont want to input all the script with vi!
Ok got over my newbie issues. Now I realise that no command gives error messages. That was where my confusion lay. I can understand removing all errors to save mem, but how about leaving just one generic "Error" message. Instead of calling exit() to leave the command which they have to, they could call a local error() which simply prints error and then itself calls exit. That'd be 6 bytes plus one extra call to a print routine. I know these systems are embedded, but can't spare ~20bytes? Anyway, I digress. Now I know there are no errors it makes sense :)
It's working now. Thanks for your work. This is based on wondershaper, right?
I've removed all the l7 filters tho as I just cannot see the need for them. The 1024 filter suggested by someone else earlier (plus exceptions) is much more efficient and works exactly the same. In fact it works better.
In both emule and utorrent I am using encryption to avoid ISP traffic shaping, so my router can also not determine what they are. Actually it can determine some, cos I have not forced encryption on, so some clients still talk to me without encryption. Therefore all the p2p traffic that is meant to go bulk is instead going default, along with dns, ssh, etc; this breaks the whole design goal.
Now that I have removed all the l7 iptables commands, the l7 detection doesn't get enabled at all by the kernel; "grep l7proto= /proc/net/ip_conntrack" returns nothing.
In the interest of keeping traffic flowing smoothly, considering maintaining that during peak traffic loads & the low cpu power of these routers; I cannot see how I can really warrant turning on any l7 filtering, especially considering that a simple; low cpu load; port filter can do exactly the same thing.
I simply changed all iptables to:
$IPTABLES -t mangle -A POSTROUTING -p icmp -j MARK --set-mark 3
$IPTABLES -t mangle -A POSTROUTING -p tcp --dport :1023 -j MARK --set-mark 3
$IPTABLES -t mangle -A POSTROUTING -p udp --dport :1023 -j MARK --set-mark 3
$IPTABLES -t mangle -A POSTROUTING -p tcp --dport 1024: -j MARK --set-mark 6
$IPTABLES -t mangle -A POSTROUTING -p udp --dport 1024: -j MARK --set-mark 6
No exceptions as yet, cos I don't game nor use voip. I raised the icmp priority whilst I was testing with ping. There are of course icmp based attacks, so eventually disabling icmp may be wise
Can anyone see any problems with this approach? Last thursday was the 1st time I used dd-wrt and the 1st time I've used linux/netfilter; tho I am a full-time UNIX admin ; so I may be missing something obvious here.