[LARTC] script for limiting uploaddoes not work
Hello, I want only a very simple thing, but somehow I cannot manage to get it working. I would like to shape download and upload speeds of my DC++ client firmly to some speed, but I cannot make the upload part working. I use a linux router (asus wl500g, actually), and a NATed PC (adress 192.168.1.100) eth1 is my WAN interface, br0 is LAN, DC++ is active and running on ports(udp and tcp) 4111. This is my script (working) for download: iptables -t mangle -A FORWARD -p tcp --dport 4111 -j MARK --set-mark 1 tc qdisc add dev br0 root handle 1:0 htb default 0 tc class add dev br0 parent 1:0 classid 1:1 htb rate 1024kbit tc class add dev br0 parent 1:1 classid 1:11 htb rate 256kbit tc filter add dev br0 parent 1:0 protocol ip handle 1 fw flowid 1:11 I thought that upload would be very similar: iptables -t mangle -A FORWARD -p tcp --sport 4111 -j MARK --set-mark 2 tc qdisc add dev eth1 root handle 2:0 htb default 0 tc class add dev eth1 parent 2:0 classid 2:1 htb rate 1024kbit tc class add dev eth1 parent 2:1 classid 2:11 htb rate 256kbit tc filter add dev eth1 parent 2:0 protocol ip handle 2 fw flowid 2:11 but it does not work. tc part is actually ok, because if I type this: iptables -t mangle -A FORWARD -i br0 -j MARK --set-mark 2 or this: iptables -t mangle -D FORWARD -s 192.168.1.100 -j MARK --set-mark 2 upload goes to 64kbit, but do does everything else too - which is not exactly what I am trying to do:-). So the problem si something with marking and iptables - any ideas? (or even a completle different approach to the problem then marking packets?) Thanks for help in advance. Tomas ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[LARTC] limiting upload speeds does not work
Hello, I want only a very simple thing, but I have been unable to get it working so far. I would like to shape my DC++ traffic firmly to certain speeds. I am using an embedded linux router (asus wl500g), and a NATed PC (address 192.168.1.100). eth1 is a WAN interface and br0 is the LAN interface of the router.DC++ client is running on 4111 ports(tcp and udp) I actually managed to shape download wth this script: iptables -t mangle -A FORWARD -p tcp --dport 4111 -j MARK --set-mark 1 tc qdisc add dev br0 root handle 1:0 htb default 0 tc class add dev br0 parent 1:0 classid 1:1 htb rate 1024kbit tc class add dev br0 parent 1:1 classid 1:11 htb rate 256kbit tc filter add dev br0 parent 1:0 protocol ip handle 1 fw flowid 1:11 And I thought it would be similar with upload, but it is not, I tried this script: iptables -t mangle -A FORWARD -p tcp --sport 4111 -j MARK --set-mark 2 tc qdisc add dev eth1 root handle 2:0 htb default 0 tc class add dev eth1 parent 2:0 classid 2:1 htb rate 1024kbit tc class add dev eth1 parent 2:1 classid 2:11 htb rate 256kbit tc filter add dev eth1 parent 2:0 protocol ip handle 2 fw flowid 2:11 but it did not work. However, the problem seems to be in the way how I mark packets since when I type this: iptables -t mangle -A FORWARD -i br0 -j MARK --set-mark 2 or this: iptables -t mangle -A FORWARD -s 192.168.1.100 -j MARK --set-mark 2 upload immidiately goes to 64kbits or something, but so does everything else too - which is not exactly what I am trying to accomplish;-). Since I am running out of ideas, have you got any? Or even an completely different approach to the problem? Thanks in advance, Tomas ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
[LARTC] sorry for sending this twice
My opera browser crashed and I somehow missed the mail was actually already sent, so I wrote it again. Sorry for two almost identical mails. Tomas ___ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc