1) IMQ basic test ip link set imq0 up ip link set imq1 up iptables -F -t mangle iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 0 iptables -t mangle -A POSTROUTING -o eth0 -j IMQ --todev 1 iptables -L -t mangle -vn Should give output like: Chain PREROUTING (policy ACCEPT 189 packets, 13724 bytes) pkts bytes target prot opt in out source destination 189 13724 IMQ all -- eth0 * 0.0.0.0/0 0.0.0.0/0 IMQ: todev 0 ** omitted ** Chain POSTROUTING (policy ACCEPT 133 packets, 17244 bytes) pkts bytes target prot opt in out source destination 27 2484 IMQ all -- * eth0 0.0.0.0/0 0.0.0.0/0 IMQ: todev 1 2) layer7 basic test iptables -F -t mangle iptables -t mangle -A PREROUTING -m layer7 --l7proto http -j CONNMARK --set-mark 1 iptables -t mangle -A PREROUTING -m connmark --mark 1 -j CONNMARK --restore-mark iptables -L -t mangle -vn Should give output like: Chain PREROUTING (policy ACCEPT 10097 packets, 1044K bytes) pkts bytes target prot opt in out source destination 0 0 CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 LAYER7 l7proto http CONNMARK xset 0x1/0xffffffff 0 0 CONNMARK all -- * * 0.0.0.0/0 0.0.0.0/0 connmark match 0x1 CONNMARK restore ** omitted ** 3) imq/htb/esfq test ip link set imq0 up iptables -F -t mangle iptables -t mangle -A POSTROUTING -o eth0 -j IMQ --todev 0 tc qdisc del root dev imq0 tc qdisc add dev imq0 root handle 1:0 htb default 3 tc class add dev imq0 parent 1:0 classid 1:1 htb rate 1024kbit quantum 1500 tc class add dev imq0 parent 1:1 classid 1:2 htb rate 256kbit ceil 256kbit quantum 1500 tc qdisc add dev imq0 parent 1:2 esfq perturb 10 hash src tc class add dev imq0 parent 1:1 classid 1:3 htb rate 512kbit ceil 512kbit quantum 1500 tc qdisc add dev imq0 parent 1:3 esfq perturb 10 hash src tc filter add dev imq0 protocol ip parent 1:0 u32 match ip sport 80 0xffff flowid 1:2 tc filter add dev imq0 protocol ip parent 1:0 u32 match ip sport 22 0xffff flowid 1:3 Should give no errors, traffic measured FROM server TO client should be: - 256kbps for http (80 port) - 512kbps for ssh (22 port) and other traffic through eth0 interface. Traffic FROM client TO server should be UNLIMITED. 4) imq/hfsc/esfq test ip link set imq0 up iptables -F -t mangle iptables -t mangle -A POSTROUTING -o eth0 -j IMQ --todev 0 tc qdisc del root dev imq0 tc qdisc add dev imq0 root handle 1:0 hfsc default 3 tc class add dev imq0 parent 1:0 classid 1:1 hfsc ls m2 1024kbit ul m2 1024kbit tc class add dev imq0 parent 1:1 classid 1:2 hfsc ls m2 512kbit ul m1 512kbit d 10s m2 256kbit tc qdisc add dev imq0 parent 1:2 esfq perturb 10 hash src tc class add dev imq0 parent 1:1 classid 1:3 hfsc ls m2 512kbit ul m1 256kbit d 5s m2 512kbit tc qdisc add dev imq0 parent 1:3 esfq perturb 10 hash src tc filter add dev imq0 protocol ip parent 1:0 u32 match ip sport 80 0xffff flowid 1:2 tc filter add dev imq0 protocol ip parent 1:0 u32 match ip sport 22 0xffff flowid 1:3 Should give no errors, traffic measured FROM server TO client should be: - 512kbps in 10 seconds and 256kbps in other time for http (80 port) - 256kbps in 5 seconds and 512kbps in other time for ssh (22 port) and other traffic through eth0 interface. Traffic FROM client TO server should be UNLIMITED like in htb test. A LITTLE TIP: Don't forget to run: iptables -F -t mangle tc qdisc del root dev imq0 after htb/hfsc test. thanks, yarzombo