QoS Hardware Queues vs Software Queues
Network devices are designed with queues or buffers that temporarily store frames or packets in the event that an interface receives traffic beyond what it is able to handle. The use of queues is part of the Quality of Service (QoS) set of features that are available on these devices.
The way the operate depends upon the type of platform.
Cisco Routers
On most Cisco routers, each port has a hardware queue and a software queue. The hardware queue is embedded in the physical port or shared hardware on some platforms. The memory for the hardware queue may be dedicated per port or shared among several ports, depending on the device architecture. QoS mechanisms cannot directly influence the hardware queue since it operates at a fixed, hard-wired level. However, on some platforms, the length of the hardware queue can be configured.
The software queue, by contrast, resides in the device's RAM or other dedicated memory, depending on the platform. All configurable QoS mechanisms, such as traffic shaping, policing, or advanced queuing techniques (e.g., Class-Based Weighted Fair Queuing, Low Latency Queuing), are applied to the software queue. These mechanisms determine how packets are prioritized and processed before reaching the hardware queue for final transmission.
Cisco Switches
When it comes to Cisco Switches, the behavior becomes much more complex. It involves mechanisms that manages packet handling through hardware buffers, queues, and thresholds. This is especially true for platforms like the Catalyst 3560 and 3750, where the configuration process can be intricate. While newer platforms, such as the Catalyst 3850, adopt the Modular QoS CLI (MQC), making configuration more consistent with routers, the underlying principles of hardware-based QoS remain similar.
By default, QoS queuing is active on Cisco switches, even without explicit configuration. This default behavior is entirely hardware-driven, leveraging ingress and egress queues, interface-specific buffers, and a shared global buffer pool. The switch automatically assigns buffers and thresholds to queues based on traffic class. In most cases, about 80% of the buffer resources are reserved for unmarked traffic when QoS is not configured. This allocation is not visible through standard show commands but when testing, these are the numbers you'll roughly see.
Each interface has dedicated buffers for incoming (ingress) and outgoing (egress) traffic, further divided into multiple queues. Each queue operates with distinct thresholds to manage traffic bursts and congestion. Additionally, a shared global buffer pool is available for dynamic allocation when individual interface buffers are insufficient.
Platform Specific
Remember, the QoS mechanism behavior you will encounter is highly platform dependent and can change depending on the type of device (switch/router) and even the operating system (IOS/IOS-XE/IOS-XR/NS-OX) that is in use.
Links:
https://networklessons.com/quality-of-service/qos-llq-low-latency-queueing-cisco-ios
https://networklessons.com/quality-of-service/apply-cbwfq-to-sub-interface