6WIND vRouter provides QoS functionalities, including rate limitation (aka Basic QoS) and class-based QoS (aka Advanced QoS). In a previous blog, we also described how the vRouter uses internal QoS mechanisms to prioritize control plane protocols over data plane traffic and avoid breakage under load.
In this blog, we focus on advanced QoS, whose goal is for example to let a network administrator provide an assured bandwidth for certain types of traffic. With advanced QoS, a user can send packets into traffic classes and then apply different processing to these classes, including policing, shaping and scheduling.
We will explain about the general advanced QoS architecture in the 6WIND vRouter’s high-performance networking stack and explain with a simple use case how to instantiate classes of traffic, program some associated schedulers on output interfaces and configure ACLs to steer ingress traffic into the traffic classes.
In the 6WIND architecture, QoS processing happens inside the vRouter’s high-performance networking stack. This is what we call the fast path, which is based on 6WINDGate, and used by Tier 1 customers worldwide for over a decade. More information about the 6WINDGate architecture can be found here.
The QoS architecture in the fast path is as follows:
All worker cores receive traffic according to RSS queues and mark packets according to Netfilter rules. These rules are used to classify packets to different class queues and the scheduler finally emits packets according to each class queue priority. Shaping and policing can also be applied in the process.
Schedulers are running on a specified set of fast path cores which are totally independent from the worker cores to assure ‘reliable scheduling.
We’ll illustrate the configuration required using a simple use case. VoIP traffic will be scheduled using a specific class while all other traffic will be scheduled with limited bandwidth.
We’ll start by configuring a scheduler on each interface that will prioritize traffic to be emitted.
This is done at the fast path level using the fp-cli qos-sched-add command.
Each scheduler attached to an interface defines:
Policy: strict or deficit weighted round robin (DWRR)
Maximum emission rate
Maximum emission burst
Class queue size in packets
Maximum class rate
Maximum class burst
Upon its creation, queues for the different classes are created.
On enp1s0f0 a scheduler is created with 2 queues (one for each class). This scheduler is limited to 10 Gbps in emission. It implements a strict policy algorithm: queue 1 is the highest priority and queue 2 the lowest.
The bandwidth of the first queue will not be limited, while the second queue will be limited to 2 Gbps in emission.
The scheduler is now created and ready to process packets submitted to its different queues matching the different classes.
Classify traffic according to marks
Every packet to be sent on a scheduled interface will need to be associated with a class, based on the Netfilter mark set on the packet.
This is done at the fast path level using the fp-cli qos-filter-add command.
This commands defines:
Priority of the filtering rule
Netfilter mark filter
Filtering action to associate with a class
Each rule is evaluated according to the order defined to sort marked packets to different classes.
Rule 1 sends all packets with Netfilter mark ending with 0x0001 to class 0x1: