Greetings Rens, : I've been migrating an existing htb-based traffic shaper from a : hideous (I'm allowed to call it that - I wrote the damn atrocity : myself) tc shell script into a TCNG configuration file, and after : a few false starts I think I managed to get the syntax right. I know what you mean about "hideous" shell scripts to manage traffic control. They can quickly become rather horrid-looking. I'm a big fan of tcng for its simpler syntax. OK, so your problem actually has nothing to do with tcng, though. It is strictly an HTB-related matter. Summary of your problem? In HTB, rate is guaranteed. Longer description follows. : However, during tests it looks like some of the tiers aren't : passing their restrictions on to lower levels. In fact, it is quite the opposite. The embedded (or nested) tiers are taking more than you wish them to take. This will require a slight change in your configuration. : $business = class ( rate 20Mbps, ceil 20Mbps ) { : // list of business-class clients, including : $client1 = class ( rate 2Mbps, ceil 2Mbps ) { sfq; } : $client2 = class ( rate 2Mbps, ceil 2Mbps ) { sfq; } : } The above configuration basically says the following: $business is guaranteed access to 20Mbps, and no more than 20Mbps. $client1 is guaranteed access to 2Mbps, but no more than 2Mbps. $client2 is guaranteed access to 2Mbps, but no more than 2Mbps. This means that HTB is not even going to bother checking any dequeued rates against a borrowing model until $client1 or $client2 (each individually) reach 2Mbps usage. That's a total of 2Mbps per client. You have overcommitted. [ As a side note, when you set a child classes rate and ceil to the same value, you don't get the benefit of the bandwidth sharing. ] Now, what you describe tells me something very different. : When this setup was tested, both client 1 and client 2 received 2 : Mbps of bandwidth, so the attached filters worked properly. But : when the rate and ceil of $business was lowered to 2Mbps, both : client 1 and client 2 *still* received 2 Mbps, even when they : were simultaneously downloading. This is probably what you actually want: $business is guaranteed access to 2Mbps, and no more than 2Mbps. $client1 is guaranteed access to 800kbps, but no more than 2Mbps. $client2 is guaranteed access to 800kbps, but no more than 2Mbps. First, the two clients will each be guaranteed 800kbps. If they are both transmitting as fast as possible, then they are implicitly competing for the remaining 400kbps of the total 2Mbps. In HTB, an inner class (in your case, $business) will divide up the remaining available bandwidth between the various children, all the way up to its own ceiling (ceil). Now, try the following, and see how this works for you: $business = class ( rate 2Mbps, ceil 2Mbps ) { // list of business-class clients, including $client1 = class ( rate 800kbps, ceil 2Mbps ) { sfq; } $client2 = class ( rate 800kbps, ceil 2Mbps ) { sfq; } } I hope I have clarified the behaviour for you, but you may find more detail on the HTB borrowing (sharing) model in the user guide [0] and in a section in my Traffic Control HOWTO [1]. Good luck and happy shaping! -Martin [0] http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#sharing [1] http://tldp.org/HOWTO/Traffic-Control-HOWTO/classful-qdiscs.html#qc-htb-borrowing -- Martin A. Brown http://linux-ip.net/ _______________________________________________ LARTC mailing list LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc