QoS Queuing – CBWFQ, LLQ & WFQ
1. Why Queuing Matters — The Congestion Problem
Queuing is the QoS mechanism that determines the order in which packets are transmitted when an interface cannot send them all immediately. Congestion occurs whenever packets arrive at an interface faster than the interface can transmit them — the excess packets must wait in a queue. Without intelligent queuing, a single large file transfer can flood the transmit queue and force every other packet — including a real-time voice call — to wait its turn.
Different types of traffic have radically different tolerance for delay and packet loss:
| Traffic Type | Delay Sensitivity | Loss Sensitivity | Bandwidth Need |
|---|---|---|---|
| VoIP (voice) | Extreme — <150 ms one-way; >150 ms causes noticeable degradation | Low — a few lost packets cause brief clicks; recoverable | Low — 8–100 kbps per call depending on codec |
| Video conferencing | High — <150 ms preferred; jitter must be minimal | Medium — loss causes pixelation or freeze-frames | Medium — 384 kbps to several Mbps |
| Interactive data (SSH, Citrix) | Medium — users notice >200 ms response time | Low — TCP retransmits handle loss | Very low — small packets, bursty |
| Transactional data (ERP, databases) | Low-medium — batch queries tolerate moderate delay | Low — TCP handles retransmission | Medium — variable |
| Bulk data (file transfer, backup) | Low — throughput matters more than latency | Very low — TCP retransmits transparently | High — can fill a link if unconstrained |
The goal of queuing is to ensure high-priority, delay-sensitive traffic (voice, video) is transmitted first and given guaranteed bandwidth, while lower-priority bulk traffic uses whatever capacity remains.
Related pages: QoS Overview | QoS Marking – DSCP & CoS | QoS Policing & Shaping | ACL Overview | Voice VLAN | show interfaces | CBWFQ & LLQ Configuration Lab | MQC QoS Basics Lab
2. FIFO — First In, First Out (Baseline)
FIFO (First In, First Out) is the simplest queuing method and the default on high-speed interfaces (>2 Mbps) in Cisco IOS. Packets are placed in a single queue in the order they arrive and transmitted in exactly that order — no packet receives priority treatment of any kind.
FIFO Limitations
| Limitation | Impact |
|---|---|
| No traffic differentiation | Voice and bulk data compete equally for queue space — bulk wins by volume |
| Head-of-line blocking | A single large flow (FTP, backup) can monopolise the queue and starve all other traffic |
| Unpredictable latency | Delay depends entirely on what happens to be queued ahead — voice latency can spike during data bursts |
| No bandwidth guarantees | Any class of traffic can consume all available bandwidth |
3. WFQ — Weighted Fair Queuing
WFQ (Weighted Fair Queuing) is the default queuing method on serial interfaces with bandwidth <2 Mbps in Cisco IOS. WFQ automatically creates separate queues for each traffic flow (identified by source/destination IP, protocol, and port) and allocates bandwidth fairly between them. Flows with higher IP Precedence values receive proportionally more bandwidth.
WFQ Limitations
| Limitation | Why It Matters |
|---|---|
| No administrator-defined classes | WFQ classifies by flow automatically — you cannot define custom classes or assign specific bandwidth guarantees |
| No strict-priority queue | Voice is weighted higher but still shares the scheduler — absolute minimum latency cannot be guaranteed |
| Does not scale with many flows | With hundreds of concurrent flows, the scheduling overhead increases and per-flow differentiation weakens |
| Cannot allocate by percentage or kbps | Bandwidth allocation is proportional to weight only — not expressible as "allocate 128 kbps to voice" |
4. CBWFQ — Class-Based Weighted Fair Queuing
CBWFQ (Class-Based Weighted Fair Queuing) extends WFQ by allowing administrators to define explicit traffic classes and assign each class a guaranteed minimum bandwidth. Each class gets its own queue. When the link is congested, each class is guaranteed at least its configured bandwidth share — and may use more if other classes are idle. Any traffic that does not match a defined class falls into the class-default queue.
CBWFQ Architecture
CBWFQ Bandwidth Allocation Methods
| Method | Command | Notes |
|---|---|---|
| Absolute kbps | bandwidth <kbps> |
Reserves a fixed number of kilobits per second for this class. The total of all class bandwidth values must not exceed 75% of the interface bandwidth (25% reserved for overhead and routing protocol traffic). |
| Percentage | bandwidth percent <pct> |
Allocates a percentage of the interface bandwidth. All class percentages must not exceed 100% (practical max ~75% for user traffic). More portable — does not need recalculation if interface bandwidth changes. |
| Remaining percentage | bandwidth remaining percent <pct> |
Allocates a share of whatever bandwidth remains after absolute/priority allocations are satisfied. Useful for lower-priority best-effort classes. |
CBWFQ Limitation — The Voice Problem
5. LLQ — Low Latency Queuing
LLQ (Low Latency Queuing) is CBWFQ with the addition of a
strict-priority queue. LLQ adds a priority
command to one or more traffic classes. The strict-priority queue
is always serviced first — before any other queue —
regardless of how much data other queues have waiting. This
guarantees the absolute minimum possible queuing delay for the
prioritised class (typically voice).
LLQ Architecture
Strict Priority — The Starvation Risk
LLQ vs CBWFQ — Key Differences
| Feature | CBWFQ | LLQ (CBWFQ + Priority) |
|---|---|---|
| Priority queue | No — all classes share the scheduler fairly | Yes — priority class always served first |
| Guaranteed bandwidth | Yes — minimum bandwidth per class | Yes — plus absolute priority service for priority class |
| Latency guarantee | No — queuing delay possible even with bandwidth guarantee | Yes — strict-priority class experiences minimal queuing delay |
| Starvation risk | Low — fair share scheduling prevents starvation | Mitigated — priority queue is policed to prevent domination |
| Recommended for voice | No — insufficient latency control | Yes — the gold standard for enterprise voice QoS |
| IOS command | bandwidth |
priority (one class) + bandwidth
(all other classes) |
6. The Modular QoS CLI (MQC) Framework
CBWFQ and LLQ are configured using the Modular QoS CLI (MQC) framework — a three-part structure consisting of class maps (identify traffic), policy maps (define actions), and service policies (apply to interfaces). MQC is the standard Cisco IOS QoS configuration model used for all modern QoS features.
MQC three-part structure: ┌─────────────────┐ ┌──────────────────┐ ┌───────────────────┐ │ class-map │────►│ policy-map │────►│ service-policy │ │ │ │ │ │ │ │ Identifies │ │ Defines actions │ │ Applies the │ │ traffic by: │ │ per class: │ │ policy to an │ │ DSCP value │ │ bandwidth │ │ interface or │ │ ACL match │ │ priority │ │ sub-interface: │ │ CoS value │ │ police │ │ in or out │ │ protocol │ │ shape │ │ │ │ input interface│ │ set (re-mark) │ │ │ └─────────────────┘ └──────────────────┘ └───────────────────┘
class-map — match Conditions
! Match traffic by DSCP value: Router(config)# class-map match-any VOICE Router(config-cmap)# match dscp ef ! Expedited Forwarding (voice payload) ! Match by DSCP AF (Assured Forwarding) values: Router(config)# class-map match-any VIDEO Router(config-cmap)# match dscp af41 ! video conferencing Router(config)# class-map match-any CRITICAL Router(config-cmap)# match dscp af31 ! critical data apps Router(config)# class-map match-any BULK Router(config-cmap)# match dscp cs1 ! scavenger / bulk (below best effort) ! Match by ACL (extended ACL identifies the traffic): Router(config)# class-map match-all HTTP_TRAFFIC Router(config-cmap)# match access-group name ACL_HTTP ! match-all: ALL conditions must match (logical AND) ! match-any: ANY condition matches (logical OR)
match-all vs match-any
| Keyword | Logic | Use Case |
|---|---|---|
match-all |
ALL match statements must be true (AND logic) | Use when traffic must satisfy multiple criteria simultaneously (e.g., from a specific source AND marked with a specific DSCP) |
match-any |
ANY one match statement is sufficient (OR logic) | Use when traffic can be identified by multiple independent criteria (e.g., DSCP EF OR CoS 5 are both voice) |
7. Full CBWFQ Configuration
The following is a complete CBWFQ configuration with four traffic classes on a 10 Mbps WAN interface. No strict-priority queue — this demonstrates pure CBWFQ bandwidth allocation.
Scenario: 10 Mbps WAN link Classes: Video (30%), Critical data (20%), Bulk data (10%), Default (remainder) ! ── Step 1: Define class maps ───────────────────────────────────────────── Router(config)# class-map match-any CLASS_VIDEO Router(config-cmap)# match dscp af41 Router(config-cmap)# match dscp af42 Router(config-cmap)# exit Router(config)# class-map match-any CLASS_CRITICAL Router(config-cmap)# match dscp af31 Router(config-cmap)# match dscp af32 Router(config-cmap)# exit Router(config)# class-map match-any CLASS_BULK Router(config-cmap)# match dscp cs1 Router(config-cmap)# exit ! ── Step 2: Define policy map with bandwidth actions ───────────────────── Router(config)# policy-map WAN_CBWFQ Router(config-pmap)# class CLASS_VIDEO Router(config-pmap-c)# bandwidth percent 30 ! 30% = 3000 kbps Router(config-pmap-c)# exit Router(config-pmap)# class CLASS_CRITICAL Router(config-pmap-c)# bandwidth percent 20 ! 20% = 2000 kbps Router(config-pmap-c)# exit Router(config-pmap)# class CLASS_BULK Router(config-pmap-c)# bandwidth percent 10 ! 10% = 1000 kbps Router(config-pmap-c)# exit Router(config-pmap)# class class-default Router(config-pmap-c)# fair-queue ! WFQ within default class Router(config-pmap-c)# exit ! ── Step 3: Apply the policy map outbound on the WAN interface ─────────── Router(config)# interface serial 0/0/0 Router(config-if)# bandwidth 10000 ! inform IOS of link speed (kbps) Router(config-if)# service-policy output WAN_CBWFQ ! service-policy output = apply queuing outbound (when interface is transmitting) ! Queuing only applies outbound — you cannot queue inbound traffic on a router
8. Full LLQ Configuration
LLQ is the recommended queuing strategy for networks carrying both
voice and data. A single class uses the priority
command for the strict-priority queue; all other classes use
bandwidth. Only one priority class is recommended
(though multiple are technically possible in modern IOS).
Scenario: 10 Mbps WAN link with VoIP, video, critical data, bulk, and default. ! ── Step 1: Define class maps ───────────────────────────────────────────── Router(config)# class-map match-any CLASS_VOICE Router(config-cmap)# match dscp ef ! voice payload Router(config-cmap)# exit Router(config)# class-map match-any CLASS_VIDEO Router(config-cmap)# match dscp af41 Router(config-cmap)# exit Router(config)# class-map match-any CLASS_CRITICAL Router(config-cmap)# match dscp af31 Router(config-cmap)# exit Router(config)# class-map match-any CLASS_BULK Router(config-cmap)# match dscp cs1 Router(config-cmap)# exit ! ── Step 2: Policy map — priority for voice, bandwidth for others ───────── Router(config)# policy-map WAN_LLQ Router(config-pmap)# class CLASS_VOICE Router(config-pmap-c)# priority percent 20 ! strict priority, policed at 20% Router(config-pmap-c)# exit ! = 2000 kbps on a 10 Mbps link Router(config-pmap)# class CLASS_VIDEO Router(config-pmap-c)# bandwidth percent 30 ! 3000 kbps guaranteed minimum Router(config-pmap-c)# exit Router(config-pmap)# class CLASS_CRITICAL Router(config-pmap-c)# bandwidth percent 20 ! 2000 kbps guaranteed minimum Router(config-pmap-c)# exit Router(config-pmap)# class CLASS_BULK Router(config-pmap-c)# bandwidth percent 5 ! 500 kbps guaranteed minimum Router(config-pmap-c)# exit Router(config-pmap)# class class-default Router(config-pmap-c)# bandwidth remaining percent 25 ! remaining share Router(config-pmap-c)# exit ! ── Step 3: Apply outbound on the WAN interface ─────────────────────────── Router(config)# interface serial 0/0/0 Router(config-if)# bandwidth 10000 Router(config-if)# service-policy output WAN_LLQ
priority vs priority percent
9. class-default — The Catch-All Queue
class-default is a special pre-defined class that automatically matches all traffic not matched by any explicit class-map. It is always present in a policy-map and always evaluated last. Without class-default, unclassified traffic falls into a default FIFO queue outside the policy.
10. Queue Depth — Tail Drop and WRED
When a queue fills to its maximum depth (the queue limit), arriving packets have nowhere to go. The router must discard them. The default discard policy is tail drop — the newest arriving packet is discarded. CBWFQ supports configuring WRED (Weighted Random Early Detection) as a smarter alternative.
Tail Drop
WRED — Weighted Random Early Detection
WRED proactively discards packets BEFORE the queue fills completely. Discards are randomised — different TCP flows are affected at different times, preventing global synchronisation. WRED thresholds (per DSCP class): ┌─────────────────────────────────────────────────────────────────┐ │ Queue depth 0% → min-threshold │ │ Queue depth at min-threshold → begin random early discard │ │ (low probability at min, increasing probability toward max) │ │ Queue depth at max-threshold → discard all new arrivals │ │ Queue depth → 100% (tail drop) → discard all │ └─────────────────────────────────────────────────────────────────┘ Higher DSCP = higher min/max thresholds = less likely to be dropped early. Lower DSCP (best effort) = lower thresholds = more aggressively dropped. Enable WRED in a CBWFQ class: Router(config-pmap-c)# random-detect dscp-based ! DSCP-based WRED thresholds Router(config-pmap-c)# random-detect dscp ef 40 60 10 ! min 40, max 60, mark 10
11. Queuing Only Activates During Congestion
A critically important principle: queuing mechanisms — FIFO, WFQ, CBWFQ, and LLQ — only take effect when an interface is congested. When an interface has spare transmit capacity and the queue is empty, every packet is transmitted immediately regardless of its class. Queuing defines what happens to packets that cannot be transmitted immediately.
12. Verification and Monitoring Commands
! Show policy-map details including class definitions and actions: Router# show policy-map WAN_LLQ ! Show the policy applied to a specific interface — includes real-time statistics: Router# show policy-map interface serial 0/0/0 ! Show class-map definitions: Router# show class-map ! Show a specific class-map: Router# show class-map CLASS_VOICE ! Show QoS queue statistics on an interface: Router# show queue serial 0/0/0 ! Show interface queuing strategy (FIFO, WFQ, custom): Router# show interfaces serial 0/0/0 | include Queueing
Sample Output — show policy-map interface
Router# show policy-map interface serial 0/0/0
Serial0/0/0
Service-policy output: WAN_LLQ
Class-map: CLASS_VOICE (match-any)
0 packets, 0 bytes
5 minute offered rate 1856000 bps, drop rate 0 bps
Match: dscp ef (46)
0 packets, 0 bytes
Queueing
Strict Priority
Output Queue: Conversation 264
Bandwidth 20% (2000 kbps), burst size 50000
(pkts matched/bytes matched) 14820/1421720
(total drops/bytes drops) 0/0 ← 0 drops = voice within budget
Class-map: CLASS_VIDEO (match-any)
(pkts matched/bytes matched) 8231/9452340
(total drops/bytes drops) 143/163560 ← some drops — congestion occurring
Class-map: CLASS_CRITICAL (match-any)
(pkts matched/bytes matched) 3420/2134480
(total drops/bytes drops) 0/0
Class-map: CLASS_BULK (match-any)
(pkts matched/bytes matched) 9910/45231600
(total drops/bytes drops) 2870/13104600 ← bulk traffic heavily dropped (expected)
Class-map: class-default (match-any)
(pkts matched/bytes matched) 1231/432100
(total drops/bytes drops) 0/0
Key fields to examine:
- offered rate: how much traffic is arriving for this class
- drop rate: how much is being dropped (non-zero = congestion in this class)
- total drops: cumulative drops since last clear
- Strict Priority: confirms this is the LLQ priority class
Common Troubleshooting Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
| Voice drops in priority queue | Priority class bandwidth too low — more voice traffic than allocated | Increase priority percent or reduce number of
simultaneous calls; check codec bandwidth requirements |
| Policy not taking effect | Service-policy applied in wrong direction (inbound instead of output), or not applied at all | Verify with show policy-map interface;
queuing must be applied output |
| Class-map matching zero packets | DSCP marking not set on the traffic, or wrong DSCP value in the class-map match | Verify markings with show policy-map interface
and check upstream marking policy |
| Bandwidth total exceeds 75% | Sum of all bandwidth and priority
allocations exceeds 75% of link bandwidth |
Cisco IOS reserves 25% for overhead; reduce class allocations so total user traffic ≤ 75% |
13. Queuing Methods Comparison — Summary
| Feature | FIFO | WFQ | CBWFQ | LLQ |
|---|---|---|---|---|
| Queue type | Single | Per-flow (auto) | Per class (admin-defined) | Priority + per class |
| Admin-defined classes | No | No | Yes | Yes |
| Bandwidth guarantee | No | Proportional by weight | Yes — per class | Yes — per class + priority |
| Latency guarantee | No | No | No | Yes — priority class only |
| Prevents starvation | No | Yes (per flow) | Yes (per class) | Yes (priority policed) |
| Suitable for voice | No | Partially | No | Yes |
| Configuration effort | None (automatic) | None (automatic) | Medium (MQC) | Medium (MQC) |
| Default on Cisco IOS | High-speed interfaces | Serial <2 Mbps | No (must configure) | No (must configure) |
14. QoS Queuing Summary — Key Facts
| Topic | Key Fact |
|---|---|
| FIFO default | Default on interfaces >2 Mbps; single queue; no differentiation; head-of-line blocking risk |
| WFQ default | Default on serial interfaces <2 Mbps; automatic per-flow queuing; no admin-defined classes |
| CBWFQ | Admin-defined classes with guaranteed minimum bandwidth;
uses bandwidth command; no strict-priority queue |
| LLQ = CBWFQ + priority | Adds a strict-priority queue using priority
command; priority class served before all others;
priority queue is policed to prevent starvation |
| MQC structure | class-map (match traffic) → policy-map (define actions) → service-policy (apply to interface) |
| service-policy direction | Always output for queuing —
queuing applies to outbound transmit queue only |
| priority command | Creates strict-priority queue; polices to configured rate; excess dropped immediately; use for voice (DSCP EF) |
| bandwidth command | Guarantees minimum bandwidth for a class during congestion; idle class bandwidth redistributed to active classes |
| 75% rule | Total of all bandwidth + priority
allocations must not exceed 75% of interface bandwidth —
25% reserved for overhead |
| class-default | Pre-defined catch-all; matches all unclassified traffic; always present; always last |
| Queuing activates when | Interface is congested — packets queued faster than transmitted; no effect at low utilisation |
| Voice best practice | LLQ with priority percent 20 (or appropriate
size) for DSCP EF traffic; CBWFQ for all other classes |
15. QoS Queuing Quiz
Related Topics & Step-by-Step Tutorials
Continue your QoS studies:
- QoS – Quality of Service Overview — QoS concepts — classification, marking, queuing, shaping
- QoS Marking – DSCP, CoS & IP Precedence — DSCP, CoS, IP Precedence — marking packets
- QoS Queuing – CBWFQ, LLQ & WFQ — FIFO, WFQ, CBWFQ, LLQ — queuing methods
- QoS Traffic Policing & Shaping — policing vs shaping — token bucket algorithm
- Wide Area Network (WAN) — WAN links where QoS matters most
- MQC — Modular QoS CLI Basics (Step-by-Step)
- DSCP Marking & Classification (Step-by-Step)
- Traffic Shaping vs Policing (Step-by-Step)
- LLQ — Low Latency Queuing for Voice (Step-by-Step)