1. The Internet's Default: The Best-Effort Model
The internet and most IP-based networks use a "best-effort" delivery model by default. The network forwards packets according to available resources, but the model does not define guaranteed delivery time, delay, or delivery of every packet. In the basic best-effort class, packets receive no defined priority differentiation, whether they belong to a video conference, a file transfer, or email.
This model is sufficient for many applications. During a file transfer, TCP detects lost segments and usually retransmits them, allowing the application to reconstruct the data in order. Final data integrity matters more than an exact download time while the connection and application can continue. Networks also carry real-time traffic such as Voice over IP (VoIP), online games, and video streaming. A delayed or lost packet in a call can cause a gap or distorted audio, and a later retransmission cannot restore the earlier part of the conversation.
Different application requirements and uniform traffic treatment motivate the use of Quality of Service (QoS) mechanisms.
2. Defining Quality of Service (QoS)
is a set of mechanisms for differentiating the treatment of selected traffic within a defined technology and network policy. QoS can limit the effects of best-effort delivery by managing bandwidth, delay, delay variation, and packet loss, but it cannot remove the physical limits of a link.
Implementing QoS allows an administrator to define policies for different traffic treatments. For example, a video conference may receive an allocated share of bandwidth and shorter queues while other users download files. Effectiveness depends on available resources, configuration, and administrative scope. QoS does not create new bandwidth; it manages bandwidth that is already available.
The scope of QoS depends on the measurement point and the administrative domain. DiffServ mechanisms classify traffic and mark packets in the DS field, whose six-bit codepoint is DSCP, after which devices apply a defined per-hop behavior. IntServ mechanisms can reserve resources for an individual flow, but they require signaling and admission control. Neither model changes the physical capacity of a link. Parameters should be described together with the measurement direction, observation point, and traffic class, because an average value does not show individual delays or losses. A policy should also specify how congestion, packet order, and rate-limit violations are handled. DiffServ can aggregate many flows into behavior classes, whereas IntServ considers individual flows. Admission control can reject a new request when resources are insufficient, so a configured class describes treatment within a domain rather than an end-to-end promise across every network.
3. The Core Metrics of Network Performance
QoS includes management of four key parameters that describe network performance.
- Bandwidth and Throughput
Bandwidth describes a link's capacity for transmitting data over time and is typically expressed in bits per second (bps). The achieved transfer rate, or throughput, also depends on traffic and protocols. QoS mechanisms can allocate a minimum share of bandwidth to selected traffic or limit the share used by less important traffic when the network configuration supports it.
- Delay (Latency)
is the total time it takes for a packet to travel from its source to its destination. This total delay is a sum of several components, including:
- Transmission Delay: The time required to push all of a packet's bits onto the link.
- Propagation Delay: The time it takes a signal to travel the physical distance of the link at its propagation speed in that medium.
- Processing Delay: Time taken by routers to process the packet's header.
- Queueing Delay: The time a packet spends waiting in a router buffer (queue) before transmission. This component is strongly affected by congestion and is a primary QoS target. About 150 milliseconds (ms) is often cited as an approximate limit for total one-way delay in a voice conversation; this value does not apply to queueing delay alone.
- Jitter (Delay Variation)
, or delay variation, describes differences in the delivery time of successive packets. It can result from changing queue load. High jitter complicates real-time audio and video playback because a receiver must use a buffer or accept gaps. The required level depends on the codec, buffer, and application; video transmission has no single universal threshold.
- Packet Loss (Loss)
Packet loss occurs when a packet fails to reach its destination. A common cause is congestion, when a router buffer fills and packets are dropped. In applications using TCP, such as file transfers, loss is detected and a segment may be retransmitted, reducing throughput; the final result depends on the connection and application. In real-time applications using UDP, such as VoIP, a packet often cannot be recovered after its playback time, causing audio gaps or video artifacts.
4. Application Requirements and Traffic Types
Applications have very different requirements for network performance. QoS therefore requires identifying and classifying this traffic.
- Real-Time Traffic (e.g., VoIP, Video Conferencing): This traffic is sensitive to delay and jitter. Some codecs and error-recovery mechanisms tolerate a small amount of packet loss, but delivery should be as regular as possible.
- Streaming Traffic (e.g., Video on Demand): This traffic is sensitive to jitter and requires adequate bandwidth. It is usually less sensitive to delay than VoIP because a client-side buffer can absorb some delay.
- Critical Data (e.g., Medical Applications, Engineering): This traffic may require very low loss, and a specific profile may require lossless transmission (zero packet loss) and adequate bandwidth. Sensitivity to delay depends on the application.
- Transactional Traffic (e.g., E-commerce, Database Queries): This type of traffic is bursty. Responsiveness (low latency) is key for a good user experience, but it does not typically require high sustained bandwidth.
- Bulk Data Traffic (e.g., FTP, backups): This traffic usually requires high bandwidth to finish a transfer in an acceptable time. It is more tolerant of delay and jitter because protocols such as TCP handle reliability. Selected QoS policies may assign it a low priority.
Flow Characteristics
Traffic can also be classified by its flow characteristics:
- CBR (Constant Bit Rate): Traffic that generates data at a steady, constant rate, like an uncompressed voice stream.
- VBR (Variable Bit Rate): Traffic that generates data at a variable rate, like compressed video, which produces more data for complex scenes and less for simple ones.
- Elastic Traffic: Traffic that can adapt its transmission rate based on network conditions, like a TCP file transfer.
- Inelastic Traffic: Traffic that cannot easily adapt its rate and has strict performance requirements, like VoIP.
5. The QoS Toolkit: Mechanisms for Managing Traffic
Network devices like routers and switches use a suite of tools to implement QoS policies. The general process involves identifying traffic, classifying it into groups, and then applying specific treatments to each group.
- Classification and Marking:The first step is to identify different types of traffic. This can be done by looking at various fields in the packet header, such as source/destination IP addresses, port numbers, or the protocol type. Once identified, the traffic is "marked" by setting a specific value in the packet's header. In IP networks, this uses the DS field in the IP header; its six-bit codepoint is the Differentiated Services Code Point (DSCP).
- Queueing and Scheduling:When multiple packets wait for the same output link, they are placed in a queue. A scheduler decides the transmission order. Instead of a single "first-in, first-out" (FIFO) queue, routers can use multiple queues and algorithms such as Priority Queueing or Weighted Fair Queueing, which assigns queues a share based on configured weights.
- Traffic Shaping and Policing: These are two methods for controlling the rate of traffic.
- Policing: Enforces a configured bandwidth limit. Packets that exceed the permitted rate may be dropped or re-marked to a lower priority.
- Shaping: Also enforces a bandwidth limit, but instead of dropping excess packets, it delays them in a buffer and sends them out later when bandwidth is available. This has the effect of smoothing out traffic bursts.
- Congestion Avoidance: These mechanisms react to signs of congestion before a buffer is completely full. Random Early Detection (RED) monitors average queue depth and, as it grows, randomly drops a small number of packets from different flows; with ECN enabled, it can mark packets instead of dropping them. This can signal transports such as TCP to reduce their transmission rates and limit the risk of a mass buffer overflow.