cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11697
Views
388
Helpful
45
Replies

Ask the Expert: Quality of Service (QoS) on Cisco IOS Routers

ciscomoderator
Community Manager
Community Manager

Welcome to this Cisco Support Community Ask the Expert conversation. This is an opportunity to learn and ask questions about quality of service (QoS) on Cisco IOS routers with Cisco subject matter expert Akash Agrawal.

A communications network forms the backbone of any successful organization. These networks transport a multitude of applications and data, including high-quality video and delay-sensitive data such as real-time voice. The bandwidth-intensive applications stretch network capabilities and resources, but also complement, add value, and enhance every business process. Networks must provide secure, predictable, measurable, and sometimes guaranteed services. Achieving the required QoS by managing the delay, delay variation (jitter), bandwidth, and packet loss parameters on a network becomes the secret to a successful end-to-end business solution. Thus, QoS is the set of techniques to manage network resources.

Quality of Service (QoS) on Cisco IOS RoutersAkash Agrawal is a customer support engineer in the Cisco High-Touch Technical Support Center in Bangalore, India, supporting Cisco's major service provider customers in routing and Multiprotocol Label Switching (MPLS) technologies. His areas of expertise include routing, switching, MPLS services, traffic engineering, and QoS. He has been in the networking industry for eight years, which includes five years in the service provider industry and three years in Cisco HTTS, and is a dual CCIE, in the routing and switching and service provider tracks.

Remember to use the rating system to let Akash know if you have received an adequate response. 

Because of the volume expected during this event, Akash might not be able to answer every question. Remember that you can continue the conversation in the Network Infrastructure Community, under the subcommunity LAN, Routing and Switching , shortly after the event. This event lasts through August 1, 2014. Visit this forum often to view responses to your questions and the questions of other Cisco Support Community members.

45 Replies 45

stemrikar
Level 1
Level 1

General Qos Questions:

Q1. What is the difference between match ip dscp and  match dscp command.

Q2. Please explain in detail (if possible with examples) the command mls qos vlan-based.

Hi,

 

Please go through below CCO document explaining command "match dscp"

 

http://www.cisco.com/c/en/us/td/docs/ios/qos/command/reference/qos_book/qos_m1.html#wp1034334

 

Match dscp matches both ipv4 and ipv6 traffie while match ip dscp matches only ipv4 traffic.

 

match dscp

To identify one or more differentiated service code point (DSCP), Assured Forwarding (AF), and Certificate Server (CS) values as a match criterion, use the match dscp command in class-map configuration mode. To remove a specific DSCP value from a class map, use the no form of this command.

match [ipdscp dscp-value [dscp-value dscp-value dscp-value dscp-value dscp-value dscp-value dscp-value]

no match [ipdscp dscp-value

Syntax Description

 

ip

(Optional) Specifies that the match is for IPv4 packets only. If not used, the match is on both IPv4 and IPv6 packets.

Note For the Cisco 10000 series router, the ip keyword is required.

dscp-value

The DSCP value used to identify a DSCP value. For valid values, see the "Usage Guidelines."

 

 

Command Default

No match criteria is configured.

If you do not enter the ip keyword, matching occurs on both IPv4 and IPv6 packets.

Command Modes

Class-map configuration

Command History

 
Release
Modification

12.2(13)T

This command was introduced. This command replaces the match ip dscp command.

12.0(28)S

Support for this command in IPv6 was added in Cisco IOS Release S12.0(28)S on the

12.0(17)SL

This command was implemented on the Cisco 10000 series router.

12.2(31)SB

This command was integrated into Cisco IOS Release 12.2(31)SB.

Hi,

"mls qos vlan-based" is related to Layer2 qos and out of scope of this discussion forum which is limited to QOS on routers. However you can refer below link to get detail of the command

 

http://www.cisco.com/c/en/us/td/docs/ios/qos/command/reference/qos_book/qos_m2.html#wp1044534

 

sumit19851
Level 1
Level 1

Hi,

 

Thanks for useful info on this forum. I have one basic doubt and would like to clarify.

What is requirement of the HW queue, how can i change it, what is recommended value and what will be effect of increasing/decreasing hw queue length.

Hi,

Hardware queue’s objective is to drive the link utilization to 100 percent. Router wants to utilize maximum of link bandwidth and when one packet is transmitted interface does not need to rely on general-purpose processor to start sending the next packet. The hardware queue can directly be accessed by ASICs associated with an interface. So even if the general purpose processor is busy, the interface can begin sending the next packet without waiting for the router CPU.

 

You can change it with below command

 

R11_2851(config-if)#tx-ring-limit ?

  <1-32767>  Number (ring limit)

 

Effect of small or large Tx queue.

 

In case of large Tx queue, it may change the order packets should get scheduled. For example say suppose there are two queue, queue 1 and queue 2. Queue1 is high priority queue  and queue2 is low priority queue. Now 6 packets come at a time but first two packets are low priority and next 4 packets are high priority packets. Ideally first two packets should be processed after packet3,4,5 and 6 but since we have HW queue, first two packets would directly be placed on the HW queue and will be processed first. In case size of HW queue is even more , say 10, then it may contain 10 low priority packets In queue and high priority packets need to wait for that much time till all packets would be put on to the wire.

 

IOS automatically attempts to minimize the impact of the Hardware queue to the IOS queuing tools.  The IOS maintains the original goal of always having a packet in the Hardware queue, available for the interface to immediately send when the interface completes sending the previous packet. When any form of the software queuing tool is enabled on an interface , IOS on lower-end routers typically reduces the size of the Hardware Queue to a small value, often times to a length of 2. The smaller the value the less impact the Tx Queue has on the effects of the queuing method.

 

-------- Please don't forget to rate helpful posts -------

 

Regards,

Akash

amerutoji
Level 1
Level 1

Hi Akash,

About input queue size on ASR1001 - built-in GE interface:
It shows 375 packets as default size.
For the most latency sensitive traffic that we don't want to delay at all, and with micro-bursts approaching 1gb/s, would you recommend lowering this input queue size? I suspect queuing  here is adding latency for us.
Also, when would counters for "flushes" increase on this platform?
 Input queue: 0/375/0/891 (size/max/drops/flushes); Total output drops: 0

Thanks,

Hi,

 

The input-queue is used only for software switched packets (destined to RP). Normally these are protocol traffic and traffic like ICMP (destined to router),SNMP.  Your transit voice and data traffic will not be placed in input-queue. Since router is able to process traffic coming with line-rate and device connected with gig link can not send traffic more than the line rate so normally in input direction we don't see buffering of packet. Buffering of transit traffic may happen on outgoing interface and reason is, traffic from multiple interfaces may go out on one interface and router may need to buffer it for some time. 

 

To save voice traffic from bursty data traffic you may use LLQ in out direction and use priority queue for voice traffic. This will help you to reduce queuing latency for latency-sensitive traffic.

 

Regards,

Akash

Hi Akash,

About HQF 3-level policy on ASR1001 and policy propagation: I have a physical interface gi0/0/0 with 3 sub-interfaces, each sub-interface has parent policy with shaper for that sub-interface and child policy applied. But, I cannot apply aggregate policy to the physical interface, I get the following error:
#service-policy output AGGREGATE-Gi0/0/0
user-defined classes with queueing features are not allowed in a service-policy at sub-interface/pvc
in conjunction with user-defined classes with queueing features in a service-policy at sub-interface/pvc/pvp

Do you know what this means?

Also, I have child policy like this:
policy-map CHILD-VLAN160
 class DATA-CRITICAL
  police 65000000 325000
  priority level 1
class class-default
  bandwidth 15000
  queue-limit 50 ms
policy-map PARENT-VLAN160
 class class-default
  shape average 90000000 900000
   service-policy CHI-TOK-CHILD-VLAN160

Will the priority level 1 class, with the policer, retain priority all the way out through the physical interface, even w/out policy applied at the physical interface level?

Thanks,

 

Hi,

 

I think you are trying to configure shaper at sub-interface and physical interface at same time. In that case we get the mentioned error message. You can use Policer on main interface to make it work. I tested in lab with below policy-map and got same error message. Removing shaper from either sub-interface or main interface solves the issue.

 

R6_ASR6#sh policy-map test
  Policy Map test
    Class EF
      bandwidth 450000 (kbps)
      Average Rate Traffic Shaping
      cir 100000000 (bps)
    Class AF12
      bandwidth 200000 (kbps)
    Class class-default
      bandwidth 350000 (kbps)
R6_ASR6#

 

R6_ASR6#sh policy-map test-parent
  Policy Map test-parent
    Class class-default
      Average Rate Traffic Shaping
      cir 900000000 (bps)
R6_ASR6#

 

R6_ASR6#sh policy-map test-phy
  Policy Map test-phy
    Class class-default
      Average Rate Traffic Shaping
      cir 50000000 (bps)
R6_ASR6#

R6_ASR6(config-pmap-c)#int gig1/0/1.100
R6_ASR6(config-subif)#service-policy out test-parent
R6_ASR6(config-subif)#int gig1/0/1
R6_ASR6(config-if)#service-policy out test-phy   
user-defined classes with queueing features are not allowed in a service-policy at sub-interface/pvc
in conjunction with user-defined classes with queueing features in a service-policy at sub-interface/pvc/pvp

R6_ASR6(config-if)#

 

Enter configuration commands, one per line.  End with CNTL/Z.
R6_ASR6(config)#policy-map test-phy
R6_ASR6(config-pmap)#class class-default
R6_ASR6(config-pmap-c)#no shape ave 50000000
R6_ASR6(config-pmap-c)#police 50000000
R6_ASR6(config-pmap-c-police)#
R6_ASR6(config-pmap-c-police)#exit
R6_ASR6(config-pmap-c)#
R6_ASR6(config-pmap-c)#exit
R6_ASR6(config-pmap)#exit
R6_ASR6(config)#int gig1/0/1
R6_ASR6(config-if)#service-policy out test-phy 
R6_ASR6(config-if)#

 

Regards,

Akash

 

To your second query, yes packet priority will be retained all the way out through the physical interface. That is why queuing on two places(on physical interface and sub-interface) is not allowed.

If in above working service-policy i define min bandwidth in class-default, again i get same error

 

R6_ASR6#show policy-map test-phy
  Policy Map test-phy
    Class class-default
     police cir 50000000 bc 1562500 
       conform-action transmit 
       exceed-action drop 
      bandwidth 500000 (kbps) <<<<<<<< 

 

R6_ASR6(config-if)#service-policy out test-phy
user-defined classes with queueing features are not allowed in a service-policy at sub-interface/pvc
in conjunction with user-defined classes with queueing features in a service-policy at sub-interface/pvc/pvp

R6_ASR6(config-if)#

 

Regards,

Akash

 

 

sumit19851
Level 1
Level 1

 

Hello Akash,

 

Thanks for the explanation. I have one more question related to LLQ behavior on ASR1K.

Q. What is difference in strict priority and conditional priority?

 

 

Hello Sumit,

 

Strict priority will always be rate limited by the explicitly configured policer. With strict priority even if there is bandwidth available from the parent, LLQ class will only forward up to the policed rate.

 

Conditional priority will rate limit traffic with a policer only if there is congestion at the parent (policy-map or physical interface).A conditional priority class can use more than its configured rate but only if there is no contention with other classes in the same policy. As soon as there is congestion at the parent,the priority class(es) will throttle back to the configured rate until there is no longer any congestion.


Strict priority configuration example

policy-map test
 class voice
  police cir 1000000
  priority

 

Conditional priority configuration example

policy-map test
 class voice
  priority 1000

 

-------- Please don't forget to rate helpful posts -------

Regards,

Akash

Hello Akash,

 
In HQF images, how much bandwidth will be reserved for the class-default on a 10 Mb/s link where user classes reserve 6 Mb/s of bandwidth ?
 
Regards
Karthik T S

 

Hi Karthik,

 

HQF behavior is different on software switched platform like 7200 and ISR (uses 2 parameter scheduler) and on platform like ASR1k (uses 3 parameter scheduler)

 

On 7200 and ISR devices, remianing bandwidth (which 4 mb in this case) will be allocated to class-default. In case of ASR1k, no bandwidth will be reserved to class-default rather remaining bandwidth can be accessed  by all classes based in excess-ratio which is by default 1.

 

So if there is 1 user defined class and 1 class-default and both are receiving traffic 10mb on a 10 mb link. Now we have allocated 6 mb to user-defined class and no allocation for remaining 4 mb which will be considered as excess bandwidth. since excess-ratio is 1 for both class, remaining bandwidth will be distributed to both class equally, 2 mb each. So user-defined class will get 6+2 = 8mb and class-default will get 2 mb.

 

In case of 7200,ISR, user-defined class will get 6 mb and class-default will get 4 mb.

 

Regards,

Akash

Gregory Rojas
Level 1
Level 1

Hi everyone
I have this hardware/software:
Cisco IOS XE Software, Version 03.10.01.S - Extended Support Release
Cisco IOS Software, ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9_NOLI-M), Version 15.3(3)S1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.

And I have these QOS error messages:
Sep 13 15:38:29.496: %IOSXE-3-PLATFORM: SIP0: cpp_cp: QFP:0.0 Thread:099 TS:00158915796776279925
%QOS-3-INVALID_CLASS_QID: Class Queuing error for interface GigabitEthernet0/0/1, qid 9331 vqid 0
-Traceback=1#d403ea3ff7b9542962ccc811de090de0 805f6fcf 80667672 8065b2f0 8200ea80 8079ec7b 8201c991 805f5e50 805f5e5a

Sep 13 15:38:29.496: %IOSXE-3-PLATFORM: SIP0: cpp_cp: QFP:0.0 Thread:099 TS:00158915796776502325
%QOS-3-VALID_DEFAULT_QID: Using Default Queue for interface GigabitEthernet0/0/1, qid 128 vqid 128
-Traceback=1#d403ea3ff7b9542962ccc811de090de0 805f6fcf 80667672 8065b428 8200ea80 8079ec7b 8201c991 805f5e50 805f5e5a
These errors only occurs on GigabitEthernet0/0/1. The router uses OSPF and BGP routing protocols
What means this error messages?
How I fix it?

Thank you for your time and attention
Regards,

Greg

Review Cisco Networking products for a $25 gift card