QoS
Traffic Shaping
Commited Burst
This is the amount of traffic (in bits) allowed to be sent in each Tc interval at the Committed Information Rate (CIR).
Bc = CIR × Tc / 1000
CIR is in bits per second (bps)
Tc is in milliseconds (ms)
Bc is in bits
Example: If CIR = 512,000 bps and Tc = 20 ms: Bc = 512,000 × 20 / 1000 = 10,240 bits -> This means the shaper allows 10,240 bits every 20 ms.
Excess Burst
This is additional traffic allowed beyond Bc if there’s unused bandwidth (i.e., tokens left in the bucket). It’s optional and used in three-color marking (conform, exceed, violate).
Usually Bc = Be, but can be adjusted based on how much burstiness you want to allow.
Be = Bc: moderate bursting
Be = 2 x Bc: aggressive bursting
This allows the router to send more than Bc if tokens have accumulated (i.e., if traffic was below CIR previously).
With Be = 0, excess traffic above Bc/Tc is immediately dropped or delayed, which can be fine-tuned if you have bursty traffic patterns.
Queue Limit
The number of packet in the buffer
Rule of thumb:
For WAN shaping (e.g. 10–500 Mbps): Queue limit of 10–50 ms worth of traffic
Can calculate that based on the interface speed and average packet size
Example: link speed = 500Mbps
Average packet size: 1000 bytes (8000 bits)
Desired buffering: 50 ms worth of traffic
Formula: Buffer size (in packets) = (CIR × buffering time) / average packet size
(500,000,000 × 0.05) / 8000 ≈ 3125 packets
Memory ≈ queue depth × average packet size
Check Memory Usage:
show platform hardware qfp active datapath utilization summary
show platform hardware qfp active statistics drop
show memory statistics history table
EEM Event to check interface drop
Bandwidth Delay Product
The BDP is a foundational concept in networking that represents the maximum amount of data “in flight” on a link.
It’s calculated as: BDP = Bandwidth × Round-Trip Time (RTT)
This helps determine:
How big queues should be to absorb bursts without dropping packets
How much buffering is needed to maintain throughput without inducing latency
Cisco’s Enterprise QoS Solution Reference Network Design (SRND) and Catalyst QoS Deep Dive sessions recommend: Queue size ≈ 10–50 ms worth of traffic, depending on:
Link speed
Application sensitivity (e.g., voice vs. bulk data)
Hardware buffer capacity
This is why the common formula is: Queue size (bits) = Bandwidth × 0.01 to 0.05 seconds. Then divide by average packet size to get the queue limit in packets.
Why It Matters
Too small a queue → drops during microbursts
Too large a queue → bufferbloat and latency
Just right → smooth traffic, minimal jitter, and efficient shaping
If tuning for real-time traffic (like VoIP), Cisco also recommends strict priority queues with burst bytes sized to 1.5× the BDP of the voice stream.
Example using 500 Mbps link and a target latency budget to size queues for different traffic types.
Let’s assume you have three main traffic types:
Voice (EF) — latency-sensitive
Video (AF41) — bursty but delay-tolerant
Bulk data (AF11/BE) — best-effort
Target queuing delay is:
Voice: 10 ms
Video: 50 ms
Bulk: 100 ms
Assume average packet size = 1000 bytes (8000 bits)
So
Voice Queue: BDP = 500,000,000 × 0.01 = 5,000,000 bits → 625 packets
Video Queue: BDP = 500,000,000 × 0.05 = 25,000,000 bits → 3125 packets
Bulk Queue: BDP = 500,000,000 × 0.1 = 50,000,000 bits → 6250 packets
Sample configuration
Reference
Last updated