QoS Classification Configuration Guide, Cisco IOS Release 15M&T

Embed Size (px)

Citation preview

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    1/118

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&TFirst Published: January 16, 2013

    Last Modified: January 16, 2013

    Americas HeadquartersCisco Systems, Inc.170 West Tasman DriveSan Jose, CA 95134-1706USAhttp://www.cisco.comTel: 408 526-4000 800 553-NETS (6387)Fax: 408 527-0883

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    2/118

    THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS,INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

    THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITHTHE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY,CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

    The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain versionof the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

    NOTWITHSTANDING ANY OTHER WARRANTY HEREIN , ALL DOCUME NT FILES AND SOFTWARE OF THE SE SUPPLIERS ARE PROVIDED “ AS IS" WITH ALL FAULTS.CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OFMERCHANTABILITY, FITNESSFOR A PARTICULARPURPOSE ANDNONINFRINGEMENT OR ARISINGFROM A COURSE OF DEALING, USAGE,OR TRADE PRACTICE.

    IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUTLIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERSHAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

    AnyInternetProtocol(IP) addressesand phonenumbers used in thisdocument arenot intendedto be actualaddresses andphone numbers. Anyexamples, command displayoutput, network topology diagrams,and otherfiguresincludedin the documentare shownfor illustrativepurposes only. Any use of actual IP addressesor phone numbers in illustrative content is unintentionaland coincidental.

    Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: http://www.cisco.com/go/trademarks . Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnershiprelationship between Cisco and any other company. (1110R)

    © 2014 Cisco Systems, Inc. All rights reserved.

    http://www.cisco.com/go/trademarkshttp://www.cisco.com/go/trademarkshttp://www.cisco.com/go/trademarkshttp://www.cisco.com/go/trademarks

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    3/118

    C O N T E N T S

    C H A P T E R 1 Classification Overview 1

    Finding Feature Information 1

    About IP Precedence 2

    How the IP Precedence Bits Are Used to Classify Packets 2

    Setting or Changing the IP Precedence Value 3Committed Access Rate 4

    Classifying Network Traffic Using NBAR 4

    Marking Network Traffic 4

    C H A P T E R 2 IPv6 Quality of Service 5

    Finding Feature Information 5

    Information About IPv6 Quality of Service 5

    Implementation Strategy for QoS for IPv6 5

    Packet Classification in IPv6 6

    How to Configure IPv6 Quality of Service 6

    Classifying Traffic in IPv6 Networks 6

    Specifying Marking Criteria for IPv6 Packets 7

    Using the Match Criteria to Manage IPv6 Traffic Flows 8

    Configuration Examples for IPv6 Quality of Service 9

    Example: Verifying Cisco Express Forwarding Switching 9

    Example: Verifying Packet Marking Criteria 10

    Example: Matching DSCP Value 15Additional References 16

    Feature Information for IPv6 Quality of Service 17

    C H A P T E R 3 Configuring Committed Access Rate 19

    Finding Feature Information 20

    Committed Access Rate Configuration Task List 20

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T iii

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    4/118

    IP Precedence or MAC Address 21

    IP Access List 21

    Configuring CAR and DCAR for All IP Traffic 22

    Configuring CAR and DCAR Policies22

    Configuring a Class-Based DCAR Policy 23

    Monitoring CAR and DCAR 24

    CAR and DCAR Configuration Examples 25

    Example Subrate IP Services 25

    Example Input and Output Rate Limiting on an Interface 25

    Example Rate Limiting in an IXP 25

    Example Rate Limiting by Access List 26

    C H A P T E R 4 IPv6 QoS: MQC Packet Marking/Remarking 29

    Finding Feature Information 29

    Information About IPv6 QoS: MQC Packet Marking/Remarking 29

    Implementation Strategy for QoS for IPv6 29

    Policies and Class-Based Packet Marking in IPv6 Networks 30

    Traffic Policing in IPv6 Environments 30

    How to Specify IPv6 QoS: MQC Packet Marking/Remarking 30

    Specifying Marking Criteria for IPv6 Packets 30

    Configuration Examples for IPv6 QoS: MQC Packet Marking/Remarking 32Example: Verifying Packet Marking Criteria 32

    Additional References 38

    Feature Information for IPv6 QoS: MQC Packet Marking/Remarking 39

    C H A P T E R 5 Marking Network Traffic 41

    Finding Feature Information 41

    Prerequisites for Marking Network Traffic 41

    Restrictions for Marking Network Traffic 42

    Information About Marking Network Traffic 42

    Purpose of Marking Network Traffic 42

    Benefits of Marking Network Traffic 42

    Two Methods for Marking Traffic Attributes 43

    Method One Using a set Command 43

    Method Two Using a Table Map 44

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&Tiv

    Contents

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    5/118

    Traffic Marking Procedure Flowchart 47

    Method for Marking Traffic Attributes 47

    Using a set Command 48

    MQC and Network Traffic Marking49

    Traffic Classification Compared with Traffic Marking 49

    How to Mark Network Traffic 50

    Creating a Class Map for Marking Network Traffic 50

    Creating a Table Map for Marking Network Traffic 51

    Creating a Policy Map for Applying a QoS Feature to Network Traffic 52

    What to Do Next 54

    Attaching the Policy Map to an Interface 54

    Configuration Examples for Marking Network Traffic 55

    Example: Creating a Class Map for Marking Network Traffic 55

    Example Creating a Policy Map for Applying a QoS Feature to Network Traffic 56

    Example: Attaching the Policy Map to an Interface 56

    Additional References for Marking Network Traffic 56

    Feature Information for Marking Network Traffic 57

    C H A P T E R 6 QoS Tunnel Marking for GRE Tunnels 59

    Finding Feature Information 59

    Prerequisites for QoS Tunnel Marking for GRE Tunnels 59Restrictions for QoS Tunnel Marking for GRE Tunnels 60

    Information About QoS Tunnel Marking for GRE Tunnels 60

    GRE Definition 60

    GRE Tunnel Marking Overview 60

    GRE Tunnel Marking and the MQC 61

    GRE Tunnel Marking and DSCP or IP Precedence Values 61

    Benefits of GRE Tunnel Marking 62

    GRE Tunnel Marking and Traffic Policing 62

    GRE Tunnel Marking Values 62

    How to Configure Tunnel Marking for GRE Tunnels 62

    Configuring a Class Map 62

    Creating a Policy Map 64

    Attaching the Policy Map to an Interface or a VC 65

    Verifying the Configuration of Tunnel Marking for GRE Tunnels 67

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T v

    Contents

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    6/118

    Troubleshooting Tips 67

    Configuration Examples for QoS Tunnel Marking for GRE Tunnels 68

    Example: Configuring Tunnel Marking for GRE Tunnels 68

    Example: Verifying the Tunnel Marking for GRE Tunnels Configuration69

    Additional References 70

    Feature Information for QoS Tunnel Marking for GRE Tunnels 71

    C H A P T E R 7 IPv6 QoS: MQC Packet Classification 73

    Finding Feature Information 73

    Information About IPv6 QoS: MQC Packet Classification 73

    Implementation Strategy for QoS for IPv6 73

    Packet Classification in IPv6 74

    How to Configure IPv6 QoS: MQC Packet Classification 74

    Classifying Traffic in IPv6 Networks 74

    Using the Match Criteria to Manage IPv6 Traffic Flows 75

    Confirming the Service Policy 76

    Configuration Examples for IPv6 QoS: MQC Packet Classification 78

    Example: Matching DSCP Value 78

    Additional References 78

    Feature Information for IPv6 QoS: MQC Packet Classification 80

    C H A P T E R 8 Classifying Network Traffic 81

    Finding Feature Information 81

    Information About Classifying Network Traffic 81

    Purpose of Classifying Network Traffic 81

    Benefits of Classifying Network Traffic 82

    MQC and Network Traffic Classification 82

    Network Traffic Classification match Commands and Match Criteria 82

    Traffic Classification Compared with Traffic Marking 84

    How to Classify Network Traffic 85

    Creating a Class Map for Classifying Network Traffic 85

    Creating a Policy Map for Applying a QoS Feature to Network Traffic 86

    What to Do Next 88

    Attaching the Policy Map to an Interface 89

    Configuration Examples for Classifying Network Traffic 91

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&Tvi

    Contents

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    7/118

    Example Creating a Class Map for Classifying Network Traffic 91

    Example Creating a Policy Map for Applying a QoS Feature to Network Traffic 91

    Example Attaching the Policy Map to an Interface 92

    Additional References92

    Feature Information for Classifying Network Traffic 93

    C H A P T E R 9 Class-Based Ethernet CoS Matching and Marking 95

    Finding Feature Information 95

    Prerequisites for Class-Based Ethernet CoS Matching and Marking 95

    Information About Class-Based Ethernet CoS Matching and Marking 96

    Layer 2 CoS Values 96

    How to Configure Class-Based Ethernet CoS Matching and Marking 96

    Configuring Class-Based Ethernet CoS Matching 96

    Configuring Class-Based Ethernet CoS Marking 100

    Configuration Examples for Class-Based Ethernet CoS Matching and Marking 102

    Example: Configuring Class-Based Ethernet CoS Matching 102

    Example: Class-Based Ethernet CoS Marking 102

    Additional References for Class-Based Ethernet CoS Matching and Marking 102

    Feature Information for Class-Based Ethernet CoS Matching & Marking 103

    C H A P T E R 1 0 Quality of Service for VPNs 105

    Finding Feature Information 105

    Information About Quality of Service for Virtual Private Networks 106

    QoS for VPNs 106

    How to Configure QoS for VPNs 106

    Configuring QoS When Using IPsec VPNs 106

    Configuration Examples for QoS for VPNs 108

    Example Configuring QoS When Using IPsec VPNs 108

    Additional References for QoS for VPNs 108

    Feature Information for QoS for VPNs 109

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T vii

    Contents

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    8/118

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&Tviii

    Contents

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    9/118

    C H A P T E R 1Classification Overview

    Classifying network traffic allows you to organize traffic (that is, packets) into traffic classes or categorieson the basis of whether the traffic matches specific criteria. Classifying network traffic (used in conjunctionwith marking network traffic) is the foundation for enabling many quality of service (QoS) features on your network.

    Packet classification is pivotal to policy techniques that select packets traversing a network element or a particular interface for different types of QoS service. For example, you can use classification to mark certain packets for IP Precedence, and you can identify other packetsas belonging to a Resource Reservation Protocol(RSVP) flow.

    Methods of classification were once limited to use of the contents of the packet header. Current methods of marking a packet with its classification allow you to set information in the Layer 2, 3, or 4 headers, or even by setting information within the payload of a packet. Criteria for classification of a group might be as broadas "traffic destined for subnetwork X" or as narrow as a single flow. For more information about classifyingnetwork traffic, see the "Classifying Network Traffic"chapter.

    This chapter explains IP Precedence, and then it gives a brief description of the kinds of traffic classification

    provided by the Cisco IOS QoS features. It discusses features described in the following sections:• Finding Feature Information, page 1

    • About IP Precedence, page 2

    • Committed Access Rate, page 4

    • Classifying Network Traffic Using NBAR, page 4

    • Marking Network Traffic, page 4

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveats andfeature information, see Bug Search Tool and the release notes for your platform and software release. Tofind information about the features documented in this module, and to see a list of the releases in which eachfeature is supported, see the feature information table at the end of this module.

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 1

    http://www.cisco.com/cisco/psn/bssprt/bsshttp://www.cisco.com/go/cfnhttp://www.cisco.com/go/cfnhttp://www.cisco.com/cisco/psn/bssprt/bss

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    10/118

    About IP PrecedenceUse of IP Precedenceallows you to specify the class of service (CoS) fora packet. You use the three precedence bits in the type of service (ToS) field of the IP version 4 (IPv4) header for this purpose. The figure belowshows the ToS field.

    Figure 1: IPv4 Packet Type of Service Field

    Using the ToS bits, you can define up to six classes of service. Other features configured throughout thenetwork can then use these bits to determine how to treat the packet. These other QoS features can assignappropriate traffic-handling policies including congestion management strategy and bandwidth allocation.For example, although IP Precedence is not a queueing method, queueing methods such as weighted fair queueing (WFQ) and Weighted Random Early Detection (WRED) can use the IP Precedence setting of the packet to prioritize traffic.

    By setting precedence levels on incoming traffic and using them in combination with the Cisco IOS QoSqueueing features, you can create differentiated service. You can use features such as policy-based routing(PBR) and committed access rate (CAR) to set precedence based on extended access list classification. Thesefeatures afford considerable flexibility for precedence assignment. For example, you can assign precedence based on application or user, or by destination and source subnetwork.

    So that each subsequent network element can provide service based on the determined policy, IP Precedence

    is usually deployed as close to the edge of the network or the administrative domain as possible. You canthink of IP Precedence as an edge function that allows core, or backbone, QoS features such as WRED toforward traffic based on CoS. IP Precedence can also be set in the host or network client, but this setting can be overridden by policy within the network.

    The following QoS features can use the IP Precedence field to determine how traffic is treated:

    • Distributed WRED (DWRED)

    • WFQ

    • CAR

    How the IP Precedence Bits Are Used to Classify PacketsYou use the three IP Precedence bits in the ToS field of the IP header to specify CoS assignment for each packet. You can partition traffic into a maximum of six classes and then use policy maps and extended accesslists to define network policies for congestion handling and bandwidth allocation for each class.

    For historical reasons, each precedence corresponds to a name. These names, which continue to evolve, aredefined in RFC 791. The table below lists the numbers and their corresponding names, from least to mostimportant.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T2

    Classification OverviewAbout IP Precedence

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    11/118

    Table 1: IP Precedence Values

    NameNumber

    routine0

    priority1

    immediate2

    flash3

    flash-override4

    critical5

    internet6

    network 7

    However, the IP Precedence feature allows you considerable flexibility for precedence assignment. That is,you can define your own classification mechanism. For example, you might want to assign precedence basedon application or access router.

    IP Precedence bit settings 6 and 7 are reserved for network control information such as routing updates.Note

    Setting or Changing the IP Precedence ValueBy default, the Cisco IOS software leaves the IP Precedence value untouched, preserving the precedencevalue set in the header, allowing all internal network devices to provide service based on the IP Precedencesetting. This policy follows the standard approach that stipulates that network traffic should be sorted intovarious types of service at the basic perimeter of the network and that those types of service should beimplemented in the core of the network. Routers in the core of the network can then use the precedence bits,for example, to determine the order of transmission, the likelihood of packet drop, and so on.

    Because traffic that enters your network can have precedence set by outside devices, we recommend that youreset the precedence for all traffic that enters your network. By controlling IP Precedence settings, you prohibitusers that have already set the IP Precedence from acquiring better service for their traffic simply by settinga high precedence for all of their packets.

    You can use CAR to set the IP Precedence in packets. As mentioned previously, after a packet has beenclassified, you can use other QoS features such as CAR and WRED to specify and enforce business policiesto fit your business model.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 3

    Classification OverviewSetting or Changing the IP Precedence Value

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    12/118

    Committed Access RateCAR is a multifaceted feature that implements both classification services and policing through rate limiting.This section describes the classification services of CAR. For information on CAR ’s rate limiting features,see the "Policing and Shaping Overview" chapter.

    In Cisco IOS Release 12.2 SR, the classification services of CAR are not supported on the Cisco 7600series router.

    Note

    You can use the classification services of CAR to set the IP Precedence for packets that enter the network.This capability of CAR allows you to partition your network into multiple priority levels or classes of service. Networking devices within your network can then use the adjusted IP Precedence to determine how to treatthe traffic. For example, VIP-distributed WRED uses the IP Precedence to determine the probability a packet being dropped.

    As discussed in the " About IP Precedence , on page 2 " section, you can use the three precedence bits in theToS field of the IP header to define up to six classes of service.

    You can classify packets using policies based on physical port, source or destination IP or MAC address,application port, IP protocol type, or other criteria specifiable by access lists or extended access lists. You canclassify packets by categories external to the network, for example, by a customer. After a packet has beenclassified, a network can either accept or override and reclassify the packet according to a specified policy.CAR includes commands that you can use to classify and reclassify packets.

    CAR is supported on the majority of Cisco routers. Additionally, distributed CAR is supported on Cisco 7000series routers with an RSP7000 interface processor or Cisco 7500 series routers with a VIP-based VIP2-40or greater interface processor. A VIP2-50 interface processor is strongly recommended when the aggregateline rate of the port adapters on the VIP is greater than DS3. A VIP2-50 interface processor is required for OC-3 rates.

    For information on how to configure CAR, see the "Configuring Committed Access Rate" chapter.

    Classifying Network Traffic Using NBAR Network-Based Application Recognition (NBAR) is a classification engine that recognizes and classifies awide variety of protocols and applications. When NBAR recognizes and classifies a protocol or application,the network can be configured to apply the appropriate QoS for that application or traffic with that protocol.

    For more information about NBAR, see the "Classifying Network Traffic Using NBAR" chapter.

    Marking Network TrafficMarking network traffic allows you to set or modify the attributes for traffic (that is, packets) belonging to aspecific class or category. When used in conjunctionwith network traffic classification, network traffic markingis the foundation for enabling many QoS features on your network.

    For more information about marking network traffic, see the "Marking Network Traffic" chapter.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T4

    Classification OverviewCommitted Access Rate

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    13/118

    C H A P T E R 2IPv6 Quality of Service

    QoS features supported for IPv6 environments include packet classification, queueing, traffic shaping,weighted random early detection (WRED), class-based packet marking, and policing of IPv6 packets.

    • Finding Feature Information, page 5• Information About IPv6 Quality of Service, page 5

    • How to Configure IPv6 Quality of Service, page 6

    • Configuration Examples for IPv6 Quality of Service, page 9

    • Additional References, page 16

    • Feature Information for IPv6 Quality of Service, page 17

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveats andfeature information, see Bug Search Tool and the release notes for your platform and software release. Tofind information about the features documented in this module, and to see a list of the releases in which eachfeature is supported, see the feature information table at the end of this module.

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required.

    Information About IPv6 Quality of Service

    Implementation Strategy for QoS for IPv6IPv6 packets are forwarded by paths that are different from those for IPv4. QoS features supported for IPv6environments include packet classification, queuing, traffic shaping, weighted random early detection (WRED),class-based packet marking, and policing of IPv6 packets. These features are available at both the processswitching and Cisco Express Forwarding switching paths of IPv6.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 5

    http://www.cisco.com/cisco/psn/bssprt/bsshttp://www.cisco.com/go/cfnhttp://www.cisco.com/go/cfnhttp://www.cisco.com/cisco/psn/bssprt/bss

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    14/118

    All of the QoS features available for IPv6 environments are managed from the modular QoS command-lineinterface (MQC). The MQC allows you to define traffic classes, create and configure traffic policies (policymaps), and then attach those traffic policies to interfaces.

    To implementQoS in networks that are running IPv6, follow the same steps that you would followto implementQoS in networks running only IPv4. At a very high level, the basic steps for implementing QoS are as follows:

    • Know which applications in your network need QoS.

    • Understand the characteristics of the applications so that you can make decisions about which QoSfeatures would be appropriate.

    • Know your network topology so that you know how link layer header sizes are affected by changes andforwarding.

    • Create classes based on the criteria that you establish for your network. In particular, if thesame network is also carrying IPv4 traffic along with IPv6 traffic, decide if you want to treat both of them the sameway or treat them separately and specify match criteria accordingly. If you want to treat them the same,use match statements such as match precedence , match dscp , set precedence , and set dscp . If youwant to treat them separately, add match criteria such as match protocol ip and match protocol ipv6

    in a match-all class map.• Create a policy to mark each class.

    • Work from the edge toward the core in applying QoS features.

    • Build the policy to treat the traffic.

    • Apply the policy.

    Packet Classification in IPv6Packet classification is available with both the process and Cisco Express Forwarding switching path.

    Classification can be based on IPv6 precedence, differentiated services control point (DSCP), and other IPv6 protocol-specific values that can be specified in IPv6 access lists in addition to other non-IPv6 values suchas COS, packet length, and QoS group. Once you determine which applications need QoS, you can createclasses based on the characteristics of the applications. You can use a variety of match criteria to classifytraffic. You can combine various match criteria to segregate, isolate, and differentiate traffic.

    The enhancements to the modular QoS CLI (MQC) allow you to create matches on precedence, DSCP, andIPv6 access group values in both IPv4 and IPv6 packets. The match command allows matches to be madeon DSCP values and precedence for both IPv4 and IPv6 packets.

    How to Configure IPv6 Quality of Service

    Classifying Traffic in IPv6 NetworksThe set cos and match cos commands for 802.1Q (dot1Q) interfaces are supported only for packets that areswitched by Cisco Express Forwarding. Packets that are process-switched, such as device-generated packets,are not marked when these options are used.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T6

    IPv6 Quality of ServicePacket Classification in IPv6

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    15/118

    Specifying Marking Criteria for IPv6 PacketsPerform this task to establish the match criteria to be used to match packets for classifying network traffic.

    SUMMARY STEPS

    1. enable2. configure terminal3. policy map policy-map-name4. class {class-name | class-default }5. Do one of the following:

    • set precedence { precedence-value | from-field [table table-map-name ]}

    • set [ip ] dscp {dscp-value | from-field [table table-map-name ]}

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example:

    Device> enable

    • Enter your password if prompted.

    Enters global configuration mode.configure terminal

    Example:

    Device# configure terminal

    Step 2

    Creates a policy map using the specified name and entersQoS policy-map configuration mode.

    policy map policy-map-name

    Example:

    Device(config)# policy map policy1

    Step 3

    • Enter the name of the policy map that you want tocreate.

    Specifies the treatment for traffic of a specified class (or thedefault class) and enters QoS policy-map class configurationmode.

    class {class-name | class-default }

    Example:

    Device(config-pmap)# class class-default

    Step 4

    Sets the precedence value and the DSCP value based on theCoS value (and action) defined in the specified table map.

    Do one of the following:Step 5

    • set precedence { precedence-value | from-field [table table-map-name ]}

    Both precedence and DSCP cannot be changed in the same packets.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 7

    IPv6 Quality of ServiceSpecifying Marking Criteria for IPv6 Packets

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    16/118

    PurposeCommand or Action• set [ip ] dscp {dscp-value | from-field [table

    table-map-name ]}

    Example:

    Device(config-pmap-c)#set precedence cos table table-map1

    Example:

    Device(config-pmap-c)#set dscp cos table table-map1

    Using the Match Criteria to Manage IPv6 Traffic FlowsYou can use multiple match statements. Depending on the type of class, you can specify whether to matchall classes or any of the classes.

    SUMMARY STEPS

    1. enable2. configure terminal3. class-map {class-name | class-default }

    4. Do one of the following:• match precedence precedence-value [ precedence-value precedence-value ]

    • match access-group name ipv6-access-group

    • match [ip] dscp dscp-value [dscp-value dscp-value dscp-value dscp-value dscp-value dscp-valuedscp-value

    DETAILED STEPS

    PurposeCommand or Action

    Enables such as privileged EXEC mode.enableStep 1

    Example:

    Router> enable

    • Enter your password if prompted.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T8

    IPv6 Quality of ServiceUsing the Match Criteria to Manage IPv6 Traffic Flows

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    17/118

    PurposeCommand or Action

    Enters global configuration mode.configure terminal

    Example:

    Router# configure terminal

    Step 2

    Creates the specified class and enters QoS class-mapconfiguration mode.

    class-map {class-name | class-default }

    Example:

    Router(config-pmap-c)# class clsl

    Step 3

    Matches the precedence value. The precedence applies to both IPv4 and IPv6 packets.

    Do one of the following:Step 4

    • match precedence precedence-value[ precedence-value precedence-value ] or

    Specifies the name of an IPv6 access list against whosecontents packets are checked to determine if they belongto the traffic class.

    • match access-group name ipv6-access-group• match [ip] dscp dscp-value [dscp-value dscp-value

    dscp-value dscp-value dscp-value dscp-valuedscp-value or

    Identifies a specific IP DSCP value as a match criterion.

    Example:

    Router(config-pmap-c)#

    match precedence 5

    Example:Router(config-pmap-c)# match ip dscp 15

    Configuration Examples for IPv6 Quality of Service

    Example: Verifying Cisco Express Forwarding SwitchingThe following is sample output from the show cef interface detail command for Ethernet interface 1/0. Usethis command to verify that Cisco Express Forwarding switching is enabled for policy decisions to occur. Notice that the display shows that Cisco Express Forwarding switching is enabled.

    Router# show cef interface Ethernet 1/0 detail

    Ethernet1/0 is up (if_number 9)Corresponding hwidb fast_if_number 9Corresponding hwidb firstsw->if_number 9Internet address is 10.2.61.8/24

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 9

    IPv6 Quality of ServiceConfiguration Examples for IPv6 Quality of Service

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    18/118

    ICMP redirects are always sentPer packet load-sharing is disabledIP unicast RPF check is disabledInbound access list is not setOutbound access list is not setIP policy routing is disabledHardware idb is Ethernet1/0Fast switching type 1, interface type 5IP Distributed CEF switching enabledIP Feature Fast switching turbo vectorIP Feature CEF switching turbo vectorInput fast flags 0x0, Output fast flags 0x0ifindex 7(7)Slot 1 Slot unit 0 VC -1Transmit limit accumulator 0x48001A82 (0x48001A82)IP MTU 1500

    Example: Verifying Packet Marking CriteriaThe following example shows how to use the match precedence command to manage IPv6 traffic flows:

    Device# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Device(config)# class-m c1Device (config-cmap)# match precedence 5Device(config-cmap)# end Device#Device(config)# policy p1Device(config-pmap)# class c1Device(config-pmap-c)# police 10000 conform set-prec-trans 4To verify that packet marking is working as expected, use the show policy command. The output of thiscommand shows a difference between the number of total packets and the number of packets marked.

    Device# show policy p1Policy Map p1

    Class c1police 10000 1500 1500 conform-action set-prec-transmit 4 exceed-action drop

    Device# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Device(config)# interface serial 4/1Device(config-if)# service out p1Device(config-if)# end Device# show policy interface s4/1

    Serial4/1Service-policy output: p1

    Class-map: c1 (match-all)0 packets, 0 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: precedence 5police:

    10000 bps, 1500 limit, 1500 extended limitconformed 0 packets, 0 bytes; action: set-prec-transmit 4exceeded 0 packets, 0 bytes; action: dropconformed 0 bps, exceed 0 bps violate 0 bps

    Class-map: class-default (match-any)10 packets, 1486 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: any

    During periods of transmit congestion at the outgoing interface, packets arrive faster than the interface cansend them. It is helpful to know how to interpret the output of the show policy-map interface command,which is useful for monitoring the results of a service policy created with Cisco ’s MQC.

    Congestion typically occurs when a fast ingress interface feeds a relatively slow egress interface. Functionally,congestion is defined as filling the transmit ring on the interface (a ring is a special buffer control structure).Every interface supports a pair of rings: a receive ring for receiving packets and a transmit ring for sending

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T10

    IPv6 Quality of ServiceExample: Verifying Packet Marking Criteria

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    19/118

    packets. The size of the rings varies with the interface controller and with the bandwidth of the interface or virtual circuit (VC). As in the following example, use the show atm vc vcd command to display the value of the transmit ring on a PA-A3 ATM port adapter.

    Device# show atm vc 3

    ATM5/0.2: VCD: 3, VPI: 2, VCI: 2VBR-NRT, PeakRate: 30000, Average Rate: 20000, Burst Cells: 94AAL5-LLC/SNAP, etype:0x0, Flags: 0x20, VCmode: 0x0OAM frequency: 0 second(s)PA TxRingLimit: 10InARP frequency: 15 minutes(s)Transmit priority 2InPkts: 0, OutPkts: 0, InBytes: 0, OutBytes: 0InPRoc: 0, OutPRoc: 0InFast: 0, OutFast: 0, InAS: 0, OutAS: 0InPktDrops: 0, OutPktDrops: 0CrcErrors: 0, SarTimeOuts: 0, OverSizedSDUs: 0OAM cells received: 0OAM cells sent: 0Status: UPCisco software (also referred to as the Layer 3 processor) and the interface driver use the transmit ring whenmoving packets to the physical media. The two processors collaborate in the following way:

    • The interface sends packets according to the interface rate or a shaped rate.

    • The interface maintains a hardware queue or transmit ring, where it stores the packets waiting for transmission onto the physical wire.

    • When the hardware queue or transmit ring fills, the interface provides explicit back pressure to the Layer 3 processor system. It notifies the Layer 3 processor to stop dequeuing packets to the interface ’s transmitring because the transmit ring is full. The Layer 3 processor now stores the excess packets in the Layer 3 queues.

    • When the interface sends the packets on the transmit ring and empties the ring, it once again hassufficient buffers available to store the packets. It releases the back pressure, and the Layer 3 processor dequeuesnew packets to the interface.

    The most important aspect of this communication system is that the interface recognizes that its transmit ringis full and throttles the receipt of new packets from the Layer 3 processor system. Thus, when the interfaceis congested, the drop decision is moved from a random, last-in, first-dropped decision in the first in, first out(FIFO) queue of the transmit ring to a differentiated decision based on IP-level service policies implemented by the Layer 3 processor.

    Service policies apply only to packets stored in the Layer 3 queues. The table below illustrates which packetssit in the Layer 3 queue. Locally generated packets are always process-switched and are delivered first to theLayer 3 queue before being passed on to the interface driver. Fast-switched and CEF-switched packets aredelivered directly to the transmit ring and sit in the L3 queue only when the transmit ring is full.

    Table 2: Packet Types and the Layer 3 Queue

    NoncongestionCongestionPacket Type

    YesYesLocally generated packets,including Telnet packets and pings

    YesYesOther packets that are process-switched

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 11

    IPv6 Quality of ServiceExample: Verifying Packet Marking Criteria

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    20/118

    NoncongestionCongestionPacket Type

    NoYesPackets that are CEF or fast-switched

    The following example shows these guidelines applied to the show policy-map interface command output.

    Device# show policy-map interface atm 1/0.1

    ATM1/0.1: VC 0/100 -Service-policy output: cbwfq (1283)

    Class-map: A (match-all) (1285/2)28621 packets, 7098008 bytes

    5 minute offered rate 10000 bps, drop rate 0 bpsMatch: access-group 101 (1289)Weighted Fair Queueing

    Output Queue: Conversation 73Bandwidth 500 (kbps) Max Threshold 64 (packets)( pkts matched/bytes matched) 28621/7098008

    (depth/total drops/no-buffer drops) 0/0/0Class-map: B (match-all) (1301/4)

    2058 packets, 148176 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: access-group 103 (1305)Weighted Fair Queueing

    Output Queue: Conversation 75Bandwidth 50 (kbps) Max Threshold 64 (packets)(pkts matched/bytes matched) 0/0(depth/total drops/no-buffer drops) 0/0/0

    Class-map: class-default (match-any) (1309/0)19 packets, 968 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: any (1313)

    The table below defines counters that appear in the example.

    Table 3: Packet Counters from show policy-map interface Output

    ExplanationCounter

    The number of packets matching the criteria of theclass. This counter increments whether or not theinterface is congested.

    28621 packets, 7098008 bytes

    The number of packets matching the criteria of theclass when the interface was congested. In other words, the interface ’s transmit ring was full, and thedriver and the L3 processor system worked together to queue the excess packets in the L3 queues, wherethe service policy applies. Packets that are processswitched always go through the L3 queuing systemand therefore increment the "packets matched"counter.

    (pkts matched/bytes matched) 28621/709800

    These numbers define an internal ID used with theCISCO-CLASS-BASED-QOS-MIB.

    Class-map: B (match-all) (1301/4)

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T12

    IPv6 Quality of ServiceExample: Verifying Packet Marking Criteria

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    21/118

    ExplanationCounter

    Use the load-interval command to change this valueand make it a more instantaneous value. The lowestvalue is 30 seconds; however, statistics displayed in

    the show policy-map interface command output areupdated every 10 seconds. Because the commandeffectively provides a snapshot at a specific moment,the statistics may not reflect a temporary change inqueue size.

    5 minute offered rate 0 bps, drop rate 0 bps

    Without congestion, there is no need to queue any excess packets. When congestion occurs, packets, includingCEF and fast-switched packets, might go into the Layer 3 queue. If you use congestion management features, packets accumulating at an interfaceare queued until the interface is free to send them; they are then scheduledaccording to their assigned priority and the queueing mechanism configured for the interface.

    Normally, the packets counter is much larger than the packets matched counter. If the values of the two

    counters are nearly equal, then the interface is receiving a large number of process-switched packets or isheavily congested. Both of these conditions should be investigated to ensure optimal packet forwarding.

    Devices allocate conversation numbers for the queues that are created when the service policy is applied. Thefollowing example shows the queues and related information.

    Device# show policy-map interface s1/0.1 dlci 100

    Serial1/0.1: DLCI 100 -output : mypolicy

    Class voiceWeighted Fair Queueing

    Strict PriorityOutput Queue: Conversation 72

    Bandwidth 16 (kbps) Packets Matched 0

    (pkts discards/bytes discards) 0/0Class immediate-dataWeighted Fair Queueing

    Output Queue: Conversation 73

    Bandwidth 60 (%) Packets Matched 0(pkts discards/bytes discards/tail drops) 0/0/0mean queue depth: 0drops: class random tail min-th max-th mark-prob

    0 0 0 64 128 1/101 0 0 71 128 1/102 0 0 78 128 1/103 0 0 85 128 1/104 0 0 92 128 1/105 0 0 99 128 1/106 0 0 106 128 1/107 0 0 113 128 1/10rsvp 0 0 120 128 1/10

    Class priority-dataWeighted Fair QueueingOutput Queue: Conversation 74

    Bandwidth 40 (%) Packets Matched 0 Max Threshold 64 (packets)(pkts discards/bytes discards/tail drops) 0/0/0

    Class class-defaultWeighted Fair Queueing

    Flow Based Fair QueueingMaximum Number of Hashed Queues 64 Max Threshold 20 (packets)

    Information reported for each class includes the following:

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 13

    IPv6 Quality of ServiceExample: Verifying Packet Marking Criteria

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    22/118

    • Class definition

    • Queueing method applied

    • Output queue conversation number

    • Bandwidth used

    • Number of packets discarded

    • Number of bytes discarded

    • Number of packets dropped

    The class-default class is the default class to which traffic is directed, if that traffic does not satisfy the matchcriteria of other classes whose policy is defined in the policy map. The fair-queue command allows you tospecify the number of dynamic queues into which IP flows are sorted and classified. Alternately, devicesallocate a default number of queues derived from the bandwidth on the interface or VC. Supported values ineither case are a power of two, in a range from 16 to 4096.

    The table below lists the default values for interfaces and for ATM permanent virtual circuits (PVCs).

    Table 4: Default Number of Dynamic Queues as a Function of Interface Bandwidth

    Number of Dynamic QueuesBandwidth Range

    16Less than or equal to 64 kbps

    32More than 64 kbps and less than or equal to 128 kbps

    64More than 128 kbps and less than or equal to 256kbps

    128More than 256 kbps and less than or equal to 512

    kbps

    256More than 512 kbps

    The table below lists the default number of dynamic queues in relation to ATM PVC bandwidth.

    Table 5: Default Number of Dynamic Queues as a Function of ATM PVC Bandwidth

    Number of Dynamic QueuesBandwidth Range

    16Less than or equal to 128 kbps

    32More than 128 kbps and less than or equal to 512kbps

    64More than 512 kbps and less than or equal to 2000kbps

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T14

    IPv6 Quality of ServiceExample: Verifying Packet Marking Criteria

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    23/118

    Number of Dynamic QueuesBandwidth Range

    128More than 2000 kbps and less than or equal to 8000kbps

    256More than 8000 kbps

    Based on the number of reserved queues for WFQ, Cisco software assigns a conversation or queue number as shown in the table below.

    Table 6: Conversation Numbers Assigned to Queues

    Type of TrafficNumber

    General flow-based traffic queues. Traffic that doesnot match to a user-created class will match toclass-default and one of the flow-based queues.

    1 to 256

    Reserved for Cisco Discovery Protocol and for packets marked with an internal high-priority flag.

    257 to 263

    Reserved queue for the priority class (classesconfigured with the priority command). Look for the"Strict Priority" value for the class in the showpolicy-map interface output. The priority queue usesa conversation ID equal to the number of dynamicqueues, plus 8.

    264

    Queues for user-created classes.265 and higher

    Example: Matching DSCP ValueThe following example shows how to configure the service policy called priority50 and attach service policy priority50 to an interface. In this example, the match dscp command includes the optional ip keyword,meaning that the match is for IPv4 packets only. The class map called ipdscp15 will evaluate all packetsentering interface Fast Ethernet 1/0. If the packet is an IPv4 packet and has a DSCP value of 15, the packetwill be treated as priority traffic and will be allocated with bandwidth of 50 kbps.

    Router(config)#class-map ipdscp15Router(config-cmap)# match ip dscp 15

    Router(config)#exit

    Router(config)# policy-map priority50Router(config-pmap)#

    class ipdscp15Router(config-pmap-c)#

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 15

    IPv6 Quality of ServiceExample: Matching DSCP Value

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    24/118

    priority 50Router(config-pmap-c)#exitRouter(config-pmap)#

    exitRouter(config)#interface fa1/0

    Router(config-if)#service-policy input priority55To match on IPv6 packets only, use the match dscp command without the ip keyword preceded by the matchprotocol command. Ensure that the class map has the match-all attribute (which is the default).

    Router(config)#class-map ipdscp15

    Router(config-cmap)# match protocol ipv6

    Router(config-cmap)# match dscp 15

    Router(config)#exit

    To match packets on both IPv4 and IPv6 protocols, use the match dscp command:

    Router(config)#class-map ipdscp15

    Router(config-cmap)# match dscp 15

    Additional ReferencesRelated Documents

    Document TitleRelated Topic

    IPv6 Configuration GuideIPv6 addressing and connectivity

    Cisco IOS Master Commands List,All Releases

    Cisco IOS commands

    Cisco IOS IPv6 CommandReference

    IPv6 commands

    Cisco IOS IPv6 Feature MappingCisco IOS IPv6 features

    “ Classifying Network Traffic ”

    moduleClassifying Network Traffic

    “ Marking Network Traffic ” moduleMarking Network Traffic

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T16

    IPv6 Quality of ServiceAdditional References

    http://www.cisco.com/en/US/docs/ios/mcl/allreleasemcl/all_book.htmlhttp://www.cisco.com/en/US/docs/ios/mcl/allreleasemcl/all_book.htmlhttp://www.cisco.com/en/US/docs/ios-xml/ios/ipv6/command/ipv6-cr-book.htmlhttp://www.cisco.com/en/US/docs/ios-xml/ios/ipv6/command/ipv6-cr-book.htmlhttp://docwiki.cisco.com/wiki/Cisco_IOS_IPv6_Feature_Mappinghttp://docwiki.cisco.com/wiki/Cisco_IOS_IPv6_Feature_Mappinghttp://www.cisco.com/en/US/docs/ios-xml/ios/ipv6/command/ipv6-cr-book.htmlhttp://www.cisco.com/en/US/docs/ios-xml/ios/ipv6/command/ipv6-cr-book.htmlhttp://www.cisco.com/en/US/docs/ios/mcl/allreleasemcl/all_book.htmlhttp://www.cisco.com/en/US/docs/ios/mcl/allreleasemcl/all_book.html

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    25/118

    Standards and RFCs

    TitleStandard/RFC

    Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers

    RFC 2474

    An Architecture for Differentiated Services Framework RFC 2475

    Assured Forwarding PHBRFC 2597

    An Expedited Forwarding PHBRFC 2598

    A Single Rate Three Color Marker RFC 2697

    A Two Rate Three Color Marker RFC 2698

    IPv6 RFCsRFCs for IPv6

    MIBs

    MIBs LinkMIB

    To locateand download MIBs for selected platforms,Cisco IOS releases, and feature sets, use Cisco MIBLocator found at the following URL:

    http://www.cisco.com/go/mibs

    No new or modified MIBs are supported by thisfeature, and support for existing MIBs has not beenmodified by this feature.

    Technical Assistance

    LinkDescription

    http://www.cisco.com/cisco/web/support/index.htmlThe Cisco Support and Documentation website providesonline resourcesto download documentation,software, and tools.Use these resources to install andconfigure thesoftware and to troubleshoot and resolvetechnical issueswith Cisco products and technologies.Access to most tools on the Cisco Support andDocumentation website requiresa Cisco.com user IDand password.

    Feature Information for IPv6 Quality of ServiceThe following table provides release information about the feature or features described in this module. Thistable lists only the software release that introduced support for a given feature in a given software releasetrain. Unless noted otherwise, subsequent releases of that software release train also support that feature.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 17

    IPv6 Quality of ServiceFeature Information for IPv6 Quality of Service

    http://www.cisco.com/en/US/docs/ios-xml/ios/ipv6/configuration/15-2mt/ip6-rfcs.htmlhttp://www.cisco.com/go/mibshttp://www.cisco.com/supporthttp://www.cisco.com/supporthttp://www.cisco.com/go/mibshttp://www.cisco.com/en/US/docs/ios-xml/ios/ipv6/configuration/15-2mt/ip6-rfcs.html

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    26/118

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required.

    Table 7: Feature Information for IPv6 Quality of Service

    Feature InformationReleasesFeature NameQoS features supported for IPv6environments include packetclassification, queueing, trafficshaping, WRED, class-based packet marking, and policing of IPv6 packets.

    The following commands wereintroduced or modified: matchdscp , match precedence , set dscp ,set precedence .

    The following commands wereintroduced or modified: matchaccess-group name , match dscp ,match precedence , set dscp , setprecedence .

    12.2(13)T

    12.3

    12.2(50)SG

    3.2.0SG

    15.0(2)SG

    12.2(33)SRA

    12.2(18)SXE

    Cisco IOS XE Release 2.1

    IPv6 Quality of Service

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T18

    IPv6 Quality of ServiceFeature Information for IPv6 Quality of Service

    http://www.cisco.com/go/cfnhttp://www.cisco.com/go/cfn

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    27/118

    C H A P T E R 3Configuring Committed Access Rate

    This moduledescribes the tasks for configuring committed access rate (CAR) and distributed CAR (DCAR).

    In Cisco IOS Release 12.2 SR, CAR is not supported on the Cisco 7600 series router.Note

    For complete conceptual information about these features, see the "Classification Overview"module and the"Policing and Shaping Overview" module.

    For a complete description of the CAR commands in this module, see the Cisco IOS Quality of ServiceSolutions Command Reference. To locate documentation of other commands that appear in this module, usethe command reference master index or search online.

    CAR and DCAR can only be used with IP traffic. Non-IP traffic is not rate limited. CAR and DCAR can be configured on an interface or subinterface. However, CAR and DCAR are not supported on the Fast

    EtherChannel, tunnel, or PRI interfaces, nor on any interface that does not support Cisco Express Forwarding(CEF). CEF must be enabled on the interface before you configure CAR or DCAR. CAR is not supportedfor Internetwork Packet Exchange (IPX) packets.

    Note

    • Finding Feature Information, page 20

    • Committed Access Rate Configuration Task List, page 20

    • Configuring CAR and DCAR for All IP Traffic, page 22

    • Configuring CAR and DCAR Policies, page 22

    • Configuring a Class-Based DCAR Policy, page 23

    • Monitoring CAR and DCAR, page 24

    • CAR and DCAR Configuration Examples, page 25

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 19

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    28/118

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveats andfeature information, see Bug Search Tool and the release notes for your platform and software release. Tofind information about the features documented in this module, and to see a list of the releases in which eachfeature is supported, see the feature information table at the end of this module.

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required.

    Committed Access Rate Configuration Task ListThe CAR and DCAR services limit the input or output transmission rate on an interface or subinterface basedon a flexible set of criteria. CAR is often configured on interfaces at the edge of a network to limit traffic intoor out of the network.

    CAR can rate limit traffic based on certain matching criteria, such as incoming interface, IP precedence, or IP access list. You configure the actions that CAR will take when traffic conforms to or exceeds the rate limit.

    You can set CAR rate policies that are associated with one of the following:

    • All IP traffic

    • IP precedence

    • MAC address

    • IP access list, both standard and extended. Matching to IP access lists is more processor-intensive thanmatching based on other criteria.

    Each interface can have multiple CAR policies, corresponding to different types of traffic. For example, low

    priority traffic may be limited to a lower rate than high-priority traffic. With multiple rate policies, the router examines each policy in the order entered until the packet matches. If a match is not found, the default actionis to send.

    The rate policies can be independent; each rate policy deals with a different type of traffic. Alternatively, rate policies can be cascading; a packet can be compared to multiple different rate policies in succession. You canconfigure up to 100 rate policies on a subinterface.

    Because of the linear search for thematching rate-limit statement, the CPU load increases with the number of rate policies.

    Note

    Basic CAR and DCAR functionality requires that the following criteria be defined:

    • Packet direction, incoming or outgoing.• An average rate, determined by a long-term average of the transmission rate. Traffic that falls under this

    rate will always conform.

    • A normal burst size, which determines how large traffic bursts can be before some traffic is consideredto exceed the rate limit.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T20

    Configuring Committed Access RateFinding Feature Information

    http://www.cisco.com/cisco/psn/bssprt/bsshttp://www.cisco.com/go/cfnhttp://www.cisco.com/go/cfnhttp://www.cisco.com/cisco/psn/bssprt/bss

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    29/118

    • An excess burst size (Be). Traffic that falls between the normal burst size and the Excess Burst sizeexceeds the rate limit with a probability that increases as the burst size increases. CAR propagates bursts.It does no smoothing or shaping of traffic.

    Table 8: Rate-Limit Command Action Keywords

    DescriptionKeyword

    Evaluates the next rate-limit command.continue

    Drops the packet.drop

    Sets the IP Precedence and evaluates the nextrate-limit command.

    set-prec-continue new-prec

    Sets the IP Precedence and sends the packet.set-prec-transmit new-prec

    Sends the packet.transmit

    IP Precedence or MAC AddressUse the access-list rate-limit command to classify packets using either IP Precedence or MAC addresses.You can then apply CARpoliciesusing the rate-limit command to individualrate-limited access lists. Packetswith different IP precedences or MAC addresses are treated differently by the CAR service. See the sectionExample Rate Limiting in an IXP , on page 25 for an example of how to configure a CAR policy using MACaddresses.

    IP Access ListUse the access-list command to define CAR policy based on an access list. The acl-index argument is anaccess list number. Use a number from 1 to 99 to classify packets by precedence or precedence mask. Use anumber from 100 to 199 to classify by MAC address.

    If an access list is not present, the rate-limit command will act as if no access list is defined and all trafficwill be rate limited accordingly.

    Note

    When you configure DCAR on Cisco 7000 series routers with RSP7000 or Cisco 7500 series routers with aVIP2-40 or greater interface processor, you can classify packets by group, to allow you to partition your

    network into multiple priority levels or classes of service. This classification is achieved by setting IP precedences based on different criteria for use by other QoS features such as WeightedRandom Early Detection(WRED) or weighted fair queueing (WFQ).

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 21

    Configuring Committed Access RateIP Precedence or MAC Address

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    30/118

    Configuring CAR and DCAR for All IP TrafficSUMMARY STEPS

    1. Router(config)# interface interface-type interface-number 2. Router(config-if)# rate-limit {input | output } bps burst-normal burst-max conform-action action

    exceed-action action

    DETAILED STEPS

    PurposeCommand or Action

    Specifies the interface or subinterface. This command puts therouter in interface configuration mode.

    Router(config)# interface interface-typeinterface-number

    Step 1

    Specifies a basic CAR policy for all Configuring CARand DCAR for All IP Traffic , on page 22 ef"> Table 1 for a description of conform and exceed action keywords.

    Router(config-if)# rate-limit {input | output } bpsburst-normal burst-max conform-action actionexceed-action action

    Step 2

    Configuring CAR and DCAR PoliciesSUMMARY STEPS

    1. Router(config-if)# interface interface-type interface-number 2. Router(config-if)# rate-limit {input | output } [access-group [rate-limit ] acl-index ] bps burst-normal

    burst-max conform-action action exceed-action action

    3. Router(config-if) exit4. Router(config)# access-list rate-limit acl-index { precedence | mac-address | mask prec-mask }5. Do one of the following:

    • Router(config)# access-list acl-index {deny | permit } source [ source-wildcard ]

    • Router(config)# access-list acl-index {deny | permit } protocol source source-wildcard destinationdestination-wildcard [precedence precedence ][tos tos] [log ]

    DETAILED STEPS

    PurposeCommand or Action

    Specifies the interface or subinterface. This command puts therouter in interface configuration mode.

    Router(config-if)# interface interface-typeinterface-number

    Step 1

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T22

    Configuring Committed Access RateConfiguring CAR and DCAR for All IP Traffic

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    31/118

    PurposeCommand or Action

    Specifies the rate policy for each particular class of traffic. SeeConfiguring CAR and DCAR Policies , on page 22 for a

    Router(config-if)# rate-limit {input | output }[access-group [rate-limit ] acl-index ] bps burst-normal

    burst-max conform-action action exceed-action action

    Step 2

    description of the rate-limit command action keywords. Repeatthis command for each different class of traffic.

    (Optional) Returns to global configuration mode.Router(config-if) exitStep 3

    This change in configuration mode is needed only if you complete optional Configuring CAR and DCAR Policies or Configuring CAR and DCAR Policies .

    Note

    (Optional) Specifies a rate-limited access list. Repeat thiscommand if you wish to specify a new access list.

    Router(config)# access-list rate-limit acl-index{ precedence | mac-address | mask prec-mask }

    Step 4

    (Optional) Specifies a standard or extended access list. Repeatthis command to further configure the access list or specify anew access list.

    Do one of the following:Step 5

    • Router(config)# access-list acl-index {deny |

    permit } source [ source-wildcard ]• Router(config)# access-list acl-index {deny |

    permit } protocol source source-wildcard destination destination-wildcard [precedence precedence ][tos tos] [log ]

    Configuring a Class-Based DCAR PolicySUMMARY STEPS

    1. Router(config-if)# interface interface-type interface-number 2. Router(config-if)# rate-limit {input | output } [access-group [rate-limit ] acl-index ] bps burst-normal

    burst-max conform-action action exceed-action action

    3. Router(config-if)# random-detect precedence precedence min-threshold max-threshold mark-prob-denominator

    4. Do one of the following:• Router(config-if)# access-list acl-index {deny | permit } source [ source-wildcard ]

    • Router(config-if)# access-list acl-index {deny | permit } protocol source source-wildcard destinationdestination-wildcard [precedence precedence ] [ tos tos] [ log ]

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 23

    Configuring Committed Access RateConfiguring a Class-Based DCAR Policy

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    32/118

    DETAILED STEPS

    PurposeCommand or Action

    Specifies the interface or subinterface. This command putsthe router in interface configuration mode.Router(config-if)# interface interface-type interface-number Step 1

    Specifies the rate policy for each particular class of traffic.See Configuring a Class-Based DCAR Policy , on page

    Router(config-if)# rate-limit {input | output } [access-group[rate-limit ] acl-index ] bps burst-normal burst-maxconform-action action exceed-action action

    Step 2

    23 for a description of the rate-limit command actionkeywords. Repeat this command for each different classof traffic.

    Configures WRED and specifies parameters for packetswith specific IP Precedence.

    Router(config-if)# random-detect precedence precedencemin-threshold max-threshold mark-prob-denominator

    Step 3

    (Optional) Specifies a standard or extended access list.Repeat this command to further configure the access listor specify a new access list.

    Do one of the following:Step 4•

    Router(config-if)# access-list acl-index {deny |permit } source [ source-wildcard ]

    • Router(config-if)# access-list acl-index {deny |permit } protocol source source-wildcard destinationdestination-wildcard [precedence precedence ] [tos tos][log ]

    Monitoring CAR and DCARPurposeCommand

    Displays the contents of current IP and rate-limitedaccess lists.Router# show access-lists

    Displays information about rate-limited access lists.Router# show access-lists rate-limit[ access-list-number ]

    Displays information about an interface configuredfor CAR.Router# show interfaces [ interface-type

    interface-number ] rate-limit

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T24

    Configuring Committed Access RateMonitoring CAR and DCAR

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    33/118

    CAR and DCAR Configuration Examples

    Example Subrate IP ServicesThe following example illustrates howto configure a basic CAR policy that allows all IP traffic. In theexample,the network operator delivers a physical T3 link to the customer, but offers a less expensive 15 Mbps subrateservice. The customer pays only for the subrate bandwidth, which can be upgraded with additional access bandwidth based on demand. The CAR policy limits the traffic rate available to the customer and deliveredto the network to the agreed upon rate limit, plus the ability to temporarily burst over the limit.

    interface hssi 0/0/0rate-limit output 15000000 2812500 5625000 conform-action transmit exceed-action dropip address 10.1.0.9 255.255.255.0

    Example Input and Output Rate Limiting on an InterfaceIn this example, a customer is connected to an Internet service provider (ISP) by a T3 link. The ISP wants torate limit transmissions from the customer to 15 Mbps of the 45 Mbps. In addition, the customer is allowedto send bursts of 2,812,500 bytes. All packets exceeding this limit are dropped. The following commands areconfigured on the High-Speed Serial Interface (HSSI) of the ISP connected to the customer:

    interface Hssi0/0/0description 45Mbps to R1rate-limit input 15000000 2812500 2812500 conform-action transmit exceed-action dropip address 200.200.14.250 255.255.255.252rate-limit output 15000000 2812500 2812500 conform-action transmit exceed-action drop

    The following sample output shows how to verify the configuration and monitor CAR statistics using theshow interfaces rate-limit command:

    Router# show interfaces hssi 0/0/0 rate-limitHssi0/0/0 45Mbps to R1

    Inputmatches: all traffic

    params: 15000000 bps, 2812500 limit, 2812500 extended limitconformed 8 packets, 428 bytes; action: transmitexceeded 0 packets, 0 bytes; action: droplast packet: 8680ms ago, current burst: 0 byteslast cleared 00:03:59 ago, conformed 0 bps, exceeded 0 bps

    Outputmatches: all traffic

    params: 15000000 bps, 2812500 limit, 2812500 extended limitconformed 0 packets, 0 bytes; action: transmitexceeded 0 packets, 0 bytes; action: droplast packet: 8680ms ago, current burst: 0 byteslast cleared 00:03:59 ago, conformed 0 bps, exceeded 0 bps

    Example Rate Limiting in an IXPThe following example uses rate limiting to control traffic in an Internet Exchange Point (IXP). Because anIXP comprises many neighborsaround an FDDI ring, MAC address rate-limited access lists are used to controltraffic from a particular ISP. Traffic from one ISP (at MAC address 00e0.34b0.7777) is compared to a rate

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 25

    Configuring Committed Access RateCAR and DCAR Configuration Examples

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    34/118

    limit of 80 Mbps of the 100 Mbps available on the FDDI connection. Traffic that conforms to this rate is sent. Nonconforming traffic is dropped.

    interface Fddi2/1/0rate-limit input access-group rate-limit 100 80000000 15000000 30000000 conform-action

    transmit exceed-action drop

    ip address 200.200.6.1 255.255.255.0!access-list rate-limit 100 00e0.34b0.7777The following sample output shows how to verify the configuration and monitor the CAR statistics using theshow interfaces rate-limit command:

    Router# show interfaces fddi2/1/0 rate-limitFddi2/1/0

    Inputmatches: access-group rate-limit 100

    params: 800000000 bps, 15000000 limit, 30000000 extended limitconformed 0 packets, 0 bytes; action: transmitexceeded 0 packets, 0 bytes; action: droplast packet: 4737508ms ago, current burst: 0 byteslast cleared 01:05:47 ago, conformed 0 bps, exceeded 0 bps

    Example Rate Limiting by Access ListThe following example shows how CAR can be used to limit the rate by application to ensure capacity for other traffic including mission-critical applications:

    • All World Wide Web traffic is sent. However, the IP precedence for Web traffic that conforms to thefirst rate policy is set to 5. For nonconforming Web traffic, the IP precedence is set to 0 (best effort).

    • File Transfer Protocol (FTP) traffic is sent with an IP precedence of 5 if it conforms to the second rate policy. If the FTP traffic exceeds the rate policy, it is dropped.

    • Any remaining traffic is limited to 8 Mbps, with a normal burst size of 15,000 bytes and an Excess Burstsize of 30,000 bytes. Traffic that conforms is sent with an IP precedence of 5. Traffic that does not

    conform is dropped.

    The figure below illustrates the configuration. Notice that two access lists are created to classify the Web andFTP traffic so that they can be handled separately by CAR.

    Figure 2: Rate Limiting by Access List

    Router LEFT Configuration

    interface Hssi0/0/0description 45Mbps to R2rate-limit output access-group 101 20000000 3750000 7500000 conform-action set-prec-

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T26

    Configuring Committed Access RateExample Rate Limiting by Access List

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    35/118

    transmit 5 exceed-action set-prec-transmit 0rate-limit output access-group 102 10000000 1875000 3750000 conform-actionset-prec-transmit 5 exceed-action droprate-limit output 8000000 1500000 3000000 conform-action set-prec-transmit 5exceed-action dropip address 10.1.0.9 255.255.255.0!access-list 101 permit tcp any any eq wwwaccess-list 102 permit tcp any any eq ftpThe following sample output shows how to verify the configuration and monitor CAR statistics using theshow interfaces rate-limit command:

    Router# show interfaces hssi 0/0/0 rate-limitHssi0/0/0 45Mbps to R2

    Inputmatches: access-group 101

    params: 20000000 bps, 3750000 limit, 7500000 extended limitconformed 3 packets, 189 bytes; action: set-prec-transmit 5exceeded 0 packets, 0 bytes; action: set-prec-transmit 0last packet: 309100ms ago, current burst: 0 byteslast cleared 00:08:00 ago, conformed 0 bps, exceeded 0 bps

    matches: access-group 102params: 10000000 bps, 1875000 limit, 3750000 extended limitconformed 0 packets, 0 bytes; action: set-prec-transmit 5

    exceeded 0 packets, 0 bytes; action: droplast packet: 19522612ms ago, current burst: 0 byteslast cleared 00:07:18 ago, conformed 0 bps, exceeded 0 bps

    matches: all trafficparams: 8000000 bps, 1500000 limit, 3000000 extended limitconformed 5 packets, 315 bytes; action: set-prec-transmit 5exceeded 0 packets, 0 bytes; action: droplast packet: 9632ms ago, current burst: 0 byteslast cleared 00:05:43 ago, conformed 0 bps, exceeded 0 bps

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 27

    Configuring Committed Access RateExample Rate Limiting by Access List

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    36/118

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T28

    Configuring Committed Access RateExample Rate Limiting by Access List

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    37/118

    C H A P T E R 4IPv6 QoS: MQC Packet Marking/Remarking

    • Finding Feature Information, page 29

    • Information About IPv6 QoS: MQC Packet Marking/Remarking, page 29

    • How to Specify IPv6 QoS: MQC Packet Marking/Remarking, page 30

    • Configuration Examples for IPv6 QoS: MQC Packet Marking/Remarking, page 32

    • Additional References, page 38

    • Feature Information for IPv6 QoS: MQC Packet Marking/Remarking, page 39

    Finding Feature InformationYour software release may not support all the features documented in this module. For the latest caveats andfeature information, see Bug Search Tool and the release notes for your platform and software release. To

    find information about the features documented in this module, and to see a list of the releases in which eachfeature is supported, see the feature information table at the end of this module.

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support.To access Cisco Feature Navigator, go to www.cisco.com/go/cfn . An account on Cisco.com is not required.

    Information About IPv6 QoS: MQC Packet Marking/Remarking

    Implementation Strategy for QoS for IPv6

    IPv6 packets are forwarded by paths that are different from those for IPv4. QoS features supported for IPv6environments include packet classification, queuing, traffic shaping, weighted random early detection (WRED),class-based packet marking, and policing of IPv6 packets. These features are available at both the processswitching and Cisco Express Forwarding switching paths of IPv6.

    All of the QoS features available for IPv6 environments are managed from the modular QoS command-lineinterface (MQC). The MQC allows you to define traffic classes, create and configure traffic policies (policymaps), and then attach those traffic policies to interfaces.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 29

    https://tools.cisco.com/bugsearch/searchhttp://www.cisco.com/go/cfnhttp://www.cisco.com/go/cfnhttps://tools.cisco.com/bugsearch/search

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    38/118

    To implementQoS in networks that are running IPv6, follow the same steps that you would followto implementQoS in networks running only IPv4. At a very high level, the basic steps for implementing QoS are as follows:

    • Know which applications in your network need QoS.

    • Understand the characteristics of the applications so that you can make decisions about which QoS

    features would be appropriate.• Know your network topology so that you know how link layer header sizes are affected by changes and

    forwarding.

    • Create classes based on the criteria that you establish for your network. In particular, if thesame network is also carrying IPv4 traffic along with IPv6 traffic, decide if you want to treat both of them the sameway or treat them separately and specify match criteria accordingly. If you want to treat them the same,use match statements such as match precedence , match dscp , set precedence , and set dscp . If youwant to treat them separately, add match criteria such as match protocol ip and match protocol ipv6in a match-all class map.

    • Create a policy to mark each class.

    • Work from the edge toward the core in applying QoS features.

    • Build the policy to treat the traffic.

    • Apply the policy.

    Policies and Class-Based Packet Marking in IPv6 NetworksYou can create a policy to mark each class of traffic with appropriate priority values, using either DSCP or precedence. Class-based marking allows you to set the IPv6 precedence and DSCP values for trafficmanagement. The traffic is marked as it enters the router on the ingress interface. The markings are used totreat the traffic (forward, queue) as it leaves the router on the egress interface. Always mark and treat thetraffic as close as possible to its source.

    Traffic Policing in IPv6 EnvironmentsCongestion management for IPv6 is similar to IPv4, and the commands used to configure queueing and trafficshaping features for IPv6 environments are the same commands as those used for IPv4. Traffic shaping allowsyou to limit the packet dequeue rate by holding additional packets in the queues and forwarding them asspecified by parameters configured for traffic shaping features. Traffic shaping uses flow-based queueing bydefault. CBWFQ can be used to classify and prioritize the packets. Class-based policer and generic trafficshaping (GTS) or Frame Relay traffic shaping (FRTS) can be used for conditioning and policing traffic.

    How to Specify IPv6 QoS: MQC Packet Marking/Remarking

    Specifying Marking Criteria for IPv6 PacketsPerform this task to establish the match criteria to be used to match packets for classifying network traffic.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T30

    IPv6 QoS: MQC Packet Marking/RemarkingPolicies and Class-Based Packet Marking in IPv6 Networks

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    39/118

    SUMMARY STEPS

    1. enable2. configure terminal

    3. policy map policy-map-name4. class {class-name | class-default }5. Do one of the following:

    • set precedence { precedence-value | from-field [table table-map-name ]}

    • set [ip ] dscp {dscp-value | from-field [table table-map-name ]}

    DETAILED STEPS

    PurposeCommand or Action

    Enables privileged EXEC mode.enableStep 1

    Example:

    Device> enable

    • Enter your password if prompted.

    Enters global configuration mode.configure terminal

    Example:

    Device# configure terminal

    Step 2

    Creates a policy map using the specified name and enters

    QoS policy-map configuration mode.

    policy map policy-map-name

    Example:

    Device(config)# policy map policy1

    Step 3

    • Enter the name of the policy map that you want tocreate.

    Specifies the treatment for traffic of a specified class (or thedefault class) and enters QoS policy-map class configurationmode.

    class {class-name | class-default }

    Example:

    Device(config-pmap)# class class-default

    Step 4

    Sets the precedence value and the DSCP value based on theCoS value (and action) defined in the specified table map.

    Do one of the following:Step 5• set precedence { precedence-value | from-field

    [table table-map-name ]}Both precedence and DSCP cannot be changed in the same packets.

    • set [ip ] dscp {dscp-value | from-field [tabletable-map-name ]}

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 31

    IPv6 QoS: MQC Packet Marking/RemarkingSpecifying Marking Criteria for IPv6 Packets

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    40/118

    PurposeCommand or Action

    Example:

    Device(config-pmap-c)#set precedence cos table table-map1

    Example:

    Device(config-pmap-c)#set dscp cos table table-map1

    Configuration Examples for IPv6 QoS: MQC PacketMarking/Remarking

    Example: Verifying Packet Marking CriteriaThe following example shows how to use the match precedence command to manage IPv6 traffic flows:

    Device# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Device(config)# class-m c1Device (config-cmap)# match precedence 5Device(config-cmap)# end

    Device#Device(config)# policy p1Device(config-pmap)# class c1Device(config-pmap-c)# police 10000 conform set-prec-trans 4To verify that packet marking is working as expected, use the show policy command. The output of thiscommand shows a difference between the number of total packets and the number of packets marked.

    Device# show policy p1Policy Map p1

    Class c1police 10000 1500 1500 conform-action set-prec-transmit 4 exceed-action drop

    Device# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Device(config)# interface serial 4/1Device(config-if)# service out p1Device(config-if)# end Device# show policy interface s4/1

    Serial4/1Service-policy output: p1

    Class-map: c1 (match-all)0 packets, 0 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: precedence 5police:

    10000 bps, 1500 limit, 1500 extended limitconformed 0 packets, 0 bytes; action: set-prec-transmit 4exceeded 0 packets, 0 bytes; action: dropconformed 0 bps, exceed 0 bps violate 0 bps

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T32

    IPv6 QoS: MQC Packet Marking/RemarkingConfiguration Examples for IPv6 QoS: MQC Packet Marking/Remarking

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    41/118

    Class-map: class-default (match-any)10 packets, 1486 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: any

    During periods of transmit congestion at the outgoing interface, packets arrive faster than the interface cansend them. It is helpful to know how to interpret the output of the show policy-map interface command,

    which is useful for monitoring the results of a service policy created with Cisco’

    s MQC.Congestion typically occurs when a fast ingress interface feeds a relatively slow egress interface. Functionally,congestion is defined as filling the transmit ring on the interface (a ring is a special buffer control structure).Every interface supports a pair of rings: a receive ring for receiving packets and a transmit ring for sending packets. The size of the rings varies with the interface controller and with the bandwidth of the interface or virtual circuit (VC). As in the following example, use the show atm vc vcd command to display the value of the transmit ring on a PA-A3 ATM port adapter.

    Device# show atm vc 3

    ATM5/0.2: VCD: 3, VPI: 2, VCI: 2VBR-NRT, PeakRate: 30000, Average Rate: 20000, Burst Cells: 94AAL5-LLC/SNAP, etype:0x0, Flags: 0x20, VCmode: 0x0OAM frequency: 0 second(s)PA TxRingLimit: 10InARP frequency: 15 minutes(s)Transmit priority 2InPkts: 0, OutPkts: 0, InBytes: 0, OutBytes: 0InPRoc: 0, OutPRoc: 0InFast: 0, OutFast: 0, InAS: 0, OutAS: 0InPktDrops: 0, OutPktDrops: 0CrcErrors: 0, SarTimeOuts: 0, OverSizedSDUs: 0OAM cells received: 0OAM cells sent: 0Status: UPCisco software (also referred to as the Layer 3 processor) and the interface driver use the transmit ring whenmoving packets to the physical media. The two processors collaborate in the following way:

    • The interface sends packets according to the interface rate or a shaped rate.

    • The interface maintains a hardware queue or transmit ring, where it stores the packets waiting for

    transmission onto the physical wire.• When the hardware queue or transmit ring fills, the interface provides explicit back pressure to the Layer

    3 processor system. It notifies the Layer 3 processor to stop dequeuing packets to the interface ’s transmitring because the transmit ring is full. The Layer 3 processor now stores the excess packets in the Layer 3 queues.

    • When the interface sends the packets on the transmit ring and empties the ring, it once again hassufficient buffers available to store the packets. It releases the back pressure, and the Layer 3 processor dequeuesnew packets to the interface.

    The most important aspect of this communication system is that the interface recognizes that its transmit ringis full and throttles the receipt of new packets from the Layer 3 processor system. Thus, when the interfaceis congested, the drop decision is moved from a random, last-in, first-dropped decision in the first in, first out(FIFO) queue of the transmit ring to a differentiated decision based on IP-level service policies implemented by the Layer 3 processor.

    Service policies apply only to packets stored in the Layer 3 queues. The table below illustrates which packetssit in the Layer 3 queue. Locally generated packets are always process-switched and are delivered first to theLayer 3 queue before being passed on to the interface driver. Fast-switched and CEF-switched packets aredelivered directly to the transmit ring and sit in the L3 queue only when the transmit ring is full.

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T 33

    IPv6 QoS: MQC Packet Marking/RemarkingExample: Verifying Packet Marking Criteria

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    42/118

    Table 9: Packet Types and the Layer 3 Queue

    NoncongestionCongestionPacket Type

    YesYesLocally generated packets,

    including Telnet packets and pings

    YesYesOther packets that are process-switched

    NoYesPackets that are CEF or fast-switched

    The following example shows these guidelines applied to the show policy-map interface command output.

    Device# show policy-map interface atm 1/0.1

    ATM1/0.1: VC 0/100 -Service-policy output: cbwfq (1283)Class-map: A (match-all) (1285/2)

    28621 packets, 7098008 bytes

    5 minute offered rate 10000 bps, drop rate 0 bpsMatch: access-group 101 (1289)Weighted Fair Queueing

    Output Queue: Conversation 73Bandwidth 500 (kbps) Max Threshold 64 (packets)( pkts matched/bytes matched) 28621/7098008

    (depth/total drops/no-buffer drops) 0/0/0Class-map: B (match-all) (1301/4)

    2058 packets, 148176 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: access-group 103 (1305)Weighted Fair Queueing

    Output Queue: Conversation 75Bandwidth 50 (kbps) Max Threshold 64 (packets)(pkts matched/bytes matched) 0/0(depth/total drops/no-buffer drops) 0/0/0

    Class-map: class-default (match-any) (1309/0)19 packets, 968 bytes5 minute offered rate 0 bps, drop rate 0 bpsMatch: any (1313)

    The table below defines counters that appear in the example.

    Table 10: Packet Counters from show policy-map interface Output

    ExplanationCounter

    The number of packets matching the criteria of theclass. This counter increments whether or not theinterface is congested.

    28621 packets, 7098008 bytes

    QoS: Classification Configuration Guide, Cisco IOS Release 15M&T34

    IPv6 QoS: MQC Packet Marking/RemarkingExample: Verifying Packet Marking Criteria

  • 8/17/2019 QoS Classification Configuration Guide, Cisco IOS Release 15M&T

    43/118

    ExplanationCounter

    The number of packets matching the criteria of