Quality of Service

Overview

By default, all packets are treated as equals in a switch: whichever packet comes first is processed first. However, when it comes to requirements of audio / video networking, not all packets are equal. Packets transporting e.g. PTP time information are very sensitive to variations in latency, so they should be transported with the minimum amount of packet delay variation possible.

The ability to treat packets identified by certain criteria differently is referred to as Quality of Service. It allows a switch to decide to process packets with e.g. PTP information before processing packets with e.g. FTP data.

In order for the switch to process packets with different priorities, a switch has queues on the output ports which can be served according to different algorithms. Many switches have a total of 4 or 8 different queues per port and use a fixed ascending priority, the queue with the highest number having the highest and the one with the lowest number having the lowest priority. This means that the switch processes all packets from queue 8 first, then all packets from queue 7 and so on (“strict priority queuing”). This algorithm is simple and straightforward but might lead to “starving” of the lower priority queues.

Other switches assign a “weight” to the queues (e.g. 25% to queue 7, 15% to queue 6 and 10% for each of the lower queues) which makes sure that higher priority queues are served with preference, but lower priority queues don’t starve. On enterprise level switches it is even possible to further tune the behavior of QoS according to an application’s individual needs. Some switches also allow a combination of both queuing methods, assigning strict priority to some queues and weights to others.

It is good practice to leave the highest priority queue for essential network traffic, which is needed for the network itself to function. PTP is a traffic class that should run with highest priority in the network due its sensitiveness to packet delay variation. Other traffic that needs priority should be distributed to the queues below. Any traffic assigned to the lowest priority queue is transported as “best effort”.

It is important to understand that the whole concept of QoS is no remedy for too little bandwidth on a link: If you try to transport 2GB of data through a 1GB link, packets will be dropped, irrespective of QoS. QoS will just help the switch to decide which packets to drop in case of bandwidth contention.

In common IT applications QoS is used to prioritize VoIP telephony data over the other data transported on the same network since VoIP data is very sensitive to latency and packet loss. The same applies to audio and video data in networks: it is sensitive to latency and packet loss and – in the case of video – often very bandwidth-intensive.

In order for the switch to sort the packets into the different queues, the switch must know the intended priority for each packet. This is achieved by marking the packets and evaluating these marks to decide on the correct queue (a process called “mapping”). One way to perform the marking is called Differentiated Services (“DiffServ”).

 

DiffServ

With DiffServ packets can be marked with a value for packet classification. This value is called the Differentiated Services Code Point (DSCP). It allows for 64 different values and is assigned to the IP packets. As a rough approximation you can say that the higher the value, the more important the packets is. However, in standard practice only a few of the available 64 values are actually used.

An important thing to understand is that these values, if they are set by the device sending the data, are often considered a “wish” concerning the processing priority and can be redefined on the network path to the destination; that means that setting a specific DSCP value does not mean that the packets are treated preferentially along the complete network path.

A switch evaluates the DSCP values in the IP packets, classifies traffic into different categories and maps them to its internal queues according to a user defined policy. In order for the complete path to provide the same (preferential) handling of packets, the complete path needs to be under the users’ control.

Lawo devices use different values to distinguish packets:

  • All PTP packets are marked either with “CS7” (56) or “EF” (46) [AES67 uses “EF”]
  • All packets containing audio / video data are either marked as “EF” (46) or “AF41” (34) [AES67 uses “AF41”]
  • All other packets are marked with “BE” (0)

The switches processing these packets should be setup to handle the packets according to those priorities and treat the remaining, unmarked traffic as “best effort” (DSCP value = 0).

When leasing network lines on which you have no direct influence on the DSCP evaluation and processing, talk to the provider to ensure correct processing and check the line prior to usage (e.g. using the V__line sounding feature). During those tests transport audio and video streams in parallel to e.g. FTP traffic to verify that the audio video streams will indeed receive preferential treatment. No audio or video dropouts should occur even when the leased line is fully utilized by the streams and the FTP transfer.

 

Continue ...