cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
88464
Views
39
Helpful
240
Comments
xthuijs
Cisco Employee
Cisco Employee

Introduction

This document provides details on how QOS is implemented in the ASR9000 and how to interpret and troubleshoot qos related issues.

 

Core Issue

QOS is always a complex topic and with this article I'll try to describe the QOS architecture and provide some tips for troubleshooting.

Based on feedback on this document I'll keep enhancing it to document more things bsaed on that feedback.

 

The ASR9000 employs an end to end qos architecture throughout the whole system, what that means is that priority is propagated throughout the systems forwarding asics. This is done via backpressure between the different fowarding asics.

One very key aspect of the A9K's qos implementation is the concept of using VOQ's (virtual output queues). Each network processor, or in fact every 10G entity in the system is represented in the Fabric Interfacing ASIC (FIA) by a VOQ on each linecard.

That means in a fully loaded system with say 24 x 10G cards, each linecard having 8 NPU's and 4 FIA's, a total of 192 (24 times 8 slots) VOQ's are represented at each FIA of each linecard.

The VOQ's have 4 different priority levels: Priority 1, Priority 2, Default priority and multicast.

The different priority levels used are assigned on the packets fabric headers (internal headers) and can be set via QOS policy-maps (MQC; modular qos configuration).

When you define a policy-map and apply it to a (sub)interface, and in that policy map certain traffic is marked as priority level 1 or 2 the fabric headers will represent that also, so that this traffic is put in the higher priority queues of the forwarding asics as it traverses the FIA and fabric components.

If you dont apply any QOS configuration, all traffic is considered to be "default" in the fabric queues. In order to leverage the strength of the asr9000's asic priority levels, you will need to configure (ingress) QOS at the ports to apply the priority level desired.

qos-archi.jpg

In this example T0 and T1 are receiving a total of 16G of traffic destined for T0 on the egress linecard. For a 10G port that is obviously too much.

T0 will flow off some of the traffic, depending on the queue, eventually signaling it back to the ingress linecard. While T0 on the ingress linecard also has some traffic for T1 on the egress LC (green), this traffic is not affected and continues to be sent to the destination port.

Resolution

 

The ASR9000 has the ability of 4 levels of qos, a sample configuration and implemenation detail presented in this picture:

 

shared-policy.jpg

 

 

Policer having exceeddrops, not reaching configured rate

 

When defining policers at high(er) rates, make sure the committed burst and excess burst are set correctly.
This is the formula to follow:

Set the Bc to CIR bps * (1 byte) / (8 bits) * 1.5 seconds

and

Be=2xBc

Default burst values are not optimal

Say you are allowing 1 pps, and then 1 second you don’t send anything, but the next second you want to send 2. in that second you’ll see an exceed, to visualize the problem.

 

Alternatively, Bc and Be can be configured in time units, e.g.:

     policy-map OUT

      class EF

       police rate percent 25 burst 250 ms peak-burst 500 ms

 

For viewing the Bc and Be applied in hardware, run the "show qos interface interface [input|output]".

 

 

Why do I see non-zero values for Queue(conform) and Queue(exceed) in show policy-map commands?

On the ASR9k, every HW queue has a configured CIR and PIR value. These correspond to the "guaranteed" bandwidth for the queue, and the "maximum" bandwidth (aka shape rate) for the queue.

In some cases the user-defined QoS policy does NOT explicitly use both of these.  However, depending on the exact QoS config the queueing hardware may require some nonzero value for these fields.  Here, the system will choose a default value for the queue CIR.  The "conform" counter in show policy-map is the number of packets/bytes that were transmitted within this CIR value, and the "exceed" value is the number of packets/bytes that were transmitted within the PIR value.

Note that "exceed" in this case does NOT equate to a packet drop, but rather a packet that is above the CIR rate on that queue.

You could change this behavior by explicitly configuring a bandwidth and/or a shape rate on each queue, but in general it's just easier to recognize that these counters don't apply to your specific situation and ignore them.

 

What is counted in QOS policers and shapers?

 

When we define a shaper in a qos pmap, the shaper takes the L2 header into consideration.

The shape rate defined of say 1Mbps would mean that if I have no dot1q or qinq, I can technically send more IP traffic then having a QIQ which has more L2 overhead. When I define a bandwidth statement in a class, same applies, also L2 is taken into consideration.

When defining a policer, it looks at L2 also.

In Ingress, for both policer & shaper, we use the incoming packet size (including the L2 header).

In order to account the L2 header in ingress shaper case, we have to use a TM overhead accounting feature, that will only let us add overhead in 4 byte granularity, which can cause a little inaccuracy.

In egress, for both policer & shaper we use the outgoing packet size (including the L2 header).

 

ASR9K Policer implementation supports 64Kbps granularity. When a rate specified is not a multiple of 64Kbps the rate would be rounded down to the next lower 64Kbps rate.

 

For policing, shaping, BW command for ingress/egress direction the following fields are included in the accounting.

 

MAC DA

MAC SA

EtherType

VLANs..

L3 headers/payload

CRC

 

Port level shaping

Shaping action requires a queue on which the shaping is applied. This queue must be created by a child level policy. Typically shaper is applied at parent or grandparent level, to allow for differentiation between traffic classes within the shaper. If there is a need to apply a flat port-level shaper, a child policy should be configured with 100% bandwidth explicitly allocated to class-default.

Understanding show policy-map counters

 

QOS counters and show interface drops:

 

Policer counts are directly against the (sub)interface and will get reported on the "show interface" drops count.
The drop counts you see are an aggregate of what the NP has dropped (in most cases) as well as policer drops.

 

Packets that get dropped before the policer is aware of them are not accounted for by the policy-map policer drops but may
show under the show interface drops and can be seen via the show controllers np count command.

 

Policy-map queue drops are not reported on the subinterface drop counts.
The reason for that is that subinterfaces may share queues with each other or the main interface and therefore we don’t
have subinterface granularity for queue related drops.

 

 

Counters come from the show policy-map interface command

 

 

Class name as per   configuration Class   precedence6
Statistics for this class   Classification statistics          (packets/bytes)     (rate - kbps)
Packets that were matched     Matched             :            31583572/2021348608           764652
packets that were sent to the wire     Transmitted         : Un-determined
packets that were dropped for any reason   in this class     Total Dropped       : Un-determined
Policing stats   Policing statistics                (packets/bytes)     (rate - kbps)
Packets that were below the CIR rate     Policed(conform)    :            31583572/2021348608           764652
Packets that fell into the 2nd bucket   above CIR but < PIR     Policed(exceed)     :                   0/0                    0
Packets that fell into the 3rd bucket   above PIR     Policed(violate)    :                   0/0                    0
Total packets that the policer dropped     Policed and dropped :                   0/0
Statistics for Q'ing   Queueing statistics  <<<----
Internal unique queue reference     Queue ID                             : 136

how many packets were q'd/held at max one   time

(value not supported by HW)

    High watermark  (Unknown)

number of 512-byte particles which are currently

waiting in the queue

    Inst-queue-len  (packets)            : 4096

how many packets on average we have to   buffer

(value not supported by HW)

    Avg-queue-len   (Unknown)

packets that could not be buffered   because we held

more then the max length

    Taildropped(packets/bytes)           : 31581615/2021223360
see description above (queue exceed section)     Queue(conform)      :            31581358/2021206912           764652
see description above (queue exceed section)     Queue(exceed)       :                   0/0                    0

Packets subject to Randon Early detection

and were dropped.

    RED random drops(packets/bytes)      : 0/0

 

 

Understanding the hardware qos output

 

RP/0/RSP0/CPU0:A9K-TOP#show qos interface g0/0/0/0 output

 

With this command the actual hardware programming can be verified of the qos policy on the interface

(not related to the output from the previous example above)


Tue Mar  8 16:46:21.167 UTC
Interface: GigabitEthernet0_0_0_0 output
Bandwidth configured: 1000000 kbps Bandwidth programed: 1000000
ANCP user configured: 0 kbps ANCP programed in HW: 0 kbps
Port Shaper programed in HW: 0 kbps
Policy: Egress102 Total number of classes: 2
----------------------------------------------------------------------
Level: 0 Policy: Egress102 Class: Qos-Group7
QueueID: 2 (Port Default)
Policer Profile: 31 (Single)
Conform: 100000 kbps (10 percent) Burst: 1248460 bytes (0 Default)
Child Policer Conform: TX
Child Policer Exceed: DROP
Child Policer Violate: DROP
----------------------------------------------------------------------
Level: 0 Policy: Egress102 Class: class-default
QueueID: 2 (Port Default)
----------------------------------------------------------------------

 

 

Default Marking behavior of the ASR9000

 

If you don't configure any service policies for QOS, the ASR9000 will set an internal cos value based on the IP Precedence, 802.1 Priority field or the mpls EXP bits.

Depending on the routing or switching scenario, this internal cos value will be used to do potential marking on newly imposed headers on egress.

 

Scenario 1

Slide1.JPG

Scenario 2

Slide2.JPG

 

Scenario 3

Slide3.JPG

 

Scenario 4

 

Slide4.JPG

 

Scenario 5

 

Slide5.JPG

 

Scenario 6

Slide6.JPG

 

Special consideration:

If the node is L3 forwarding, then there is no L2 CoS propagation or preservation as the L2 domain stops at the incoming interface and restarts at the outgoing interface.

Default marking PHB on L3 retains no L2 CoS information even if the incoming interface happened to be an 802.1q or 802.1ad/q-in-q sub interface.

CoS may appear to be propagated, if the corresponding L3 field (prec/dscp) used for default marking matches the incoming CoS value and so, is used as is for imposed L2 headers at egress.

 

If the node is L2 switching, then the incoming L2 header will be preserved unless the node has ingress or egress rewrites configured on the EFPs.
If an L2 rewrite results in new header imposition, then the default marking derived from the 3-bit PCP (as specified in 802.1p) on the incoming EFP is used to mark the new headers.

 

An exception to the above is that the DEI bit value from incoming 802.1ad / 802.1ah headers is propagated to imposed or topmost 802.1ad / 802.1ah headers for both L3 and L2 forwarding;

 

Related Information

ASR9000 Quality of Service configuration guide

 

Xander Thuijs, CCIE #6775

 

Comments
xthuijs
Cisco Employee
Cisco Employee

that's no problem georgios! all that matters is that things are working in the end

Say for everyone's benefit, can you share what the config mistake was so that other folks can maybe prevent the same thing from happening?

Aleks, also thanks for stepping in while I was taking a nap

regards

xander

Well.. during previous tests I had configured a policy with a similar name, including only set commands.

I was mistakenly using that one and I always had that specific error.

policy-map child1

class voice

  set mpls experimental topmost 5

class business

  set mpls experimental topmost 3

class mgmt

  set mpls experimental topmost 2

It is a bit strange though that I can't remark and shape at a higher rate

George

Aleksandar Vidakovic
Cisco Employee
Cisco Employee

Hi George,

this explains it well. Nice example for this 'Comments' section.   Policy-map child1 doesn't have a queueing action. This makes the policer in the parent policy a flat policer. You need a queueing action at child level. You can achive that by allocating bandwidt, bandwidth percent or bandwidt remaining ratio to every child class.

Aleks

gthermaenius
Level 1
Level 1

Hi Aleks,

I have a question regarding BNG IPoE on multiple 10G bundle-interface with SPI. So, with the SPI i want a to control that a single customer only get 100Mbit/s in total regardless if he has 1 or 4 sessions. Am I understanding it right that this is not possible to do since the QoS is programmed on the physical port? Because 1 session might be load-balanced on  te0/0/2/1 and the other session on te0/0/2/2.

//Gunnar

Aleksandar Vidakovic
Cisco Employee
Cisco Employee

Hi Gunnar,

QoS is implemented at NP level. If your bundle members happen to be on the same NP, you can achieve your goal. In that case you should go for 24x10G cards (3 ports per single NP) or 36x10G (6 ports per single NP).

In case of SPI all sub-interfaces that share the same instance must anyway be on the same NP. Please see

http://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k_r5-1/bng/configuration/guide/b_bng_cg51xasr9k/b_bng_cg51xasr9k_chapter_0110.html#concept_E8A20609AC38468591721DD9F15971DC

Regards,

Aleksandar

pavel.stefanov
Level 1
Level 1

Hi Xander,

Another excellent article as always! Thanks a lot.

Can you please clarify how policing is applied to priority queue classes? Let's assume we have the config below. Does that mean each class is allowed to send up to 70% of the interface bandwidth into PQ2 or does it actually police PQ2 to 70%? I believe it is the first option, which implies that if 900 Mbps match CLASS1 and 300 Mbps match CLASS2 on a 10G interface, PQ2 will be running at 100% with 700 Mbps accepted from CLASS1 and 300 Mbps from CLASS2, with 50 Mbps of dropped traffic in CLASS1. Is there actually a way to place a hard limit on the PQ when multiple classes use the same PQ?

In addition, what happens if there is a child service policy in one of the parent classes - is it required to configure priority queuing in the child classes as well as the parent ones and if it is, does the sub-class police a percentage of the parent 70% allowed through i.e is policing first done on the parent and then child policing is done on what is allowed through by the parent?

policy-map PMAP-TEST
 class CLASS1
  priority level 2
  police rate percent 70
  !
 !
 class CLASS2
  priority level 2
  police rate percent 70
  !
 !
 class class-default
 !
 end-policy-map

 

Thanks,

Pavel

 

yshindunata
Level 1
Level 1

Hi Xander,

What about the QoS in the ASR9000V. How is the behaviour and check the queue id?

Thanks,

Yoesa

jerry.bonner
Level 1
Level 1

I've seen in the documentation that qos policies applied to bundles are duplicated for each LC in the bundle. This is problematic for our applications, is there any workarounds or plans to fix this?

Aleksandar Vidakovic
Cisco Employee
Cisco Employee

Hi Jerry,

platform architecures with centralised forwarding can guarantee that only a single instance of a QoS policy is executed on all members of a virtual interface. ASR9000 is a fully distributed platform. On ASR9000 QoS is executed on network processors (NP) on every line card. For all practical purposes it's impossible to design a platform solution where NPs can synchronise the QoS sheduler information in real time. This is not a platform limitation of ASR9000, this is the very nature of distributed platform architectures.

So, what are your options?

  • If you are implementing bundle interfaces for providing bandiwdth higher than 10Gbps, you can opt for a line card where a single NP connects multiple interfaces. On A9K-24X10GE card every NP connects three 10Gig interfaces. On A9K-36X10GE, every NP connects six 10Gig interfaces.
  • If you are implementing bundle interfaces for redundancy in case of a line card failure, use LACP and modify the priority so that only one member is active at the time.
  • you can still combine both approaches

 

I hope this answers your question.

 

Regards,

Aleksandar

 

jerry.bonner
Level 1
Level 1

I'm seeing this in the documentation now :

 

interface Bundle-Ether 50.25 l2transport

  encapsulation dot1q 25

  bundle load-balance hash-select 2

 

does the hash-select 2 push all traffic across the second link in the bundle? I can't find more info on that command.

xthuijs
Cisco Employee
Cisco Employee

when a pakcet arrives a hash value is determined, this hash value is generally based on either L3+L4+RID or L2+RID info.

with this command you fix that hash result.

the hash then determines the buckets, as each Lb scheme, bunde/ecmp/vqi will take different bits from that hash result to find out the bucket.

the bucket are distributed over the avaialble paths, vqi's or members.

so with this command you can control the member select, but it is not a one to one relation from hash to member in that regard.

xander
 

wenqli
Community Member

Hi, Xander

A bit confusing about the statement in scenario 1 " VPWS will be treated like a L2 operation on ingress". This makes me think ingress PW facing interface also belongs to scenario 1. It shouldn't be, right?

My understanding is that, in scenario 1, 2, 3, the ingress interface are all L2 sub-intf. If ingress is PW interface, it should be MPLS routed interface scenario.

Please help clarify. Thanks a lot

xthuijs
Cisco Employee
Cisco Employee

hi wenqli,

the scenario 1,2 and 3 indeed are pertaining to l2transport subinterfaces.

the difference is that in scenario 1 a dot1q tagged frame comes in on the l2transport interface, in scenario 2 there is an untagged frame and in scenario 3 there is an mpls tagged frame coming in on the l2transport interface.

The PW side is coming in via a routed port, which would fall under scenario 6 and then either one of the top 2 boxes on the right (bridging out, box1 is untagged, box 2 is tagged).

The difference between box 1 and 2 in scenario 6 is that the internal cos, derived from the mpls exp is used to mark the new dot1p header of box2. in box-1 there is no dot1q header and we are not rewriting the IPP either.

cheers!

xander

wenqli
Community Member

Thanks Xander.

In scenario6, if packet goes out to box1 or box2, it should be l2vpn packet (non IP packet). According the statement, it uses dscp=0. If so, the cos will remain 0 in the new dot1p header of box2?

Regards

xthuijs
Cisco Employee
Cisco Employee

scenario6 box1 and 2 are the cases of a PW coming into an xconnect (VPWS) or bridgedomain (VPLS) and out of an attachment circuit (AC).

xander

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links