<html><head><meta name="Generator" content="PocoMail 3 HTML/CSS Generator"/>
<style type="text/css"><!--
LI{display:list-item;margin:0.00in;}
p{display:block;margin:0.00in;}
body{}
--></style>
</head><BODY ><p><SPAN style="font-family:'Tahoma';font-size:10pt;">That's great.</SPAN></p>
<p> </p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">Maybe i will ask a nonsense question.</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">Let go then :</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">Sip uses RTP right ? So  open a SIP channel 5060 i have alot of RTP packets .</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">Did i don't need mark this RTP packets too ?? </SPAN></p>
<p> </p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">I mean IAX2 use RTP  ? In you script i see that i MARK IAX2 then i can control the rate and give</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">to my VOIP connection more priority then the other services, (Web,Mail,FTP etc), always making the voip connection the best possible.</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">That's great, awesome!</SPAN></p>
<p> </p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">But in your script ? If i  change this : </SPAN></p>
<p> </p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> iptables -t mangle ${IPTOP} PREROUTING -p udp -m udp --dport 4569 -</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> j MARK --set-mark 0x1</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> iptables -t mangle ${IPTOP} PREROUTING -p udp -m udp --dport 4569 -</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> j RETURN</SPAN></p>
<p> </p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;">to this ?</SPAN></p>
<p> </p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> iptables -t mangle ${IPTOP} PREROUTING -p udp -m udp --dport 5060 -</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> j MARK --set-mark 0x1</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> iptables -t mangle ${IPTOP} PREROUTING -p udp -m udp --dport 5060 -</SPAN></p>
<p><SPAN style="font-family:'Tahoma';font-size:10pt;"> j RETURN</SPAN></p>
<p> </p>
<p><SPAN style="font-size:10pt;">All my SIP connections will receive now the best priority in the link ??</SPAN></p>
<p><SPAN style="font-size:10pt;">Sorry the question again but and the RTP packets ???</SPAN></p>
<p> </p>
<p><SPAN style="font-size:10pt;">Can with this script give from my link 512up and 512down 90% to Voip when used and let the rest (Web,FTP,Mail), with the rest 10%, so when the VoIP finish give more to the others services???</SPAN></p>
<p> </p>
<p><SPAN style="font-size:10pt;">Anyway thanks alot for the answer !</SPAN></p>
<p> </p>
<p><SPAN style="font-size:10pt;">Carlos.</SPAN></p>
<p> </p>
<p><SPAN style="font-size:10pt;"><br /><br />On Tue, 1 Jun 2004 09:30:29 -0400, Andrew Kohlsmith wrote:<br /></SPAN><SPAN style="font-size:10pt;color:navy;">> On Tuesday 01 June 2004 05:44, joachim wrote:</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:maroon;">>> Do you have a working firewall ruleset for HTB, optimized for</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:maroon;">>> voip ?</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:maroon;">>></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> Here, for your viewing pleasure, is my htb script.  I am *positive*</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> it can be improved upon.  I found I had to put the bulk traffic in</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> a separate HTB "branch" or otherwise it would tend to borrow from</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> the VOIP branch way too early and cause a lot of stutter.</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> Again, this isn't to be taken as an official, proven and perfect</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> system.  I am welcome to any suggestions or improvements.  As you</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> can see from the diagram I am planning on doing some more fine</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tuning, but it works pretty damned well as is.  My next post will</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> be the Cisco 2610's configuration on the other side of the link.</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> Regards,</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> Andrew</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #!/bin/sh</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> TCOP="add"</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> IPTOP="-A"</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> if [ "$1" == "stop" ]; then</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> echo "Stopping..."</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> TCOP="del"</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> IPTOP="-D"</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> fi</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #          +---------+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #          | root 1: |</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #          +---------+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #               |</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # +----------------------------+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # |         class 1:1          |</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # +----------------------------+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #   |           |           |</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # +----+      +----+      +----+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # |1:10|      |1:20|      |1:30|</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # +----+      +----+      +----+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #               |</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #      +--------+--------+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #      |        |        |</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #   +-----+  +-----+  +-----+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #   |1:100|  |1:101|  |1:102|</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #   +-----+  +-----+  +-----+</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # 1:10 is the class for VOIP traffic, pfifo qdisc</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # 1:20 is for bulk traffic (htb, leaves use sfq)</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # 1:30 is the class that interactive and TCP SYN/ACK traffic (sfq</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> qdisc)</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # 1:20 is further split up into different kinds of bulk traffic:</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> web, mail and # everything else.  1:100-102 fight amongst</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> themselves for their slice of excess</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # bandwidth, and in turn 1:10,20 and 30 then fight for any excess</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> above their # minimum rates.</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # which interface to throw all this on (DSL)</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> IF=eth2</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # ciel is 75% of max rate (768kbps)</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # rate is 65% of max rate</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # we don't let it go to 100% because we don't want the DSL modems</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> to have a ton</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # of packets in their buffers.  *we* want to do the buffering.</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> RATE=576</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> CEIL=640</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #RATE=450</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> #CEIL=500</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc qdisc ${TCOP} dev ${IF} root handle 1: htb default 102</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc class ${TCOP} dev ${IF} parent 1:   classid 1:1 htb rate</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> ${RATE}kbit ceil ${CEIL}kbit</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc class ${TCOP} dev ${IF} parent 1:1  classid 1:10 htb rate 64kbit</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> ceil ${RATE}kbit prio 1</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc class ${TCOP} dev ${IF} parent 1:1  classid 1:20 htb rate 64kbit</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> ceil ${RATE}kbit prio 2</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc class ${TCOP} dev ${IF} parent 1:20 classid 1:100 htb rate</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> ${RATE}kbit tc class ${TCOP} dev ${IF} parent 1:20 classid 1:101</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> htb rate ${RATE}kbit tc class ${TCOP} dev ${IF} parent 1:20 classid</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> 1:102 htb rate ${RATE}kbit</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc qdisc ${TCOP} dev ${IF} parent 1:10  handle 10:  pfifo</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc qdisc ${TCOP} dev ${IF} parent 1:100 handle 100: sfq perturb 10</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc qdisc ${TCOP} dev ${IF} parent 1:101 handle 101: sfq perturb 10</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc qdisc ${TCOP} dev ${IF} parent 1:102 handle 102: sfq perturb 10</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc filter ${TCOP} dev ${IF} parent 1:0 protocol ip prio 1 handle 1</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> fw classid 1:10</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> tc filter ${TCOP} dev ${IF} parent 1:0 protocol ip prio 4 handle 4</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> fw classid 1:100</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # IAX2 prio 0.</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> iptables -t mangle ${IPTOP} PREROUTING -p udp -m udp --dport 4569 -</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> j MARK --set-mark 0x1</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> iptables -t mangle ${IPTOP} PREROUTING -p udp -m udp --dport 4569 -</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> j RETURN</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> # everything else goes into lowest priority (best effort).</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> iptables -t mangle ${IPTOP} PREROUTING -j MARK --set-mark 0x4</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> iptables -t mangle ${IPTOP} OUTPUT -j MARK --set-mark 0x4</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> _______________________________________________</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> Asterisk-Users mailing list</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> Asterisk-Users@lists.digium.com</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> To UNSUBSCRIBE or update options visit:</SPAN><SPAN style="font-size:10pt;"><br /></SPAN><SPAN style="font-size:10pt;color:navy;">> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></SPAN><SPAN style="font-size:10pt;"><br /><br /></SPAN></p>
</body></html>