This is a multi-part message in MIME format.
------=_NextPart_000_0024_01C23334.D4D0E0D0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi everyone,
I am trying to set-up a scenario wherein a given traffic flow gets
certain QoS to begin with, and then is moved to another QoS class. Using
Linux RH7.0 kernel 2.2.16. I tried doing this using the "tc filter
change" and "tc filter replace" commands, but both don't seem to
work.
An example scenario is as follows:
***** Initial set-up ****
tc qdisc add dev eth0 handle 1:0 root htb default 1 r2q 1
tc class add dev eth0 parent 1:0 classid 1:1 htb rate \
64kbit ceil 64kbit burst 2k
tc qdisc add dev eth0 parent 1:1 handle 2:0 dsmark indices 64
tc class change dev eth0 classid 2:1 dsmark mask 0x3 value 0x68
tc class change dev eth0 classid 2:2 dsmark mask 0x3 value 0x48
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 1: \
u32 divisor 1
tc filter add dev eth0 parent 2:0 prio 1 u32 \
match ip src 10.0.41.2
match ip protocol 17 0xff
match ip dport 5000 0xffff
flowid 2:1
As shown above, initially the flow is marked with DSCP value 0x68
(confirmed using ethereal). Later, I need to move this flow to class
2:2, so that it gets marked with value 0x48. Using, "tc filter
replace"
to now classify the flow as 2:2 doesn't work, as the packets are still
marked as 0x68. Doing "tc filter show dev eth0" returns nothing! I am
not sure what I am doing wrong. Any help in this matter is appreciated.
Thanking in advance.
regards
Kaustubh
------=_NextPart_000_0024_01C23334.D4D0E0D0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2716.2200"
name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial
size=3D2>Hi=20
everyone,</FONT></SPAN></DIV>
<DIV><SPAN
class=3D802344720-24072002></SPAN> </DIV>
<DIV><SPAN
class=3D802344720-24072002> <FONT =
face=3DArial=20
size=3D2>I am trying to set-up a scenario wherein a given traffic flow =
gets=20
certain QoS to begin with, and then is moved to another QoS class. Using =
Linux=20
RH7.0 kernel 2.2.16. I tried doing this using the "tc filter change"
and =
"tc=20
filter replace" commands, but both don't seem to work. An example
=
scenario=20
is as follows:</FONT></SPAN></DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial
size=3D2>***** =
Initial set-up=20
****</FONT></SPAN></DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial
size=3D2>tc =
qdisc add dev=20
eth0 handle 1:0 root htb default 1 r2q 1<BR>tc class add dev eth0 parent =
1:0=20
classid 1:1 htb rate \<BR> 64kbit ceil 64kbit burst
2k<BR>tc qdisc =
add dev=20
eth0 parent 1:1 handle 2:0 dsmark indices 64<BR>tc class change dev eth0 =
classid=20
2:1 dsmark mask 0x3 value 0x68</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial
size=3D2>tc =
class change dev=20
eth0 classid 2:2 dsmark mask 0x3 value
0x48</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial
size=3D2>tc =
filter add dev=20
eth0 parent 2:0 protocol ip prio 1 handle 1: \<BR> u32 divisor=20
1</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial
size=3D2>tc =
filter add dev=20
eth0 parent 2:0 prio 1 u32 \<BR> match ip src =
10.0.41.2<BR> match ip=20
protocol 17 0xff<BR> match ip dport 5000 =
0xffff<BR> flowid=20
2:1</FONT></SPAN></DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial
size=3D2>As =
shown above,=20
initially the flow is marked with DSCP value 0x68 (confirmed using =
ethereal).=20
Later, I need to move this flow to class 2:2, so that it gets marked =
with value=20
0x48. Using, "tc filter replace" to now classify the flow as 2:2
doesn't =
work,=20
as the packets are still marked as 0x68. Doing "tc filter show dev
eth0" =
returns=20
nothing! I am not sure what I am doing wrong. Any help in this matter is =
appreciated.</FONT></SPAN></DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial =
size=3D2>Thanking in=20
advance.</FONT></SPAN></DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial=20
size=3D2>regards</FONT></SPAN></DIV>
<DIV><SPAN class=3D802344720-24072002><FONT face=3DArial=20
size=3D2>Kaustubh</FONT></SPAN></DIV></BODY></HTML>
------=_NextPart_000_0024_01C23334.D4D0E0D0--