Hello... Im trying to setup HTB to allow me to shape traffic from two upstreams that meets on single lan0 interface. I prefer to use HTB qdisc within HTB root qdisc for cleaner rules design. Seems that it doesnt work at all. tc -s class show doesnt show any traffic on other classes attached to HTB qdisc. Linux 2.6.20.7 iproute-2.6.20-070313 Weird thing is that tc -s class show that 1: and 2: are both root class, where it is not true since they both have parent qdisc 1: or 2: and those qdisc arent root, they have parent class 10:11 or 10:12 (what tc -s qdisc show says). Is HTB qdisc within HTB qdisc is valid on newer kernels? If yes, what is wrong in this setup? This setup works fine when I use one HTB qdisc and many classes within classes. How it looks like: ------------------------------------------------------------------------------ ### lan0 ### tcq="tc qdisc add dev lan0" tcc="tc class add dev lan0" $tcq root handle 10: htb $tcc parent 10: classid 10:1 htb rate 100000Kbit # LAN $tcc parent 10:1 classid 10:10 htb rate 80000Kbit ceil 100000Kbit prio 7 $tcq parent 10:10 sfq limit 50 perturb 1 # from wan0 $tcc parent 10:1 classid 10:11 htb rate 2048Kbit prio 3 # from wan1 $tcc parent 10:1 classid 10:12 htb rate 10000Kbit prio 3 ### lan0 - from wan0 ### tcq="tc qdisc add dev lan0" tcc="tc class add dev lan0" $tcq parent 10:11 handle 1: htb $tcc parent 1: classid 1:1 htb rate 2048Kbit # SYN/minimal payload $tcc parent 1:1 classid 1:10 htb rate 128Kbit ceil 256Kbit prio 0 $tcq parent 1:10 pfifo limit 50 # DMZ $tcc parent 1:1 classid 1:14 htb rate 256Kbit ceil 1024Kbit prio 4 # telnet/SSH/IRC $tcc parent 1:14 classid 1:41 htb rate 64Kbit ceil 512Kbit prio 2 $tcq parent 1:41 pfifo limit 30 # UDP $tcc parent 1:14 classid 1:42 htb rate 64Kbit ceil 512Kbit prio 3 $tcq parent 1:42 pfifo limit 30 # generic NORMAL $tcc parent 1:14 classid 1:43 htb rate 64Kbit ceil 1024Kbit prio 5 $tcq parent 1:43 sfq limit 50 perturb 1 # generic BULK $tcc parent 1:14 classid 1:44 htb rate 64Kbit ceil 512Kbit prio 7 $tcq parent 1:44 sfq limit 50 perturb 1 ### lan0 - from wan1 ### tcq="tc qdisc add dev lan0" tcc="tc class add dev lan0" $tcq parent 10:12 handle 2: htb $tcc parent 2: classid 2:1 htb rate 10000Kbit # SYN/minimal payload $tcc parent 2:1 classid 2:10 htb rate 200Kbit ceil 500Kbit prio 0 $tcq parent 2:10 pfifo limit 50 # gw traffic $tcc parent 2:1 classid 2:11 htb rate 200Kbit ceil 500Kbit prio 2 $tcq parent 2:11 pfifo limit 20 # DMZ $tcc parent 2:1 classid 2:13 htb rate 3000Kbit ceil 5000Kbit prio 4 # telnet/SSH/IRC $tcc parent 2:13 classid 2:31 htb rate 300Kbit ceil 500Kbit prio 2 $tcq parent 2:31 pfifo limit 30 # UDP $tcc parent 2:13 classid 2:32 htb rate 700Kbit ceil 1000Kbit prio 3 $tcq parent 2:32 pfifo limit 30 # generic NORMAL $tcc parent 2:13 classid 2:33 htb rate 2000Kbit ceil 5000Kbit prio 5 $tcq parent 2:33 sfq limit 50 perturb 1 # generic BULK $tcc parent 2:13 classid 2:34 htb rate 1000Kbit ceil 2000Kbit prio 7 $tcq parent 2:34 sfq limit 50 perturb 1 ------------------------------------------------------------------------------ # tc -s class show dev lan0 class htb 10:1 root rate 100000Kbit ceil 100000Kbit burst 126599b cburst 126599b Sent 68351264 bytes 527234 pkt (dropped 0, overlimits 0 requeues 0) rate 464bit 0pps backlog 0b 0p requeues 0 lended: 0 borrowed: 0 giants: 1924 tokens: 10118 ctokens: 10118 class htb 10:10 parent 10:1 leaf 825b: prio 7 rate 80000Kbit ceil 100000Kbit burst 101599b cburst 126599b Sent 68348547 bytes 527215 pkt (dropped 0, overlimits 0 requeues 0) rate 576bit 0pps backlog 0b 0p requeues 0 lended: 527215 borrowed: 0 giants: 1924 tokens: 10147 ctokens: 10118 class htb 10:11 parent 10:1 leaf 1: prio 3 rate 2048Kbit ceil 2048Kbit burst 4159b cburst 4159b Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 lended: 0 borrowed: 0 giants: 0 tokens: 16249 ctokens: 16249 class htb 10:12 parent 10:1 leaf 2: prio 3 rate 10000Kbit ceil 10000Kbit burst 1 4099b cburst 14099b Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 lended: 0 borrowed: 0 giants: 0 tokens: 11280 ctokens: 11280 class htb 1:1 root rate 2048Kbit ceil 2048Kbit burst 4159b cburst 4159b Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 lended: 0 borrowed: 0 giants: 0 tokens: 16249 ctokens: 16249 class htb 1:14 parent 1:1 rate 256000bit ceil 1024Kbit burst 1919b cburst 2879b Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 lended: 0 borrowed: 0 giants: 0 tokens: 60000 ctokens: 22500 class htb 2:1 root rate 10000Kbit ceil 10000Kbit burst 14099b cburst 14099b Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 lended: 0 borrowed: 0 giants: 0 tokens: 11280 ctokens: 11280 class htb 2:13 parent 2:1 rate 3000Kbit ceil 5000Kbit burst 5349b cburst 7849b Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) rate 0bit 0pps backlog 0b 0p requeues 0 lended: 0 borrowed: 0 giants: 0 tokens: 14266 ctokens: 12560 # tc -s qdisc show dev lan0 qdisc htb 10: r2q 10 default 0 direct_packets_stat 10390983 Sent 4202459134 bytes 10919087 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 qdisc htb 1: parent 10:11 r2q 10 default 0 direct_packets_stat 0 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 qdisc htb 2: parent 10:12 r2q 10 default 0 direct_packets_stat 0 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 Regards, Borg