🪦

Practical QoS

Network Traffic Control & Network Modeling

OpalSoft.net • 2002 – 2020

"Focusing on Network Quality of Service from a practical point of view"

About Practical QoS

For nearly two decades, Practical QoS was a comprehensive resource dedicated to Network Quality of Service (QoS). Created and maintained by Leonardo Balliache, this site helped network administrators, engineers, and students understand and implement QoS solutions across various platforms.

The site covered a wide range of topics divided into four main sections:

Topics included real-time traffic bandwidth reservation, network congestion management, VoIP quality optimization, and practical solutions for traffic shaping and prioritization.

The site was known for its practical, hands-on approach to explaining complex networking concepts, making QoS accessible to practitioners who needed real-world solutions rather than just theoretical knowledge.

Understanding Quality of Service (QoS)

Quality of Service represents a set of technologies and techniques designed to manage network traffic and ensure reliable delivery of critical applications. In modern networks, different types of traffic have vastly different requirements. Voice and video calls require low latency and minimal jitter, while file transfers can tolerate delays but benefit from high throughput. Email and web browsing fall somewhere in between. Without QoS mechanisms, all traffic is treated equally, leading to poor performance for time-sensitive applications during periods of network congestion.

The fundamental challenge QoS addresses is resource scarcity. Network bandwidth, buffer space, and processing capacity are finite resources that must be shared among competing traffic flows. When demand exceeds available capacity, packets must be queued or dropped. QoS provides the tools to make intelligent decisions about which packets receive priority, which can be delayed, and which should be dropped when necessary.

Network congestion occurs when too many packets attempt to traverse a network link simultaneously. Traditional networks handle this through simple FIFO (First In, First Out) queuing, where packets are processed in the order they arrive. This approach fails to account for the varying needs of different applications. A delayed video conference packet causes noticeable quality degradation, while a delayed email has no perceptible impact on user experience.

QoS mechanisms operate at multiple layers of the network stack. At the data link layer, technologies like 802.1p provide priority tagging for Ethernet frames. At the network layer, IP precedence and DSCP (Differentiated Services Code Point) markings classify packets into different service classes. These markings allow network devices to identify packet priority and apply appropriate treatment as traffic flows through the network.

Linux QoS Implementation

Linux provides powerful and flexible QoS capabilities through its traffic control (tc) subsystem. The Linux kernel includes sophisticated queuing disciplines (qdiscs) that enable fine-grained control over packet scheduling and shaping. Unlike proprietary solutions, Linux QoS is completely open-source, allowing administrators to understand exactly how traffic is being managed and customize behavior to meet specific requirements.

The tc command-line tool serves as the primary interface for configuring Linux QoS. Through tc, administrators can attach queuing disciplines to network interfaces, create traffic classes, and define filters to classify packets. Common queuing disciplines include HTB (Hierarchical Token Bucket) for bandwidth shaping, PRIO for priority-based queuing, and SFQ (Stochastic Fairness Queuing) for ensuring fair bandwidth distribution among flows.

HTB is particularly popular for bandwidth management because it allows hierarchical rate limiting. Administrators can define a total bandwidth limit for an interface, then subdivide that bandwidth among different traffic classes. For example, you might allocate 50% of bandwidth to business-critical applications, 30% to general internet traffic, and 20% to bulk transfers. HTB ensures these allocations are respected while still allowing unused bandwidth to be borrowed by other classes when available.

Packet classification in Linux uses the powerful filter framework. Filters can match packets based on IP addresses, port numbers, protocol types, DSCP markings, or even packet payload content. The u32 filter provides extensive matching capabilities using bitmasks and offsets, while the fw filter leverages iptables firewall marks for classification. This flexibility allows administrators to implement complex traffic policies that precisely match their network requirements.

For VoIP and real-time applications, Linux supports priority queuing mechanisms that ensure low-latency delivery. The PRIO qdisc provides multiple priority bands, with higher-priority traffic always transmitted before lower-priority traffic. Combined with appropriate packet classification, this ensures voice packets experience minimal delay even during network congestion. The IMQ (Intermediate Queuing Device) allows QoS policies to be applied to incoming traffic, not just outgoing, providing complete control over traffic flow.

Advanced Linux QoS implementations often combine multiple queuing disciplines in hierarchical arrangements. A common pattern uses HTB for bandwidth allocation at the top level, with PRIO or SFQ attached to individual classes for fine-grained scheduling. This layered approach provides both bandwidth guarantees and latency optimization, meeting the diverse requirements of modern network applications.

Cisco QoS Technologies

Cisco routers and switches offer comprehensive QoS features designed for enterprise networks. Cisco's QoS implementation follows a modular approach based on the Modular QoS CLI (MQC), which separates traffic classification, marking, and policy enforcement into distinct configuration steps. This modular design makes complex QoS policies easier to understand and maintain.

The foundation of Cisco QoS is the class-map, which defines criteria for identifying specific traffic types. Class-maps can match traffic based on access control lists, DSCP values, IP precedence, protocols, or application signatures. Once traffic is classified, policy-maps define the actions to apply to each class. These actions might include marking packets with specific DSCP values, rate-limiting traffic, or assigning packets to particular queues.

Class-Based Weighted Fair Queuing (CBWFQ) is a cornerstone of Cisco QoS. CBWFQ allows administrators to define multiple traffic classes and guarantee minimum bandwidth for each class. Unlike simple priority queuing, CBWFQ prevents high-priority traffic from completely starving lower-priority traffic. Each class receives its guaranteed bandwidth, with any excess bandwidth distributed proportionally based on configured weights.

For latency-sensitive applications, Cisco provides Low Latency Queuing (LLQ), which combines CBWFQ with a strict priority queue. Traffic assigned to the priority queue is always transmitted before other traffic, ensuring minimal delay for voice and video. To prevent priority traffic from monopolizing the link, LLQ includes policing mechanisms that limit the amount of bandwidth priority traffic can consume.

Traffic shaping and policing are essential tools for managing bandwidth. Shaping buffers excess traffic to smooth bursts and ensure transmission rates don't exceed configured limits. This is particularly important when connecting to service provider networks with strict rate limits. Policing, in contrast, drops or marks packets that exceed configured rates, providing a more aggressive approach to rate limiting. Cisco supports both mechanisms, allowing administrators to choose the appropriate tool for each situation.

Cisco's AutoQoS feature simplifies QoS deployment by automatically generating configurations based on best practices. For VoIP deployments, AutoQoS can detect Cisco IP phones, configure appropriate trust boundaries, and apply recommended QoS policies. While AutoQoS provides a good starting point, most enterprise deployments require customization to match specific network requirements and application mixes.

Windows QoS Capabilities

Windows operating systems include built-in QoS capabilities that allow applications and administrators to prioritize network traffic. The Windows QoS Packet Scheduler operates at the network driver level, providing the ability to mark packets with DSCP values and apply rate limits. This integration allows Windows systems to participate effectively in QoS-enabled networks.

Group Policy provides centralized QoS management for Windows networks. Administrators can create QoS policies that apply to specific applications, users, or computers. These policies can mark traffic with appropriate DSCP values, ensuring Windows-generated traffic receives proper treatment as it traverses the network. For example, you might configure policies to mark Microsoft Teams traffic with EF (Expedited Forwarding) DSCP values, ensuring voice and video calls receive priority treatment.

Windows Server includes advanced QoS features through the Quality Windows Audio Video Experience (qWave) service. This service provides admission control for audio and video streams, ensuring the network has sufficient capacity before allowing new sessions to start. qWave also coordinates with network infrastructure to reserve bandwidth for multimedia applications, improving reliability for real-time communications.

The Windows Filtering Platform (WFP) provides programmatic access to network traffic, allowing custom applications to implement sophisticated QoS policies. Developers can create filters that inspect packets and make dynamic QoS decisions based on application state, network conditions, or business rules. This flexibility enables Windows systems to adapt QoS behavior to changing requirements without manual reconfiguration.

For network modeling and capacity planning, Windows supports various professional tools that help administrators design and validate QoS implementations before deployment. These simulation tools can model complex network topologies, generate realistic traffic patterns, and predict performance under different QoS configurations. By testing QoS policies in simulation, administrators can identify potential issues and optimize configurations before affecting production networks.

The Enduring Importance of QoS

As networks continue to evolve, QoS remains fundamental to ensuring reliable application performance. The proliferation of cloud services, remote work, and real-time collaboration tools has made QoS more critical than ever. Modern networks must simultaneously support video conferencing, VoIP calls, cloud application access, and traditional data transfers—all with acceptable performance.

The principles established by resources like Practical QoS continue to guide network engineers today. Understanding how different traffic types compete for resources, knowing when to apply shaping versus policing, and recognizing the importance of end-to-end QoS policies are timeless concepts. While specific technologies evolve, the fundamental challenge of managing scarce network resources to meet diverse application requirements remains constant.

Effective QoS implementation requires understanding both the technical mechanisms and the business requirements driving network usage. The best QoS policies align technical capabilities with organizational priorities, ensuring critical applications receive the resources they need while maintaining fair treatment for other traffic. This balance between technical excellence and business alignment is what separates successful QoS deployments from those that fail to deliver value.

Thank you, for sharing your knowledge with the networking community.

🌹