Hello,
 
I have read most of the relevant emails already posted to the LARTC 
mailingilist and I have not found a solution to my problem.
 
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.
 
Here it is my setup:
 
/sbin/tc qdisc add dev eth0 root handle 1:0 htb default 1/sbin/tc class add dev 
eth0 parent 1:0 classid 1:1 htb rate 100mbit/sbin/tc class add dev eth0 parent 
1:1 classid 1:11 htb rate 512kbit ceil 512kbit/sbin/tc class add dev eth0 
parent 1:1 classid 1:12 htb rate 30mbit  ceil 30mbit
/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/sbin/iptables 
--table mangle --append POSTROUTING --out-interface eth0 --protocol tcp --sport 
80 --jump CLASSIFY --set-class 1:12
 
I have tried, without success, to mark the matching packets with iptables and 
redirect a marked packet to class 1:11:
 
/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
/sbin/tc filter add dev eth0 parent 0: prio 0 protocol ip handle 11 fw classid 
11
Any clue or ideas ? What I am doing wrong ? 
 
Thank you,
George
 
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Reply via email to