Introduction to QoS (Quality of Service)

Hi David,

I think this is best explained with an example. It comes up every now and then so I decided to lab it up and show how it works:

In a nutshell, there is a built-in bandwidth policer for the priority queue that prevents it from starving other queues. In this lesson you can see it in action with scenarios where I tested with/without priority queue and with/without congestion. I hope this helps.

Rene

Hello Rene.

Thank you very much for creating this lesson. I really like when a concept that contains a lot of theory is broken down into practical examples like this.

David

Hi David,

You are welcome. Sometimes it’s better to let the routers do the talking.

Rene

Hello, everyone.

May I know what exactly is the difference between WFQ and CBWFQ? I didn’t find satisfying documentation regarding WFQ online.

From what I’ve read, it’s a type of queuing/scheduling that prioritizes traffic based off flows? How exactly does that work? Are there no classes in classic WFQ?

Thank you.
David

Hello David

Take a look at the following NetworkLessons notes that clarify these technologies and their differences:

If you have any further questions, let us know!

I hope this has been helpful!

Laz

This was a great explanation of QoS. Yet, I have a question. Since 150 ms is an acceptable delay for voice, why is 10 ms recommended for the traffic shaping pause instead of 100 ms? 2 ms doesn’t seem to be a lot of time to transfer packets when it’s only 200 packets/second for voice.

Hello Roger

This is an excellent question, and it is an important one to understand the difference between these values stated here. Also, this is a VoIP-related question, an VoIP is really close to my heart, as it is the area of networking I started out with many years ago… :slightly_smiling_face:

The 150ms delay for voice is called a delay budget defined in the ITU-T G.114 recommendation, which is a standards document defining acceptable thresholds for high-quality VoIP. A delay budget is the total end-to-end one-way delay. This budget must cover ALL delay components across the entire path, including:

  • Codec encoding/decoding: 5-30 ms (varies by codec)
  • Packetization delay: Typically 20 ms (time to fill a voice packet)
  • Serialization delay: Time to place bits on the wire for transmission (link-speed dependent)
  • Propagation delay: Physical travel time across the medium (~5-10 ms per 1000 km)
  • Queuing/buffering delay: Time waiting in queues (what QoS minimizes)
  • Jitter buffer delay: Receive-side buffer to smooth arrival times (30-60 ms)

The traffic shaping interval Tc is a parameter that affects only one of these components, specifically, the queuing/buffering delay introduced by the shaping buffer at one particular interface across the whole path.

If you configure Tc = 100ms at one router, packets can be buffered for up to 100 ms at just that single hop. This consumes 67% of your entire 150 ms budget at one hop!

If you are traversing multiple routers, and the Tc is set somewhat high on all of them, you can see how the delay accumulates.

So you see, the component of the delay that the Tc value affects is a small percentage of the total delay budget, but it can quickly add up, especially over many hops.

For a 1 Gbps connection, if you do the math, it turns out that in 2 ms, you can send 2 megabits, or 244KB. Because VoIP packets are typically around 1000 bits, or 125 bytes, you can see that many of them can be transmitted within a single 2ms interval. On the other hand hwoever, voice codecs will packetize voice at intervals of 20ms, so for voice, many of those 2ms intervals will not contain voice packets! On average, you’ll get one every 10 2ms intervals. So the “briefness” of the 2ms transmission period is not an issue with VoIP.

I hope this has been helpful!

Laz

Hey Laz,

Thank you for that explanation. It definitely was helpful!

1 Like