From: Andy Furniss <andy.furniss@dsl.pipex.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] HTB: Problem with excess bandwidth distribution
Date: Fri, 29 Oct 2004 22:03:26 +0000 [thread overview]
Message-ID: <4182BE2E.1050307@dsl.pipex.com> (raw)
In-Reply-To: <41812464.8010207@gmx.net>
Leslie Patrick Polzer wrote:
> Still problems :(
>
> I upgraded to kernel 2.6.9 now, configured IMQ to hook itself up after
> NAT, called it
> from prerouting, used u32 (matching works), set the root class to a rate
> of 800kBit
> (which is 200 less than my link speed) - and the behavior gets even
> worse :(
>
> Unfortunately, I cannot shape on the outgoing interfaces either, because
> there are two.
>
> I really don't know what to do now... I haven't dug deep into CBQ yet -
> should I try it?
Hmm - this should work. I just cobbled together a test - It's not very
elegant because it's based on a slightly different setup, but it works
for me. I use default as my local traffic has a dynamic IP - you don't
need to . Note the U32 filters are attached to 1:0 if I attached them to
1:1 than I would need a rule to send traffic to 1:1.
I wouldn't trust the output of apps for bandwidth tests - their
averaging can be confusing - also if it weren't just a test I would add
queues to the classes. Saying that I did notice that HTB was dropping -
maybe the default queue length is shorter now? It does seem a bit
strange though, I see drops where I expect the queue to be long enough
for my rwin and a class with two tcps on the go had less drops than one
with one - strange.
It did work though use tc -s class ls dev imq0 to see rates (which for
me using the new TC seem to be shown in the wrong units).
You may need to unwrap the lines if you copy n paste this:
set -x
IPTABLES=/usr/local/sbin/iptables
MODPROBE=/sbin/modprobe
IP=/sbin/ip
TC=/sbin/tc
$IPTABLES -t mangle -D PREROUTING -i ppp0 -j IMQ --todev 0 &> /dev/null
$IP link set imq0 down &> /dev/null
$MODPROBE -r imq &> /dev/null
if [ "$1" = "stop" ]
then
echo "stopping"
exit
fi
$MODPROBE imq numdevs=1
$IPTABLES -t mangle -I PREROUTING -i ppp0 -j IMQ --todev 0
$IP link set imq0 up
$TC qdisc add dev imq0 root handle 1:0 htb default 34
$TC class add dev imq0 parent 1:0 classid 1:1 htb rate 400kbit ceil
400kbit burst 6k
#### 1 ####
$TC class add dev imq0 parent 1:1 classid 1:32 htb rate 133kbit ceil
400kbit prio 1
$TC filter add dev imq0 protocol ip parent 1:0 prio 1 u32 match ip dst
192.168.0.2 flowid 1:32
#### 2 ####
$TC class add dev imq0 parent 1:1 classid 1:33 htb rate 133kbit ceil 400kbit
$TC filter add dev imq0 protocol ip parent 1:0 prio 1 u32 match ip dst
192.168.0.3 flowid 1:33
#### Default = traffic for local process ####
$TC class add dev imq0 parent 1:1 classid 1:34 htb rate 133kbit ceil 400kbit
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2004-10-29 22:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-28 16:55 [LARTC] HTB: Problem with excess bandwidth distribution Leslie Patrick Polzer
2004-10-28 17:20 ` Saad S. B. Faruque
2004-10-28 17:45 ` Zviad O. Giorgadze
2004-10-28 22:04 ` Andy Furniss
2004-10-29 6:11 ` Leslie Patrick Polzer
2004-10-29 11:17 ` Leslie Patrick Polzer
2004-10-29 15:29 ` Andy Furniss
2004-10-29 15:36 ` Leslie Patrick Polzer
2004-10-29 16:19 ` Jason Boxman
2004-10-29 17:40 ` Francisco Pereira
2004-10-29 22:03 ` Andy Furniss [this message]
2004-10-29 23:24 ` Andy Furniss
2004-10-31 12:03 ` 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=4182BE2E.1050307@dsl.pipex.com \
--to=andy.furniss@dsl.pipex.com \
--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.