<div>1.</div>
<div>
<div>lines:</div>
<div>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 1<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 &nbsp;-j IMQ --todev 1<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.1.0/24 -j MARK
<br>--set-mark 10<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.2.0/24 -j MARK<br>--set-mark 20</div></div>
<div>&nbsp;</div>
<div>should be in this order:</div>
<div>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.1.0/24 -j MARK<br>--set-mark 10<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.2.0/24 -j MARK<br>--set-mark 20</div>
<div>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 1<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 &nbsp;-j IMQ --todev 1<br>&nbsp;</div>
<div>3. performance fix</div>
<div>/sbin/tc class add dev imq1 parent 2: classid 2:1 htb rate 768Kbit</div>
<div>doesnt have CEIL defined? it has to have it defined so your modem wont queue packets, making your latency go to meet the sky :-) set it to 90-95% of the bandwidth your modem can do</div>
<div>
<div>/sbin/tc class add dev imq1 parent 2: classid 2:1 htb rate 768Kbit ceil 1000kbit</div></div>
<div>&nbsp;</div>
<div>4. performance fix</div>
<div>put some leaf qdisc like SFQ.</div>
<div>/sbin/tc qdisc add sfq parent id 2:20 handle 20 : sfq perturb 10</div>
<div>&nbsp;</div>
<div>5. performance fix</div>
<div>in the classes 2:10 and 2:20 you're using only 256kbit of RATE. change it so their sum is the rate of their parent. <br>&nbsp;</div>
<div><span class="gmail_quote">On 5/18/05, <b class="gmail_sendername">Rio Martin.</b> &lt;<a href="mailto:rio@martin.mu">rio@martin.mu</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Folks,<br>I'm so surprised what happened to my box just in the few weeks lately.<br>Here is my setup:<br><br>
INTERNET &lt;----------&gt; [eth0] SHAPER-BOX [eth1] &lt;----------&gt; USER-FARM<br>both eth0 &amp; eth1 got public ips (202.x.x.x)<br><br>Why traffic monitored at eth0 is bigger than eth1 ?<br>eth1 shaped just exactly the same as rate i defined in HTB.
<br><br>I just have 1024Kbps from my ISP and i defined the total parent rate for<br>768Kbps. But what happened is the traffic monitored at eth0 almost all the<br>time eating all the bandwidth we have.<br><br># DOWNSTREAM 768Kbps
<br>/sbin/ip link set imq1 up<br>/sbin/tc qdisc add dev imq1 root handle 2: htb default 0<br>/sbin/tc class add dev imq1 parent 2: classid 2:1 htb rate 768Kbit<br>/sbin/tc class add dev imq1 parent 2:1 classid 2:10 htb rate 128kbit ceil
<br>768kbit<br>/sbin/tc class add dev imq1 parent 2:1 classid 2:20 htb rate 128kbit ceil<br>768kbit<br>/sbin/tc filter add dev imq1 parent 2: protocol ip handle 10 fw classid 2:10<br>/sbin/tc filter add dev imq1 parent 2: protocol ip handle 20 fw classid 2:20
<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 1<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0&nbsp;&nbsp;-j IMQ --todev 1<br><br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.1.0/24 -j MARK
<br>--set-mark 10<br>/usr/sbin/iptables -t mangle -A PREROUTING -i eth0 -d 202.x.2.0/24 -j MARK<br>--set-mark 20<br><br>Please help me analyze whats wrong.<br>Thank you.<br><br>Regards,<br>Rio Martin.<br>_______________________________________________
<br>LARTC mailing list<br><a href="mailto:LARTC@mailman.ds9a.nl">LARTC@mailman.ds9a.nl</a><br><a href="http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc">http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc</a><br></blockquote>
</div><br><br><br>-- <br>Miłego Dnia<br>Krystian Antoni