fireqos-class(5)

πŸ“¦
version 3.1.8 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– fireqos-class β€” traffic class definition πŸ’–

okay bestie, welcome to fireqos-class(5), straight out of the FireQOS fam ✨ this is the page that teaches you how to define traffic classes, and ngl it's kinda the main character of your whole QoS config πŸŽ€


🌸 NAME 🌸

fireqos-class β€” traffic class definition πŸ’…


✨ SYNOPSIS ✨

{class|class4|class6|class46} [group] name [optional-class-params]
{class|class4|class6|class46} group end

πŸ¦‹ DESCRIPTION πŸ¦‹

So first thing, there's also an optional match parameter called class, and that one lives over in fireqos-params-match(5). iykyk, go read it 🫢

Writing plain class inherits the IPv4/IPv6 version from its enclosing interface (peep fireqos-interface(5) for that).

  • Writing class4 includes only IPv4 traffic in the class.
  • Writing class6 includes only IPv6 traffic in the class.
  • Writing class46 includes both IPv4 and IPv6 traffic in the class.

The actual traffic to be matched by a class is defined by adding matches. That's fireqos-match(5), go check it πŸ’–

Now the spicy part: the sequence that classes appear in the configuration defines their priority. The first class is the most important one. Unless otherwise limited, it will get all available bandwidth if it needs to. Like, all of it. no cap.

The second class is less important than the first, the third is even less important than the second, etc. The idea is very simple: just put the classes in the order of importance to you. That's it. That's the vibe check πŸ”₯

Classes can also have their priority assigned explicitly with the prio parameter. See fireqos-params-class(5) πŸ‘‘

Note 🫒 The underlying Linux qdisc used by FireQOS, HTB, supports only 8 priorities, from 0 to 7. If you use more than 8 priorities, all after the 8th will get the same priority (prio 7). so like. don't be greedy with your priorities bestie πŸ’€

All classes in FireQOS share the interface bandwidth. However, every class has a committed rate (the minimum guaranteed speed it will get if it needs to) and a ceiling (the maximum rate this class can reach, provided there is capacity available and even if there is spare). committed rate = the bare minimum she deserves, ceiling = how far she can pop off ✨

Classes may be nested to any level by using the class group syntax. nesting is giving family tree 🌳

By default FireQOS creates nested classes as classes directly attached to their parent class. This way, nesting does not add any delays. slay, no latency tax πŸ’…

FireQOS can also emulate new hardware at the group class level. This may be needed, when for example you have an ADSL router that you connect to via Ethernet: you want the LAN traffic to be at Ethernet speed, but WAN traffic at ADSL speed with proper ADSL overheads calculation. so basically two totally different personalities in one interface πŸ™ˆ

To accomplish hardware emulation nesting, you add a linklayer definition (ethernet, adsl, atm, etc.), or just an mtu to the group class. FireQOS will create a qdisc within the class, where the linklayer parameters will be assigned and the child classes will be attached to this qdisc. This adds some delay to the packets of the child classes, but allows you to emulate new hardware. For linklayer options, see fireqos-params-class(5) πŸ’–

There is special class, called default. Default classes can be given explicitly in the configuration file. If they are not found in the config, FireQOS will append one at the end of each interface or class group. she shows up uninvited but honestly she's needed 😭


πŸŽ€ PARAMETERS πŸŽ€

  • group β€” It is possible to nest classes by using a group. Grouped classes must be closed with the class group end command. Class groups can be nested. (nesting-ception, we love to see it 🌈)
  • name β€” This is a single-word name for this class and is used for displaying status information. one word only bestie, no spaces, no drama πŸ’…
  • optional-class-params β€” The set of optional class parameters to apply to this class.

The following optional class parameters are inherited from the interface the class is in:

  • ceil
  • burst
  • cburst
  • quantum
  • qdisc

If you define one of these at the interface level, then all classes within the interface will get the value by default. These values can be overwritten by defining the parameter on the class too. The same inheritance works on class groups. generational wealth but for qdisc params πŸ‘‘

Optional class parameters not in the above list are not inherited from interfaces. periodt.

FireQOS will by default commit 1/100th of the parent bandwidth to each class. This can be overwritten per class by adding a commit to the class, or adding a minrate at the parent. tiny default, but she's just a starting point ✨


πŸ”₯ EXAMPLES πŸ”₯

To create a nested class, called servers, containing http and smtp:

interface eth0 lan input rate 1Gbit
  class voip commit 1Mbit
    match udp ports 5060,10000:10100

  class group servers commit 50%  # define the parent class
    match tcp                     # apply to all child classes

    class mail commit 50%         # 50% of parent ('servers')
      match port 25               # matches within parent ('servers')

    class web commit 50%
      match port 80
  class group end                 # end the group 'servers'

  class streaming commit 30%

To create a nested class which emulates an ADSL modem:

interface eth0 lan output rate 1Gbit ethernet
  class lan
    match src 192.168.0.0/24 # LAN traffic

  class group adsl rate 10Mbit ceil 10Mbit adsl remote pppoe-llc
    match all # all non-lan traffic in this emulated hardware group

    class voip # class within adsl
      match udp port 5060

    class web # class within adsl
      match tcp port 80,443
  class group end

πŸ¦„ SEE ALSO πŸ¦„


πŸ’œ AUTHORS πŸ’œ

FireHOL Team.


okay that's the whole page bestie, you ate it up fr fr πŸ“βœ¨ this was the FireQOS Reference, built 13 Apr 2025 β€” go forth and class-ify your traffic, you're literally the main character of your own bandwidth πŸ’…πŸ‘‘πŸŽ€

πŸ“¦ where this page comes from