Understanding IP Production Networks: Part 13 - Quality Of Service

How QoS introduces a degree of control over packet prioritization to improve streaming over asynchronous networks.

Broadcast engineers are accustomed to point-to-point, reliable, guaranteed bandwidth circuits. An SDI cable will guarantee 270Mbps for SD and 1.485Gbps for HD. Digital audio circuits will guarantee 2.5Mbps for uncompressed 48Khz sampled 24bit word stereo.

Computer networks do not offer this level of guarantee as they are shared packet switched systems and use best effort delivery mechanisms. A stream of video or audio is divided up into packets of 1,500-octets to fit in an IP packet, which is generally inserted into an Ethernet packet. Each of these packets is streamed in sequence at the video or audio data-rate and sent through the network to its destination using a best effort mechanism.

Routers and switchers vary enormously in their sophistication and data handling speeds. The routing protocols they support and their ability to provide services such as multicasting also vary. Consequently, if a packet is sent from a camera to a production switcher through a network, we cannot guarantee or even predict how long it will take to get there, whether it will get there, or whether it will be in sequence.

Each packet has a sequence number within its header enabling the receiver to re-order the packets within its input buffer. The packets can be received out of sequence if a route is temporarily interrupted and the packets sent by a different path, resulting in some packets taking longer than others. The receiver can re-order them, but if some packets take too long to arrive then they may be dropped as they will fall outside of the input buffer window.

Buffering Compromises

Input buffers are usually of a fixed size and are used to re-time and re-order packets causing delays for video and audio streaming. If the buffer is too big then there will be an unacceptable delay, possibly even seconds if these delays concatenate. If the buffer is too small, then a disproportionate number of packets will be dropped as their arrival will fall outside of the buffer window.

To meet the demands of video and audio streaming, IT has adopted the term QoS, adding an element of control to packet arrival. Another term used is rate-shaping. Essentially, QoS helps us distribute a synchronous stream over an asynchronous network.

When IP and TCP were originally designed, there was no consideration or provision for synchronous services such as streamed audio and video.

Two strategies are available to help us reliably stream audio and video over an IP network: extra provision and packet prioritization.

Extra provision is providing more bandwidth than we need. If a streamed audio service requires 2.5Mbps, extra provisioning would demand 5Mbps or even 10Mbps. Clearly this is wasteful of bandwidth and doesn’t scale efficiently. The bandwidth requirements and switching speeds become absurd when we start looking at HD and UHD video.

Packet Prioritization

Packet prioritization takes advantage of information inside the IP header. The Type of Service (ToS) field, recently renamed as Differential Services Code Point (DSCP), belongs to packet prioritization models called differentiated services. This information is used by the router to help it determine its routing order.

If many streams are being switched to one port, then the router is left to decide which packets take priority over others. This might be a round-robin type strategy or first come first served. Higher end routers use buffers to temporarily store packets as they enter the device. Algorithms within the router interrogate the packets, extract information such as the DSCP value, and decide its priority when sending to the next hop in the network.

The prioritization causes delay and packet loss within a network. If a buffer becomes overloaded, then it drops packets. Variations in delay give rise to jitter, both long and short term. Solving this problem is the essence of QoS.

Figure 1 - When packets are queued, the routers algorithm must decide which packet to output next. The video buffer is full resulting in new packets being dropped.

Figure 1 - When packets are queued, the routers algorithm must decide which packet to output next. The video buffer is full resulting in new packets being dropped.

Packet prioritization relies on routers within a network all agreeing on a prioritization strategy. From a broadcasting point of view, video and audio should take priority over HTTP and other traffic. Within closed private networks this may be possible, but once we move into public networks the prioritization becomes less predictable and manageable. Some network providers might not even provide QoS or bit rate shaping, potentially resulting in a complete mess.

Packet prioritization relies on switchers and routers performing deep analysis of the packet to extract the necessary DSCP values and even looking at the stream itself to determine whether it is audio or video, resulting in delays and bottlenecks. This is further compounded when we look at encrypted packets as the router will not be able to decode any of the payload and will not determine if it’s switching video or audio.

MPLS

Multi-Protocol Label Switching (MPLS) is designed to overcome these problems. MPLS is provided by a network supplier and is largely transparent to the end user. As a packet enters the MPLS network the ingress router adds a label to the packet, which is used by all subsequent routers within the provider’s network to prioritize and route that packet. 

Routing efficiency is improved as switchers use the label for prioritization and routing, but do not interrogate the packets further, thus improving throughput and reducing complexity. As QoS is an intrinsic part of MPLS it forms a fundamental part of the routing method instead of being an unwelcomed add on.

Figure 2 -  MPLS service providers abstract away the network and guarantee a Quality of Service for video and audio streaming.

Figure 2 - MPLS service providers abstract away the network and guarantee a Quality of Service for video and audio streaming.

Interoperability between network providers is maintained and to be part of an MPLS system all providers must agree on using the same QoS strategies to guarantee streaming of video and audio.

MPLS can adopt diverse types of layer-2 connections including Ethernet, ATM and DSL. Combined with multi-vendor interoperability, MPLS is extremely flexible and lends itself well to broadcasting, especially when backhauling cameras and microphones from remote outside broadcasts.

As IP grows within broadcast facilities QoS is a fundamental consideration, and decisions on whether to use protocols such as MPLS will need to be taken at an early stage, especially when choosing network providers who may or may not be able to provide MPLS.

QoS Standards

Several standards of QoS have evolved to include DiffServ, IntServ, and layer-2 VLAN-PCP, but they use entirely different models of classification, resource allocation and forwarding behavior.

DiffServ (Differentiated Services) is the most widely used QoS architecture in IP networks and uses the six-bit DSCP value in the IP header. This is used to determine how a router should handle the packets associated with it. The sending device sets the classification bits to types including Expedited Forwarding for low latency traffic or Assured Forwarding for critical control flows. Within the networks, the routers deal with prioritizing the DSCP values on a packet-by-packet basis, and do not prioritize at the flow level, which helps with scalability as there are a smaller number of aggregates to deal with. DiffServ is not a rate-shaper but instead prioritizes packets, which has the disadvantage of not guaranteeing datarates across the network and the reliability of the QoS relies on all routers across the network consistently setting agreed QoS policies.

IntServ (Integrated Services) tries to guarantee bandwidth allocation on a per flow basis. When a flow is established, the sender uses the RSVP signaling protocol to request bandwidth and latency characteristics from each router for each individual flow. Although this method provides full end-to-end guaranteed bandwidth and latency, it does not scale well as maintaining a per flow state across an entire network becomes impossible to achieve. Consequently, IntServ is rarely deployed outside of highly constrained or experimental environments, but it has influenced other QoS solutions such as MPLS Traffic Engineering and DetNet (Deterministic Networking). DetNet attempts to deliver guaranteed bandwidths and latency as it avoids IntServ’s per-flow state and only requires detailed flow state at the network edges and specific transit nodes, not at every single router in the network.

VLAN provides layer-2 prioritization by using a 3-bit PCP (Priority Code Point) tag to give eight priority levels. PCP-enabled Ethernet switches use this information to prioritize the traffic, but it has limited granularity due to only having eight levels. Bandwidth is not guaranteed and higher level QoS layers are needed to determine this. VLAN-PCP behaves as a DiffServ at the layer-2 level.

QoS is one of the concepts that is relatively new to broadcast engineers as the SDI, AES and analog circuit switched networks have guaranteed QoS by virtue of their design. IP networks are highly variable in bandwidth and latency, and QoS provides a method of bringing some order to their characteristics. 

You might also like...

Understanding IP Production Networks: Part 14 - Delay Monitoring

We use buffers to reassemble asynchronous streams so we must measure how long individual packets take to reliably get to the receiver, and the maximum and minimum delay of all packets at the receiver.

Understanding IP Production Networks: Part 12 - Measuring Line Speeds

Broadcast and IT engineers take very different approaches to network speed and capacity; it is essential to reach a shared understanding.

Understanding IP Production Networks: Part 11 - Network Analyzers

Wireshark is an invaluable tool that enables engineers to examine network traffic in detail. Commercial monitoring platforms provide even deeper observation.

Understanding IP Production Networks: Part 10 - Security

The flexibility of IP and COTS brings with it all of the security dangers of the internet and the need for robust processes. It means new questions need to be asked of broadcast equipment manufacturers.

Understanding IP Production Networks: Part 9 - Ethernet

How Ethernet has evolved to combat congestion and how speeds have increased through the decades.