From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joachim Otahal Date: Thu, 18 Sep 2003 21:39:21 +0000 Subject: [LARTC] Why does Emule still fill my line ? What is wrong in this script Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org The effect I have: Friend runs emule. It filles the shared (A-DSL) line so everything else gets slow, that annoys me quite. I set up the rules to slow down her traffic. Her IP 192.168.0.20, my IP 192.168.0.45), linux IP 192.168.0.10 However, after a few minutes the line is full of emule again and everything else is slowed down again. I have to restart the script to have a temporary (a few seconds) effect of having the traffic shaped the way I configured. Another question: does anyone know how I can specify the ACK packets more precicely than just by their small size ? And: I don't really understand the r2q value, although I read as most as I can. r2q = 1 is the only value which does not give me stupid syslog messages. Here the script in short: (Thanks in advance from here on) #!/bin/sh # Root /sbin/tc-new qdisc add dev ppp0 root handle 1:0 htb r2q 1 default 12 ## main class /sbin/tc-new class add dev ppp0 parent 1:0 classid 1:1 htb rate 125kbit ceil 125kbit ## ACK Packages /sbin/tc-new class add dev ppp0 parent 1:1 classid 1:10 htb rate 25kbit ceil 125kbit prio 0 ## VPN/SSH /sbin/tc-new class add dev ppp0 parent 1:1 classid 1:11 htb rate 100kbit ceil 125kbit prio 1 ## normal /sbin/tc-new class add dev ppp0 parent 1:11 classid 1:12 htb rate 75kbit ceil 125kbit prio 2 ## Kazaa /sbin/tc-new class add dev ppp0 parent 1:12 classid 1:13 htb rate 14kbit ceil 50kbit prio 3 ## Emule BRAAAAAKE /sbin/tc-new class add dev ppp0 parent 1:13 classid 1:14 htb rate 2kbit ceil 4kbit prio 4 # I don't want to bor you with the marking, so just the important here # ACKs - How can this be done better ? iptables -A POSTROUTING -t mangle -o ppp0 -p tcp -m length --length :64 -j MARK --set-mark 10 # Girlfriend iptables -A POSTROUTING -t mangle -o ppp0 -p tcp --source 192.168.0.20 -j MARK --set-mark 14 iptables -A POSTROUTING -t mangle -o ppp0 -p udp --source 192.168.0.20 -j MARK --set-mark 14 iptables -A POSTROUTING -t mangle -o ppp0 -p tcp --destination 192.168.0.20 -j MARK --set-mark 14 iptables -A POSTROUTING -t mangle -o ppp0 -p udp --destination 192.168.0.20 -j MARK --set-mark 14 # Sorting the marked packets into the according /sbin/tc-new filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10 /sbin/tc-new filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 11 fw flowid 1:11 # defalt class 1:12 is not specified additionally /sbin/tc-new filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 13 fw flowid 1:13 /sbin/tc-new filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 14 fw flowid 1:14 Still here ? Thx ! Joachim Otahal _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/