How to Debug QOS on switches and routers

Hi Steven,

A simple method to verify this is to do it on a hop-by-hop basis, first from source to destination and then for the return traffic as well. On your routers (and most switches), you can use a policy map with no actions just to use it as a counter:

SW1(config)#class-map EF  
SW1(config-cmap)#match dscp ef

SW1(config)#policy-map COUNTER
SW1(config-pmap)#class EF

SW1(config)#interface GigabitEthernet 0/1
SW1(config-if)#service-policy input COUNTER

And monitor:

SW1#show policy-map interface GigabitEthernet 0/1
 GigabitEthernet0/1 

  Service-policy input: COUNTER

    Class-map: EF (match-all)  
      0 packets, 0 bytes
      5 minute offered rate 0000 bps
      Match:  dscp ef (46)

    Class-map: class-default (match-any)  
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: any

That is a simple way to test it. You can also use the show mls qos command on the 29xx/35xx switches to see incoming marked traffic:

SW1#show mls qos interface FastEthernet 0/1 statistics
FastEthernet0/1 (All statistics are in packets)

  dscp: incoming
-------------------------------

  0 -  4 :           0            0            0            0            0
  5 -  9 :           0            0            0            0            0
 10 - 14 :           0            0            0            0            0
 15 - 19 :           0            0            0            0            0
 20 - 24 :           0            0            0            0            0
 25 - 29 :           0            0            0            0            0
 30 - 34 :           0            0            0            0            0
 35 - 39 :           0            0            0            0            0
 40 - 44 :           0            0            0            0            0
 45 - 49 :           0            0            0            0            0
 50 - 54 :           0            0            0            0            0
 55 - 59 :           0            0            0            0            0
 60 - 64 :           0            0            0            0

Of course there are also some network monitoring tools that do this on a larger scale, checking your policy-maps or netflow.