From: George Lefter <george.lefter@it-solutions.ro>
To: lartc@vger.kernel.org
Subject: [LARTC] u32 match ip dst not working with 2.4.22?
Date: Sun, 16 Nov 2003 14:08:34 +0000 [thread overview]
Message-ID: <marc-lartc-106899502615291@msgid-missing> (raw)
hi,
i have a simple configuration:
hostA(192.168.100.44) <-----> hostB(192.168.100.45).
I want to shape the traffic from hostB to hostA to a maximum of 10kbps:
hostB# tc qdisc add dev eth0 root handle 1:0 htb default 11
hostB# tc class add dev eth0 parent 1:0 classid 1:1 htb \
rate 200kbps ceil 200kbps
hostB# tc class add dev eth0 parent 1:1 classid 1:10 htb \
rate 10kbps ceil 10kbps
hostB# tc class add dev eth0 parent 1:1 classid 1:11 htb \
rate 100kbps ceil 100kbps
bostB# tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
match ip dst 192.168.100.44 flowid 1:10
With this setup, a wget run on hostA downloading from hostB has an
average rate of 97.74 KB/s - it seems to be classified to the default
classid 1:11, not classid 1:10. Also, the class statistics below show
traffic accounted to class 1:11.
tc details:
hostB# tc -d -s qdisc ls dev eth0
qdisc htb 1: r2q 10 default 11 direct_packets_stat 0 ver 3.12
Sent 1137520 bytes 1714 pkts (dropped 0, overlimits 2010)
hostB# tc -d -s class ls dev eth0
class htb 1:11 parent 1:1 prio 0 quantum 10240 rate 800Kbit ceil 800Kbit
burst 2623b/8 mpu 0b cburst 2623b/8 mpu 0b level 0
Sent 1071226 bytes 711 pkts (dropped 0, overlimits 0)
rate 33475bps 22pps
lended: 711 borrowed: 0 giants: 0
tokens: 7557 ctokens: 7557
class htb 1:1 root rate 1600Kbit ceil 1600Kbit burst 3647b/8 mpu 0b
cburst 3647b/8 mpu 0b level 7
Sent 1137520 bytes 1714 pkts (dropped 0, overlimits 0)
rate 35547bps 53pps
lended: 0 borrowed: 0 giants: 0
tokens: 14336 ctokens: 14336
class htb 1:10 parent 1:1 prio 0 quantum 1024 rate 80Kbit ceil 80Kbit
burst 1701b/8 mpu 0b cburst 1701b/8 mpu 0b level 0
Sent 66294 bytes 1003 pkts (dropped 0, overlimits 0)
rate 2071bps 31pps
lended: 1003 borrowed: 0 giants: 0
tokens: 125919 ctokens: 125919
hostB# tc -d -s filter ls dev eth0
filter parent 1: protocol ip pref 49152 u32
filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key
ht 800 bkt 0 flowid 1:10
match c0a8642c/ffffffff at 16
tc binary downloaded from
http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz.
hostB is a Slackware 9.1 running recompiled 2.4.22,
cls_u32 and sch_htb loaded as modules.
If instead of matching ip dst for hostA i match ip src for hostB,
it works as expected - rate is 10Kb/s with the following:
hostb# tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 \
match ip src 192.168.100.45 flowid 1:10
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2003-11-16 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-16 14:08 George Lefter [this message]
2003-11-17 23:39 ` [LARTC] u32 match ip dst not working with 2.4.22? George Lefter
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-106899502615291@msgid-missing \
--to=george.lefter@it-solutions.ro \
--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.