From: =?windows-1252?Q?Tiago_Bruno_Esp=EDrito_Santo_Silva?= List-Id: References: <4169118F.5040400@students.fct.unl.pt> In-Reply-To: <4169118F.5040400@students.fct.unl.pt> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Thanks Alexis! So you are saying to me that it's better use TC instead of TCNG, i'll=20 try your idea thanks again! Alexis wrote: >First you need to mark the packet, mark is on the mangle table. >L7 is a match condition, so, in order to mark the packets this could be an >example > >Suppose eth0 as lan int and eth1 as wan and the linux box forwarding betwe= en >those interfaces > >The example to mark a packet, lets say with a pattern called bla1 > >iptables -t mangle -A POSTROUTING -m layer7 --l7proto bla1 -j MARK >--set-mark 55 > > >Now, you=92ve marked all packets with the pattern defined as bla1 in >/etc/protocols > >So, you must classify those packets. > >First create the qdisc > >tc disc add dev eth1 root handle 1: htb default 99 > >Now you must create the root htb class >tc class add dev eth1 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps = > >Now the class for your marked traffic with 90kbps of bw > >tc class add dev eth1 parent 1:1 classid 1:10 htb rate 90kbps ceil 90kbps > >Now the default class for other non marked traffic > >tc class add dev eth1 parent 1:1 classid 1:99 htb rate 10kbps ceil 10kbps > > >Now you must apply the filters to assing traffic to the classes > >tc filter add dev eth1 protocol ip parent 1: prio 0 handle 55 fw flowid 1:= 10 > > >And now, not mandatory but a good idea, add some discipline to the htb >classes (defaults are pfifo, but I prefer sfq) > >tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 >tc qdisc add dev eth1 parent 1:99 handle 10: sfq perturb 10 > >And that=92s it. Now try to generate some traffic and use tc -s -d class s= how >dev eth1 and check for the results. > >This example is very basic but I think it can help. > > >Regards > > > > > > >-----Mensaje original----- >De: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl] En >nombre de Tiago Bruno Esp=EDrito Santo Silva >Enviado el: Domingo, 10 de Octubre de 2004 7:40 >Para: lartc@mailman.ds9a.nl >Asunto: [LARTC] Use l7-filter in/and TCNG. > >Hello every one! > >I'm making a project to a discipline in the university and the project is >make a Linux router that grants QoS to Multimedia connections (the prof. s= ay >we can use Open Source Soft. :) or reinvent the wheel). I have been >googeling and googeling and i found the l7-filter in source forge and the >spectacular simple language that is TCNG. Well the problem is how can i ma= rk >packets with netfilter and l7-filter and after that make my HTBs with TCNG. >I have read the how to from TCNG (my English is not at 100%) and i see the >external program declaration but i think thats not it that i want! In the >l7-filter project they talk about TC but TCNG it much more simpler! >Can some one help me? (if there are any post in this mailing list about th= is >matter, please give me the link i couldn't find it :( ) > >Thanks in advance > >Tiago. > >_______________________________________________ >LARTC mailing list / LARTC@mailman.ds9a.nl >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > =20 > _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/