Introduction to traffic shaping
Let's think about car traffic – on a bustling road, if an ambulance, fire truck, or police vehicle needs to pass, they have priority, right? The same situation also applies in the network packets world, where some packets need to be treated with higher priority to keep the protocols operating smoothly. With all sorts of different packets passing through the firewall, it is necessary to classify them to choose which traffic requires higher priority to keep an application, such as a voice over IP (VoIP) application. For example, if there are 20 VoIP packets and 1 for HTTP, the firewall or the streaming apps may work smoothly. The term QoS is also often used to refer to traffic shaping, and in this chapter, it will be used to refer to the classification and prioritization of packets.
To apply QoS to network traffic, OPNsense uses dummynet and ipfw, independent of the packet filter rules (which use pf). Ever heard of dummynet and ipfw before...