Martin Devera wrote: >you can use one htb here like: > >root (your full link, rate=ceil=256k) >\ > ssh+icmp leaf (prio=0 rate=50k ceil=256k) > http leaf (prio=1 rate=100k ceil=256k) > other leaf (prio=2 rate=100k ceil=256k) > >This is only example - I don't remember correct >numbers you want. In above ssh+icmp will go always >first as long as they are under 50k, then http >is priorized as long as it is in 100k limit .... > My first attempt was close to your example, like this: tc class add dev eth1 parent 1:0 classid 1:1 htb rate 626kbit ceil 628kbit burst 2k tc class add dev eth1 parent 1:1 classid 1:10 htb rate 388kbit ceil 400kbit burst 2k tc class add dev eth1 parent 1:10 classid 1:110 htb rate 32kbit ceil 32kbit burst 2k prio 1 tc qdisc add dev eth1 parent 1:110 handle 10:0 pfifo limit 10 tc class add dev eth1 parent 1:10 classid 1:120 htb rate 32kbit ceil 400kbit burst 2k prio 2 tc qdisc add dev eth1 parent 1:120 handle 12:0 sfq perturb 10 tc class add dev eth1 parent 1:10 classid 1:130 htb rate 112kbit ceil 400kbit burst 2k prio 3 tc qdisc add dev eth1 parent 1:130 handle 13:0 sfq perturb 10 I've tc-ed ICMP to be 1:110, ssh to be 1:120 and the rest 1:130. Guess what? Look at the following example, you can notice that although ICMP should be the highest prio, sometimes it's not. Maybe I've made, again, some mistakes or maybe prio from HTB needs more tuning... :) 64 bytes from 192.168.1.64: icmp_seq=60676 ttl=127 time=682 usec 64 bytes from 192.168.1.64: icmp_seq=60677 ttl=127 time=682 usec 64 bytes from 192.168.1.64: icmp_seq=60678 ttl=127 time=685 usec 64 bytes from 192.168.1.64: icmp_seq=60679 ttl=127 time=685 usec 64 bytes from 192.168.1.64: icmp_seq=60680 ttl=127 time=713 usec 64 bytes from 192.168.1.64: icmp_seq=60681 ttl=127 time=688 usec 64 bytes from 192.168.1.64: icmp_seq=60682 ttl=127 time=665 usec 64 bytes from 192.168.1.64: icmp_seq=60683 ttl=127 time=655 usec 64 bytes from 192.168.1.64: icmp_seq=60684 ttl=127 time=688 usec 64 bytes from 192.168.1.64: icmp_seq=60685 ttl=127 time=673 usec 64 bytes from 192.168.1.64: icmp_seq=60686 ttl=127 time=689 usec 64 bytes from 192.168.1.64: icmp_seq=60687 ttl=127 time=712 usec 64 bytes from 192.168.1.64: icmp_seq=60688 ttl=127 time=714 usec 64 bytes from 192.168.1.64: icmp_seq=60689 ttl=127 time=1.410 msec 64 bytes from 192.168.1.64: icmp_seq=60690 ttl=127 time=711 usec 64 bytes from 192.168.1.64: icmp_seq=60691 ttl=127 time=690 usec 64 bytes from 192.168.1.64: icmp_seq=60692 ttl=127 time=687 usec 64 bytes from 192.168.1.64: icmp_seq=60693 ttl=127 time=689 usec 64 bytes from 192.168.1.64: icmp_seq=60694 ttl=127 time=689 usec 64 bytes from 192.168.1.64: icmp_seq=60695 ttl=127 time=712 usec 64 bytes from 192.168.1.64: icmp_seq=60696 ttl=127 time=1.487 msec 64 bytes from 192.168.1.64: icmp_seq=60697 ttl=127 time=685 usec 64 bytes from 192.168.1.64: icmp_seq=60698 ttl=127 time=669 usec 64 bytes from 192.168.1.64: icmp_seq=60699 ttl=127 time=684 usec 64 bytes from 192.168.1.64: icmp_seq=60700 ttl=127 time=676 usec 64 bytes from 192.168.1.64: icmp_seq=60701 ttl=127 time=660 usec 64 bytes from 192.168.1.64: icmp_seq=60702 ttl=127 time=715 usec 64 bytes from 192.168.1.64: icmp_seq=60703 ttl=127 time=688 usec 64 bytes from 192.168.1.64: icmp_seq=60704 ttl=127 time=702 usec 64 bytes from 192.168.1.64: icmp_seq=60705 ttl=127 time=705 usec <--- From now on I start and stop 4 ftp transfers 64 bytes from 192.168.1.64: icmp_seq=60706 ttl=127 time=1.554 msec 64 bytes from 192.168.1.64: icmp_seq=60707 ttl=127 time=690 usec 64 bytes from 192.168.1.64: icmp_seq=60708 ttl=127 time=4.287 msec 64 bytes from 192.168.1.64: icmp_seq=60709 ttl=127 time=1.491 msec 64 bytes from 192.168.1.64: icmp_seq=60710 ttl=127 time=3.105 msec 64 bytes from 192.168.1.64: icmp_seq=60711 ttl=127 time=690 usec 64 bytes from 192.168.1.64: icmp_seq=60712 ttl=127 time=1.461 msec 64 bytes from 192.168.1.64: icmp_seq=60713 ttl=127 time=686 usec 64 bytes from 192.168.1.64: icmp_seq=60714 ttl=127 time=1.481 msec 64 bytes from 192.168.1.64: icmp_seq=60715 ttl=127 time=1.415 msec <-- I stop playing with ftp and let them flow 64 bytes from 192.168.1.64: icmp_seq=60716 ttl=127 time=1.295 msec 64 bytes from 192.168.1.64: icmp_seq=60717 ttl=127 time=713 usec 64 bytes from 192.168.1.64: icmp_seq=60718 ttl=127 time=688 usec 64 bytes from 192.168.1.64: icmp_seq=60719 ttl=127 time=652 usec 64 bytes from 192.168.1.64: icmp_seq=60720 ttl=127 time=921 usec 64 bytes from 192.168.1.64: icmp_seq=60721 ttl=127 time=828 usec 64 bytes from 192.168.1.64: icmp_seq=60722 ttl=127 time=671 usec 64 bytes from 192.168.1.64: icmp_seq=60723 ttl=127 time=684 usec 64 bytes from 192.168.1.64: icmp_seq=60724 ttl=127 time=716 usec 64 bytes from 192.168.1.64: icmp_seq=60725 ttl=127 time=717 usec 64 bytes from 192.168.1.64: icmp_seq=60726 ttl=127 time=670 usec 64 bytes from 192.168.1.64: icmp_seq=60727 ttl=127 time=681 usec 64 bytes from 192.168.1.64: icmp_seq=60728 ttl=127 time=695 usec 64 bytes from 192.168.1.64: icmp_seq=60729 ttl=127 time=680 usec 64 bytes from 192.168.1.64: icmp_seq=60730 ttl=127 time=1.416 msec 64 bytes from 192.168.1.64: icmp_seq=60731 ttl=127 time=713 usec 64 bytes from 192.168.1.64: icmp_seq=60732 ttl=127 time=695 usec 64 bytes from 192.168.1.64: icmp_seq=60733 ttl=127 time=691 usec 64 bytes from 192.168.1.64: icmp_seq=60734 ttl=127 time=675 usec 64 bytes from 192.168.1.64: icmp_seq=60735 ttl=127 time=782 usec 64 bytes from 192.168.1.64: icmp_seq=60736 ttl=127 time=662 usec 64 bytes from 192.168.1.64: icmp_seq=60737 ttl=127 time=660 usec 64 bytes from 192.168.1.64: icmp_seq=60738 ttl=127 time=662 usec 64 bytes from 192.168.1.64: icmp_seq=60739 ttl=127 time=711 usec 64 bytes from 192.168.1.64: icmp_seq=60740 ttl=127 time=684 usec 64 bytes from 192.168.1.64: icmp_seq=60741 ttl=127 time=681 usec 64 bytes from 192.168.1.64: icmp_seq=60742 ttl=127 time=675 usec 64 bytes from 192.168.1.64: icmp_seq=60743 ttl=127 time=669 usec 64 bytes from 192.168.1.64: icmp_seq=60744 ttl=127 time=672 usec 64 bytes from 192.168.1.64: icmp_seq=60745 ttl=127 time=1.454 msec You can see that every once and then prio from HTB misses some prio as long as lower traffic is constant in terms of number of connections; I can testify too that the traffic to the shaped class is still smoth; HTB has some problems when starting and stopping connections, watch my notice above. The listing above made me attempt to make a htb root and from there a PRIO with it's default 3 bands and each of then limited with HTBs... I quit after it looks like HTB doesn't like being a leaf of a PRIO's band. I've made the correction you suggested in the last mail but they were of no use. OTOH root HTB with PRIO and TBF on each leaf would make the band 0 *REALLY* prio, I'm sorry I don't have the listing with ICMP's you'll have to take my word for it ;-). Still in the second case (PRIO+TBF) FTP on the lower bands was very poor distributed in terms of who gets what amount of traffic; plus it was exactly like I thought, if you start 10 pings you drown the other bands... dilema!