This is a multipart message in MIME format. --=_alternative 0060F87203256EBD_= Content-Type: text/plain; charset="us-ascii" Hello people, This the first time i post in list. I read the lartc how-to and decided that IMQ with HTB was the solution to solve my problem. The ingress shaping i want is simple, shape the traffic to my ftp-server, i just want to give 8kbps to each client because they only upload to my ftp-server, and i dont want to any class borrowing, each client only send(upload) at 8kbps, not above this rate. I tested this: tc qdisc add dev imq0 root handle 1: htb tc class add dev imq0 parent 1: classid 1:1 htb rate 1Mbit tc class add dev imq0 parent 1:1 classid 1:10 htb rate 8kbps tc class add dev imq0 parent 1:1 classid 1:11 htb rate 8kbps tc qdisc add dev imq0 parent 1:10 handle 20:0 pfifo tc qdisc add dev imq0 parent 1:11 handle 21:0 pfifo tc filter add dev imq0 protocol ip pref 1 parent 1: handle 1 fw classid 1:10 tc filter add dev imq0 protocol ip pref 2 parent 1: handle 2 fw classid 1:11 iptables -t mangle -A PREROUTING -i eth0 -j IMQ iptables -t mangle -A PREROUTING -i eth0 -s 172.19.200.214 -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -i eth0 -s 172.19.200.100 -j MARK --set-mark 2 These worked perfect. Now i have some questions: When i use the filter command (tc filter add dev imq0 protocol ip pref 2 parent 1: handle 2 fw classid 1:11) , what this "handle" means?I understood that its the number of the mark, am i correct? Is there a better solution for my problem???I will create 300 classes , all below 1:1. Should i use sfq instead pfifo?I choose pfifo because i have connections from just one client. Thanks. --=_alternative 0060F87203256EBD_= Content-Type: text/html; charset="us-ascii" <br><font size=2 face="sans-serif">Hello people,</font> <br><font size=2 face="sans-serif">This the first time i post in list.</font> <br><font size=2 face="sans-serif">I read the lartc how-to and decided that IMQ with HTB was the solution to solve my problem.</font> <br><font size=2 face="sans-serif">The ingress shaping i want is simple, shape the traffic to my ftp-server, i just want to give 8kbps to each client because they only upload to my ftp-server, and i dont want to any class borrowing, each client only send(upload) at 8kbps, not above this rate.</font> <br> <br><font size=2 face="sans-serif">I tested this:</font> <br> <br><font size=2 face="sans-serif">tc qdisc add dev imq0 root handle 1: htb</font> <br><font size=2 face="sans-serif">tc class add dev imq0 parent 1: classid 1:1 htb rate 1Mbit</font> <br> <br><font size=2 face="sans-serif">tc class add dev imq0 parent 1:1 classid 1:10 htb rate 8kbps</font> <br><font size=2 face="sans-serif">tc class add dev imq0 parent 1:1 classid 1:11 htb rate 8kbps</font> <br> <br><font size=2 face="sans-serif">tc qdisc add dev imq0 parent 1:10 handle 20:0 pfifo</font> <br><font size=2 face="sans-serif">tc qdisc add dev imq0 parent 1:11 handle 21:0 pfifo</font> <br> <br><font size=2 face="sans-serif">tc filter add dev imq0 protocol ip pref 1 parent 1: handle 1 fw classid 1:10</font> <br><font size=2 face="sans-serif">tc filter add dev imq0 protocol ip pref 2 parent 1: handle 2 fw classid 1:11</font> <br> <br><font size=2 face="sans-serif">iptables -t mangle -A PREROUTING -i eth0 -j IMQ</font> <br><font size=2 face="sans-serif">iptables -t mangle -A PREROUTING -i eth0 -s 172.19.200.214 -j MARK --set-mark 1</font> <br><font size=2 face="sans-serif">iptables -t mangle -A PREROUTING -i eth0 -s 172.19.200.100 -j MARK --set-mark 2</font> <br> <br><font size=2 face="sans-serif">These worked perfect.</font> <br> <br><font size=2 face="sans-serif">Now i have some questions:</font> <br> <br><font size=2 face="sans-serif">When i use the filter command (tc filter add dev imq0 protocol ip pref 2 parent 1: handle 2 fw classid 1:11) , what this "handle" means?I understood that its the number of the mark, am i correct?</font> <br><font size=2 face="sans-serif">Is there a better solution for my problem???I will create 300 classes , all below 1:1.</font> <br><font size=2 face="sans-serif">Should i use sfq instead pfifo?I choose pfifo because i have connections from just one client.</font> <br> <br><font size=2 face="sans-serif">Thanks.</font> <br> <br> --=_alternative 0060F87203256EBD_=--