CCNA QoS Traffic Management
Notes
Chapter #1 – Class Models
We don’t need to guess which classes to use. There are several good models that we can use as a template, and adjust according to our needs. Cisco have a 4/5-class, 8-class, and 12-class model.
If you don’t have QoS in your environment yet, it’s simplest to start with the 4/5-class model, and then move to the next model as your network matures.
The 4-class model looks like this:
| Class | Marking | Bandwidth |
|---|---|---|
| Real-time | EF | 33% |
| Signaling / Critical | CS3 | 7% |
| Transactional | AF31 | 35% |
| Best Effort | BE | 25% |
Chapter #2 – Queueing and Scheduling
One action is queueing. Each physical interface has several logical queues. Packets queue here while waiting to be sent. We can align queues with traffic classes, and treat them with different priorities.
The scheduler decides which queue is serviced next. A simple round-robin scheduler takes a packet from each queue in turn, but this doesn’t apply appropriate priorities to different queues.
A better way is Weighted Round-Robin, where queues still take turns but more important queues are serviced more often. On a Cisco router, this is called Class-Based Weighted Fair Queueing (CBWFQ). This is good for general traffic, but not real-time traffic.
With Strict-Priority queueing, one queue is serviced straight away whenever there are packets in it. This can lead to queue starvation, where other queues aren’t serviced enough. This is good for real-time traffic, but not general traffic.
Low-Latency Queueing (LLQ) is a hybrid between Strict-Priority and CBWFQ. This balances the best of both methods and is the recommended approach in most cases.
When a queue fills up, packets need to drop. This is a tail drop, as packets are dropped from the tail of the queue. To tune this, we can use drop probabilities. Packets in a class with a high drop probability are dropped before other packets.
Chapter #3 – Policing and Shaping
QoS offers two rate-limiting tools: Policing and Shaping. They both have a rate limit set. Any traffic under this limit is conforming, and any traffic over this limit is non-conforming.
The difference is how they handle non-conforming traffic. A policer will drop non-conforming traffic (or take another action such as remarking). A shaper will buffer the packets in a queue to send them out when there’s more bandwidth available.
Small bursts over the rate-limit are usually allowed, making the rate-limiters a little bit ‘friendly’.
Rate-limiters don’t have a good effect on some traffic, such as real-time traffic. They drop or delay the delivery of these packets.
Chapter #4 – Congestion
One of QoS’ jobs is to avoid congestion when possible. One way it can do this is with TCP windowing.
When packets are sent with TCP, the receiver needs to send an acknowledgment (ACK). If the ACK doesn’t make it to the original sender, the original traffic is resent.
It’s slow to ACK each packet individually, so one ACK can cover many packets. The number of packets covered by one ACK is called the Window Size. If an ACK isn’t received, the traffic in that window needs to be resent, and the window size shrinks.
A smaller window effectively slows the sender down, as it needs to spend more time waiting for ACK messages, and less time sending.
QoS uses this when a queue starts filling up. It will drop a random packet or two, which forces the sender to slow down and helps with congestion for a while. QoS will drop more packets the more full a queue is.
Command Summary
| Command | Mode | Description |
|---|---|---|
| class-map | Global Config | Create/modify a QoS class |
| match … | Class-map Config | Match criteria, such as DSCP markings |
| policy-map | Global Config | Create/modify a QoS policy |
| priority percent … | Policy-map Config | Create a strict priority queue with bandwidth reservation |
| bandwidth percent | Policy-map Config | Allocate bandwidth to a queue |
| service-policy … | Interface Config | Apply a QoS policy to an interface (with a direction) |
| police … | Policy-map Config | Create a policer (rate-limiter) |
| shape average … | Policy-map Config | Create a shaper (rate-limiter) |