Qos-settings

From Tomato64
Revision as of 17:38, 26 September 2023 by Lancethepants (talk | contribs) (Text replacement - "FreshTomato" to "Tomato64")

QoS principles

QoS stands for Quality of Services and is a method to prioritize/penalize predefined types of traffic. It is a fairly complex topic so we'll try to hover over the basic principles so that an initial setup can be performed. QoS in a nutshell performs the following:

  • identifies traffic
  • classifies traffic
  • marks packets
  • define classes and subclasses
  • set classes parameters (e.g. reserved bandwidth, etc)

The above list you might have heard elsewhere refers to a so called diffserv (differential services) which is the only QoS type possible with Tomato64. On the first page of every QoS book/material you read you should find something that sounds like this:

QoS is technique to mitigate lack of bandwidth where an upgrade is too costly or simply not possible.

Truth, but to be precise QoS also allows you to prioritize latency-sensitive traffic (e.g. voice) even if no congestion is experienced. Essentially QoS introduces control, this allows to protect certain traffic.
20230215-084814.png
Let's familiarize ourselves with some basic terms now:

  • Traffic: Is the stream of data between two nodes. This can be unilateral (e.g. over UDP) or bilateral (e.g. over TCP)
  • Best effort: is also referred to "no QoS" first come first served which is the default queuing mechanism applied to the network interfaces (a.k.a. FIFO). In case QoS is set, best effort is usually the class that handles "everything else".
  • Classification: Is the act (internal) to identify a packets based on predefined parameters e.g. "from IP", "to port", "protocol=tcp", etc.
  • Marking: Not always performed it's the action to actually colorize a packet (modify the ToS/DSCP field of the IP header) with a locally significant meaning. This will help matching packet simply looking at the ToS/DSCP.
  • Queuing: [Outbound only] is the process to buffer up data when the system (network) can't process in real time. Queuing comes in many variants and in QoS this is divided in classes.
  • Policing: [Inbound and Outbound] is the process to drop packets in a controlled way.
  • Class discipline: Is the rule applied to all the classes e.g. data in the priority class goes first no question asked, if priority is empty apply WFQ (weighted fair queuing) amongst all the other classes, etc. There are dozen of queuing disciplines but only few are supported by FT.


Looking at the list above let's put everything together:
20230215-085237.png


What does this mean all mean to me?

Ever experienced a poor VoIP call from your LAN into Internet? Do you get media buffering too much? Is anyone in your LAN generating too much traffic? These are all things QoS can address for you. Please notice: QoS is NOT auto-regulating, you will need to define manually most of the parameters and tweak them as needed throughout time.

CTF implications

20230215-081526.png
QoS doesn't work when CTF is enabled, because CTF causes network packets to be routed in hardware, outside of firmware control or monitoring.