From: "Ming-Ching Tiew" Date: Mon, 05 Feb 2007 10:11:41 +0000 Subject: [LARTC] Re: tc filter matches ip fileds inside pppoe frames Message-Id: <027101c7490e$07d9c2f0$0100a8c0@MingChing> MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPartTM-000-e9f60807-c410-4aff-91a5-d7799aa8186a" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPartTM-000-e9f60807-c410-4aff-91a5-d7799aa8186a Content-Type: multipart/alternative; boundary="----=_NextPart_000_026E_01C74951.15EC6120" ------=_NextPart_000_026E_01C74951.15EC6120 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Resent using text insted of html. ----- Original Message -----=20 From: Ming-Ching Tiew=20 To: lartc@mailman.ds9a.nl=20 Sent: Monday, February 05, 2007 9:28 AM Subject: tc filter matches ip fileds inside pppoe frames I have a requirement which I guess it is not too unusually, however I = haven't=20 quite figured out how to do it and couldn't find any examples which = handle that. I have made myself a Linux-based bridge, eth0 bridged with eth1 to form br0. In this bridge, I run 'tc' script to handle QoS. So far nothing unusual. However, what's different is that this bridge is sitted in between a = pppoe client=20 and pppoe server, ie pppoe frames are bridge between the Linux bridge, = and=20 I am interested to perform QoS on the pppoe frames, based on the ip = tos setting=20 of the ppp packets ( encapsulated inside the pppoe frames ). For example, normal tc script :- tc filter add dev ppp0 parent 1:0 prio 10 u32 \ match ip tos 0x10 0xff \ flowid 1:4 This will work on a ppp0 device because the ppp0 has ip packets = flowing through=20 it. Now in my bridge, there is no such device, I only have access to = eth0 or eth1, how could I perform the same thing on devices such as eth0 or eth1, = but matching=20 the ip TOS setting inside the pppoe frame ? Best regards. ------=_NextPart_000_026E_01C74951.15EC6120 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Resent using text insted of = html.
----- Original Message -----
From:=20 Ming-Ching Tiew
To: lartc@mailman.ds9a.nl
Sent: Monday, February 05, 2007 = 9:28=20 AM
Subject: tc filter matches ip = fileds=20 inside pppoe frames

I have a requirement which I guess it = is not too=20 unusually, however I haven't =
quite figured out how to do it and = couldn't=20 find any examples which handle=20 that.
 
I have made myself a Linux-based = bridge, eth0=20 bridged with
eth1 to form br0.
 
In this bridge, I run 'tc' script to = handle=20 QoS.
 
So far nothing unusual.
 
However, what's different is that = this bridge is=20 sitted in between a pppoe = client=20
and pppoe server, ie pppoe frames = are bridge between the Linux bridge, and =
I am interested to=20 perform QoS on the pppoe frames, based on = the ip tos setting
of the ppp packets ( encapsulated = inside=20 the pppoe frames ).
 
For example,=20 normal tc script :-

tc filter=20 add dev ppp0 parent 1:0 prio 10 u32 \
 =20    match ip tos 0x10 0xff \
  =  =20  flowid 1:4

This will work on a ppp0 device = because the ppp0=20 has ip packets flowing through =
it. Now in my bridge, there = is no such device, I only have access to eth0 or = eth1,
how could I perform the same thing on = devices=20 such as eth0 or eth1, but matching
the ip TOS setting=20 inside the pppoe frame ?
 
Best regards.
 
 
------=_NextPart_000_026E_01C74951.15EC6120-- ------=_NextPartTM-000-e9f60807-c410-4aff-91a5-d7799aa8186a Content-Type: text/plain; name="InterScan_SafeStamp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_SafeStamp.txt" ****** Message from InterScan E-Mail VirusWall NT ****** ** No virus found in attached file noname.htm ** No virus found in attached file noname.htm This mail has been scanned by InterScan. ***************** End of message *************** ------=_NextPartTM-000-e9f60807-c410-4aff-91a5-d7799aa8186a Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc ------=_NextPartTM-000-e9f60807-c410-4aff-91a5-d7799aa8186a--