<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Hello,<BR>
<BR>
I have read most of the relevant emails already posted to the LARTC mailingilist and I have not found a solution to my problem.<BR>
<BR>
What I am trying to do is: limit the HTTP output traffic to 30Mbps and also to limit each HTTP connection at 512Kbps, if the client downloads more than 1MB. I have managed to limit the total traffic but not the traffic of each HTTP connection.<BR>
<BR>
Here it is my setup:<BR>
<BR>
/sbin/tc qdisc add dev eth0 root handle 1:0 htb default 1<BR>/sbin/tc class add dev eth0 parent 1:0 classid 1:1 htb rate 100mbit<BR>/sbin/tc class add dev eth0 parent 1:1 classid 1:11 htb rate <FONT face="">512kbit</FONT> ceil 512kbit<BR>/sbin/tc class add dev eth0 parent 1:1 classid 1:12 htb rate <FONT face="">30mbit</FONT> ceil 30mbit<BR><BR>
/sbin/iptables --table mangle --append POSTROUTING --out-interface eth0 --protocol tcp --sport 80 -m connbytes --connbytes 1024000: --connbytes-dir reply --connbytes-mode bytes --jump CLASSIFY --set-class 1:11<BR>/sbin/iptables --table mangle --append POSTROUTING --out-interface eth0 --protocol tcp --sport 80 --jump CLASSIFY --set-class 1:12<BR>
<BR>
I have tried, without success, to mark the matching packets with iptables and redirect a marked packet to class 1:11:<BR>
<BR>
/sbin/iptables --table mangle --append POSTROUTING --out-interface eth0 --protocol tcp --sport 80 -m connbytes --connbytes 1024000: --connbytes-dir reply --connbytes-mode bytes --jump MARK --set-mark 11<BR>
/sbin/tc filter add dev eth0 parent 0: prio 0 protocol ip handle 11 fw classid 11<BR>
<BR>Any clue or ideas ? What I am doing wrong ? <BR>
<BR>
Thank you,<BR>
George<BR>
<BR><br /><hr />Hotmail to go? Get your Hotmail, news, sports and much more! <a href='http://mobile.msn.com' target='_new'>Check out the New MSN Mobile</a></body>
</html>