Course contents

Unit 5: QoS and AppQoELesson 5.6 (6 of 7 in this unit)27 of 63 in the Advanced Cisco SD-WAN course

QoS counters and queue-drop troubleshooting

How to read per-class queue counters in a fixed order: which class drops, why, the average packet size as a fingerprint of what is in a class, and a worked case where the video class stayed empty because a switch reset the marks.

Advanced · 15 min read

You'll learn to read the per-class counters on a WAN interface in a fixed order, tell expected drops from faulty ones, use the average packet size of a class to check what is in it, and prove a fix with before and after numbers.

Technical definition

A queue counter is a per-class tally kept by the edge for the traffic leaving an interface: packets and bytes sent, the offered rate, the drop rate and, for a weighted queue, the queue depth. Read together they show which class is in trouble, how much it loses and whether the traffic in it is the traffic the design expected.

Drops are how QoS works, so judge them by class

When a link is full, something has to wait or be lost. QoS decides what. A drop in the default class during a backup window is the policy doing its job. A drop in the voice class is not. The first question about any drop is therefore which class it is in.

Diagram
Which drop is a fault
Which drop is a fault

Drops in the default class while the link is full are expected. Drops in a protected class such as voice, or a protected class showing no traffic at all, point to a fault.

ExpectedDefault class dropswhile the link is full
A faultVoice drops, or aclass that is empty
Judge a counter against what the design intended for that class.

Read the counters in the same order every time

A fixed order saves time because each step removes a whole family of causes. Start with where the policy is attached, then find the class, then compare what it was offered with what it lost, and only then ask why.

Diagram
Five steps through the counters
Five steps through the counters

Check the policy is attached to the right interface in the output direction, find the class that loses packets, compare its offered rate with its drop rate, name the reason, and check that the traffic in the class is the traffic expected.

  1. 1 AttachedRight interface, output directionthe shaper on the same policy
  2. 2 ClassWhich class has dropsor has no traffic at all
  3. 3 RatesOffered rate against drop ratehow big the loss is
  4. 4 ReasonQueue full, priority exceededor a policer
  5. 5 ContentPacket size and marksis the right traffic in the class
Stop at the first step that finds the cause. The last step catches faults the first four cannot see.
Diagram
What the counters say
What the counters say
CounterWhat it tells youA warning sign
Offered rateHow much the class was asked to sendFar above or below what the design expected
Drop rateHow much of that was lostAnything above zero in a protected class
Queue depth against the limitWhether the queue is full right nowAt the limit for long periods
Total dropsPackets lost to a full queue since the counters were clearedRising in step with the offered rate
Priority exceed dropsPackets over the priority class's limitAny, because voice should fit inside its limit
Packets and bytesSize of the traffic: bytes divided by packetsAn average that does not match the traffic the class should hold
Names differ between platforms and releases. The idea of each row is the same.

The packet size is a fingerprint

Bytes divided by packets gives the average packet size in a class. It is not proof, but it is a quick test of whether the right traffic is there. With the 70-byte encapsulation assumed in the earlier lessons, G.711 voice leaves the edge as 270-byte packets and G.729 as 130-byte packets. Video and bulk transfers send packets of about a thousand bytes or more, up to the path limit.

Diagram
From counters to a packet size
From counters to a packet size

Divide the bytes in the voice class, 842,400,000, by its packets, 3,120,000. The answer is 270 bytes, which matches G.711 voice with 70 bytes of encapsulation.

  1. Bytes842,400,000
  2. Packets3,120,000
  3. Dividebytes bypackets
  4. 270 bytesmatches G.711voice
A quick test of whether the right traffic is in a class. It is not proof.
Diagram
Average packet size, as a fingerprint
Average packet size, as a fingerprint
TrafficTypical size on the wireIf a class averages this
G.711 voice270 bytesA voice class is full of voice
G.729 voice130 bytesA voice class is full of compressed voice
Video and bulk dataAbout 1,000 bytes and upA voice class holds something else, or a class meant for small packets is carrying video
Sizes follow from the packet arithmetic in the QoS concepts lesson and assume 70 bytes of encapsulation. Real figures depend on the codec and the platform.

The same counters give a rough call count. Once the average size is known to be 270 bytes, the offered rate of the voice class divided by the rate of one call says how many calls are behind it, and the priority limit says how many calls it can hold. The table works this out for the voice class in the worked example below.

Diagram
What the voice counters imply (computed)
What the voice counters imply (computed)
MeasureValueHow it is worked out
Average packet size270 bytes842,400,000 bytes divided by 3,120,000 packets
One call, one direction108 kbps270 bytes times 8 bits times 50 packets a second (20 ms packets assumed)
Calls behind 8.1 Mbps758,100 kbps divided by 108 kbps
Calls the 20 Mbps priority limit holds18520,000 kbps divided by 108 kbps, rounded down
Share of the priority limit in use40.5 percent8.1 Mbps divided by 20 Mbps
Assumes G.711 with 20 ms packets, 70 bytes of encapsulation and calls counted in one direction. A different codec or packet time changes the figures.

Worked example: the video class that stayed empty

Video calls at BR-01 freeze in the afternoon. The design from the earlier lessons gives video its own class with a guaranteed share. The counters on the WAN interface are the first thing to read.

Example output written for this lesson, simplified; real output has more fields and a different layout
BR-01#show policy-map interface GigabitEthernet1
Service-policy output: WAN-QOS
  Class-map: VOICE (match-any)
    3120000 packets, 842400000 bytes
    30 second offered rate 8100000 bps, drop rate 0 bps
    Priority: 20000 kbps, b/w exceed drops: 0
  Class-map: VIDEO (match-any)
    0 packets, 0 bytes
    30 second offered rate 0 bps, drop rate 0 bps
  Class-map: class-default (match-any)
    4860000 packets, 5832000000 bytes
    30 second offered rate 98600000 bps, drop rate 11700000 bps
    (queue depth/total drops/no-buffer drops) 64/412000/0
Voice is healthy: 8.1 Mbps offered, nothing dropped. The VIDEO class has no packets at all, which is the surprise. The default class is offered 98.6 Mbps against about 86.9 Mbps available after voice, so it loses 11.7 Mbps, about 12 percent. Divide the default class's bytes by its packets and the average is 1,200 bytes, which is video-sized or bulk-sized, not a mix of small control packets. The video is in the default class, sharing a queue with the backup.
Diagram
Evidence from the empty-class case
Evidence from the empty-class case

The policy is attached correctly and voice is clean. The video class has no packets. The default class averages 1,200 bytes a packet and loses 12 percent. A capture on the LAN side shows the video endpoints' marks arrive as zero, so the class match does not fire.

  1. AttachedWAN-QOS on the WAN interface, outputvoice drops are zero
  2. ClassVIDEO has 0 packetsclass-default is losing 11.7 Mbps
  3. ContentDefault averages 1,200 bytesvideo-sized, not control traffic
  4. MarksLAN capture shows tos 0x0 on videoa switch reset the AF41 marks
  5. FixTrust the marks on that switch port,or match the video on the edge
An empty class means the match is not firing. The next question is whether the mark or the match is wrong.

A capture on the edge's LAN side confirmed that the video packets arrive with a mark of zero. The access switch resets the endpoints' marks because its uplink port does not trust them, so the edge's match on AF41 does not fire. The cause is not on the edge at all. The fix is to trust the marks on that switch port or, if the switch cannot be changed, to classify the video on the edge by address or application list.

Diagram
Before and after the fix (computed)
Before and after the fix (computed)
MeasureBeforeAfter
Video class offered rate0 Mbps18 Mbps
Video lostAbout 2.1 Mbps (12 percent of 18), in default0 Mbps
Default class offered rate98.6 Mbps80.6 Mbps (98.6 minus the video's 18)
Available to default86.9 Mbps68.9 Mbps (86.9 minus the video's 18)
Default class dropped11.7 Mbps (11.9 percent)11.7 Mbps (14.5 percent of what is left in default)
The link is full either way, so the total loss stays at 11.7 Mbps. After the fix the backup carries all of it and the video loses nothing. That shift is the policy working as designed.

Where the fault can be, by what the counters show

Diagram
Counter pattern to cause
Counter pattern to cause

Drops only in the default class are expected under load. Drops in the priority class mean it was overfilled. A class with no packets means its match does not fire. No drops anywhere with bad quality means the queue is forming at the provider because the shaper is missing or set too high.

What the counters show
  • Default dropsexpected whilethe link is full
  • Priority dropsclass overfilledor mis-marked
  • Empty classmark reset ormatch wrong
  • No dropsshaper missingor set too high
Start from the pattern in the counters, then confirm with a capture or the policy.

Learn more: Classification and SchedulingQoS Concepts: Marking, Queueing and Shaping

Test yourself

Predict · scenario 1

During a nightly backup, the default class shows drops and every other class shows none. What is the right reading?

Predict · scenario 2

A class holds 842,400,000 bytes in 3,120,000 packets. What is the average packet size, and what does it suggest?

Predict · scenario 3

The VIDEO class shows 0 packets, and class-default is averaging 1,200 bytes per packet. What do you check next?

Predict · scenario 4

Default is offered 98.6 Mbps. After voice takes 8.1 Mbps of a 95 Mbps shaped link, how much does the default class lose?

Predict · scenario 5

There are no drops in any class, but video quality is poor at busy times. Which cause fits?

Predict · scenario 6

The voice class offers 8.1 Mbps in 270-byte packets. Assume 20 ms packets, so each call sends 50 packets a second in one direction. About how many calls is that?

Predict · scenario 7

After the fix the video class is guaranteed its 18 Mbps. The backup and other traffic offer 80.6 Mbps, and 86.9 Mbps is left after voice. How much does the default class lose?

Predict · scenario 8

A class meant for G.711 voice averages 1,200 bytes a packet. What is the most likely reading?

FAQ

Is every drop a fault?
No. A full queue drops by design, and a default class that loses packets while a backup runs may be exactly what the policy intends. A drop is a fault when it appears in a class that should be protected, or when the traffic in the class is not what the design expected.
Which command shows the counters?
On IOS XE edges the usual command is show policy-map interface for the WAN interface, which lists each class with its offered rate and drop rate. Fields and layout differ by platform and release, so check the output on your own device before relying on a field name.
How can the packet size say what is in a class?
Divide the class's bytes by its packets. Voice packets are small and fixed, so a voice class averages a tight, known number. A class that should hold voice and averages over a thousand bytes holds something else.
Do the counters cover traffic coming in?
A policy attached to an interface's output counts what leaves it. Traffic that arrives on the far side is counted on the far edge's own interface, so a one-way problem needs the counters from both ends.