HTBSection: Linux (8)
Updated: 10 January 2002
Return to Main Contents
NAMEHTB - Hierarchy Token Bucket
SYNOPSIStc qdisc ... dev dev ( parent classid | root) [ handle major: ] htb [ default minor-id ]
tc class ... dev dev parent major:[minor] [ classid major:minor ] htb rate rate [ ceil rate ] burst bytes [ cburst bytes ] [ prio priority ]
DESCRIPTIONHTB is meant as a more understandable and intuitive replacement for the CBQ qdisc in Linux. Both CBQ and HTB help you to control the use of the outbound bandwidth on a given link. Both allow you to use one physical link to simulate several slower links and to send different kinds of traffic on different simulated links. In both cases, you have to specify how to divide the physical link into simulated links and how to decide which simulated link to use for a given packet to be sent.
Unlike CBQ, HTB shapes traffic based on the Token Bucket Filter algorithm which does not depend on interface characteristics and so does not need to know the underlying bandwidth of the outgoing interface.
SHAPING ALGORITHMShaping works as documented in tc-tbf (8).
CLASSIFICATIONWithin the one HRB instance many classes may exist. Each of these classes contains another qdisc, by default tc-pfifo(8).
When enqueueing a packet, HTB starts at the root and uses various methods to determine which class should receive the data.
In the absence of uncommon configuration options, the process is rather easy. At each node we look for an instruction, and then go to the class the instruction refers us to. If the class found is a barren leaf-node (without children), we enqueue the packet there. If it is not yet a leaf node, we do the whole thing over again starting from that node.
The following actions are performed, in order at each node we visit, until one sends us to another node, or terminates the process.
LINK SHARING ALGORITHMFIXME
QDISCThe root of a HTB qdisc class tree has the following parameters:
CLASSESClasses have a host of parameters to configure their operation.
NOTESDue to Unix timing constraints, the maximum ceil rate is not infinite and may in fact be quite low. On Intel, there are 100 timer events per second, the maximum rate is that rate at which 'burst' bytes are sent each timer tick. From this, the mininum burst size for a specified rate can be calculated. For i386, a 10mbit rate requires a 12 kilobyte burst as 100*12kb*8 equals 10mbit.
SEE ALSOtc(8) HTB website: http://luxik.cdi.cz/~devik/qos/htb/
AUTHORMartin Devera <email@example.com>. This manpage maintained by bert hubert <firstname.lastname@example.org>
This document was created by man2html, using the manual pages.
Time: 00:34:21 GMT, March 02, 2024