Optimizing Network Quality of Service for Applications
Application-Level Quality of Service (QoS)
Different applications have varying demands on network performance. Understanding these demands is crucial for implementing effective Quality of Service (QoS) solutions. Common application requirements include:
- Email: Minimum errors
- FTP (File Transfer Protocol): Minimum errors, maximum capacity
- WWW (World Wide Web): Minimum errors, large capacity, low latency
- VoIP (Voice over IP): Tolerates some errors (up to 20% is often acceptable), minimum latency and jitter, good capacity
Solutions to meet these diverse demands typically involve either increasing network capacity (brute force) or implementing Quality of Service mechanisms, such as Integrated Services or Differentiated Services, to manage different demands and qualities.
Common QoS Challenges
Packet Loss: Dropped Packets
Routers might fail to deliver some packets if their data is corrupted or when buffers are full. The receiving application may request this information to be retransmitted, potentially causing severe delays in the overall transmission.
Packet Corruption: Errors
Sometimes packets are corrupted due to bit errors caused by noise and interference, especially in wireless communications and long copper wires. The receiver has to detect this and may request this information to be retransmitted.
Latency
It might take a long time for each packet to reach its destination because it gets held up in long queues or takes a less direct route to avoid congestion. Excessive latency can severely affect applications like VoIP or online gaming.
Jitter
Packets from the source will reach the destination with different delays. This variation in delay is known as jitter and can seriously affect the quality of streaming audio and video.
Out-of-Order Delivery
This can occur when related packets are routed through a network, and different packets take different routes, each resulting in a different delay. This problem requires special additional protocols responsible for rearranging out-of-order packets into a synchronized state once they reach their destination. This is very important in VoIP.
Integrated Services (IntServ)
Integrated Services (IntServ) provides a way to reserve network resources for specific traffic flows, ensuring a certain level of QoS.
- Flow Specification (TSPEC): Utilizes a Token Bucket algorithm, where tokens limit data transfer. Without tokens, no data can be sent.
- Resource Reservation Protocol (RSVP): All routers on the path must support this function. RSVP reserves capacity for specific transmissions. Routers can accept or reject requested reservations; if accepted, they are obligated to carry the traffic.
Differentiated Services (DiffServ)
Differentiated Services (DiffServ) operates on the principle of traffic classification, where each data packet is placed into a limited number of traffic classes, rather than differentiating network traffic based on the requirements of an individual flow. Each router on the network is configured to differentiate traffic based on its class. Each traffic class can be managed differently, ensuring preferential treatment for higher-priority traffic on the network.
Per-Hop Behaviors (PHBs)
Per-Hop Behaviors define how a DiffServ-compliant router should forward packets belonging to a particular traffic class.
- Default PHB: Typically used for best-effort traffic.
- Expedited Forwarding (EF) PHB: Dedicated to low-loss, low-latency traffic.
- Assured Forwarding (AF) PHB: Gives assurance of delivery under prescribed conditions.
- Class Selector PHBs: Maintain backward compatibility with the IP Precedence field.
Application-Specific Solutions: RTP/RTCP
For real-time multimedia applications, specific protocols like RTP and RTCP are used to manage and control the media streams.
Real-time Transport Protocol (RTP)
RTP creates its own multimedia packets, which are then inserted into UDP packets. It adds crucial information for real-time communication:
- Multimedia Type: Specifies the codec and format (e.g., PCM 64kbps, GSM 13kbps, Motion JPEG, MPEG2 video).
- Order of Packets: Uses a sequence number to help reconstruct the stream.
- Timestamp: Improves buffering on the client side.
- Stream ID: Allows one RTP session to carry multiple streams.
- Supports multicast for efficient delivery to multiple recipients.
Real-time Transport Control Protocol (RTCP)
RTCP exchanges information between the sender and receiver about the reliability and quality of the connection. This information includes:
- Ratio of lost packets
- Average delay
- Dispersion of delay (jitter)
- Receiver’s ability to process the stream
- Description of the RTP stream