From: "Jan Coppens" <Jan.Coppens@intec.rug.ac.be>
To: lartc@vger.kernel.org
Subject: [LARTC] Ingress policing
Date: Fri, 01 Mar 2002 11:09:15 +0000 [thread overview]
Message-ID: <marc-lartc-101498104311743@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]
Hi all,
I'm working on a script that measures the incoming bandwidth and devides the traffic into different classes. First I mark all the incoming traffic with a firewall rule (fwmark = 1), then I use an ingress qdisc with some policers/filters to devide the traffic by setting the tc_index. I use the following script:
tc qdisc add dev eth1 handle ffff: ingress
tc filter add dev eth1 parent ffff: handle 1 protocol ip prio 1 estimator 1 2 fw police rate 0 burst 0 avrate 500bps continue flowid :28
tc filter add dev eth1 parent ffff: handle 1 protocol ip prio 2 estimator 1 2 fw police rate 0 burst 0 avrate 300bps continue flowid :30
tc filter add dev eth1 parent ffff: handle 1 protocol ip prio 3 estimator 1 2 fw police rate 0 burst 0 avrate 1bps drop flowid :50
This is the way I think it "should" work ;-) If the incoming traffic is below 500bps the tc_index gets the value 28. If the traffic is between 500bps and 800bps the tc_index gets the value of 30. Between 800bps and 801bps the tc_index is 50, above 801bps, all packets are dropped.
The policing works just fine, all packets are sent to the correct filters. The only thing that does not work is the tc_index stuff. The tc_index is allways 0 instead of 28, 30 or (in some cases) 50. What's going wrong here?
thx,
Jan
[-- Attachment #2: Type: text/html, Size: 2126 bytes --]
next reply other threads:[~2002-03-01 11:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-01 11:09 Jan Coppens [this message]
2002-03-06 14:19 ` [LARTC] Ingress policing Radosław Łoboda
2002-03-06 14:30 ` bert hubert
2002-03-07 11:17 ` Radosław Łoboda
2002-04-12 15:09 ` Jan Coppens
2002-04-14 10:19 ` bert hubert
2002-04-15 8:06 ` Jan Coppens
2002-12-28 11:32 ` [LARTC] ingress policing lartc
2002-12-28 12:02 ` Patrick McHardy
2004-01-13 22:26 ` Vinh Nguyen
2004-01-14 11:48 ` Andre Correa
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-101498104311743@msgid-missing \
--to=jan.coppens@intec.rug.ac.be \
--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