Queuing disciplines

We would be remiss if our discussion of traffic shaping didn't include a mention of different queuing disciplines. We have already introduced one type of queue: the FIFO queue, also sometimes referred to as a first come, first served (FCFS) queue. FIFO queues might be described as net neutrality writ small. No packet has priority over others, and there are no different classes of traffic. Packets are treated equally and they are sent out in the same order in which they arrive.

FIFO queues are useful structures. Indeed, even when we implement traffic shaping, the different queues are often themselves FIFO queues; they are easy enough to implement.

But, if we place all incoming and outgoing data into FIFO queues, some users and applications may end up consuming all or most of the bandwidth. Even if they don't consume bandwidth on a constant basis, often their usage will spike at inconvenient times, which will delay important—and often time-sensitive—data. Moreover, if the queue fills, important traffic may be dropped because of less important traffic already in the queue.

If you have a high-bandwidth connection with little congestion, you might get by with FIFO queuing. If not, it is time to start considering the alternatives.

An early improvement over FIFO queuing was fair queuing. With fair queuing, each program process is given its own FIFO queue, which prevents a badly behaving process from using up bandwidth. The earliest versions of fair queuing used round-robin scheduling between a LAN and the internet and was an improvement over FIFO queuing, but work soon began on refining fair queuing. A further improvement was weighted fair queuing (WFQ). This method provided a form of priority management in which packets were classified into high- and low-bandwidth traffic. High-bandwidth traffic is prioritized over low-bandwidth traffic. High-bandwidth traffic gets a share of the connection; this share is proportional and based on assigned weights. Thus, low-bandwidth streams, representing the lion's share of network traffic, will be transmitted in a timely manner. Since WFQ requires an examination of packets, it may not work over encrypted connections.

Next, we will consider the queuing disciplines supported by the current version of pfSense: priority queuing (PRIQ), class-based queuing (CBQ), and the Hierarchical Fair Service Curve (HFSC).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.106.232