From: "Tarek Amr" <tarekamr@haridy.com>
To: lartc@vger.kernel.org
Subject: [LARTC] The re-classifying
Date: Tue, 23 Jul 2002 08:14:19 +0000 [thread overview]
Message-ID: <marc-lartc-102741221920641@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 4603 bytes --]
Referring to Differentiated Services on Linux <draft-almesberger-wajhak-diffserv-linux-01.txt>
I read the examples there; they seem to be very helpful. Especially the last two ones of thee EF
But in my case I am working on an exterior node (packets are not marked yet)
Here is a brief description of my problem.
1. tc qdisc add dev eth0 handle 1:0 root dsmark indices 64 set_tc_index
2. tc class change dev eth0 parent 1:0 classid 1:1 dsmark mask 0x3 value 0xb8
3. tc class change dev eth0 parent 1:0 classid 1:2 dsmark mask 0x3 value 0x28
4. tc class change dev eth0 parent 1:0 classid 1:3 dsmark mask 0x3 value 0x30
5. tc class change dev eth0 parent 1:0 classid 1:4 dsmark mask 0x3 value 0x38
6. tc class change dev eth0 parent 1:0 classid 1:5 dsmark mask 0x3 value 0x48
7. tc class change dev eth0 parent 1:0 classid 1:6 dsmark mask 0x3 value 0x50
8. tc class change dev eth0 parent 1:0 classid 1:7 dsmark mask 0x3 value 0x58
9. tc class change dev eth0 parent 1:0 classid 1:8 dsmark mask 0x3 value 0x60
10. tc class change dev eth0 parent 1:0 classid 1:9 dsmark mask 0x3 value 0x70
11. tc class change dev eth0 parent 1:0 classid 1:a dsmark mask 0x3 value 0x78
12. tc class change dev eth0 parent 1:0 classid 1:b dsmark mask 0x3 value 0x88
13. tc class change dev eth0 parent 1:0 classid 1:c dsmark mask 0x3 value 0x90
14. tc class change dev eth0 parent 1:0 classid 1:d dsmark mask 0x3 value 0x98
15. tc qdisc add dev eth0 handle 2:0 parent 1:0 cbq bandwidth 10Mbit cell 8 avpkt 1000 mpu 64
16. tc class add dev eth0 classid 2:1 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 1 bounded allot 1514 weight 1 maxburst 21
17. tc class add dev eth0 classid 2:2 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 2 bounded allot 1514 weight 1 maxburst 21
18. tc class add dev eth0 classid 2:3 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 3 bounded allot 1514 weight 1 maxburst 21
19. tc class add dev eth0 classid 2:4 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 4 bounded allot 1514 weight 1 maxburst 21
20. tc class add dev eth0 classid 2:5 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 5 bounded allot 1514 weight 1 maxburst 21
21. tc class add dev eth0 classid 2:6 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 6 bounded allot 1514 weight 1 maxburst 21
22. tc class add dev eth0 classid 2:7 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 7 bounded allot 1514 weight 1 maxburst 21
23. tc class add dev eth0 classid 2:8 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 8 bounded allot 1514 weight 1 maxburst 21
24. tc class add dev eth0 classid 2:9 parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 9 bounded allot 1514 weight 1 maxburst 21
25. tc class add dev eth0 classid 2:a parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 10 bounded allot 1514 weight 1 maxburst 21
26. tc class add dev eth0 classid 2:b parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 11 bounded allot 1514 weight 1 maxburst 21
27. tc class add dev eth0 classid 2:c parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 12 bounded allot 1514 weight 1 maxburst 21
28. tc class add dev eth0 classid 2:d parent 2:0 cbq bandwidth 10Mbit rate 50Kbit avpkt 1000 prio 13 bounded allot 1514 weight 1 maxburst 21
29. etc.
So here in lines 1, 2, till 14 I made a rood qdisc “DSMARK” and put in it two “DSMARK” classes for marking 0xb8, and 0x28, etc
In lines 15, 16, till 28 I added a “CBQ”
Now I have no problem in making filters to classify the incoming traffic according to their IP header (u32, etc) and to point them to the “DSMARK” classes 1:1, and 1:2.
But I need to reclassify the packets within the “CBQ” again, according to the mark they had had.
The problem here that I tried to use a “TCINDEX” filter
E.g. tc filter add dev eth0 parent 2:0 protocol ip prio 1 tcindex handle 1 tcindex classid 2:1
This filter is supposed to point the traffic with the mark 0xb8 to classid 2:1
But when I added the rest of the filters to point to the classes 2:2, 2:3, 2:d .. only some of the filters worked well and the rest didn’t
Also in that “TCINDEX” filter, what value does that handle take? Is it in hex or decimal or is it just the marking classid or what?
BEST REGARDS
[-- Attachment #2: Type: text/html, Size: 31471 bytes --]
reply other threads:[~2002-07-23 8:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-102741221920641@msgid-missing \
--to=tarekamr@haridy.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.