Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Joachim Otahal <jou@gmx.net>
To: lartc@vger.kernel.org
Subject: [LARTC] Why does Emule still fill my line ? What is wrong in this script
Date: Thu, 18 Sep 2003 21:39:21 +0000	[thread overview]
Message-ID: <marc-lartc-106392126016400@msgid-missing> (raw)

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

<big cut here>

# 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

<cut again>

# 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/

             reply	other threads:[~2003-09-18 21:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-18 21:39 Joachim Otahal [this message]
2003-09-19  5:49 ` [LARTC] Why does Emule still fill my line? Martin A. Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-106392126016400@msgid-missing \
    --to=jou@gmx.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox