.\" Automatically generated by Pandoc 3.1.3 .nh .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "fireqos-params-class" "5" "Built 30 Mar 2024" "FireQOS Reference" "3.1.7" .hy .SH NAME .PP fireqos-params-class - optional class parameters .SH SYNOPSIS .PP rate | commit | min \f[I]speed\f[R] .PP ceil | max \f[I]speed\f[R] .PP minrate \f[I]speed\f[R] .PP { qdisc \f[I]qdisc-name\f[R] | pfifo|bfifo|sfq|fq_codel|codel|none } [options \[lq]\f[I]qdisc-options\f[R]\[rq]] .PP prio { 0..7 | keep | last } .PP { linklayer \f[I]linklayer-name\f[R] } | { adsl {local|remote} \f[I]encapsulation\f[R] } | ethernet | atm .PP mtu \f[I]bytes\f[R] .PP mpu \f[I]bytes\f[R] .PP tsize \f[I]size\f[R] .PP overhead \f[I]bytes\f[R] .PP r2q \f[I]factor\f[R] .PP burst \f[I]bytes\f[R] .PP cburst \f[I]bytes\f[R] .PP quantum \f[I]bytes\f[R] .PP priority | balanced .PP input | output .SH DESCRIPTION .PP All of the options apply to \f[V]interface\f[R] and \f[V]class\f[R] statements. .PP Units for speeds are defined in fireqos.conf(5). .SS input, output .PP For \f[V]bidirectional\f[R] interfaces, \f[V]input\f[R] and \f[V]output\f[R] define the direction for which the parameters following it are applied. .PP Only the following parameters are affected (all the others are applied to both input and output): .IP \[bu] 2 \f[V]minrate\f[R] .IP \[bu] 2 \f[V]rate\f[R], \f[V]min\f[R], \f[V]commit\f[R] .IP \[bu] 2 \f[V]ceil\f[R], \f[V]max\f[R] .PP If one of the above is not defined for either \f[V]input\f[R] or \f[V]output\f[R], its default will be used. .SS rate, commit, min .PP When a committed rate of \f[I]speed\f[R] is provided to a class, it means that the bandwidth will be given to the class when it needs it. If the class does not need the bandwidth, it will be available for any other class to use. .RS .PP For interfaces, a rate must be defined. .RE .RS .PP For classes the rate defaults to 1/100 of the interface capacity. .RE .SH ceil, max .PP Defines the maximum \f[I]speed\f[R] a class can use. Even there is available bandwidth, a class will not exceed its ceil speed. .PP For interfaces, the default is the \f[V]rate\f[R] speed of the interface. .PP For classes, the defaults is the \f[V]ceil\f[R] of the their interfaces. .SS minrate .PP Defines the default committed \f[I]speed\f[R] for all classes not specifically given a rate in the config file. It forces a recalculation of tc(8) r2q. .PP When minrate is not given, FireQOS assigns a default value of 1/100 of the interface \f[V]rate\f[R]. .SS qdisc \f[I]qdisc-name\f[R], pfifo, bfifo, sfq, fq_codel, codel, none .PP The qdisc defines the method to distribute class bandwidth to its sockets. It is applied within the class itself and is useful in cases where a class gets saturated. For information about these, see the Traffic Control Howto (http://www.tldp.org/HOWTO/Traffic-Control-HOWTO/classless-qdiscs.html) .PP A qdisc is only useful when applied to a class. It can be specified at the interface level in order to set the default for all of the included classes. .PP To pass options to a qdisc, you can specify them through an environment variable or explicitly on each class. .PP Set the variable FIREQOS_DEFAULT_QDISC_OPTIONS_qdiscname in the config file. For example, for sfq: .IP .nf \f[C] FIREQOS_DEFAULT_QDISC_OPTIONS_sfq=\[dq]perturb 10 quantum 2000\[dq]. \f[R] .fi .PP Using this variable each sfq will get these options by default. You can still override this by specifying explicit \f[V]options\f[R] for individual qdiscs, for example to add some \f[V]sfq\f[R] options you would write: .IP .nf \f[C] class classname sfq options \[dq]perturb 10 quantum 2000\[dq] \f[R] .fi .PP The \f[V]options\f[R] keyword must appear just after the qdisc name. .SS prio (class) .RS .PP \f[I]Note\f[R] .PP There is also a match parameter called \f[V]prio\f[R], see fireqos-params-match(5). .RE .PP HTB supports 8 priorities, from 0 to 7. Any number less than 0 will give priority 0. Any number above 7 will give priority 7. .PP By default, FireQOS gives the first class priority 0, and increases this number by 1 for each class it encounters in the config file. If there are more than 8 classes, all classes after the 8th will get priority 7. In \f[V]balanced\f[R] mode (see balanced, below), all classes will get priority 4 by default. .PP FireQOS restarts priorities for each interface and class group. .PP The class priority defines how the spare bandwidth is spread among the classes. Classes with higher priorities (lower \f[V]prio\f[R]) will get all spare bandwidth. Classes with the same priority will get a percentage of the spare bandwidth, proportional to their committed rates. .PP The keywords \f[V]keep\f[R] and \f[V]last\f[R] will make a class use the priority of the class just above / before it. So to make two consecutive classes have the same prio, just add \f[V]prio keep\f[R] to the second one. .SS linklayer \f[I]linklayer-name\f[R], ethernet, atm .PP The \f[V]linklayer\f[R] can only be given on interfaces. It is used by the kernel to calculate the overheads in the packets. .SS adsl .PP \f[V]adsl\f[R] is a special \f[V]linklayer\f[R] that automatically calculates ATM overheads for the link. .PP \f[V]local\f[R] is used when linux is running PPPoE. .PP \f[V]remote\f[R] is used when PPPoE is running on the router. .RS .PP \f[B]Note\f[R] .PP This special case has not yet been demonstrated for sure. Experiment a bit and if you find out, let us know to update this page. In practice, this parameter lets the kernel know that the packets it sees, have already an ethernet header on them. .RE .PP \f[I]encapsulation\f[R] can be one of (all the labels on the same line are aliases): .IP \[bu] 2 IPoA-VC/Mux or ipoa-vcmux or ipoa-vc or ipoa-mux, .IP \[bu] 2 IPoA-LLC/SNAP or ipoa-llcsnap or ipoa-llc or ipoa-snap .IP \[bu] 2 Bridged-VC/Mux or bridged-vcmux or bridged-vc or bridged-mux .IP \[bu] 2 Bridged-LLC/SNAP or bridged-llcsnap or bridged-llc or bridged-snap .IP \[bu] 2 PPPoA-VC/Mux or pppoa-vcmux or pppoa-vc or pppoa-mux .IP \[bu] 2 PPPoA-LLC/SNAP or pppoa-llcsnap or pppoa-llc or pppoa-snap .IP \[bu] 2 PPPoE-VC/Mux or pppoe-vcmux or pppoe-vc or pppoe-mux .IP \[bu] 2 PPPoE-LLC/SNAP or pppoe-llcsnap or pppoe-llc or pppoe-snap .PP If your adsl router can give you the mtu, it would be nice to add an \f[V]mtu\f[R] parameter too. For detailed info, see here (http://ace-host.stuart.id.au/russell/files/tc/tc-atm/). .SS mtu .PP Defines the MTU of the interface in \f[I]bytes\f[R]. .PP FireQOS will query the interface to find its MTU. You can overwrite this behaviour by giving this parameter to a class or interface. .SS mpu .PP Defines the MPU of the interface in \f[I]bytes\f[R]. .PP FireQOS does not set a default value. You can set your own using this parameter. .SS tsize .PP FireQOS does not set a default \f[I]size\f[R]. You can set your own using this parameter. .SS overhead .PP FireQOS automatically calculates the \f[I]bytes\f[R] \f[V]overhead\f[R] for ADSL. For all other technologies, you can specify the overhead in the config file. .SS r2q .PP FireQOS calculates the proper r2q \f[I]factor\f[R], so that you can control speeds in steps of 1/100th of the interface speed (if that is possible). .RS .PP \f[B]Note\f[R] .PP The HTB manual states that this parameter is ignored when a quantum have been set. By default, FireQOS sets quantum to interface MTU, so \f[V]r2q\f[R] is probably is ignored by the kernel. .RE .SS burst .PP \f[V]burst\f[R] specifies the number of \f[I]bytes\f[R] that will be sent at once, at ceiling speed, when a class is allowed to send traffic. It is like a `traffic unit'. A class is allowed to send at least \f[V]burst\f[R] bytes before trying to serve any other class. .PP \f[V]burst\f[R] should never be lower that the interface mtu and class groups and interfaces should never have a smaller \f[V]burst\f[R] value than their children. If you do specify a higher \f[V]burst\f[R] for a child class, its parent may get stuck sometimes (the child will drain the parent). .PP By default, FireQOS lets the kernel decide this parameter, which calculates the lowest possible value (the minimum value depends on the rate of the interface and the clock speed of the CPU). .PP \f[V]burst\f[R] is inherited from interfaces to classes and from group classes to their subclasses. FireQOS will not allow you to set a \f[V]burst\f[R] at a subclass, higher than its parent. Setting a \f[V]burst\f[R] of a subclass higher than its parent will drain the parent class, which may be stuck for up to a minute when this happens. For this check to work, FireQOS uses just its configuration (it does not query the kernel to check how the value specified in the config file for a subclass relates to the actual value of its parent). .SS cburst .PP \f[V]cburst\f[R] is like \f[V]burst\f[R], but at hardware speed (not just ceiling speed). .PP By default, FireQOS lets the kernel decide this parameter. .PP \f[V]cburst\f[R] is inherited from interfaces to classes and from group classes to their subclasses. FireQOS will not allow you to set a \f[V]cburst\f[R] at a subclass, higher to its parent. Setting a \f[V]cburst\f[R] of a subclass higher than its parent, will drain the parent class, which may be stuck for up to a minute when this happens. For this check to work, FireQOS uses just its configuration (it does not query the kernel to check how the value specified in the config file for a subclass relates to the actual value of its parent). .SS quantum .PP \f[V]quantum\f[R] specifies the number of \f[I]bytes\f[R] a class is allowed to send at once, when it is borrowing spare bandwidth from other classes. .PP By default, FireQOS sets \f[V]quantum\f[R] to the interface mtu. .PP \f[V]quantum\f[R] is inherited from interfaces to classes and from group classes to their subclasses. .SS priority, balanced .PP These parameters set the priority mode of the child classes. .TP \f[V]priority\f[R] \f[V]priority\f[R] is the default mode, where FireQOS assigns an incremental priority to each class. In this mode, the first class takes \f[V]prio 0\f[R], the second \f[V]prio 1\f[R], etc. When a class has a higher prio than the others (higher = smaller number), this high priority class will get all the spare bandwidth available, when it needs it. Spare bandwidth will be allocate to lower priority classes only when the higher priority ones do not need it. .TP \f[V]balanced\f[R] \f[V]balanced\f[R] mode gives \f[V]prio 4\f[R] to all child classes. When multiple classes have the same \f[V]prio\f[R], the spare bandwidth available is spread among them, proportionally to their committed rate. The value 4 can be overwritten by setting FIREQOS_BALANCED_PRIO at the top of the config file to the \f[V]prio\f[R] you want the balanced mode to assign for all classes. .PP The priority mode can be set in interfaces and class groups. The effect is the same. The classes that are defined as child classes, will get by default the calculated class \f[V]prio\f[R] based on the priority mode given. .PP These options affect only the default \f[V]prio\f[R] that will be assigned by FireQOS. The default is used only if you don\[cq]t explicitly use a \f[V]prio\f[R] parameter on a class. .RS .PP \f[I]Note\f[R] .PP There is also a match parameter called \f[V]priority\f[R], see fireqos-params-match(5). .RE .SH SEE ALSO .IP \[bu] 2 fireqos(1) - FireQOS program .IP \[bu] 2 fireqos.conf(5) - FireQOS configuration file .IP \[bu] 2 fireqos-interface(5) - QOS interface definition .IP \[bu] 2 fireqos-class(5) - QOS class definition .IP \[bu] 2 FireHOL Website (http://firehol.org/) .IP \[bu] 2 FireQOS Online PDF Manual (http://firehol.org/fireqos-manual.pdf) .IP \[bu] 2 FireQOS Online Documentation (http://firehol.org/documentation/) .SH AUTHORS FireHOL Team.