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. say 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 mark 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 this 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/
Thanks Alexis! So you are saying to me that it''s better use TC instead of TCNG, i''ll 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 between >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’ve 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’s it. Now try to generate some traffic and use tc -s -d class show >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írito 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. say >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 mark >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 this >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/ > > > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
OK! But you are right what i want from TCNG (htbs) can be make with TC! And seems easy, tomorrow i''ll try what you said. Thanks again. Alexis wrote:>For sure im not saying this as a formula. I have like a policy that is >"don’t use it until you _really_ need it", as far I can understand, in your >case you can handle the issue with tc. > >Regards and good luck > > > >-----Mensaje original----- >De: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl] En >nombre de Tiago Bruno Espírito Santo Silva >Enviado el: Domingo, 10 de Octubre de 2004 12:14 >Para: LARTC@mailman.ds9a.nl >Asunto: Re: [LARTC] Use l7-filter in/and TCNG. > >Thanks Alexis! > >So you are saying to me that it''s better use TC instead of TCNG, i''ll 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 >>between 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’ve 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’s it. Now try to generate some traffic and use tc -s -d class >>show 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írito 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. say 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 mark 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 >>this 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/ >> >> >> >> >> >> > > >_______________________________________________ >LARTC mailing list / LARTC@mailman.ds9a.nl >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > > > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/