<br><br><div><span class="gmail_quote">On 3/24/07, <b class="gmail_sendername">Andy Furniss</b> &lt;<a href="mailto:lists@andyfurniss.entadsl.com">lists@andyfurniss.entadsl.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Salatiel Filho wrote:<br><br>&gt;<br>&gt; Hi Andy , thanks again , but i am not understanding very well how to<br>&gt; do it [still newbie in this].&nbsp;&nbsp;Let`s try to change to some real code<br>&gt; here. This is part of my&nbsp;&nbsp;setup to shape download:
<br>&gt;<br>&gt; eth0 = EXTIF<br>&gt; eth1 = LOCALIF<br>&gt;<br>&gt; # SHAPE DOWNLOAD to LOCALNET NOT COMING FROM THE ROUTER ITSELF [samba<br>&gt; for example]<br>&gt; iptables -t mangle -s ! <a href="http://192.168.254.254">
192.168.254.254</a> -A POSTROUTING -o eth1 -j IMQ<br>&gt; --todev 1<br><br>If you shape your wan - eth0 using ifb on ingress or imq from prerouting<br>then you do not need any rules on eth1, the wan traffic will already be
<br>shaped.<br><br>If you do not plan on seperating users or interactive traffic from bulk<br>traffic, it would actually be much nicer to use a policer for ingress<br>wan traffic. Policing doesn&#39;t buffer traffic just drops it when a
<br>virtual buffer is full, so you won&#39;t be delaying interactive traffic by<br>queuing with bulk.<br><br>When you shape ingress wan, however you do it, you will need to<br>sacrifice about 20% of your bandwidth, possibly more depending on
<br>needs/traffic/wan speed. Shaping from the wrong end of the bottleneck is<br>better than doing nothing, but you can&#39;t do it perfectly.<br><br>&gt;<br>&gt; tc qdisc add dev imq1 root handle 1: htb&nbsp;&nbsp;default 3 r2q 1&nbsp;&nbsp; //
<br>&gt; DOWNLOAD SHAPER ROOT<br>&gt; tc class add dev imq1 parent 1: classid 1:1 htb rate 2048kbit quantum<br>&gt; 1500 //KNOWN TRAFFIC GOES HERE<br>&gt; tc class add dev imq1 parent 1: classid 1:3 htb rate 8kbit quantum
<br>&gt; 1500&nbsp;&nbsp;// DEFAULT CLASS VERYYYYY SLOWWWWWWW<br><br>If this were eth rather than imq you would be sending arp to a slow<br>class - not nice.<br><br>Andy.<br><br></blockquote></div><br>I was finally able to shape the router itself :) , i changed IMQ default behaviour to AFTER NAT in Prerouting and BEFORE NAT in Postrouting.
<br>I do not know if my setup is common , but i have some like this:<br><br><br>DOWNLOAD LINK&nbsp; [1024K]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt; HTB<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; PEOPLE [500k-1024ceil]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; guy1 [100k-1000ceil]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; guy2 [100k-1000ceil]
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; guy3 [100k-1000ceil]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; guy4 [100k-1000ceil]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; guy5 [100k-1000kceil] <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ROUTER[512k-1000ceil]&nbsp; -&gt; router and P2P BOX 24/7&nbsp; [Before be able to shape the router , i need to hard limit the download speed to not eat all bandwidth, now i can let it borrow if there is available bandwidth in the parent (DOWNLOAD LINK)] -&gt; I really need this 512k rate guaranteed in the router.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DEFAULT[8k-8k]&nbsp; -&gt; In theory should not be used by anyone :)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>But now i have a doubt , when a packet gets in too htb it will be queued , right ? If it is, is there a way to drop it if it is over the ceil limit ? I really do not want packets being queued `cause probably wiill&nbsp; delay the interactive traffic. Despite that , my setup is working great , that is just a doubt :)
<br><br clear="all"><br>-- <br>[]&#39;s<br>Salatiel<br><br>&quot;O maior prazer do inteligente é bancar o&nbsp;&nbsp;idiota <br>&nbsp;&nbsp; diante de um&nbsp;&nbsp;idiota que banca o inteligente&quot;.