All of lore.kernel.org
 help / color / mirror / Atom feed
From: Staenker <staenker@web.de>
To: lartc@vger.kernel.org
Subject: [LARTC] ppp uplink shaping problems
Date: Mon, 18 Jul 2005 07:26:39 +0000	[thread overview]
Message-ID: <42DB59AF.60106@web.de> (raw)

Hello,

i played a few days with tc htb classes and classified my packets using
iptables CLASSIFY target.

here is what i did:
#!/bin/bash
int='ppp0'
#making all things clear
tc qdisc del dev $int root
iptables -t mangle --flush
iptables -t mangle --delete-chain

if $1
then
#defining classes
tc qdisc add dev $int root handle 1: htb default 20 r2q 2
tc class add dev $int parent 1: classid 1:1 htb rate 22kbps

tc class add dev $int parent 1:1 classid 1:10 htb rate 10kbps ceil
22kbps prio 0
tc class add dev $int parent 1:1 classid 1:20 htb rate 9kbps ceil 15kbps
prio 1
tc class add dev $int parent 1:1 classid 1:30 htb rate 3kbps ceil 13kbps
prio 2
tc qdisc add dev $int parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $int parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev $int parent 1:30 handle 30: sfq perturb 10

iptables -t mangle -N TS_FWD
iptables -t mangle -A FORWARD -j TS_FWD

iptables -t mangle -A TS_FWD -o ppp0 -p ! icmp --match length --length
0:70 -j CLASSIFY --set-class 1:10
iptables -t mangle -A TS_FWD -o ppp0 -p ! icmp --match length --length
0:70 -j RETURN

iptables -t mangle -A TS_FWD -i eth2 -o ppp0 -p tcp --source 192.168.0.2
--destination-port 80 -j CLASSIFY --set-class 1:20
iptables -t mangle -A TS_FWD -i eth2 -o ppp0 -p tcp --source 192.168.0.2
--destination-port 80 -j RETURN
iptables -t mangle -A TS_FWD -i eth2 -o ppp0 -p tcp --source 192.168.0.2
--destination-port 443 -j CLASSIFY --set-class 1:20
iptables -t mangle -A TS_FWD -i eth2 -o ppp0 -p tcp --source 192.168.0.2
--destination-port 443 -j RETURN

iptables -t mangle -A TS_FWD -i eth2 -o ppp0 -p tcp --source 192.168.0.2
--destination-port 554 -j CLASSIFY --set-class 1:10
iptables -t mangle -A TS_FWD -i eth2 -o ppp0 -p tcp --source 192.168.0.2
--destination-port 554 -j RETURN
#if $2
#then
#    iptables -t mangle -A TS_FWD -i eth2 -o ppp0 --source 192.168.0.2
-j LOG
#fi
iptables -t mangle -A TS_FWD -i eth2 -o ppp0 --source 192.168.0.2 -j
CLASSIFY --set-class 1:30
fi

It works not really good. I tested it using my internal 100MBit network
interface using multiple ftp connections and classified the packets
based on their source-ip. That works fine with same classes. Immediately
all things i expected took place. Also the prio option worked fine. If i
was running 2 simultanious downloads, the one with the higher piority
gets all borrowable downloadspeed and the one with the lower priority
gets his ashured rate.
But same classes didnt work with my 192kbit 2048kbit ppp link. Well ok,
they are working, but not like i want them to work. The speed changes
takes some seconds to take place. And the priority seems to be ignored.
I have to say, that the i tested the ppp uplink using emule with many
connections (500 - 800) and the higher priority upload was one active
ftp connection.

Whats my fault?

Regards
Richard Hauswald
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

             reply	other threads:[~2005-07-18  7:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-18  7:26 Staenker [this message]
2005-07-21  0:18 ` [LARTC] ppp uplink shaping problems Andy Furniss

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=42DB59AF.60106@web.de \
    --to=staenker@web.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.