Site Tools


qos-settings

This is an old revision of the document!


QoS Principles

Quality of Service (QoS) is a method to prioritize/penalize predefined types of traffic. QoS is a complex topic so we'll cover only enough basic principles to help you configure an initial setup.

Basically, QoS performs the following:

  • Identifies traffic
  • Classifies this traffic
  • Marks packets
  • Defines classes and subclasses
  • Set class parameters (such as reserved bandwidth)


You might have heard the above points when describing “diffserv” (differential services). Diffserv is the only QoS type FreshTomato can perform.

It's often said that the QoS is a technique to mitigate lack of bandwidth when an upgrade is too costly or even impossible. More precisely, QoS also allows you to prioritize latency-sensitive traffic (such as voice) even when there's no network congestion. Thus, QoS introduces controls to allows you to protect certain traffic.



Here are some commonly used QoS terms:

  • Traffic: This is the stream of data between two nodes. This stream could be unidirectional (such as over UDP)
    or bidirectional (such as over TCP).
  • Best effort: This is also referred to as “no QoS”. This works on the principle of “first come, first served”.
    This is generally the default queuing mechanism applied to network interfaces (AKA “FIFO”).
    When QoS is operating, best effort usually means that class of traffic that handles “everything else”.
    It is therefore the lowest priority of all classes of traffic passed.
  • Classification: This is the process of internally identifying packets based on predefined parameters.
    For example, “from IP”, “to port”, “protocol=tcp”.
  • Marking: This is the action of actually colorize a packet (modify the Type of Service/DSCP field of the IP header)
    with a locally significant meaning. This will help matching packet simply looking at the ToS/DSCP header.
    This process it not always performed.
  • Queuing: This is (Outbound only) buffering of data that the network can't process in real time.
    There are many forms of Queuing in QoS. This is divided into classes.
  • Policing: This is the (Inbound and Outbound) process of dropping packets in a controlled way.
  • Class Discipline: This is the rule applied to all the classes of data in the priority class goes first no question asked, if priority is empty apply WFQ (Weighted Fair Queuing) amongst all the other classes, etcetera. There are dozen of queuing disciplines but only few are supported by FreshTomato.


The diagram below should help you to understand these principles:



How Does all this Help Me?

Have you ever experienced a poor quality VoIP call from your LAN onto the Internet?

Do your media, such as videos, buffer too much?

Is someone on your LAN generating too much traffic?

These are all problems that QoS can help you to solve. Note that QoS is NOT auto-regulating. You need to manually define most of the QoS parameters, and tweak them, as needed.

CTF implications



As shown in the above screenshot, QoS doesn't work when CTF is enabled. This is because CTF causes network packets to be routed in hardware, outside of firmware control or monitoring.



qos-settings.1712783215.txt.gz · Last modified: 2024/04/10 22:06 by hogwild