Sunday 5 November 2017

Verschiebung Durchschnitt Aggregation


Computational Tools Analog hat DataFrame eine Methode cov, um paarweise Kovarianzen unter den Serien im DataFrame zu berechnen, auch ohne NAnull Werte. Unter der Annahme, dass die fehlenden Daten zufällig fehlen, ergibt sich eine Schätzung für die Kovarianzmatrix, die unvoreingenommen ist. Für viele Anwendungen ist diese Schätzung jedoch nicht akzeptabel, da die geschätzte Kovarianzmatrix nicht als positiv halb-definitiv garantiert ist. Dies könnte zu geschätzten Korrelationen mit absoluten Werten führen, die größer als eins sind und eine nicht invertierbare Kovarianzmatrix. Siehe Schätzung der Kovarianzmatrizen für weitere Details. DataFrame. cov unterstützt auch ein optionales Minperiod-Keyword, das die erforderliche Mindestanzahl von Beobachtungen für jedes Spaltenpaar angibt, um ein gültiges Ergebnis zu erhalten. Die im Fenster verwendeten Gewichte werden durch das Schlüsselwort wintype angegeben. Die Liste der anerkannten Typen sind: boxcar triang blackman hamming bartlett parzen bohman blackmanharris nuttall barthann kaiser (benötigt beta) gaussian (benötigt std) generalgaussian (benötigt Macht, Breite) slepian (braucht Breite). Beachten Sie, dass das Kastenfenster dem Mittelwert entspricht (). Für einige Fensterfunktionen müssen zusätzliche Parameter angegeben werden: Für. sum () mit einem Wintype. Es gibt keine Normalisierung an den Gewichten für das Fenster. Wenn man benutzerdefinierte Gewichte von 1, 1, 1 erhält, ergibt sich ein anderes Ergebnis als die Gewichte von 2, 2, 2. zum Beispiel. Beim Überschreiten eines Wintyps anstatt explizit die Gewichte zu spezifizieren, sind die Gewichte bereits normalisiert, so dass das größte Gewicht 1 ist. Im Gegensatz dazu ist die Art der. mean () - Berechnung so, dass die Gewichte in Bezug aufeinander normalisiert werden. Gewichte von 1, 1, 1 und 2, 2, 2 ergeben das gleiche Ergebnis. Time-aware Rolling Neu in Version 0.19.0. Neu in der Version 0.19.0 sind die Möglichkeit, einen Offset (oder Cabrio) an eine. rolling () - Methode zu übergeben und es auf der Grundlage des übergebenen Zeitfensters variable Fenster zu erzeugen. Für jeden Zeitpunkt sind alle vorangegangenen Werte innerhalb der angegebenen Zeit delta enthalten. Dies kann besonders nützlich für einen nicht regelmäßigen Zeitfrequenzindex sein. Dies ist ein regelmäßiger Frequenzindex. Die Verwendung eines Integer-Fensterparameters funktioniert, um die Fensterfrequenz zu rollen. Die Angabe eines Offsets ermöglicht eine intuitivere Spezifikation der Rollfrequenz. Mit einem nicht regelmäßigen, aber immer noch monotonen Index, das Rollen mit einem ganzzahligen Fenster gibt keine spezielle Berechnung. Die Verwendung der Zeit-Spezifikation erzeugt variable Fenster für diese spärlichen Daten. Darüber hinaus erlauben wir nun einen optionalen Parameter, um eine Spalte (und nicht die Standardeinstellung des Index) in einem DataFrame anzugeben. Time-aware Rolling vs. Resampling Mit. rolling () mit einem zeitbasierten Index ähnelt dem Resampling. Sie betreiben und führen reduktive Operationen auf zeitindizierten Pandasobjekten durch. Bei Verwendung von. rolling () mit einem Offset. Der Versatz ist ein Zeit-Dreieck. Nehmen Sie ein Rückwärts-in-Zeit-Fenster und aggregieren alle Werte in diesem Fenster (einschließlich der Endpunkt, aber nicht der Startpunkt). Dies ist der neue Wert zu diesem Zeitpunkt im Ergebnis. Dies sind variable Fenster im Zeitraum für jeden Punkt der Eingabe. Sie erhalten ein gleiches Ergebnis wie die Eingabe. Bei Verwendung von. resample () mit einem Offset. Konstruieren Sie einen neuen Index, der die Häufigkeit des Offsets ist. Für jeden Frequenz-Bin, Aggregat Punkte aus der Eingabe in einem Rückwärts-in-Zeit-Fenster, die in diesem bin. Das Ergebnis dieser Aggregation ist die Ausgabe für diesen Frequenzpunkt. Die Fenster sind im Größenbereich feste Größe. Ihr Ergebnis hat die Form einer regelmäßigen Frequenz zwischen dem Min und dem Maximum des ursprünglichen Eingabeobjekts. Zusammenfassen. Rolling () ist eine zeitbasierte Fensterbedienung, während. resample () eine frequenzbasierte Fensteroperation ist. Zentrieren von Windows Standardmäßig sind die Etiketten am rechten Rand des Fensters eingestellt, aber ein zentrales Schlüsselwort steht zur Verfügung, so dass die Etiketten in der Mitte eingestellt werden können. Binäre Fensterfunktionen cov () und corr () können bewegte Fensterstatistiken über zwei Serien oder eine beliebige Kombination von DataFrameSeries oder DataFrameDataFrame berechnen. Hier ist das Verhalten in jedem Fall: zwei Serien. Berechnen Sie die Statistik für die Paarung. DataFrameSeries. Berechnen Sie die Statistik für jede Spalte des DataFrame mit der übergebenen Serie und geben so ein DataFrame zurück. DataFrameDataFrame. Standardmäßig berechnen Sie die Statistik für passende Spaltennamen und geben ein DataFrame zurück. Wenn das Keyword-Argument paarweiseTrue übergeben wird, berechnet man die Statistik für jedes Spaltenpaar und gibt ein Panel zurück, dessen Elemente die betreffenden Termine sind (siehe nächster Abschnitt). Computing Rolling Paarweise Kovarianzen und Korrelationen In der Finanzdatenanalyse und anderen Bereichen it8217s gemeinsam, um Kovarianz und Korrelationsmatrizen für eine Sammlung von Zeitreihen zu berechnen. Oft ist man auch an Moving-Fenster-Kovarianz - und Korrelationsmatrizen interessiert. Dies kann getan werden, indem man das paarweise Schlüsselwort-Argument übergibt, das im Fall von DataFrame-Eingaben ein Panel liefert, dessen Elemente die Daten sind. Im Falle eines einzigen DataFrame-Arguments kann das paarweise Argument sogar weggelassen werden: Fehlende Werte werden ignoriert und jeder Eintrag wird mit den paarweise vollständigen Beobachtungen berechnet. Bitte beachten Sie die Kovarianz-Sektion für Einschränkungen, die mit dieser Methode zur Berechnung von Kovarianz - und Korrelationsmatrizen verbunden sind. Abgesehen davon, dass kein Fensterparameter vorhanden ist, haben diese Funktionen die gleichen Schnittstellen wie ihre. rolling-Pendants. Wie oben sind die Parameter, die sie alle akzeptieren: minperiods. Schwelle von Nicht-Null-Datenpunkten zu erfordern. Standardmäßig benötigt, um die Statistik zu berechnen. Es werden keine NaNs ausgegeben, sobald Minimalperioden Nicht-Null-Datenpunkte gesehen wurden. Center. Boolean, ob die Etiketten in der Mitte gesetzt werden sollen (Standard ist False) Die Ausgabe der. rolling - und. expanding-Methoden gibt kein NaN zurück, wenn es im aktuellen Fenster mindestens Minimalperioden gibt. Das unterscheidet sich von cumsum. Cumprod Cummax Und cummin Die NaN in der Ausgabe zurückgeben, wo ein NaN in der Eingabe angetroffen wird. Eine expandierende Fensterstatistik wird stabiler (und weniger reaktionsfähig) als sein Rollfenster, da die zunehmende Fenstergröße die relative Auswirkung eines einzelnen Datenpunktes verringert. Als Beispiel hierbei handelt es sich um die mittlere () Ausgabe für den vorherigen Zeitreihen-Datensatz: Exponentiell gewichtetes Fenster Ein verwandter Satz von Funktionen sind exponentiell gewichtete Versionen mehrerer der obigen Statistiken. Eine ähnliche Schnittstelle zu. rolling und. expanding wird durch die. ewm-Methode aufgerufen, um ein EWM-Objekt zu empfangen. Es werden eine Reihe von expandierenden EW (exponentiell gewichtete) Methoden bereitgestellt: DAX enthält einige statistische Aggregationsfunktionen wie Durchschnitt, Varianz und Standardabweichung. Andere typische statistische Berechnungen verlangen, dass Sie längere DAX-Ausdrücke schreiben. Excel hat aus dieser Sicht eine viel reichere Sprache. Die statistischen Muster sind eine Sammlung von gemeinsamen statistischen Berechnungen: Median, Modus, gleitender Durchschnitt, Perzentil und Quartil. Wir danken Colin Banfield, Gerard Brückl und Javier Guilln, dessen Blogs einige der folgenden Muster inspirierten. Grundmuster Beispiel Die Formeln in diesem Muster sind die Lösungen für spezifische statistische Berechnungen. Sie können Standard-DAX-Funktionen verwenden, um den Mittelwert (arithmetischen Mittelwert) eines Satzes von Werten zu berechnen. DURCHSCHNITT Gibt den Durchschnitt aller Zahlen in einer numerischen Spalte zurück. AVERAGEA Gibt den Durchschnitt aller Zahlen in einer Spalte zurück und behandelt sowohl Text als auch nicht-numerische Werte (nicht numerische und leere Textwerte zählen als 0). AVERAGEX Berechnen Sie den Durchschnitt auf einem Ausdruck, der über einer Tabelle ausgewertet wird. Moving Average Der gleitende Durchschnitt ist eine Berechnung, um Datenpunkte zu analysieren, indem eine Reihe von Mittelwerten verschiedener Teilmengen des vollständigen Datensatzes erstellt wird. Sie können viele DAX-Techniken verwenden, um diese Berechnung umzusetzen. Die einfachste Technik ist die Verwendung von AVERAGEX, die eine Tabelle der gewünschten Granularität iteriert und für jede Iteration den Ausdruck berechnet, der den einzelnen Datenpunkt erzeugt, der im Durchschnitt verwendet wird. Beispielsweise berechnet die folgende Formel den gleitenden Durchschnitt der letzten 7 Tage, vorausgesetzt, dass Sie eine Datumstabelle in Ihrem Datenmodell verwenden. Mit AVERAGEX berechnen Sie automatisch die Maßnahme auf jeder Granularitätsebene. Bei der Verwendung einer Maßnahme, die aggregiert werden kann (wie zB SUM), dann könnte ein anderer Ansatz, der auf CALCULATE basiert, schneller sein. Sie finden diesen alternativen Ansatz in der vollständigen Muster von Moving Average. Sie können Standard-DAX-Funktionen verwenden, um die Varianz eines Satzes von Werten zu berechnen. VAR. S. Gibt die Varianz der Werte in einer Spalte zurück, die eine Stichprobenpopulation repräsentiert. VAR. P. Gibt die Varianz der Werte in einer Spalte zurück, die die gesamte Population repräsentiert. VARX. S. Gibt die Varianz eines Ausdrucks zurück, der über eine Tabelle ausgewertet wird, die eine Stichprobenpopulation repräsentiert. VARX. P. Gibt die Varianz eines Ausdrucks zurück, der über eine Tabelle ausgewertet wird, die die gesamte Population repräsentiert. Standardabweichung Sie können Standard-DAX-Funktionen verwenden, um die Standardabweichung eines Satzes von Werten zu berechnen. STDEV. S. Gibt die Standardabweichung von Werten in einer Spalte zurück, die eine Stichprobenpopulation repräsentiert. STDEV. P. Gibt die Standardabweichung von Werten in einer Spalte zurück, die die gesamte Population repräsentiert. STDEVX. S. Gibt die Standardabweichung eines Ausdrucks zurück, der über eine Tabelle ausgewertet wird, die eine Stichprobenpopulation repräsentiert. STDEVX. P. Gibt die Standardabweichung eines Ausdrucks zurück, der über eine Tabelle ausgewertet wird, die die gesamte Population repräsentiert. Der Median ist der Zahlenwert, der die höhere Hälfte einer Population von der unteren Hälfte trennt. Wenn es eine ungerade Anzahl von Zeilen gibt, ist der Median der Mittelwert (Sortierung der Zeilen vom niedrigsten Wert zum höchsten Wert). Wenn es eine gerade Anzahl von Zeilen gibt, ist es der Durchschnitt der beiden Mittelwerte. Die Formel ignoriert leere Werte, die nicht als Teil der Bevölkerung betrachtet werden. Das Ergebnis ist identisch mit der MEDIAN-Funktion in Excel. Abbildung 1 zeigt einen Vergleich zwischen dem von Excel zurückgegebenen Ergebnis und der entsprechenden DAX-Formel für die Medianberechnung. Abbildung 1 Beispiel für die mediane Berechnung in Excel und DAX. Der Modus ist der Wert, der am häufigsten in einem Satz von Daten erscheint. Die Formel ignoriert leere Werte, die nicht als Teil der Bevölkerung betrachtet werden. Das Ergebnis ist identisch mit den Funktionen MODE und MODE. SNGL in Excel, die nur den Minimalwert zurückgeben, wenn es mehrere Modi in der Menge der betrachteten Werte gibt. Die Excel-Funktion MODE. MULT würde alle Modi zurückgeben, aber man kann sie nicht als Maß im DAX implementieren. Abbildung 2 vergleicht das von Excel zurückgegebene Ergebnis mit der entsprechenden DAX-Formel für die Modusberechnung. Abbildung 2 Beispiel der Modusberechnung in Excel und DAX. Percentile Das Perzentil ist der Wert, unter dem ein bestimmter Prozentsatz der Werte in einer Gruppe fällt. Die Formel ignoriert leere Werte, die nicht als Teil der Bevölkerung betrachtet werden. Die Berechnung im DAX erfordert mehrere Schritte, die im Abschnitt "Vollständige Muster" beschrieben sind, in dem gezeigt wird, wie die gleichen Ergebnisse der Excel-Funktionen PERCENTILE, PERCENTILE. INC und PERCENTILE. EXC erhalten werden. Die Quartile sind drei Punkte, die einen Satz von Werten in vier gleiche Gruppen aufteilen, wobei jede Gruppe ein Viertel der Daten umfasst. Sie können die Quartile mit dem Percentile-Muster nach diesen Korrespondenzen berechnen: Erster Quartil-Unterquartil 25. Perzentil Zweiter Quartil-Median 50. Perzentil Dritter Quartil-Oberquartil 75. Perzentil Komplettes Muster Ein paar statistische Berechnungen haben eine längere Beschreibung des vollständigen Musters, weil Vielleicht haben Sie je nach Datenmodell und anderen Anforderungen unterschiedliche Implementierungen. Moving Average Normalerweise beurteilen Sie den gleitenden Durchschnitt, indem Sie auf den Tag Granularitätsniveau verweisen. Die allgemeine Vorlage der folgenden Formel hat diese Markierungen: ltnumberofdaysgt ist die Anzahl der Tage für den gleitenden Durchschnitt. Ltdatecolumngt ist die Datumssäule der Datumstabelle, wenn Sie eine oder die Datumssäule der Tabelle enthalten, die Werte enthält, wenn es keine separate Datumstabelle gibt. Ltmeasuregt ist die Maßnahme, um den gleitenden Durchschnitt zu berechnen. Das einfachste Muster nutzt die AVERAGEX-Funktion im DAX, die automatisch nur die Tage berücksichtigt, für die es einen Wert gibt. Alternativ können Sie die folgende Vorlage in Datenmodellen ohne Datumstabelle und mit einer Maßnahme, die aggregiert werden kann (zB SUM), über den gesamten betrachteten Zeitraum verwenden. Die vorherige Formel betrachtet einen Tag ohne entsprechende Daten als Maß, der 0 Wert hat. Dies kann nur geschehen, wenn Sie eine separate Datumstabelle haben, die Tage enthalten kann, für die es keine entsprechenden Transaktionen gibt. Sie können den Nenner für den Durchschnitt nur mit der Anzahl der Tage festlegen, für die es Transaktionen gibt, die das folgende Muster verwenden, wobei: ltfacttablegt die Tabelle ist, die sich auf die Datumstabelle bezieht und die von der Maßnahme berechneten Werte enthält. Sie können die DATESBETWEEN - oder DATESINPERIOD-Funktionen anstelle von FILTER verwenden, aber diese funktionieren nur in einer regulären Datumstabelle, während Sie das oben beschriebene Muster auch auf nicht reguläre Datumstabellen und auf Modelle mit einer Datumstabelle anwenden können. Betrachten wir zum Beispiel die verschiedenen Ergebnisse, die durch die beiden folgenden Maßnahmen hervorgerufen wurden. In Abbildung 3 können Sie sehen, dass es keine Verkäufe am 11. September 2005 gibt. Dieses Datum ist jedoch in der Date-Tabelle enthalten. Es gibt also 7 Tage (vom 11. September bis 17. September), die nur 6 Tage mit Daten haben. Abbildung 3 Beispiel für eine gleitende durchschnittliche Berechnung unter Berücksichtigung und ignorierte Daten ohne Umsatz. Die Maßnahme Moving Average 7 Tage hat eine niedrigere Zahl zwischen 11. September und 17. September, weil es den 11. September als Tag mit 0 Verkäufen betrachtet. Wenn du Tage ohne Verkauf ignorieren möchtest, dann benutze die Maßnahme Moving Average 7 Days No Zero. Dies könnte der richtige Ansatz sein, wenn Sie eine komplette Datumstabelle haben, aber Sie möchten Tage ohne Transaktionen ignorieren. Mit der Moving Average 7 Days Formel ist das Ergebnis korrekt, da AVERAGEX automatisch nur nicht leere Werte berücksichtigt. Denken Sie daran, dass Sie die Leistung eines gleitenden Durchschnitts verbessern könnten, indem Sie den Wert in einer berechneten Spalte einer Tabelle mit der gewünschten Granularität wie Datum oder Datum und Produkt beibehalten. Der dynamische Berechnungsansatz mit einer Maßnahme bietet jedoch die Möglichkeit, einen Parameter für die Anzahl der Tage des gleitenden Durchschnitts zu verwenden (z. B. ersetzen ltnumberofdaysgt mit einer Maßnahme, die das Parameter-Tabellenmuster implementiert). Der Median entspricht dem 50. Perzentil, das man mit dem Percentile-Muster berechnen kann. Das mediane Muster erlaubt es Ihnen jedoch, die Medianberechnung mit einer einzigen Maßnahme zu optimieren und zu vereinfachen, anstatt der verschiedenen Maßnahmen, die das Percentile-Muster benötigt. Sie können diesen Ansatz verwenden, wenn Sie den Median für Werte berechnen, die in ltvaluecolumngt enthalten sind, wie unten gezeigt: Um die Leistung zu verbessern, möchten Sie vielleicht den Wert einer Maßnahme in einer berechneten Spalte beibehalten, wenn Sie den Median für die Ergebnisse erhalten möchten Eine Maßnahme im Datenmodell. Bevor Sie diese Optimierung durchführen, sollten Sie die MedianX-Berechnung auf der Grundlage der folgenden Vorlage implementieren, indem Sie diese Markierungen verwenden: ltgranularitytablegt ist die Tabelle, die die Granularität der Berechnung definiert. Zum Beispiel könnte es die Date-Tabelle sein, wenn man den Median einer auf dem Tagesniveau berechneten Maßnahme berechnen möchte, oder es könnte VALUES (8216DateYearMonth) sein, wenn man den Median einer auf dem Monatsniveau berechneten Maßnahme berechnen möchte. Ltmeasuregt ist die Maßnahme, um für jede Zeile von ltrancityitytablegt für die Medianberechnung zu berechnen. Ltmeasuretablegt ist die Tabelle mit Daten, die von ltmeasuregt verwendet werden. Zum Beispiel, wenn das ltgranularitytablegt eine Dimension wie 8216Date8217 ist, dann wird das ltmeasuretablegt 8216Internet Sales8217 mit der Internet-Verkaufsmenge Spalte summiert durch die Internet Total Sales Maßnahme. Zum Beispiel können Sie den Median des Internet Total Sales für alle Kunden in Adventure Works wie folgt schreiben: Tipp Das folgende Muster: wird verwendet, um Zeilen aus ltgranularitytablegt zu entfernen, die keine entsprechenden Daten in der aktuellen Auswahl haben. Es ist ein schnellerer Weg als die Verwendung des folgenden Ausdrucks: Allerdings können Sie den gesamten CALCULATETABLE Ausdruck mit nur ltgranularitytablegt ersetzen, wenn Sie leere Werte des ltmeasuregt als 0 betrachten möchten. Die Leistung der MedianX Formel hängt von der Anzahl der Zeilen in der Tisch iteriert und auf die Komplexität der Maßnahme. Wenn die Leistung schlecht ist, können Sie das ltmeasuregt-Ergebnis in einer berechneten Spalte des lttablegt bestehen, aber dies wird die Fähigkeit entfernen, Filter auf die Medianberechnung zur Abfragezeit anzuwenden. Percentile Excel hat zwei verschiedene Implementierungen der Perzentilberechnung mit drei Funktionen: PERCENTILE, PERCENTILE. INC und PERCENTILE. EXC. Sie alle kehren das K-te Perzentil der Werte zurück, wobei K im Bereich 0 bis 1 liegt. Der Unterschied ist, dass PERCENTILE und PERCENTILE. INC K als Inklusivbereich betrachten, während PERCENTILE. EXC den K-Bereich 0 bis 1 als exklusiv betrachtet . Alle diese Funktionen und ihre DAX-Implementierungen erhalten einen Perzentilwert als Parameter, den wir K. ltKgt-Perzentilwert im Bereich 0 bis 1 nennen. Die beiden DAX-Implementierungen von Perzentil erfordern ein paar Maßnahmen, die ähnlich, aber unterschiedlich genug sind Zwei verschiedene Formeln. Die in jedem Muster definierten Maßnahmen sind: KPerc. Der Perzentilwert entspricht ltKgt. PercPos Die Position des Perzentils im sortierten Satz von Werten. ValueLow Der Wert unterhalb der Perzentilposition. ValueHigh. Der Wert über der Perzentilposition. Percentile Die endgültige Berechnung des Perzentils. Sie benötigen die ValueLow - und ValueHigh-Maßnahmen, falls der PercPos einen Dezimalteil enthält, denn dann müssen Sie zwischen ValueLow und ValueHigh interpolieren, um den korrekten Perzentilwert zurückzugeben. Abbildung 4 zeigt ein Beispiel für die Berechnungen, die mit Excel - und DAX-Formeln erstellt wurden, wobei beide Algorithmen von Perzentil (einschließlich und exklusiv) verwendet werden. Abbildung 4 Perzentile Berechnungen mit Excel-Formeln und der entsprechenden DAX-Berechnung. In den folgenden Abschnitten führen die Percentile-Formeln die Berechnung auf Werte aus, die in einer Tabellenspalte DataValue gespeichert sind, während die PercentileX-Formeln die Berechnung auf Werte ausführen, die von einer bei einer gegebenen Granularität berechneten Größe zurückgegeben werden. Percentile Inclusive Die Percentile Inclusive Implementierung ist die folgende. Percentile Exclusive Die Percentile Exclusive Implementierung ist die folgende. PercentileX Inclusive Die PercentileX Inclusive Implementierung basiert auf der folgenden Vorlage, wobei diese Marker verwendet werden: ltgranularitytablegt ist die Tabelle, die die Granularität der Berechnung definiert. Zum Beispiel könnte es die Datumstabelle sein, wenn Sie das Perzentil einer Maßnahme am Tagestag berechnen möchten, oder es könnte VALUES (8216DateYearMonth) sein, wenn Sie das Perzentil einer Maßnahme auf der Monatsstufe berechnen möchten. Ltmeasuregt ist die Maßnahme, um für jede Zeile von ltrancityitytablegt für die Perzentilberechnung zu berechnen. Ltmeasuretablegt ist die Tabelle mit Daten, die von ltmeasuregt verwendet werden. Wenn zum Beispiel die ltgranularitytablegt eine Dimension wie 8216Date, 8217 ist, dann wird das ltmeasuretablegt 8216Sales8217 sein, das die Summenspalte enthält, die durch das Gesamtmengenmaß summiert wird. Beispielsweise können Sie den PercentileXInc des Gesamtbetrags der Verkäufe für alle Termine in der Datentabelle wie folgt schreiben: PercentileX Exclusive Die PercentileX Exclusive Implementierung basiert auf der folgenden Vorlage und verwendet dieselben Marker, die in PercentileX Inclusive verwendet werden Kann die PercentileXExc des Gesamtbetrags der Verkäufe für alle Termine in der Datumstabelle wie folgt schreiben: Halten Sie mich über die bevorstehenden Muster (Newsletter) informiert. Deaktivieren Sie, um die Datei frei herunterzuladen. Veröffentlicht am 17. März 2014 byCisco ASR 1000 Aggregation Services Router Quality of Service (QoS) FAQ Die Cisco Reg ASR 1000 Aggregation Services Router Plattform verfügt über eine robuste und skalierbare Quality-of-Service (QoS) Implementierung. Es haftet an der modularen QoS CLI (MQC) Befehlszeilenschnittstelle (CLI), so dass die Konfiguration den Cisco IOS Reg und IOS XE Softwarebenutzern aus anderen Plattformen bekannt ist. Da QoS auf dem Cisco ASR 1000 in Hardware implementiert ist, können bestimmte Details des Betriebs von anderen Cisco-Plattformen abweichen. Wie kann der Cisco ASR 1000 die Paketgrößen A berechnen. Siehe Tabelle 1 für allgemeine Informationen über Warteschlangen-Richtlinienkarten, die auf physikalische Schnittstellen, Unterschnittstellen, virtuelle ATM-Schaltungen, virtuelle Vorlagen oder Tunnelschnittstellen angewendet werden. Bitte beachten Sie die Tabelle 2 für allgemeine Informationen über Polizeiplankarten, die auf physikalische Schnittstellen, Unterschnittstellen, virtuellen ATM-Schaltungen, virtuellen Vorlagen oder Tunnelschnittstellen angewendet werden. Tabelle 1. Paketgrößenberechnung für Warteschlangenfunktionen und Zähler Was ist nicht enthalten Was ist enthalten Ethernet-Haupt - und Sub-Schnittstellen Inter-Frame-Lücke (IFG) Präambel und zyklische Redundanzprüfung (CRC) Layer 1 übersteigt Layer 2 Header und Layer 2 Payload All Layer 3 und up Payloads ATM virtuelle Schaltungen und ATM virtuelle Pfade Layer 1 Overheads 5-Byte ATM-Zellen-Header Alle ATM Adaption Layer (AAL) Header ATM Zelle Steuern und ATM-Zell-Padding Alle Layer 3 und up Payloads Serial und Packet über SONET (PoS) Hauptschnittstellen CRC und High-Level Data Link Control (HDLC) Bit-Füllung Layer 2 Header und Layer 2 Payload Alle Layer 3 und Up Payloads Virtueller Zugriff, Breitband virtuelle Vorlage und Sitzungen IFGpreamble und CRC Layer 1 übersteigt Layer 2 Header und Layer 2 Payload Layer-2-Tunneling-Protokoll (L2TP) Header Punkt-zu-Punkt-Protokoll über X (PPPoX) Header Alle Layer 3 und up Payloads Tunnel (generische Routing Kapselung GRE, Dynamic Multipoint VPN DMVPN, Dynamic Virtual Tunnel Interface dVTI, IPsec Site-to-Site VPN sVTI und IP Security IPsec) IFGpreamble und CRC Layer 1 überlagert Layer 2 Header und Layer 2 Payload Q. Ist es möglich, nachgeschaltete Änderungen in der Paketgröße A zu berücksichtigen. Ja, mit der Overhead Accounting Funktion können alle Warteschlangenfunktionen die anpassen Größe von Paketen für die Zwecke der Terminierung von Paketen für die Übertragung mit dem Konto-Schlüsselwort mit dem Warteschlangen-Feature. Sie können benutzerdefinierte Offsets von -64 bis 64 Bytes konfigurieren. Darüber hinaus können Sie einige vordefinierte Offsets verwenden. Beachten Sie, dass Warteschlangen-Features nur beim Ausstieg unterstützt werden, daher wird die Overhead-Accounting nur bei Ausrichtungsrichtlinien mit Warteschlangenfunktionen unterstützt. Ein Beispiel für die Befehlszeilenschnittstelle (CLI) folgt: Form Durchschnittliches Konto benutzerdefiniert -4 Zusätzlich können mit dem atm-Schlüsselwort die Warteschlangenfunktionen die ATM-Zellteilung und die Zellpolsterung (manchmal auch als ATM-Zellensteuer bezeichnet) kompensieren. Diese Funktion kompensiert den 5-Byte-Header jeder Zelle und die Auffüllung der letzten Zelle, um eine volle 48 Byte Nutzlast zu füllen. Wenn zusätzliche AAL5, Subnetwork Access Protocol (SNAP) oder andere Header berücksichtigt werden sollen, sollten sie mit dem benutzerdefinierten Parameter oder einigen der vordefinierten Schlüsselwörter aufgenommen werden. Die Polizei-Overhead-Buchhaltung wird in Cisco IOS XE 3.17 unterstützt. Diese Änderung gilt für die strikte Polizeiarbeit (Polizeipreis) und die bedingungslose Polizeiarbeit mit Priorität (Priorität der Polizei). Allerdings gilt es nicht für bedingte Polizei (Priorität mit einem Prozentsatz konfiguriert). Jede Klasse mit einem bedingten Polizisten impliziert sowohl einen Polizisten als auch eine Prioritätswarteschlange. Die Warteschlange unterstützt den übergeordneten Overhead von der Warteschlange, aber der Polizist wird keinen Overhead unterstützen. Polizei cir 3000000 Konto benutzerdefiniert -4 Für weitere Informationen wenden Sie sich bitte an: Q. Kann QoS auf der Management-Schnittstelle, GigabitEthernet0 A verwirrt werden. Nein, Sie können QoS nicht auf der Management-Schnittstelle konfigurieren. Die Management-Schnittstelle wird vollständig innerhalb des Route-Prozessors abgewickelt, und der Datenverkehr zu und von der Management-Schnittstelle bewegt sich nicht durch den Cisco ASR 1000 Series Embedded Services Processor (ESP). Da alle QoS-Funktionen auf dem ESP durchgeführt werden, kann QoS nicht angewendet werden. Q. Gibt es einen Unterschied im QoS-Verhalten auf Shared Port Adapter (SPA) - basierten Ethernet-Ports im Vergleich zu integrierten Ethernet-Ports A. Für QoS-Verhalten, das von MQC-Service-Policy-Befehlen verwaltet wird, gibt es keinen Unterschied im QoS-Verhalten. Alle erweiterten QoS-Verarbeitung erfolgt auf dem ESP und wird nicht durch die Art des Eingangs-Ethernet-Anschlusses beeinflusst. Alle ASR 1000-Plattformen verfügen über eine niedrige und hochprioritäre Warteschlange pro Port im Eintritts - und Ausstiegspfad. Dies ist unabhängig von einem modularen oder festen Plattformdesign. SPA-Schnittstellenprozessor (SIP10 und SIP40) Leitungskarten greifen bei der Terminierung des Eingangsverkehrs und der Weiterleitung an die ESP zur Verarbeitung ein leicht unterschiedliches Verhalten ein. Diese Variante kommt nur ins Spiel, wenn der SIP10 mit dem Verkehr überzeichnet ist (z. B. zwei 10-GE SPAs, die in einem SIP10-Versuch installiert sind, um mehr als 10 Gbit / s Verkehr an den ESP zur Verarbeitung weiterzuleiten). In unterzeichneten Szenarien ist das Verhalten bei SIP10 und SIP40 gleich. Für die überwiegende Mehrheit der Kunden würden diese subtilen Verhaltensunterschiede bei normalem Netzwerkverhalten nicht beobachtet. Es wird nicht empfohlen, das SIP-basierte QoS-Verhalten ohne entsprechende Anweisungen zu manipulieren. Das Egress-Verhalten ist zwischen SIP10 und SIP40 gleich. Der Cisco ASR 1002 Router verfügt über einen eingebauten SIP10. Der ASR 1002-X Router verfügt über einen eingebauten SIP40. Sowohl im ASR 1002 als auch im ASR 1002-X Router ist das eingebaute SIP immer unterschrieben. Der ASR 1001-X Router verfügt nicht über ein eingebautes SIP, da Ethernet-Schnittstellen direkt über einen integrierten Chipsatz verwaltet werden. Der ASR 1001-X hat im Vergleich zu den anderen ASR 1000 Plattformen eine reduzierte Menge an Input Packet Puffer. Q. Kann QoS den Steuerungsebenenverkehr verwalten, der für Cisco IOS Software bestimmt ist, die auf dem Routenprozessor A läuft. Ja, eine nicht kalkulierende QoS-Richtlinienkarte wird auf der Steuerungsebene im Cisco IOS Software-Konfigurationsmodus unterstützt. Diese Funktion wird als CoPP (Control Plane Policing) bezeichnet. Normalerweise wird eine Richtlinienkarte auf die Steuerebene angewendet, um den Routenprozessor vor Denial-of-Service - (DoS-) Angriffen zu schützen. Ein in der Eingabedirektion auf der Steuerebene angelegter Richtlinienplan wirkt sich auf den Verkehr aus, der für den Routenprozessor von regulären Schnittstellen bestimmt ist. Es ist möglich, Pakete so zu klassifizieren, dass einige ratenbegrenzt sind und andere nicht. Bei der Verwendung von show plat Hardware-qfp-Befehlen auf der Bedienebene-Schnittstelle ist zu bedenken, dass, obwohl die Richtlinienkarte als Eingang zur Steuerebene konfiguriert ist, es von der ESP-Karte ausgeht. Somit müssen die show plat hardware qfp Befehle die Ausgaberichtung verwenden. Q. Wie können QFP-Komplexe physikalische Schnittstellen für die Egress-Warteschlangen mit Cisco ASR 1000 Series 100- und 200-Gbps Embedded Services-Prozessoren (ESP100 bzw. ESP200) abbilden. A. Für die Puposes der Egress-Warteschlangen ist ein gegebener QFP-Komplex zuständig Die Warteschlangenfunktionen auf bestimmten Port-Adapter (SPA) im Cisco ASR 1000-Chassis. Bei Systemen mit einem QFP-Komplex ist diese Situation kein Anliegen, da alle Schnittstellen von einem einzigen QFP-Komplex abgewickelt werden. Bei Systemen mit mehreren QFPs ist es wichtig, Schnittstellen zwischen den QFPs zu verteilen, wenn es eine große Anzahl von Warteschlangen oder Zeitplänen gibt oder wenn es um eine hohe Paketpuffer-Speicher-Nutzung geht. Beachten Sie, dass diese Warteschlangenverantwortung unabhängig von der anderen Funktionsverarbeitung ist. Beispielsweise könnte ein Paket seine Einstiegs - und Ausstiegsmerkmale von QFP 0 behandeln, während die Egress-Warteschlange von QFP 1 abgewickelt wird. Die Abbildungen 1 und 2 zeigen, wie Schnittstellen im Cisco ASR 1006 und ASR 1013 Chassis verteilt sind: Cisco ASR 1006 Chassis Mit ESP100: SPA-Steckplätze in grün bedient von QFP 0 SPA-Steckplätze in blau von QFP bedient 1 Es ist nicht möglich, dass mehrere QFPs einen Cisco ASR 1000 Series SPA Interface Prozessor 10 (SIP10) in jedem Steckplatz installiert haben. Wenn ein SIP10 in einem Slot verwendet wird, der normalerweise unter QFPs aufgeteilt ist, wird der QFP, der normalerweise die linke Seite des SIP besitzt, alle Schnittstellen bedienen. SIP40-Karten können von mehreren QFPs bedient werden. Für die Cisco ASR 1000 Series Fixed Ethernet Line Card (ASR1000-2T20X1GE) sind die beiden 10 Gigabit Ethernet Schnittstellen im Besitz der rechtsseitigen QFP und die zweiundzwanzig Gigabit Ethernet Schnittstellen sind im Besitz der linken QFP (Abbildung 1). Für die Cisco ASR 1000 Series Fixed Ethernet Line Card (ASR1000-6TGE) befinden sich die ungeraden geraden Nummernports von der linken Seite QFP und die ungeradzahligen Ports befinden sich im Besitz der rechten Seite QFP (Abbildung 1). Abbildung 1. Cisco ASR 1006 QFP-Verteilung mit ESP100 Cisco ASR 1013 Chassis mit ESP100 oder ESP200: SPA-Steckplätze in grün von QFP 0 SPA-Steckplätze in blau bedient von QFP 1 SPA-Steckplätze in lila bedient durch QFP 2 SPA-Steckplätze in orange von QFP bedient 3 Abbildung 2. QFP-Schnittstelle Besitzverteilung mit ESP100 und ESP200 Beachten Sie, dass Abbildung 2 davon ausgeht, dass SIP40-Leitungskarten in einem Cisco ASR 1013-Chassis verwendet werden. Wenn SIP10-Leitungskarten verwendet werden, werden alle Ausgangswarteschlangen von der QFP gehandhabt, die die linke Seite (gerade nummerierte SPA-Schächte) in der Figur besitzt. Wenn zum Beispiel ein SIP10 in Steckplatz 2 (Drittel von unten) installiert wurde, würden alle Warteschlangen für alle Ports auf diesem SIP10 mit ESP100 und QFP 1 (blau) mit ESP200 von QFP 0 (grün) bedient. Für die Cisco ASR 1000 Series Fixed Ethernet Line Card (ASR1000-2T20X1GE) sind die beiden 10 Gigabit Ethernet Schnittstellen im Besitz der rechten QFP und die zweiundzwanzig Gigabit Ethernet Schnittstellen sind im Besitz des linken QFP. Für die Cisco ASR 1000 Series Fixed Ethernet Line Card (ASR1000-6TGE) befinden sich die ungeraden geraden Nummernports von der linken Seite QFP und die ungeradzahligen Ports befinden sich im Besitz der rechten Seite QFP (Abbildung 1). Q. Wie unterscheidet sich der von der Cisco ASR 1000 verwendete Drei-Parameter-Scheduler von zwei Parametern, die von anderen Plattformen A verwendet werden. Der Cisco ASR1000 QoS Scheduler verwendet drei Parameter: Maximum, Minimum und Over. Die meisten anderen anderen Plattformen verwenden nur zwei Parameter: Maximum und Minimum. Beide Modelle behandeln die maximale (Form) und minimale (Bandbreite) auf die gleiche Weise. Der Unterschied ist, wie sie überschreiten (Bandbreite bleibt). Maximum ist eine obere Grenze der Bandbreite des Verkehrs, die eine Klasse weiterleiten darf. Minimum ist ein Garant, dass die angegebene Menge an Verkehr immer verfügbar ist, auch wenn die Schnittstelle oder Hierarchie verstopft ist. Überschuss ist der Unterschied zwischen der maximal möglichen Rate (Eltern-Shaper) und allen verwendeten Mimumums (Priorität und Bandbreite-garantierter Verkehr). Ein Zwei-Parameter-Scheduler verteilt die überschüssige Bandbreite proportional nach den Mindestraten. Ein Drei-Parameter-Scheduler verfügt über einen programmierbaren Parameter, um diese Freigabe zu steuern. Standardmäßig verwendet der Cisco ASR 1000 für jede Klasse gleichwertige oder überschüssige Werte von 1. Aufgrund von Einschränkungen in Cisco IOS Software können Sie die minimalen (Bandbreite) und überschüssigen (Bandbreite verbleibenden) Parameter nicht gleichzeitig in einer Klasse konfigurieren. Diese gleichzeitige Konfiguration wurde in der klassischen Cisco IOS Software unterstützt. Für weitere Informationen wenden Sie sich bitte an: Leaky Bucket Algorithmus als Warteschlange: en. wikipedia. orgwikiLeakybucketTheLeakyBucketAlgorithmasaQueue (Hinweis: Dieses Dokument wird nicht von Cisco kontrolliert oder unterstützt, es wird nur als Bequemlichkeit zur Verfügung gestellt.) Q. Was bedeutet die Nicht-MQC-Bandbreite Und Bandbreite qos-Referenz-Befehle tun und wo sind sie nützlich A. Typischerweise wird die Schnittstelle Bandbreite Befehl auf einer Schnittstelle verwendet, um die Bandbreite Metrik, die Routing-Protokolle für ihre Weg Entscheidungen zu beeinflussen beeinflussen. In bestimmten Situationen kann jedoch der Wert für den Bandbreitenbefehl QoS beeinflussen. Der Bandbreiten-qos-Referenz-Schnittstellenbefehl soll der QoS-Infrastruktur vermitteln, wie viel Bandbreite für die nachgeschaltete Tunnelbandbreite zur Verfügung steht. Tabelle 3 Details, wenn Bandbreite und Bandbreite qos-Referenz anwendbar sind. Tabelle 3. Verwendet für Schnittstellenbandbreite und Bandbreite qos-Referenz Q. Was sind PAKPRIORITY-Pakete und wie werden sie behandelt A. Bestimmte Pakete, die so wichtig sind, dass sie als Tropfen betrachtet werden und eine spezielle Bezeichnung namens PAKPRIORITY gegeben werden. Sie werden von Cisco IOS Software auf dem Routenprozessor generiert. PAKPRIORITY-Pakete sind typischerweise mit Protokollen verknüpft, bei denen eine zuverlässige Lieferung sehr erwünscht ist und es keine Neuübertragung oder Haltezeit gibt, die in das Protokoll eingebaut ist. Nicht alle Pakete für ein gegebenes Protokoll werden PAKPRIORITY sein. Um das No-Drop-Verhalten zu erreichen, werden PAKPRIORITY-Pakete nicht durch die von MQC-Richtlinienkarten erstellten Warteschlangen ausgeführt. PAKPRIORITY-Pakete werden mit wenigen Ausnahmen über die Schnittstellen-Standard-Warteschlange ausgeführt. Wenn ein PAKPRIORITY-Paket durch eine MQC-Richtlinienkarte in eine Priorität (low-latency) - Warteschlange eingestuft wird, bewegen sich PAKPRIORITY-Pakete anstelle der Schnittstellen-Standard-Warteschlange durch die benutzerdefinierte Prioritäts-Warteschlange. Andernfalls erhöht das Paket die Klassifizierungszähler (aber nicht Warteschlangenzähler) für die passende Klasse und wird dann in der Schnittstellen-Standard-Warteschlange eingegeben. Bei Nicht-ATM-Schnittstellen gibt es eine einzige Schnittstellen-Standard-Warteschlange pro physikalischer Schnittstelle. Es trägt PAKPRIOIRTY und Nicht-PAKPRIORITY-Verkehr, der sich nicht durch eine MQC-Policy-Map bewegt. Für ATM-Schnittstellen gibt es eine einzige Schnittstellen-Standard-Warteschlange, aber zusätzlich hat jede virtuelle ATM-Schaltung eine Default-Warteschlange zugeordnet. Die Standard-Warteschlange pro-ATM-virtuelle Schaltung führt den Nicht-PAKPRIORITY-Verkehr einer gegebenen virtuellen Schaltung ohne angelegte MQC. Alle PAKPRIORITY-Verkehr (nicht anders klassifiziert in eine Low-Latency-Priorität-Warteschlange durch eine MQC-Richtlinienkarte) bewegt sich durch die ATM-Schnittstelle Standard-Warteschlange. Die Schnittstellen-Standardwarteschlange existiert außerhalb der Warteschlangen, die erstellt werden, wenn eine Warteschlangen-QoS-Richtlinienkarte auf eine Schnittstelle angewendet wird. Die Schnittstellen-Standard-Warteschlange hat eine minimale Bandbreite für Service-PAKPRIORITY-Pakete gewährleistet. Das Bewegen des Verkehrs durch diese Warteschlange hilft zu vermeiden (aber nicht garantieren Vermeidung von) Hunger durch benutzerdefinierte Priorität Pakete. Wenn in bestimmten Kundenszenarien eine bessere Verhüllungsvermeidung notwendig ist, dann ist es möglich, diesen speziellen Verkehr (über Klassenkartenfilter) zu benutzerdefinierten Klassen mit Priorität (LLL mit geringer Latenzwartung) zu klassifizieren, die es dem PAKPRIO-Verkehr ermöglichen wird Fließen durch die benutzerdefinierte Prioritäts-Warteschlange anstelle der Standard-Schnittstellen-Warteschlange (wie diskutiert). Dieser Verkehr wird dann gleichmäßig mit anderen vorrangigen Verkehr konkurrieren. PAKPRIORITY-Pakete erscheinen in den Klassifikationszählern für eine Richtlinienkarte, die auf eine Egress-Schnittstelle angewendet wird. Die Pakete erscheinen jedoch nicht in den Warteschlangenzählern, weil sie tatsächlich durch die Schnittstellen-Standard-Warteschlange eingestuft werden. Um die Anzahl der Pakete zu beobachten, die sich durch die Schnittstellen-Standard-Warteschlange bewegt haben, verwenden Sie den folgenden Befehl (beachten Sie, dass der Schnittstellenname vollständig mit übereinstimmender Großschreibung ausgedrückt werden muss): show plat hard qfp aktiv infra bqs int GigabitEthernet000 Die Werte für tail fallen Und totalenqs geben die Anzahl der Pakete, die wegen einer vollen Warteschlange fallen gelassen wurden und die Anzahl der Pakete, die eingelassen wurden. PAKPRIORITY-Pakete sind nicht Gegenstand von Schwanz-Tropfen, zufällige Erkennung von Tropfen oder Polizisten Tropfen. Beispielsweise werden diese Pakete der Schnittstellen-Standard-Warteschlange hinzugefügt, auch wenn die Warteschlangentiefe größer als die Warteschlangengrenze ist. Nicht-PAKPRIORITY-Pakete, die auf die Schnittstellen-Standard-Warteschlange gerichtet sind, werden als beliebiges anderes Paket fallen gelassen, wenn die Warteschlangengrenze überschritten wird. PAKPRIORITY-Pakete, die in einer Warteschlange mit geringer Latenz klassifiziert sind, sind auch vor dem Schwellenfallen durch dieselbe Logik geschützt. Nur wenn der gesamte ESP-Paket-Speicher sehr voll ist (mehr als 98 Prozent) sind PAKPRIOIRTY-Pakete Schwanz fallen gelassen. Es ist nicht möglich, Pakete als PAKPRIORITY durch die CLI zu markieren. Diese Funktion ist für Pakete reserviert, die von Cisco IOS Software generiert und markiert sind. Es gibt keine Cisco IOS Software Zähler für PAKPRIORITY Pakete. Einige Protokolle dienten jedoch der Konfigurationssteuerung, um ihre Pakete als PAKPRIORITY zu markieren. Address Resolution Protocol (ARP) ist ein Beispiel, durch die folgende CLI: Arp-Paket-Priority-Freigabe Nachfolgend ist eine Liste von Protokollen mit Paketen, die als PAKPRIORITY markiert sind. Diese Liste unterliegt Änderungen ohne vorherige Ankündigung und wird nicht als umfassend oder vollständig erachtet: ATM Address Resolution Protocol Negative Acknowledgement (ARP NAK) ATM ARP fordert ATM Host Ping Operationen, Verwaltung und Management Zelle (OAampM) ATM Interim Local Management Interface (ILMI) Cisco Discovery-Protokoll Dynamisches Trunking-Protokoll (DTP) Ethernet-Loopback-Paket Frame Relay End2End Keepalive Frame Relay invers ARP Frame Relay Link Zugriffsverfahren (LAPF) Frame Relay Lokales Management Interface (LMI) Hot Standby Anschluss-zu-Connectrion Steuerpakete (HCCP) High-Level Data Link Control (HDLC) Keepalives Link Aggregation Control Protocol (LACP) (802.3ad) Port Aggregation Protocol (PAgP) Link Control Protocol (LCP) Nachrichten Serial Line Address Resolution Protocol (SLARP) Einige Multilink Point-to-Point Protocol (MLPP) Kontrollpakete (LCP) Protocol Unabhängiges Multicast (PIM) hellos Interne Gateway Routing Protocol (IGRP) hellos Intermediate System-to-Intermediate System (IS-IS) hellos, komplette Sequenznummer PDU (CSNP), PSNP und Label Switched Pfade (LSPs ) Ausgelöstes Routing Information Protocol (RIP) Ack TDP und LDP hellos Resource Reservation Protocol (RSVP) Einige L2TP Control Pakete Einige L2F Control Pakete GRE IP Keepalive Bidirektional Forwarding Protocol (BFD) Q. Sind Pakete als PAKPRIO mit Priorität behandelt oder garantiert nicht zu drop A. No, they are not treated with priority by default and they are subject to dropping under certain conditions. They are not subject to tail drop, random-detect drop, or policer drop unless the packet memory is very full (over 98). They are given a minimum bandwidth associated with the interface default queue (which can sometimes be managed by a policy map on the main physical interface). However, they share this minimum bandwidth with all other traffic that flows through the default interface queue. Therefore, this traffic can still be dropped in congestion scenarios. If you want greater protection or priority handling for specific traffic marked as PAKPRIO, then you should classify that traffic (with specific filters) to a user-defined class map that has LLQ (Low-Latency Queuing) enabled. It would also be a good practice to provision either strict or conditional policing in this class to manage any denial of service-type attacks. Q. The Cisco ASR 1000 isnt showing a class-map filter or access control entries (ACE) matches. How can I access the information A. By default, the ASR 1000 does not track per class-map filter or per-ACE matches for QoS. However, you can access these statistics by enabling one of the following CLIs: platform qos match-statistics per-filter (supported in Cisco IOS XE 3.3) platform qos match-statistics per-ace (supported in Cisco IOS XE 3.10) Note that these commands will not be affective if added to the configuration while any QoS policies are attached to any interfaces. To become effective, all QoS policies must be removed and then reapplied or the router must be rebooted. Q. The Cisco ASR 1000 isnt showing packet-marker statistics. How can I access the information A. By default, the ASR 1000 does not track marking statistics for QoS. However, you can enable these statistics by configuring the following CLI: platform qos marker-statistics (supported in Cisco IOS XE 3.3) Note that this command will not take effect if added to the configuration while any QoS policies are attached to any interfaces. To become effective, all QoS policies must be removed and then reapplied or the router must be rebooted. Q. How many class maps, policy maps, or match rules are supported A. Support as of Cisco IOS XE 3.10 is listed in Table 4. Table 4. Number of Class Maps, Policy Maps, and Match Rules Supported 16,000 for Cisco ASR 1000 Series Route Processor 2 or 3 (RP2 or RP3) with ESP40, ESP100, or ESP200All other platform combinations are 4096. Q. What are the causes for FMFPQOS-6-QOSSTATSPROGRESS messages in the system log A. The FMFPQOS-6-QOSSTATSSTALLED message is simply an informational message indicating that the statistics upload from the ESP card to the RP card is not progressing as quickly as normally expected. There are no long term bad effects from this command other than QoS statistics in IOS may not be updated as quickly as expected. This would affect statistics gathered from the CLI as well as from SNMPszlig. This error could occur during a heavy processing load on the RP, for example during a large BGP routing update or during a period of high rate session bringup. Q. How many policers are supported in the entire system A. For conditional policing, the limits are dictated by the number of queues that the platform supports. For strict policing, there is no set limit. The primary limiting factor for strict policers is available memory (both control plane and data plane). Q. How can the usage of control plane memory be determined A. The command show platform software status control-processor brief can be used to check the amount of available control plane memory. The command show plat hard qfp act infra exmem stat can be used to check the amount of free data plane memory. Q. What is the burst profile associated with shapers on the ASR 1000 A. When configuring the shape command on the ASR 1000, the CLI will accept the bc and be parameters in order to maintain configuration compatibility with migration of configurations from prior platforms. Even though these parameters are accepted, they are ignored by the hardware that does the QoS processing. Classic Cisco IOS Software shapers were based on an interval (Tc). Whenever that interval arrived, the scheduler would send a burst of data ( bc and be ) such that, over time, the desired shape rate would be achieved. The minimum interval of four msec was based on the Cisco IOS tick timer that fired periodically to trigger such time-based events. On the ASR 1000, the shaper is implemented in hardware and will send packets as often as possible to help maintain shape rate. There are a two mechanisms that appear like ASR 1000 bursts data at an interval however, it actually isnt the case. These two cases: When small packets are in the queue, the hardware may group them into a batch of about 512 bytes and send them as a group. The scheduler will generally send no fewer than two packets when a queue is cleared to transmit. Both of these decrease required instructions and allow the hardware to service high-speed 10-GE interfaces without consuming extra CPU cycles. Neither of these small burst scenarios should cause a problem when looking at the overall rate. Another way to view this shaper implementation is as a purely leaky bucket, whereas previous shapers could be considered as token leaky buckets. This purely leaky bucket algorithm prevents us from having a burst of bc or be packets like some of the older platforms that required tuning of parameters to protect downstream devices with limited buffering. Transmissions from the ASR 1000 should be much smoother overall, without previously observed bursting that had to be managed. Bursting for downstream devices should not be considered a major concern. Q. Are there any restrictions on high data rates and low data rates used at the same level of a QoS hierarchy A. There are no restrictions, but there are some best-practice guidelines. In general, there should not be elements in the same policy map (or at the same level of a QoS hierarchy in hardware) that are more than three levels of magnitude apart. If this rule is not followed, the higher-speed interfaces will suffer from a higher amount of jitter and bursty traffic than would otherwise be anticipated. If there is a need for this, the recommended solution is to insert an artificial level into the hierarchy. Adding this level of hierarchy can put the slow and fast shapers at different levels of the hierarchy, thus working around the restriction. Note that this problem can be found if vastly different rates are used in the same policy map, or if different policy maps with vastly different rates are applied at sibling nodes (for instance, two Gigabit Ethernet sub-interfaces, two subscriber sessions on the same interface, etc.). An example of a situation where this would be required would be two sub-interfaces for a Gigabit Ethernet interface. One needs to be shaped at 512 kbps and the other at 600 Mbps. The 600 Mbps interface is 1171 times the rate of the 512 kbps shaper and breaks the 1:1000 (three levels of magnitude) guidance. In this instance, one of the recommended solutions would be deploying policy maps such as the following: policy-map 512kb-shaper class class-default bandwidth remaining ratio 1 service-policy 512kb-shaper-child policy-map 512kb-shaper-child class class-default shape average 512000 policy-map 600Mb-shaper-child class class-default shape average 600000000 interface GigabitEthernet 000.100 service-policy output 512kb-shaper interface GigabitEthernet 000.101 service-policy output 600Mb-shaper The command below can also solve the issue when the shape ratio exceeds 1:1000 at the same level. However, it will require a chassis reload after the command is added to the configuration. platform qos optimize-rate-ratios This optimization is supported in Cisco IOS XE 3.16.3 and all Cisco IOS XE 16.3.1 and newer software. Q. What are the details of the packet counters in the show policy-map interface output A. The output is divided into several different sections. Typically there are sections for each of the following: Wired random early detection (WRED), random-detect The following configuration was used to generate the output for the example being documented: platform qos marker-statistics platform qos match-statistics per-filter platform qos match-statistics per-ace police cir 5000000 pir 75000000 exceed-action set-dscp-transmit 0 shape average 40000000 random-detect precedence 0 10 20 10 random-detect precedence 1 12 20 10 random-detect precedence 2 14 20 10 match precedence 1 match precedence 2 service-policy output reference Q. How is packet memory managed A. On all Cisco ASR 1000 platforms, the packet buffer memory on the ESP is one large pool that is used on an as-needed basis for all interfaces in the chassis. Interfaces do not reserve sections of memory. If 85 percent of all packet memory is used, nonpriority packets are dropped. At 98-percent packet memory usage, priority packets are dropped. The remaining 2 percent is reserved for internal control packet information. It is recommended that no more than 50 percent of packet buffer memory be allocated with configured queue-limit commands. Although not enforced, this recommendation is a best-practice recommendation. For certain special applications this recommendation may not apply. Only under unusual circumstances would you expect to see the packet buffer memory highly used. When the 85- and 98-percent thresholds are crossed, Cisco IOS Software generates a console log message. Q. How can I monitor packet buffer memory usage A. The following command can show how much of the packet buffer memory is used at any given time. Note that on systems with multiple QFP complexes (ESP100 and ESP200), you can vary the number after the bqs keyword to check the different QFP complexes. ASR1000 show plat hard qfp active bqs 0 packet-buffer utilization Packet buffer memory utilization details: Out of Memory (OOM). 255.96 MB, Status: False Vital (gt 98). 253.44 MB, Status: False Out of Resource (OOR). 217.60 MB, Status: False Q. What is the scalability of packet memory, ternary content addressable memory (TCAM), and queue for various Cisco ASR 1000 hardware devices A. Table 5 details that information: Table 5. Packet Memory, Queue, and TCAM Scalability Note that for ESP100 and ESP200, physical ports are associated with a particular QFP complex on the ESP card. In order to fully use all queues, the queues must be distributed among different slots and SPAs in the chassis. Additional information is included in this QampA in this question: How do QFP complexes map to physical interfaces for egress queuing with Cisco ASR 1000 Series 100- and 200-Gbps ESPs (ESP100 and ESP200, respectively) Q. How are default queue limits calculated on the Cisco ASR 1000 when QoS is applied A. By default, the ASR 1000 assigns a default queue limit on the greater of the two following items: The number of packets of interface maximum-transmission-unit (MTU) size that would pass through the interface at the configured rate for 50 milliseconds. If only a shape average rate or shape percent value is used, then the rate is the shaper. If a bandwidth rate or bandwidth percent value is included, then it is used instead of the shaper rate. If bandwidth remaining ratio value is used, then the parent maximum rate (policy map or interface) is used. Here are some examples with a Gigabit Ethernet interface with a default MTU of 1500 bytes: For example, a class with a shape rate of 500 Mbps on a Gigabit Ethernet interface would give a default queue limit of: For example, a class with a shape rate of 300 Mbps on a Gigabit Ethernet interface would give a default queue limit of: For example, a class with a shape rate of 2 Mbps and a minimum bandwidth of 1000 kbps on a Gigabit Ethernet interface would use the minimum rate for calculations and give a default queue limit of: Q. If QoS is not configured, what is the queue limit for the interface A. Typically on Cisco IOS Software platforms, the output for show interface will give you the number of packets in the output hold queue. On the Cisco ASR 1000, even if QoS is not configured, the QFP complex still manages the interface queuing. The output hold-queue value does not apply on the ASR 1000. When QoS is not configured on an interface, all the traffic for that physical interface moves through the interface default queue. The interface default queue is by default configured to handle 50 msec worth of traffic at 105 percent of interface bandwidth speed for interfaces 100 Mbps or faster. (Note that there are two exceptions: interfaces slower than 100 Mbps are based on 100 percent of interface bandwidth, and ESP40 is based on 25 msec for all interface speeds.) For ESP5 through ESP40, if the default calculation comes up with a value that is less than 9280 bytes, then the default queue size is set to 9280 bytes. For the Cisco ASR 1002-X and ESP100 and higher, if the default calculation comes up with a value that is less than 9218 bytes, then the default queue size is set to 9218 bytes. You can use the following command to check the actual interface queue limit for a given physical interface (note that the interface name must be fully expressed with matching capitalization): show plat hard qfp active infra bqs queue output default interface GigabitEthernet110 inc qlimit Note that traffic for sub-interfaces with queuing QoS configured moves through the MQC-created queues, whereas traffic forwarded through other sub-interfaces or the main interface moves through the interface default queue. The interface default queue is always handled in byte mode instead of packet mode, which is the default for MQC policy maps. Q. Can I change the units (packets, time, and bytes) of the queue limit in real time A. No, you cannot change units used for a given policy map in real time. You would have to remove the policy map from any interfaces, reconfigure it, and then reattach it. If you have a feature such as WRED configured with a given type of units for the minth and maxth values, you would have to remove WRED, change the queue-limit command units, and then reapply WRED. Also keep in mind that all classes in a given policy map must use the same units. Q. From time to time, drops are seen in various queues. I do not suspect that the maximum rate is being overdriven. How should I address this problem A. The class showing the drops may be experiencing microbursts. Microbursts are small bursts of traffic that are long enough to fill up the queue for the class but not sustained long enough for network management to see the bandwidth as high enough to tail drop. The first thing to try is to increase the queue limit for the class. You can make this change in real time without affecting forwarding traffic. Try doubling the queue limit and then monitor for drops. If you still observe drops, you can increase the queue limit again. Eventually the drops should become less frequent or stop altogether. During nonburst times, traffic will have the same behavior. During the microbursts, there will be periods of higher latency as packets drain from the deeper queue. Note that if WRED is on the class, you will need to also adjust the minth and maxth values accordingly or temporarily remove WRED and reapply it so that WRED can be installed with minth and maxth values based on the increased queue limit. Q. When should I use time-, byte-, or packet-based queue limits A. By default, queue limits are defined in units of packets, giving a predictable number of MTU-sized packets that can be queued for the class. However, the queue could also fill up with just as many very small packets that would start to tail drop packets while the overall latency of packets at the end of a full queue is quite small. For most applications, the use of packet-based queue limits works well. If you prefer to have a tightly controlled and predictable latency, you should switch to byte - or time-based queue limits. When you use time or bytes, the maximum latency is fixed and the number of packets that can be queued is variable. Note that all classes in a policy map must use the same units and WRED must be configured using the same units that the queue limit is specified in. Operationally, time - and byte-based configuration is the same. If you use time units, the system will use the maximum allowed bandwidth for the class to convert the time value into a number of bytes and use that value to program the QFP hardware. Q. When should I use small or large queue limits A. You should use large queue limits as a mechanism to deal with bursty traffic. Having the available queue space minimizes the chance of dropping packets when there are short bursts of high-data-rate traffic in an otherwise slower stream of traffic. Queues that normally function well but occasionally show packet are good candidates for an increased queue limit. If a traffic class is constantly overdriven, a large queue limit is doing nothing other than increasing latency for most of the packets delivered. It would be better to have a smaller queue limit because just as many packets would be forwarded and they would have spent less time sitting idly in a queue. Priority queues by default have a queue limit of 512 packets, helping keep latency low but allowing buffering if the need arises. Typically, there is no need to tune the priority queue limits because only rarely are more than one or two packets waiting in the priority queue. If maximum latency and bursts of small packets are of concern, you should consider changing the queue limit to units of time or bytes. Q. Why do WRED configurations ported to the Cisco ASR 1000 have restrictive queue limits A. Cisco ASR 1000 calculates default queue limits differently from other platforms. Often older platforms have a higher default queue-limit value than the ASR 1000. You need to either manually increase the queue limit for the QoS class with the queue-limit value command or reconfigure your WRED minth and maxth values according to the default ASR 1000 queue-limit value for the given class. Q. What are the default minth and maxth values used by WRED A. The default minth and maxth values are based on the queue limit for the class. For all precedence and differentiated services code point (DSCP) values, maxth values are by default half of the queue limit. Headroom between the maxth values and the hard queue limit is important because WRED is based on the mean average queue depth that trails that instantaneous queue depth. The headroom between maxth and hard queue limit may be needed as the mean queue depth catches up with instantaneous queue depth. Table 6 presents the default minth values for all precedence and DSCP values. It is easiest to think of minth values as a fraction of the corresponding maxth value. The example values given are based on a queue limit of 3200. Table 6. WRED Defaults for Queue Limit (Example with Queue Limit of 3200) Q. How is the average or mean queue depth calculated A. The average or mean queue size is calculated according the following formula, where n is the exponential constant value, currentqueuesize is the instantaneous queue size when the drop decision is being made, and oldaveragequeuesize is the queue size the previous time this calculation was performed: As n increases, the mean queue depth is slower to respond to changes in instantaneous queue depth. Q. What is the scalability for wired random early detection (WRED) A. The ASR 1000 does not have a hard limit on the number of WRED profiles that are available across the entire system. A WRED profile defined in a given policy map that is reused on multiple targets is only counted as a single profile. The primary limiting factor is available memory. In typical enterprise deployments, you should be able to scale up to 64 profiles without issue. The number of WRED profiles is not dependent upon time-, packet-, or byte-based queue-limit configurations. Q. What are the causes for QOS-4-WREDQLIMITOUTOFSYNC messages in the system log A. This is a generic QoS warning on Cisco IOS Software platforms that can be safely ignored on ASR 1000. This warning message indicates that the threshold used by WRED exceeds the queue-limit in the parent level. However on IOS XE platforms, queue-limit in parent level is a legacy value set for the compatibility of IOS format. The parent queue is actually a scheduler node instead of a real queue, hence the queue-limit value will not take any effect to the WRED threshold in child level. Q. What are the queue limits for the queues created by the fair-queue feature A. By default, each of the 16 queues created by the fair-queue feature has a limit of 25 percent of the queue limit of the class. For example, if a class is configured to have a queue limit of 1000 packets and fair queue is configured, each of the 16 underlying queues has a limit of 250 packets. For this reason, it is important to consider the per-flow queue limit when manually adjusting the WRED minth and maxth values. Q. Is it possible to specifically change the queue limit for the queues created by fair queuing A. Yes, you can adjust the queue limits for the 16 queues created by fair queuing but only when using packet-based queue limits. As of Cisco IOS XE Release 3.11, the CLI is limited such that it is not possible to adjust the queue limits for the 16 queues using time - or byte-based queue-limit configurations. The workaround is to manipulate the overall class queue limit in byte or packet mode such that the fair queues are at the desired value. So if the desired per-flow queue limit is 100 ms, you should configure the class queue limit to be 400 ms. Q. How does fair queue divide traffic into different flows A. The Cisco ASR 1000 uses a 5-tuple on the packets contents to hash the traffic into a given queue. The 5-tuple consists of: Source and destination IP address Protocol (TCP, UDP, etc.) Source and destination protocol ports There are some special considerations when using fair-queue with tunnel traffic. Specifically, fair-queue will use the outermost IP addresses as part of the tuple calculation. For tunnel traffic moving across a class with fair-queue, all the traffic for a given tunnel will use only one of the 16 fair queues even if the inner IP addresses are different. If there are multiple tunnels using the class-map with fair-queue configured, then the tunnels will be distributed amongst the 16 queues based on the tunnel source and destination addresses. Fair-queue may not be the best choice to use on a main-interface for sub-interface that is carrying a number of tunnel connections. Q. How does fair queuing interact with random detect A. Adding fair queue to random detect introduces some additional checks and considerations for applying custom random-detect configurations. Figure 3 shows a flow diagram of the decision-making process when the two features are configured together. Figure 3. Decision-Making Process (WRED with Fair Queue) FQD (flow-queue depth): Per-flow queue depth, which is the number of packets in a particular flow queue FQL (flow-queue limit): Per-flow individual queue limit, set by the fair-queue queue-limit ltxgt command on the CLI AQD (aggregate queue depth): Virtual queue depth, which is the sum of all individual flow-queue depths AQL (aggregate queue limit): Virtual queue limit, set by the queue-limit ltxgt command on the CLI Q. How does fair queuing interact with queue limits when random detect is not configured A. Having only fair queue configured without random detect significantly changes how the QFP decides when to drop a packet. The flow diagram in Figure 4 describes the process. The key difference in this scenario is that the decision to drop is based solely on the comparison with the per-flow queue limit. There is no comparison against the aggregate queue limit. This lack of decision against the aggregate queue limit can be misleading because it is possible to manipulate the aggregate queue limit to affect changes to the per-flow queue limit (25 percent). Figure 4. Decision Making Process (WRED without Fair-Queue) FQD (flow-queue depth): Per-flow queue depth, which is the number of packets in a particular flow queue FQL (flow-queue limit): Per-flow individual queue limit, set by the fair-queue queue-limit ltxgt command on the CLI Q. How does fair queuing interact with qos pre-classify on tunnel interface and crypto-map A. Aligning with the behavior on Cisco IOS Software, the fair-queue command has no effect on the traffic in tunnels, even when qos pre-classify is configured on the tunnel or crypto-map. Beginning with Cisco IOS XE 16.4.1, the fair-queue pre-classify command on tunnelcrypto-map is supported, which will cause fair-queue to inspect interior IP addresses for hashing into the various fair-queues: In this case traffic will be distributed to 16 queues on physical interfaces by the inner header before encapsulated on tunnel or crypto-map, as long as qos pre-classify is also configured on the tunnel interface. Cisco EtherChannel QoS Please note that some documents refer to EtherChannel, while others may refer to Port-channel, Gigabit Etherchannel (GEC) or Link Aggregation (LAG). All of these technologies are the same. This document will use the term Etherchannel for the technology. Q. What modes are supported for Cisco EtherChannel QoS A. Cisco EtherChannel QoS on the Cisco ASR 1000 is supported in numerous configurations. There are requirements for coordinated configuration of VLAN load-balancing mode and QoS configurations. Following are the combinations of load balancing and QoS that are supported on a given port channel: With VLAN-based load balancing: Egress MQC queuing configuration on port-channel sub-interfaces Egress MQC queuing configuration on port-channel member Policy aggregation: Egress MQC queuing on sub-interface Ingress policing and marking on port-channel sub-interface Egress policing and marking on port-channel member link Policy aggregation for multiple queues Cisco IOS XE 2.6 and later Activestandby with LACP (1 1) Egress MQC queuing configuration on port-channel member link Cisco IOS XE 2.4 and later Egress MQC queuing configuration on Point-to-Point Protocol over Ethernet (PPPoE) sessions Policy map on session only, model D.2 Cisco IOS XE 3.7 and later Policy maps on sub-interface and session, model F Cisco IOS XE 3.8 and later EtherChannel with LACP and load balancing (activeactive) Egress MQC queuing configuration supported on port-channel member link Cisco IOS XE 2.5 and later Aggregate EtherChannel with flow-based load-balancing (activeactive) Egress and ingress MQC configurations are supported on the port-channel main interface Cisco IOS XE 3.12 and later Egress and ingress MQC configurations are supported on the port-channel sub-interfaces Cisco IOS XE 3.16.3, Cisco IOS XE 16.3.1 and later Q. Can different port channels in the same router have different supported QoS combinations A. Yes, each port channel is independent. If a global load-balancing method is configured, it could be necessary to configure a unique load-balancing method on a given port channel to allow certain QoS configurations. For example, if the global mode is configured to flow-based load balancing, you would need to configure VLAN-based load balancing on a specific port channel to configure ingress port-channel sub-interface policy maps. Q. Can I configure egress and ingress QoS simultaneously on a port-channel interface A. With VLAN-based load balancing, you can configure ingress QoS (non-queuing) on port-channel sub-interfaces, or you can configure the egress policy map on the member links or port-channel sub-interfaces (but not both simultaneously). If a port channel is configured to use aggregate QoS (through the platform qos port-channel-aggregate X command), then ingress and egress QoS commands may be configured on the port-channel main interface (or sub-interfaces of that port channel in Cisco IOS XE 16.3.1 or later, but not both simultaneously.) Q. Is egress policing or marking supported on port-channel sub-interfaces A. Yes, in Cisco IOS XE 3.16.3, or from Cisco IOS XE 16.3.1. In earlier releases, only policing and marking are supported on ingress port-channel sub-interfaces and egress member-link interfaces. But please note that you need to enable platform qos port-channel-aggregate X before creating the aggregate port channel. Only after that is policy map supported on port-channel sub-interfaces. Q. Can I configure a policy map on a port-channel main interface A. Yes, Cisco IOS XE 3.12 has support for aggregate Etherchannel. This allows configuration of a policy map on the port-channel main interface that will manage all traffic moving through the logical interface before the load-balancing mechanism distributes traffic to physical interfaces. This functionality requires configuration of platform qos port-channel-aggregate X prior to creating the port-channel interface. Q. Can 10 Gigabit Ethernet interfaces be used with aggregate Etherchannel A. Yes, Cisco IOS XE 3.16.3 and Cisco IOS XE 16.3.1 software add support for 10 Gigabit Ethernet interfaces in aggregate port channels. Table 7. Tunnel QoS Topics and Resources Q. Are tunnels (GRE, IPSEC, dVTI, sVTI) configured with queuing QoS supported over port-channel interfaces A. Yes, for certain tunnel types. In Cisco IOS XE 3.14 support was added for sourcing GRE tunnels from an aggregate port-channel interface. Queuing and non-queuing policy maps will be supported on the tunnels. A class-default-only shaping policy map will be supported on the aggregate port-channel interface. This does not include DMVPN or any other type of dynamic tunnels, with QoS sourced from an aggregate Gigabit EtherChannel (GEC) interface. Q. Are QoS policies supported on both the tunnel interface and the physicalsub-interface over which the tunnel is routed Q. Is GRE tunnel marking (marking the tunnel header) supported for IPSEC tunnels A. No. GRE tunnel marking is only supported for non-IPSEC tunnels. It is not blocked by the CLI, however, it simply does not work when configured. Q. Is IPv6 supported together with DMVPN and NHRP A. Yes, in IOS XE3.11, support was added for IPv6 DMVPN. As a result, the ip nhrp commands used on the tunnel interface were changed so that the preceeding ip keyword are not required. Q. Can DMVPN tunnels dynamically adjust QoS bandwidth based on changing network conditions A. Yes, with support for adaptive QoS over DMVPN using the shape adaptive MQC directive, QoS rate-limiting can be adjusted dynamically as network conditions change. Q. How is QoS supported on a DMVPNmGRE interface A. Service policy cannot be configured on a DMVPN tunnel interface directly. We support per-tunnel QoS on a DMVPNmGRE Tunnel interface. See ciscocenustddocsios-xmliossecconndmvpnconfigurationxe-16sec-conn-dmvpn-xe-16-booksec-conn-dmvpn-per-tunnel-qos. html. Meanwhile, a class-default-only shaper is supported on the underlay transport physical interface or sub-interface. Q. How does QoS interact with load sharing on broadband sessions (L2TP) A. CEF load sharing, by default, is per destination with a universal hash scheme. Flows are balanced by their sourcedestination IP address and a global ID changing with chassis reboot. In an L2TP scenario, LACs and LNSs can be connected by multiple physical links to let the tunneling flows be shared among them. However, each service policy applied on sessions (Virtual-TemplateVirtual-Access) has to find a fixed and single physical interface to root the queuing structure. This will break the load-sharing deployment. Now when any service policy gets applied to Virtual-Template, the per-destination load sharing is overridden by per-session QoS to per-prefix on the L2TP transport physical interface, as long as the load sharing is triggered on the L2TP tunnel (by ECMP between LAC and LNS, for example). This behavior can be checked with the show cef interface lt interface gt command. Per-prefix is a special mode that aggregates the flows by source prefix and returns a single adjacency without being hashed by data-plane in CEF. A limitation is that the per-prefix mode can be recovered to normal per-destination mode only by a chassis reload, due to performance considerations. Moreover, load-sharing functionality will be affected along L2TP tunnels when per-session QoS is installed. Priority (Low-Latency) Behavior Q. What is the difference in strict priority (priority with policer) and conditional priority (priority with a rate) A. Strict priority is always rate limited by the explicitly configured policer. The configuration looks like this: police cir 1000000 With strict priority, even if there is available bandwidth from the parent (that is, it is not congested), the policed Low-Latency Queuing (LLQ) class forwards only up to the policer rate. The policer always rate limits the traffic. Conditional priority configuration looks like this: Conditional priority rate limits traffic with a policer only if there is congestion at the parent (policy map or physical interface). The parent is congested if more than the configured maximum rate of traffic attempts to move through the class (andor 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) throttle back to the configured rate until there is no longer any congestion. Q. What are the restrictions for conditional priority (aka conditional policing) A. Conditional policing will not work at the bottom level of a three-level policy map That means the policer of the child policy will not kick in even when congestion happens in the top level or middle level. A BQS limitation may cause it, so this is a hardware-dependent limitation. Software-based platforms like CSR and ISR4000 have the expected behavior. Q. How many levels of priority does the Cisco ASR 1000 support A. Two levels of high-priority traffic are supported. Priority level 1 is serviced first, then priority level 2. After all priority traffic is forwarded, nonpriority traffic is serviced. Q. How are queues for multiple priority classes in a single policy map managed A. Individual queues are created for each class configured for priority treatment. Classification statistics and any related policer and marking statistics will be reported on a per class basis. The queue statistics for all the priority level 1 statistics will be reported in aggregate. The same applies for all of the priority level 2 statistics. The queuing statistics for priority levels 1 and 2 will not be aggregated together. Hierarchical Policy Maps Q. How many levels of hierarchical policy maps are supported A. In general, three levels of hierarchy are supported. If you mix queuing and nonqueuing policies together in a hierarchy, the nonqueuing policy maps must be at the leaf level of the policy map (child policy beneath grandparent and parent queuing policies, for example). In a three-level queuing policy map, the highest level (grandparent), can consist only of class default. In Cisco IOS XE 16.3.1, user-defined classes are also supported on the grandparent level of a three-level policy. However, on virtual interfaces (service group, tunnel, or sessions) and aggregated port-channel interfaces, the restriction is not lifted, so in these cases only class default is allowed. If the policy map is applied to a virtual interface (such as a tunnel or session), there may be additional restrictions limiting the hierarchy to two levels of queuing, depending on the configuration. Q. How is bandwidth shared among sub-interfaces (or tunnels) when a parent node is oversubscribed A. Sharing behavior is controlled with the bandwidth remaining value configured among the hierarchy nodes just below the congestion point. By default, all schedules have a bandwidth remaining ratio value of 1. Consider the example in Figure 5. Figure 5. Example of Sharing Behavior In this example, the topmost (grandparent, physical interface with a class-default shaper at 20 Mbps) is congested. Three tunnels are egressing the router through this physical interface. The leftmost and rightmost tunnels are not configured with a bandwidth remaining ratio (BRR) and thus use the default value of 1. The center tunnel has a BRR value of 2, configured in its parent policy map. Since the 20 Mbps shaper is congested, the tunnels have to share the available bandwidth. The center tunnel has access to at least half (2 (121) ) of the 20 Mbps available on the grandparent node. The left and right tunnels each have access to at least 25 percent of the grandparents overall bandwidth (1 ( 1 2 1) ). This is the most simple case where all the tunnels are overdriven. In a new scenario, assume that the leftmost tunnel has no traffic. In this case, the center tunnel would get access to 2 ( 2 1 ), or 66.67 percent, of 20 Mbps while the rightmost tunnel receives 33.33 percent. As soon as the leftmost tunnel has traffic, it would potentially have access to up to 10 Mbps. Q. What are the restrictions on the use of bandwidth in Cisco IOS XE Software A. In classic Cisco IOS Software, it is permitted to configure bandwidth at the leaf and intermediate nodes of a hierarchy. In IOS XE, bandwidth is only allowed at the leaf node of a hierarchy. This is a restriction in software and may be lifted in the future. For current deployments, where a classic IOS QoS policy map is being moved to a IOS XE platform, the best option is to convert the intermediate node bandwidth commands to bandwidth remaining commands. bandwidth remaining percent or bandwidth remaining ratio commands could be used to achieve very similar behavior. Q. What is the impact of using very slow and fast rate shapers on the same physical interface A. Neither IOS XE software, nor the ASR 1000 QFP hardware impose any limitations on the range of rates that can be used on a given physical interface. However, the hardware will use the lowest rate configured at a given schedule level to decide how often to check if traffic is permitted from a given level of the schedule. As a general rule, if all the shapers at a given level of the hierarchy are within a 1:1000 ratio, the jitter profile of the transmitted traffic will be within normal parameters. If the range of shapers is outside the 1:1000 range, the schedule will be checked based on the slowest rate configured. The slower the rate, the less often the hardware checks the schedule for transmitting. This can cause the faster schedule nodes to transmit in a bursty nature since there will be fewer opportunities to transmit. A workaround to avoid the bursty transmission of the high rate traffic is to put the slow and fast rates at different levels of the hierarchy. Consider a scenario where multiple Ethernet sub-interfaces on a given physical interface are configured with two level policy maps, and parent shaper rates ranging from 500 Mbps to 64 kbps. 500,000 kbps. 64 kbps is clearly beyond the 1000:1 ratio. The solution to this issue would be to add a grandparent shaper to the slow rate policy maps. The grandparent class-default-only shaper could shape at 500 Mbps the parent shaper would be the original 64 kbps rate. By introducing this extra level the topmost schedule nodes are all at a given level of magnitude. The grandparent shapers on the slow rate sub-interfaces will never actually rate-limit traffic since the rate-limiting will be completed by the shaper at the parent level (middle level). This configuration allows the hardware to appropriately schedule the other, faster rate shapers that are still two level hierarchies and provide the slow rate interfaces with the appropriate behavior. Interaction with Cryptography Q. How is QoS low-latency priority queuing acknowledged as traffic is sent to the cryptography engine A. There are high - and low-priority queues for traffic being sent to the cryptography engine. Any traffic that matches an egress high-priority QoS class is sent through the high-priority queue to the cryptography engine. Priority-levels 1 and 2 traffic move through a single high-priority queue to the cryptography hardware. All other traffic is sent through the low-priority queue to the cryptography hardware. After the traffic has returned from the cryptography hardware, the priority-levels 1 and 2 are honored in independent queues, followed by nonpriority traffic. PAKPRI traffic will move through the low-prioirty queue for cryptography by default. Only if the PAKPRI traffic is classified into a high priority class via a MQC policy-map will it use the high priority queue for cryptography. Q. How does cryptography affect the size of packets that QoS observes A. Queuing functions on physical interfaces or tunnel interfaces see the complete packet size including any cryptography overhead that was added to the packet. If the policy map is applied to the tunnel interface, policers do not observe the Layer 2 andor cryptography overhead. Note that if a policer is used on a priority class, it is advisable to adjust the policer rate down accordingly because the observed rate for the priority policer will be different from the rates used for classes configured with other queuing functions. Q. Why do cryptographic connections sometimes fail when QoS is configured A. Cryptography happens before egress QoS queuing. When encryption occurs a sequence number is sometimes included in the encryption headers. If the packets are subsequently delayed significantly because of high queue depths, the remote router can declare the packets outside of the anti-replay window and drop the encrypted connection. Potential workarounds include increasing the available bandwidth with QoS (to decrease latency) or increase the replay window size. Q. How can packet drops to the cryptography engine be monitored A. There are high and low priority queues for traffic destined for cryptography. Those queues can be monitored via platform hardware commands. The following gives an example of how to monitor those queues. You can see statistics for packet and byte drops with the tail drop statistic. plevel 0 is low priority traffic and plevel 1 is high priority traffic. ASR1000show plat hardware qfp active infrastructure bqs queue output default all inc crypto Interface: internal10crypto:0 QFP: 0.0 ifh: 6 Num QueuesSchedules: 2 ASR1000show plat hardware qfp active infrastructure bqs queue output default interface-string internal10crypto:0 Interface: internal10crypto:0 QFP: 0.0 ifh: 6 Num QueuesSchedules: 2 Index 0 (Queue ID:0x88, Name: i2lif6cpp0prio0) Software Control Info: (cache) queue id: 0x00000088, wred: 0x88b168c2, qlimit (bytes): 73125056 parentsid: 0x261, debugname: i2lif6cpp0prio0 swflags: 0x08000001, swstate: 0x00000c01, portuidb: 0 origmin. 0. min: 0 minqos. 0. mindflt: 0 origmax. 0. max: 0 maxqos. 0. maxdflt: 0 plevel. 0 priority: 65535 tail drops (bytes): 0. (packets): 0 total enqs (bytes): 0. (packets): 0 queuedepth (bytes): 0 Index 1 (Queue ID:0x89, Name: i2lif6cpp0prio1) Software Control Info: (cache) queue id: 0x00000089, wred: 0x88b168d2, qlimit (bytes): 73125056 parentsid: 0x262, debugname: i2lif6cpp0prio1 swflags: 0x18000001, swstate: 0x00000c01, portuidb: 0 origmin. 0. min: 0 minqos. 0. mindflt: 0 origmax. 0. max: 0 maxqos. 0. maxdflt: 0 plevel. 1, priority: 0 tail drops (bytes): 0. (packets): 0 total enqs (bytes): 0. (packets): 0 queuedepth (bytes): 0 Q. In what order should I add commands to a class map A. Although there is no strict requirement that you add commands in a particular order, the following describes the best practice: For queuing classes, add commands in this order: Queuing features ( shape, bandwidth, bandwidth remaining, and priority ) For nonqueuing classes ordering is not as important, but the following order is preferred: Q. When is it acceptable to configure multiple policy maps for traffic A. First it is important to understand the difference in queuing and nonqueuing policy maps. Queuing policy maps include the following features in at least one class: The practice of configuring multiple queuing policy maps for traffic to traverse is sometimes called multiple policy maps (MPOL). In general on the Cisco ASR 1000, it is acceptable to configure only one queuing policy map that traffic will be forwarded through in the egress direction. For example, if a Gigabit Ethernet sub-interface has a queuing policy map configured, it is not possible to configure another queuing policy map on the main interface. Certain configurations do not carry this limitation, however. Here is a list of those scenarios where multiple queuing policy maps are supported: Broadband QoS, class default-only queuing policy map on Ethernet sub-interface, and two-level hierarchical queuing policy map on session (through virtual template or RADIUS configuration) (sometimes referred to as model F broadband QoS). Tunnels (GRE, DMVPN, sVTI, and dVTI) with two-level hierarchical queuing policy map and the targeted egress physical interface with a class default-only flat queuing policy map with a maximum rate configured ( shape ): The tunnels may target the physical interface directly or depend on the routing table to point toward the egress interface. This feature is supported as of Cisco IOS XE 3.6. Policy aggregation where priority queues are configured on the sub-interfaces and nonpriority queues are configured on the main interface: This scenario requires the use of service fragments. Policy aggregation where priority queues are configured on the main interface and nonpriority queues are configured on the sub-interfaces: This scenario requires the use of service fragments.

No comments:

Post a Comment