Table of Contents

Preface

Overview

Configuring Classification

Configuring Marking Policies

Configuring Policing

Configuring Statistics

DSCP and Precedence Values

QoS Configuration Limits

Title Page

Preface

and describes how to obtain related documentation.

Audience

This guide is for experienced network administrators who configure and maintain Cisco NX-OS software.

Organization

This publication is organized as follows:

Chapter

Description

Chapter 1, “Overview”

Provides an overview of QoS features and lists supported RFPs.

Chapter 2, “Configuring QoS Classification”

Describes how to classify network traffic.

Chapter 3, “Configuring QoS Marking Policies”

Describes how to mark network traffic.

Chapter 4, “Configuring QoS Policing”

Describes how to police network traffic.

Chapter 5, “Monitoring QoS Statistics”

Describes how to enable and view QoS statistics.

Chapter 6, “DSCP and Precedence Values”

Provides the DSCP and precedence values used in QoS class maps and policy maps.

Chapter 7, “QoS Configuration Limits”

Provides information about limitations in configuring QoS.

Document Conventions

This publication uses the following conventions:

Command descriptions use these conventions:

Commands and keywords are in boldface.

Arguments for which you supply values are in italics.

{ }

Elements in braces are required choices.

[ ]

Elements in square brackets are optional.

Alternative, mutually exclusive elements are separated by vertical bars.

Screen examples use these conventions:

screen font

Terminal sessions and information that the switch displays are in screen font.

boldface screen font

Information that you must enter is in boldface screen font.

Arguments for which you supply values are in italic screen font.

< >

Nonprinting characters, such as passwords, are in angle brackets.

[ ]

Default responses to system prompts are in square brackets.

!, #

An exclamation point (!) or number sign (#) at the beginning of a line of code indicates a comment line.

Note Means reader take note. Notes contain helpful suggestions or references to material not covered in the manual.

Caution Means reader be careful. In this situation, you might do something that could result in equipment damage or loss of data.

Overview

This chapter describes the Quality of Service (QoS) features that are used to prevent traffic congestion.

Improving the Quality of Service

QoS lets you classify network traffic so that it can be policed and prioritized in a way that prevents congestion. Traffic is processed based on how you classify it and the QoS policies that you put in place.

You can implement a QoS policy using the following steps:

command.

command.

A traffic policy defines how specific traffic is to be acted upon to improve the quality of service.

command.

Step 4 Police the traffic.

Traffic Classification and Marking

describes these processes.

Table 1-1 Traffic Classification and Traffic Marking

QoS Method

Description

Command

Mechanism

Traffic Classification

Groups network traffic based on defined criteria.

class maps

Traffic Marking

Modifies traffic attributes by class.

policy maps

Traffic Classification

Classifying network traffic allows you to organize traffic (that is, packets) into traffic classes or categories on the basis of whether the traffic matches specific criteria. Classifying network traffic (used in conjunction with marking network traffic) is the foundation for applying QoS actions. For more information, see Chapter2, “Configuring QoS Classification”

Traffic Marking

Marking is the process of assigning a priority and involves changing the fields, such as class of service or DSCP, in a packet. The traffic is then marked accordingly as it comes into the device on an ingress interface. The markings are used to treat the traffic as it leaves the device on the egress interface. For more information about configuring marking, see Chapter3, “Configuring QoS Marking Policies”

Policing

Policing is the monitoring of data rates and burst sizes for a particular class of traffic. QoS policing on a network determines whether network traffic is within a specified profile (contract). This may cause out-of-profile traffic to drop or to be marked down to another differentiated services code point (DSCP) value to enforce a contracted service level. DSCP is a measure of the QoS level of the frame. For more information about configuring policing, see Chapter4, “Configuring QoS Policing”

QoS Commands

.

Table 1-2 QoS Configuration Commands

Global Configuration Commands

Class Map QoS Configuration

Command

Policy Map QoS Configuration

Command

Interface or

Port Profile Configuration Command

Policy Map Class QoS Configuration Command

Description

that represents a class of traffic.

that represents a mapping from one set of field values to another set of field values. You can reference a table map from a policy map.

that represents a set of policies to be applied to a set of class maps. Policy maps can reference table maps.

Applies a specified policy map to input or output packets on interfaces configured as follows:

- inherited from a port-profile1

- port-channel

- Ethernet

- VEthernet

Defines the action to take regarding packet data rates.

Defines the criteria for a class map.

Defines the packet header values for a policy map.

1.For information about port profiles see the Cisco Nexus 1000V Port Profile Configuration Guide, Release 4.0(4)SV1(1).

1.For information about port profiles see the Cisco Nexus 1000V Port Profile Configuration Guide, Release 4.0(4)SV1(1).

QoS Statistics

Statistics are maintained for each policy, class action, and match criteria per interface. For information about monitoring QoS statistics, see Chapter5, “Monitoring QoS Statistics”

Default QoS Behavior

There is no default QoS behavior. Policing and prioritization of traffic are only implemented when you apply a policy map to an interface.

However, when designing your QoS and ACL policies, keep in mind that ACLs referenced within a QoS policy are processed as follows as part of the QoS policy:

- QoS ingress processing follows ACL processing.

- QoS egress processing precedes ACL egress processing.

Supported RFCs

The following RFCs are supported by QoS.

Table 1-3 Supported RFCs

Number

Title

Architecture for Differentiated Services

A Single Rate Three Color Marker

A Dual Rate Three Color Marker

Management Information Base for the Differentiated Services Architecture

RTP: A Transport Protocol for Real-Time Applications

High Availability Requirements for QoS Features

QoS recovers its previous state after a software restart, and it is able to switch over from the active supervisor to the standby supervisor without a loss of state.

Configuring QoS Classification

This chapter describes how to create and map classes of traffic for QoS.

Information About Traffic Classes

Traffic classes are categories of traffic (packets) that are grouped on the basis of similarity. Such groups of traffic are called class maps. Classifying network traffic is the foundation for enabling a quality of service (QoS) strategy in your network.

Figure 2-1 shows the criteria you use to classify network traffic.

Figure 2-1 Criteria for classifying network traffic

Identifying and categorizing network traffic into traffic classes (that is, classifying packets) enables distinct handling for different types of traffic, effectively separating network traffic into different categories.

Classifying network traffic allows you to see what kinds of traffic you have and treat some types of traffic differently than others. Identifying and organizing network traffic is key enabling you to allocate network resources to deliver best performance for each type of traffic. For example, high-priority network traffic can be singled out for special handling, and thus, help to achieve peak application performance.

Network traffic with a specific IP precedence can be placed into one traffic class, while traffic with a specific DSCP value can be placed into another traffic class. The network traffic within that traffic class can be given the proper QoS treatment, which you can configure in a policy map later.

. You can match the criteria to your traffic as follows:

- Matching all

- Matching or not matching one

- Matching or not matching multiple

- Matching or not matching another class map

Some of the criteria used in traffic class maps relates only to one direction of traffic—either ingress or egress. For example, the internal label QoS group has no meaning on ingress traffic because it has not yet been assigned a value.

Traffic that fails to match any traffic class in a QoS policy map is assigned to a default class of traffic called class-default. The class-default can be referenced in a QoS policy map to select this unmatched traffic.

lists and describes the allowable criteria used for mapping traffic classes.

Table 2-1 Traffic Class Criteria

Class Criteria

Description

CoS

Class of Service (CoS) field in the IEEE 802.1Q header.

IP precedence

Precedence value within the Type of Service (TOS) byte of the IP header.

The IP Precedence values are shown in the “DSCP and Precedence Values” section.

Differentiated Services Code Point (DSCP)

DSCP value within the DIffServ field of the IP header.

The standard DSCP values are shown in the “DSCP and Precedence Values” section.

QoS group

Locally significant QoS values that can be manipulated and matched within the system. The range is from 0 to 126.

Discard class

Locally significant values that can be matched and manipulated within the system. The range is from 0 to 63.

ACL

IP ACL or MAC ACL name.

If you configure the class to match-all ACLs, no other match criteria, except packet length, can be specified. If you configure the class to match-any ACL, you can match ACLs and any other match criteria.

Packet length

Size range of Layer 3 packet lengths.

IP RTP

Identify applications using Real-time Transport Protocol (RTP) by UDP port number range.

Class map

Criteria specified in a named class-map object.

Prerequisites for Classification

Classification has the following prerequisite:

- You are logged in to the CLI in EXEC mode.

Guidelines and Limitations

Classification has the following guidelines and limitations:

- You can specify a maximum of 32 match criteria in a class map.

- You can configure a maximum of 64 classes for use in a single policy map, provided no policers are configured.

- When you match on an ACL, the only other match you can specify is the Layer 3 packet length in a match-all class.

- You can classify traffic on Layer 2 ports based on the port policy of the incoming packet.

Classifying Traffic

This section includes the following topics.

- Classifying ACL Traffic

- Classifying DSCP Traffic

- Configuring IP Precedence Classification

- Configuring QoS Group Classification

- Configuring Discard Class Classification

- Configuring Layer 3 Packet Length Classification

- Configuring CoS Classification

- Configuring IP RTP Classification

- Configuring Class Map Classification

Classifying ACL Traffic

Use this procedure to classify traffic by matching packets based on existing ACLs.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

- QoS does not use the permit-deny functions of ACLs. The permit and deny ACL keywords are ignored when matching.

- QoS does not support the not form of this command.

- If you configure the class to match-all ACLs, no other match criteria, except packet length, can be specified. If you configure the class to match-any ACL, you can match ACLs and any other match criteria.

- You are logged in to the CLI in EXEC mode.

- Tunneled IP packets are not matched unless the tunneling protocol is also IP, and then the match applies to the outer IP header and not the encapsulated IP header.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_acl

switch(config-cmap_qos)# class-map class_acl

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match access-group name my_acl

Configures and saves the access group to match for this class in the running configuration.

Note The permit and deny keywords are ignored when matching the ACL. form of this command is not supported.

Step 4

switch(config-cmap-qos)# show class-map class_acl1

Displays the class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Classifying DSCP Traffic

You can classify traffic based on the DSCP value in the DiffServ field of the IP header. The standard DSCP values are found in “DSCP and Precedence Values” section.

Note Tunneled IP packets will not be matched unless the tunneling protocol is also IP, and then the match applies to the outer IP header and not the encapsulated IP header.

SUMMARY STEPS

`DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_dscp

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match dscp af21, af32

. The standard DSCP values are shown in the “DSCP and Precedence Values” section.

keyword to match on values that do not match the specified range.

Step 4

switch(config-cmap-qos)# show class-map class_dscp

Displays the class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring IP Precedence Classification

You can classify traffic based on the precedence value in the Type of Service (TOS) byte field of the IP header. Precedence values can be found in the “DSCP and Precedence Values” section.

Note Tunneled IP packets will not be matched unless the tunneling protocol is also IP, and then the match applies to the outer IP header and not the encapsulated IP header.

SUMMARY STEPS

`DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_ip_precedence

switch(config-cmap-qos)#

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match precedence 1-2, 5-7

keyword to match on values that do not match the specified range.

Step 4

Example:

switch(config-cmap-qos)# show class-map class_ip_precedence

Displays the class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring QoS Group Classification

command as described in the “Creating a QoS Group Policy” section.

Note You match on the QoS group only in egress policies because its value is undefined until you set it in an ingress policy.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_qos_group

switch(config-cmap-qos)#

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match qos-group 4, 80-90

keyword to match on values that do not match the specified range.

Step 4

Example:

switch(config-cmap-qos)# show class-map class_qos_group

Displays the class map configuration for the specified traffic class name.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring Discard Class Classification

command as described in the “Creating a Discard Class Policy” section.

Note You match on the discard class only in egress policies because its value is undefined until you set it in an ingress policy.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

] class_map_name

switch(config)# class-map class_discard_class

switch(config-cmap-qos)#

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match discard-class 4, 60-62

switch(config-cmap-qos)#

keyword to match on values that do not match the specified range.

Step 4

Example:

switch(config-cmap-qos)# show class-map class_discard_class

switch(config-cmap-qos)#

Displays the specified class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring Layer 3 Packet Length Classification

You can classify Layer 3 traffic based on various packet lengths.

Note This feature is designed for IP packets only.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_packet_length

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match packet length 2000

keyword to match on values that do not match the specified range.

Step 4

Example:

switch(config-cmap-qos)# show class-map class_packet_length

switch(config-cmap-qos)#

Displays the specified class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring CoS Classification

You can classify traffic based on Class of Service (CoS) in the IEEE 802.1Q header. This 3-bit field is defined in IEEE 802.1p to support QoS traffic classes. CoS is encoded in the high order 3 bits of the VLAN ID Tag field and is referred to as user_priority.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_cos

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match cos 4, 5-6

keyword to match on values that do not match the specified range.

Step 4

Example:

switch(config-cmap-qos)# show class-map class_cos

switch(config-cmap-qos)#

Displays the specified class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring IP RTP Classification

. Although RTP does not use a common TCP or UDP port, you typically configure RTP to use ports 16384 to 32767. UDP communications uses an even port and the next higher odd port is used for RTP Control Protocol (RTCP) communications.

You can configure classification based on UDP port ranges, which are likely to target applications using RTP.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_rtp

switch(config-cmap-qos)#

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match ip rtp 2000-2100, 4000-4100

keyword to match on values that do not match the specified range.

Step 4

Example:

switch(config-cmap-qos)# show class-map class_rtp

switch(config-cmap-qos)#

Displays the specified class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring Class Map Classification

Use this procedure to classify traffic based on the match criteria in another class map.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

- The referenced class map must be created prior to its reference.

- You can reference the same class map in multiple policies.

- You can configure only one level of nesting of class maps. You cannot reference a class map that references another class map.

- Before you delete a referenced class map, you should delete all references to that class map.

- To perform a logical OR with the class map specified in the match class-map command, use the match-any keyword. The match-any or match-all specification of the matched class map is ignored.

- To perform a logical AND with the class map specified in the match class-map command, use the match-all keyword. The match-any or match-all specification of the matched class map is ignored.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# class-map class_class_map

Places you into Class Map QoS Configuration mode for the specified class map. Configures and saves the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

switch(config-cmap-qos)# match class-map class_map3

keyword to match on values that do not match the specified range.

Step 4

switch(config-cmap-qos)# show class-map class_class_map

switch(config-cmap-qos)#

Displays the specified class map configuration.

Step 5

switch(config-cmap-qos)# copy running-config startup-config

[######################################] 100%

switch(config-cmap-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Verifying the Classification Configuration

command to verify the classification configuration.

Command

Description

show class-map name

Displays the class map configuration for all class maps or for a specified class map.

Example:

n1000v(config)# show class-map class-dscpmatch

Type qos class-maps

====================

class-map type qos match-all class-dscpmatch

match dscp 12

n1000v(config)# show class-map cmap1

Type qos class-maps

====================

class-map type qos match-all cmap1

match dscp 10

match ip rtp 5000

n1000v(config-if)# show class-map combine1

Type qos class-maps

====================

class-map type qos match-all combine1

match not qos-group 100

match ip rtp 5000-5001

match not discard-class 63

match dscp 12

n1000v(config)# show ip access-lists ipaclprec

IP access list ipaclprec

statistics

10 permit ip 7.120.1.10/32 7.120.1.20/32 precedence critical

n1000v(config)# show class-map class-ipaclprec

Type qos class-maps

====================

class-map type qos match-all class-ipaclprec

match access-group name ipaclprec

Example Configuration

The following example shows how to configure classification for the class map named cmap1 which matches DSCP traffic AF21 and AF32:

n1000v(config)# class-map type qos match-all cmap1

n1000v(config-cmap-qos)# match dscp af21 af32

n1000v(config-cmap-qos)# exit

n1000v(config)#

Feature History for QoS Classification

This section provides the QoS Classification release history.

Feature Name

Releases

Feature Information

QoS Classification

4.0

This feature was introduced.

Configuring QoS Marking Policies

This chapter describes how to configure QoS marking policies to prioritize network traffic.

Information About Policy Maps

Policy maps prioritize network traffic by class. You create policy maps to define how to treat each class of traffic so that it is prioritizes for the best quality of service.

Marking is the process of marking packets, that is changing one of the following in the packet for QoS purposes:

- Differentiated services code point (DSCP)

- Precedence

- CoS

You can map a traffic class to a DSCP, an indicator of the service level for a specified frame. The DSCP value ranges from 0 to 63, and the default is 0. A DSCP value of 46 is disallowed.

Service policies are specified using policy maps. Policy maps provide an ordered mapping of class maps to service levels. You can specify multiple class maps within a policy map, and map a class map to a high, medium, or low service level. The default priority is low. The policy map name is restricted to 63 alphanumeric characters.

The order of the class maps within a policy map is important to determine the order in which the frame is compared to class maps. The first matching class map has the corresponding priority marked in the frame.

Figure 3-1 Packet fields that can be marked

Marking is the setting of QoS information that is related to a packet. You can set the value of standard QoS fields IP precedence, DSCP and Class of Service (CoS), and internal labels that can be used in subsequent actions such as policing.

Once your traffic classes are defined, you can reference them in the policy map where you also define how they should be marked. We recommend keeping the policy simple by using no more than four classes.

.

Table 3-1 Fields That Can be Marked

Field

Description

DSCP

Layer 3 Differentiated Service Code Point (DSCP).

Note If you mark DSCP, you cannot mark Discard Class.

IP precedence

Layer 3 IP precedence.

Note IP precedence uses only the lower 3 bits of the Type of Service (TOS) field. The device overwrites the first 3 bits of the TOS field to 0.

CoS

Layer 2 Class of Service (CoS).

QoS group

The range is from 0 to 126.

Discard class

The range is from 0 to 63.

Note If you mark Discard Class, you cannot mark DSCP.

Ingress and egress ports

The marking applies to incoming or outgoing packets.

Unless noted as a restriction, you can mark both incoming and outgoing packets.

Prerequisites for QoS Policies

Marking has the following prerequisites:

- You must have already classified your network traffic. For more information, see the “Configuring QoS Classification” section.

- You are already logged in to the CLI in EXEC mode.

Guidelines and Limitations

Use the following guidelines to configure marking:

- The set cos command is applicable only to 802.1Q interfaces, and you can only use it in egress policies.

- If you mark DSCP, you cannot mark Discard Class.

- If you mark Discard Class, you cannot mark DSCP.

- You can only use the set qos-group command in ingress policies.

- You can only use the set discard-class command in ingress policies.

- When designing your QoS and ACL policies, keep in mind that ACLs referenced within a QoS policy are processed as follows as part of the QoS policy:

– QoS ingress processing follows ACL processing.

– QoS egress processing precedes ACL egress processing.

Creating QoS Policies

This section includes the following topics:

- Creating a DSCP Policy

- Creating an IP Precedence Policy

- Creating a Class of Service Policy

- Creating a QoS Group Policy

- Creating a Discard Class Policy

- Creating Ingress and Egress Policies

- Marking the Port DSCP

Creating a DSCP Policy

Use this procedure to create a policy that marks the DSCP value in the IP header packet to prioritize traffic in a particular class.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

- DSCP is described in RFC 2475 .

- You are logged in to the CLI in EXEC mode.

- If you use DSCP marking, you cannot use Discard Class marking (see the “Creating a Discard Class Policy” section).

- You can mark the DSCP field as a numeric value between 0 and 63 or as one of the commonly used values listed in the “DSCP and Precedence Values” section.

SUMMARY STEPS

}

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

Places you into Policy Map QoS Configuration mode for the specified policy map and configures the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

}

switch(config-pmap)# class class1

switch(config-pmap-c-qos)#

In Policy Map QoS Configuration mode for the specified policy map, the named class map is referenced. You are then placed into Policy Map Class QoS Configuration mode for the specified class map. Changes are saved in the running configuration.

- The default is to reference a new class map at the end of the policy map.

- class-default : Selects all traffic not currently matched by classes in the policy map.

Step 4

switch(config-pmap-c-qos)# set dscp af31

switch(config-pmap-c-qos)#

In Policy Map Class QoS Configuration mode, defines the DSCP value that should be used in all IP headers for the specified class and saves it in the running configuration.

You can use a numeric value from 1 to 60, or one of the standard values from the “DSCP and Precedence Values” section.

In this example, the standard value of af31 is used.

Step 5

Example:

switch(config-pmap-c-qos)# show policy-map policy1

switch(config-pmap-c-qos)#

Displays the policy map configuration for the specified map name.

Step 6

switch(config-pmap-c-qos)# copy running-config startup-config

[######################################] 100%

switch(config-pmap-c-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Creating an IP Precedence Policy

You can mark IP Precedence to give priority to all packets in a particular traffic class.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

- You are logged in to the CLI in EXEC mode.

- Table 3-2 lists the RFC 791 precedence values from least to most important.

Table 3-2 Precedence Values

Value

Description

000 (0)

Routine or Best Effort

001 (1)

Priority

010 (2)

Immediate

011 (3)

Flash - mainly used for Voice Signaling or for Video.

100 (4)

Flash Override

101 (5)

Critical -mainly used for Voice RTP.

110 (6)

Internet

111 (7)

Network

SUMMARY STEPS

}

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

Places you into Policy Map QoS Configuration mode for the specified policy map and configures the map name in the running configuration.

Allowable characters: Up to 40 (alphabetic, hyphen, or underscore). Characters, are case sensitive.

Step 3

}

switch(config-pmap-qos)# class class1

switch(config-pmap-c-qos)#

In Policy Map QoS Configuration mode for the specified policy map, the named class map is referenced. You are then placed into Policy Map Class QoS Configuration mode for the specified class map. Changes are saved in the running configuration.

- The default is to add the new class map to the end of the policy map.

- class-default : Selects all traffic not currently matched by classes in the policy map.

Step 4

switch(config-pmap-c-qos)# set precedence 3

switch(config-pmap-c-qos)#

In Policy Map Class QoS Configuration mode, adds the precedence value that should be used in all packets for the specified traffic class. The change is saved in the running configuration.

.

Step 5

Example:

switch(config-pmap-c-qos)# show policy-map policy1

switch(config-pmap-c-qos)#

Displays the policy map configuration for the specified map name.

Step 6

switch(config-pmap-c-qos)# copy running-config startup-config

[######################################] 100%

switch(config-pmap-c-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Creating a Class of Service Policy

You can mark the CoS field in the IEEE 802.1Q header for all traffic in a specific class.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

- You are logged in to the CLI in EXEC mode.

- You can set CoS in ingress and egress policies.

SUMMARY STEPS

}

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

Places you into Policy Map QoS Configuration mode for the specified policy map and configures the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

}

switch(config-pmap-qos)# class class1

switch(config-pmap-c-qos)#

Places you into Policy Map Class QoS Configuration mode for the specified policy map. A reference is also created to the specified class map. Changes are saved in the running configuration.

- The default is to add the class map to the end of the map.

- class-default : Selects all traffic not currently matched by classes in the policy map.

Step 4

switch(config-pmap-c-qos)# set cos 3

switch(config-pmap-c-qos)#

. The value can range from 0 to 7. You can use this command only in egress policies.

Step 5

Example:

switch(config-pmap-c-qos)# show policy-map policy1

switch(config-pmap-c-qos)#

Displays the policy map configuration for the specified map name.

Step 6

switch(config-pmap-c-qos)# copy running-config startup-config

[######################################] 100%

switch(config-pmap-c-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Creating a QoS Group Policy

You can mark the locally-defined QoS group value.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

- You can mark the QoS group value only in ingress policies.

- You are logged in to the CLI in EXEC mode.

SUMMARY STEPS

}

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

Places you into Policy Map QoS Configuration mode for the specified policy map and configures the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

}

switch(config-pmap-qos)# class class1

switch(config-pmap-c-qos)#

Places you into Policy Map Class QoS Configuration mode for the specified policy map. A reference is also created to the specified class map. Changes are saved in the running configuration.

- The default is to add the class map to the end of the map.

- class-default : Selects all traffic not currently matched by classes in the policy map.

Step 4

switch(config-pmap-c-qos)# set qos-group 100

switch(config-pmap-c-qos)#

. The value can range from 0 to 126.

Step 5

Example:

switch(config-pmap-c-qos)# show policy-map policy1

switch(config-pmap-c-qos)#

Displays the policy map configuration for the specified map name.

Step 6

switch(config-pmap-c-qos)# copy running-config startup-config

[######################################] 100%

switch(config-pmap-c-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Creating a Discard Class Policy

Use this procedure to set a local internal label discard class policy.

BEFORE YOU BEGIN

- If you configure a local internal label discard class policy, you cannot create a DSCP policy

For more information about DSCP policies, see the Creating a DSCP Policy.

- You can set a discard class only in ingress policies.

- To reference the local discard class in a policy or in traffic classification use the match discard-class command.

For more information, see the Configuring Discard Class Classification.

SUMMARY STEPS

}

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

Places you into Policy Map QoS Configuration mode for the specified policy map and configures the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

}

switch(config-pmap-qos)# class class1

switch(config-pmap-c-qos)#

Places you into Policy Map Class QoS Configuration mode for the specified policy map. A reference is also created to the specified class map. Changes are saved in the running configuration.

- The default is to add the class map to the end of the map.

- class-default : Selects all traffic not currently matched by classes in the policy map.

Step 4

switch(config-pmap-c-qos)# set discard-class 40

switch(config-pmap-c-qos)#

. The value can range from 0 to 63.

Step 5

Example:

switch(config-pmap-c-qos)# show policy-map policy1

switch(config-pmap-c-qos)#

Displays the policy map configuration for the specified map name.

Step 6

switch(config-pmap-c-qos)# copy running-config startup-config

[######################################] 100%

switch(config-pmap-c-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Creating Ingress and Egress Policies

Use this procedure to attach a policy map to an interface or a port profile so that the marking instructions are applied to the ingress or egress packets.

BEFORE YOU BEGIN

- You already know the policy map and interface or port profile you want to use.

- The policy map you want to use is already defined.

Note You can attach only one input policy and one output policy to an interface or port profile.

SUMMARY STEPS

]}

]

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

Places you into Configuration mode for the specified Ethernet or Vethernet interface or port profile.

switch(config)# interface ethernet 1/1

switch(config-if)#

This example shows an Ethernet interface configuration.

switch(config)# port-profile accessprofile

switch(config-port-prof)#

This example shows a port profile configuration.

Step 3

[no-stats]

(Optional) Attaches a policy map name that will be added to the input or output packets of the interface or port profile.

Note You can attach only one input policy and one output policy to an interface or port profile.

switch(config-if)# service-policy input policy1

switch(config-if)#

This example shows an Ethernet interface configuration.

switch(config-port-prof)# service-policy input policy1

switch(config-port-prof)#

This example shows a port profile configuration.

Step 4

Example:

switch(config-pmap-c-qos)# show policy-map policy1

switch(config-pmap-c-qos)#

Displays the policy map configuration for the specified map name.

Step 5

switch(config-pmap-c-qos)# copy running-config startup-config

[######################################] 100%

switch(config-pmap-c-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Marking the Port DSCP

Use this procedure to mark the DSCP port for each class of traffic defined in a specified ingress or egress policy map.

BEFORE YOU BEGIN

- The default behavior is to preserve the DSCP value, or to trust DSCP. To make the port untrusted, change the DSCP value.

- Unless you configure a QoS policy and attach that policy to specified interfaces, the DSCP value is preserved.

Note You can attach only one input policy and one output policy to an interface or port profile.

SUMMARY STEPS

}

}

}

]}

]

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

Places you into Policy Map QoS Configuration mode for the specified policy map and configures the map name in the running configuration.

Allowable characters: Up to 40 alphabetic, hyphen, or underscore. Characters, are case sensitive.

Step 3

}

switch(config-pmap)# class class1

switch(config-pmap-c-qos)#

Places you into Policy Map Class QoS Configuration mode for the specified policy map. A reference is also created to the specified class map which is saved in the running configuration.

- The default is to add the class map to the end of the map.

- class-default : Selects all traffic not currently matched by classes in the policy map.

Step 4

switch(config-pmap-c-qos)# set dscp af31

switch(config-pmap-c-qos)#

Sets a DSCP value. Valid values are shown in the “DSCP and Precedence Values” section.

Step 5

exit

switch(config-pmap-c-qos)# exit

switch(config-pmap-qos)#

Returns you to Policy Map Configuration mode.

Step 6

}

switch(config-pmap-qos)# class class2

switch(config-pmap-c-qos)#

- In the policy map, creates a reference to the specified class map name , and then places you into Policy-map Class Configuration mode.

- Adds the class to the end of the policy map.

- Specify class-default to select all traffic not currently matched by classes in the policy map.

Step 7

switch(config-pmap-c-qos)# set dscp af13

switch(config-pmap-c-qos)#

.

Valid values are shown in the “DSCP and Precedence Values” section.

Step 8

exit

switch(config-pmap-c-qos)# exit

switch(config-pmap-qos)#

Returns to Policy Map Configuration mode.

Step 9

}

switch(config-pmap-qos)# class class-default

switch(config-pmap-c-qos)#

- Creates a reference to the specified class map .

- Places you into Policy Map Class Configuration mode.

- Adds the class to the end of the policy map.

- Specify class-default to select all traffic not currently matched by classes in policy map.

Step 10

switch(config-pmap-c-qos)# set dscp af22

switch(config-pmap-c-qos)#

. Valid values are shown in the “DSCP and Precedence Values” section.

Step 11

switch(config-pmap-c-qos)# exit

switch(config-pmap-qos)#

Returns you to Policy Map Configuration mode.

Step 12

switch(config-pmap)# exit

switch(config)#

Returns you to Global Configuration mode.

Step 13

Places you into Configuration mode for the specified Ethernet or Vethernet interface or port profile.

switch(config)# interface ethernet 1/1

switch(config-if)#

This example shows an Ethernet interface configuration.

switch(config)# port-profile accessprofile

switch(config-port-prof)#

This example shows a port profile configuration.

Step 14

[no-stats]

(Optional) Attaches a policy map name that will be added to the input or output packets of the interface or port profile.

Note You can attach only one input policy and one output policy to an interface or port profile.

switch(config-if)# service-policy input policy1

switch(config-if)#

This example shows an Ethernet interface configuration.

switch(config-port-prof)# service-policy input policy1

switch(config-port-prof)#

This example shows a port profile configuration.

Step 15

Example:

switch(config-pmap-c-qos)# show policy-map policy1

switch(config-pmap-c-qos)#

Displays the policy map configuration for the specified map name.

Step 16

switch(config-pmap-c-qos)# copy running-config startup-config

[######################################] 100%

switch(config-pmap-c-qos)#

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Verifying the Policy Configuration

Use the commands in this section to verify the policy configuration.

Command

Description

show policy-map [ type qos ] [ name policy_map_name ]

Display the policy map configuration.

Display the table map configuration.

Example 3-1 show policy-map policy_map_name

n1000v(config)# show policy-map policy-ipacl

Type qos policy-maps

====================

policy-map type qos policy-ipacl

class class-ipacl

set dscp 10

Example 3-2 show policy-map interface

n1000v# show policy-map interface brief

Interface/VLAN [Status]:INP QOS OUT QOS INP QUE OUT QUE

================================================================================

Vethernet1 [Active]: media

Vethernet10 [Active]: media

Vethernet13 [Active]:web_policer

Vethernet15 [Active]:iperf

Vethernet16 [Active]: iperf_policer

Vethernet17 [Active]:ixia_in ixia_out

Vethernet18 [Active]: media

Vethernet19 [Active]:iperf

Vethernet20 [Active]: iperf_policer

Vethernet21 [Active]:netperf_polic

================================================================================

Feature History for QoS Marking Policies

This section provides the QoS marking policies release history.

Feature Name

Releases

Feature Information

QoS Marking Policies

4.0

This feature was introduced.

Configuring QoS Policing

This chapter describes how to configure policing of traffic classes.

Information About Policing

Policing is the monitoring of data rates and burst sizes for a particular class of traffic.

QoS policing on a network determines whether network traffic is within a specified profile (contract). This may cause out-of-profile traffic to drop or to be marked down to another differentiated services code point (DSCP) value to enforce a contracted service level. DSCP is a measure of the QoS level of the frame. Figure 4-1shows policing conditions and types.

Figure 4-1 Policing Conditions and Types

The following conditions, are recognized and trigger action by the policer depending on the defined data rate:

Condition

Color

Description

Policer Action

(only one allowed per condition)

Conform

Green

The packet traffic data rate is within the defined boundaries.

The policer either transmits these packets as is, or changes the value in the header (DSCP, precedence, or CoS) and then transmits these packets.

Exceed

Yellow

The packet traffic data rate exceeds the defined boundary.

The policer can drop or markdown these packets.

Violate

Red

The packet traffic data rate violates the defined boundaries.

The policer can drop or markdown these packets.

You can define single-rate and dual-rate policers.

Single-rate policers monitor the specified committed information rate (CIR) of traffic. Dual-rate policers monitor both CIR and peak information rate (PIR) of traffic.

.

Prerequisites for Policing

Policing has the following prerequisites:

- You must be familiar with RFC 2698 .

- You are logged on to the CLI in EXEC mode.

Guidelines and Limitations

Use the following guideline to configure policing:

- Each module polices independently, which might affect a a policer applied to traffic distributed across more than one module, such as in the case of a port channel interface.

Configuring Policing

You can configure a single- or dual-rate policer.

This section includes the following topics:

- Configuring 1-Rate and 2-Rate, 2-Color and 3-Color Policing

- Configuring Ingress and Egress Policing

- Configuring Markdown Policing

- Verifying the Policing Configuration

Configuring 1-Rate and 2-Rate, 2-Color and 3-Color Policing

.

Note Specify the identical value for pir and cir to configure 1-rate 3-color policing.

Command

Argument

Description

is required, the argument itself is optional. The range of values is 1 to 80000000000; the range of policing values that are mathematically significant is 8000 to 80 Gbps.

Specifies the rate as a percentage of the interface rate. The range of values is 1 to 100%.

. The default is 200 milliseconds of traffic at the configured rate. The default data rate units are bytes, and the Gigabit per second (gbps) rate is not supported for this parameter.

Peak information rate, specified as a PIR bit rate or a percentage of the link rate. There is no default. The range of values is 1 to 80000000000; the range of policing values that are mathematically significant is 8000 to 80 Gbps. The range of percentage values is 1 to 100%.

value is not specified, the default is 200 milliseconds of traffic at the configured rate. The default data rate units are bytes, and the Gigabit per second (gbps) rate is not supported for this parameter.
before the device displays this argument.

. The default is transmit.

Single action to take if the traffic data rate exceeds the specified boundaries. The basic actions are drop or markdown. The default is drop.

Single action to take if the traffic data rate violates the configured rate values. The basic actions are drop or markdown. The default is drop.

.

Table 4-2 Policer Types and Actions

Police Arguments Present

Policer Type

Policer Action

1-rate, 2-color

1-rate, 3-color

.

2-rate, 3-color

.

Table 4-3 Policer Actions for Exceed or Violate

Action

Description

Drops the packet. This is only available when the packet exceeds or violates the parameters.

}

Sets the specified fields from a table map and transmits the packet. For more information on the system-defined, or default table maps, see Chapter3, “Configuring QoS Marking Policies” This is available only when the packet exceeds the parameters (use the cir-markdown-map) or violates the parameters (use the pir-markdown-map).

Table 4-4 Policer Actions for Conform

Action

Description

Transmits the packet. This is available only when the packet conforms to the parameters.

Sets the IP precedence field to a specified value and transmits the packet. This is available only when the packet conforms to the parameters.

Sets the DSCP field to a specified value and transmits the packet. This is available only when the packet conforms to the parameters

Sets the CoS field to a specified value and transmits the packet. This is available only when the packet conforms to the parameters

Sets the QoS group internal label to specified value and transmits the packet. This action can be used only in input policies and is available only when the packet conforms to the parameters

Sets the discard-class internal label to a specified value and transmits the packet. This action can be used only in ingress policies and is available only when the packet conforms to the parameters

Note The policer can only drop or markdown packets that exceed or violate the specified parameters. See Chapter 3, “Configuring QoS Marking Policies” for information on marking down packets.

.

Table 4-5 The Data Rates for the police Command

Rate

Description

Bits per second (default)

1,000 bits per seconds

1,000,000 bits per second

1,000,000,000 bits per second

.

Table 4-6 Burst Sizes for the police Command

Speed

Description

bytes

1,000 bytes

1,000,000 bytes

milliseconds

microseconds

SUMMARY STEPS

Note Specify the identical value for pir and cir to configure 1-rate 3-color policing.

}

}}]]}

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

and then enters policy-map mode. The policy-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters.

Step 3

}

switch(config-pmap-qos)# class class-default

switch(config-pmap-c-qos)#

to select all traffic that is not matched by classes in the policy map so far.

Step 4

}}]]]

.

switch(config-pmap-c-qos)# police cir 256000 conform transmit violate set dscp dscp table pir-markdown-map

switch(config-pmap-c-qos)#

This first example shows a 1-rate, 2-color policer that transmits if the data rate is within 200 milliseconds of traffic at 256000 bps and marks DSCP to the values that are configured in table map if the data rate is violated.

switch(config-pmap-c-qos)# police cir 256000 pir 256000 conform transmit exceed set dscp dscp table cir-markdown-map violate drop

switch(config-pmap-c-qos)#

This second example shows a 1-rate, 3-color policer that transmits if the data rate is within 200 milliseconds of traffic at 256000 bps, and marks DSCP to the values that are configured in table map if the data rate is violated.

Step 5

]

switch(config-pmap-c-qos)# show policy-map

(Optional) Displays information about all configured policy maps or a selected policy map of type QoS.

Step 6

switch(config-pmap-c-qos)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Configuring Ingress and Egress Policing

command, see the Creating Ingress and Egress Policies.

Configuring Markdown Policing

.

The example in this section shows you how to use a table map to perform markdown.

SUMMARY STEPS

}

}]]}}

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# policy-map policy1

switch(config-pmap-qos)#

and then enters policy-map mode. The policy-map name can contain alphabetic, hyphen, or underscore characters, is case sensitive, and can be up to 40 characters.

Step 3

}

switch(config-pmap-qos)# class class-default

switch(config-pmap-c-qos)#

to select all traffic not matched by classes in the policy map so far.

Step 4

]]]

.

switch(config-pmap-c-qos)# police cir 256000 be 300 ms conform transmit exceed set dscp dscp table cir-markdown-map violate drop

switch(config-pmap-c-qos)#

This example shows a 1-rate, 3-color policer that transmits if the data rate is within 300 milliseconds of traffic at 256000 bps; marks down DSCP using the system-defined table map if the data rate is within 300 milliseconds of traffic at 256000 bps; and drops packets otherwise.

Step 5

]

switch(config-pmap-c-qos)# show policy-map

(Optional) Displays information about the policy map configuration.

Step 6

switch(config-pmap-c-qos)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Verifying the Policing Configuration

command to verify the policing configuration.

Displays information about policy maps and policing.

Example Configurations

The following are examples of how to configure policing:

Example 4-1 1-rate, 2-color policer

config t

policy-map policy1

class one_rate_2_color_policer

police cir 256000 conform transmit violate drop

Example 4-2 1-rate, 2-color policer with DSCP markdown

config t

policy-map policy2

class one_rate_2_color_policer_with_dscp_markdown

police cir 256000 conform set-dscp-transmit af11 violate set dscp dscp table pir-markdown-map

Example 4-3 1-rate, 3-color policer

config t

policy-map policy3

class one_rate_3_color_policer

police cir 256000 pir 256000 conform transmit exceed set dscp dscp table cir-markdown-map violate drop

Feature History for QoS Policing

This section provides the QoS policing release history.

Feature Name

Releases

Feature Information

QoS Policing

4.0

This feature was introduced.

Monitoring QoS Statistics

This chapter describes how to enable, display, and clear QoS statistics.

Information about QoS Statistics

command. Statistics are enabled by default and can be disabled globally.

Prerequisites for Monitoring QoS Statistics

Monitoring QoS statistics has the following prerequisites:

- You are logged in to the CLI in EXEC mode.

Enabling Statistics

You can enable or disable QoS statistics for all interfaces on the device.

BEFORE YOU BEGIN

- By default, QoS statistics are enabled.

SUMMARY STEPS

DETAILED STEPS

Command

Purpose

Step 1

switch# config t

switch(config)#

Places you into CLI Global Configuration mode.

Step 2

switch(config)# qos statistics

Enables QoS statistics on all interfaces.

Step 3

switch(config)# show policy-map interface

(Optional) Displays the statistics status and the configured policy maps on all interfaces.

Step 4

switch(config)# copy running-config startup-config

(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration.

Displaying Statistics

Use this procedure to display QoS statistics for an interface.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

- You know the interface for which statistics are needed.

Note Statistics for individual interfaces are often the most useful.

SUMMARY STEPS

] | type qos}

DETAILED STEPS

Command

Purpose

Step 1

}

switch# show policy-map interface ethernet 2/1

Displays the specified statistics.

To achieve the best result when your system has a large number of policies, use this command with specific arguments, such as specifying a particular interface or port channel.

- interface: Show service policy on interface

: Use this option to get a brief report of all policies attached to interfaces.

: Use this option to get statistics for an Ethernet IEEE 802.3z interface.

: Use this option to get statistics for QoS input policies.

: Use this option to get statistics for QoS output policies.

: Use this option to get statistics for a Port Channel interface.

: Use this option to get statistics for a Virtual Ethernet interface.

- type qos: Type of the policy-map

Clearing Statistics

Use this procedure to clear QoS statistics.

SUMMARY STEPS

}

DETAILED STEPS

Command

Purpose

Step 1

]}

switch# clear qos statistics type qos

Clears the specified QoS statistics.

Example Policy Map Statistics

The following examples show statistics for a policy map.

n1000v(config)# show policy-map interface

Global statistics status : enabled

Vethernet3

Service-policy (qos) input: new-policy

policy statistics status: enabled

Class-map (qos): class-default (match-any)

59610700 packets

set prec 5

Vethernet5

Service-policy (qos) output: new-policer

policy statistics status: enabled

Class-map (qos): new-class (match-all)

344661013 packets

Match: precedence 5

police cir 900 mbps bc 200 ms

conformed 505953339796 bytes, 899924196 bps action: transmit

violated 12285218014 bytes, 22283000 bps action: drop

n1000v(config)# show ip access-lists protoacl

IP access list protoacl

statistics per-entry

10 permit icmp 7.120.1.10/32 7.120.1.20/32

20 permit tcp 7.120.1.10/32 7.120.1.20/32 dscp af11

30 permit udp 7.120.1.10/32 7.120.1.20/32 precedence critical

50 permit ip 7.120.1.20/32 7.120.1.10/32

60 permit ip 7.120.1.20/32 7.120.1.10/32 dscp af11

70 permit ip 7.120.1.20/32 7.120.1.10/32 precedence critical

n1000v(config)# show class-map class-protoacl

Type qos class-maps

====================

class-map type qos match-any class-protoacl

match access-group name protoacl

n1000v(config)# show policy-map policy-protoacl

Type qos policy-maps

====================

policy-map type qos policy-proto acl

class class-protoacl

set qos-group 100

n1000v(config)# show policy-map interface vethernet 3

Global statistics status : enabled

Vethernet3

Service-policy (qos) input: policy-protoacl

policy statistics status: enabled

Class-map (qos): class-protoacl (match-any)

132 packets

Match: access-group protoacl

132 packets

set qos-group 100

Example Policer Statistics

The following examples show policer statistics.

n1000v# show policy-map interface

Global statistics status : enabled

port-channel1

Service-policy (qos) output: new-policer

policy statistics status: enabled

Class-map (qos): newsched (match-all)

468595 packets

Match: dscp 10

police cir 900 mbps bc 200 ms

conformed 3508440746 bytes, 896840681 bps action: transmit

violated 56543498 bytes, 14453859 bps action: drop

n1000v# show policy-map interface

Global statistics status : enabled

Vethernet3

Service-policy (qos) input: 2r3c

policy statistics status: enabled

Class-map (qos): class-default (match-any)

123934 packets

police cir 200 mbps bc 200 ms pir 250 mbps be 200 ms

conformed 514043776 bytes, 197547687 bps action: transmit

exceeded 130494776 bytes, 50149311 bps action: set dscp dscp table cir-markdown-map

violated 67752080 bytes, 26037211 bps action: drop

Additional References

For additional information related to implementing system-level HA features, see the following sections:

- Related Documents

- Standards

- MIBs

- RFCs

- Technical Assistance

Related Documents

Related Topic

Document Title

QoS Classification

“Configuring QoS Classification” section

QoS Policies and Marking

“Configuring QoS Marking Policies” section

QoS Overview

“Overview” section

QoS Policing

“Configuring QoS Policing” section

Configuring ACLs

Cisco Nexus 1000V commands

Standards

Standards

Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.

—

MIBs

MIBs

MIBs Link

- CISCO-PROCESS-MIB

To locate and download MIBs, go to the following URL:

RFCs

RFCs

Title

No RFCs are supported by this feature

—

Technical Assistance

Description

Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

Feature History for QoS Statistics

This section provides the QoS statistics release history.

Feature Name

Releases

Feature Information

QoS Statistics

4.0

This feature was introduced.

DSCP and Precedence Values

This section provides the DSCP and precedence values used in QoS class maps and policy maps.

Commonly Used DSCP Values

Unless noted as a restriction, you can mark both incoming and outgoing packets.

.

Table 6-1 Commonly Used DSCP Values

DSCP Value

Decimal Value

Meaning

Drop Probability

Equivalent IP Precedence Value

101 110

46

High Priority

Expedited Forwarding (EF)

N/A

101 - Critical

000 000

0

Best Effort

N/A

000 - Routine

001 010

10

AF11

Low

001 - Priority

001 100

12

AF12

Medium

001 - Priority

001 110

14

AF13

High

001 - Priority

010 010

18

AF21

Low

010 - Immediate

010 100

20

AF22

Medium

010 - Immediate

010 110

22

AF23

High

010 - Immediate

011 010

26

AF31

Low

011 - Flash

011 100

28

AF32

Medium

011 - Flash

011 110

30

AF33

High

011 - Flash

100 010

34

AF41

Low

100 - Flash Override

100 100

36

AF42

Medium

100 - Flash Override

100 110

38

AF43

High

100 - Flash Override

001 000

8

CS1

1

010 000

16

CS2

2

011 000

24

CS3

3

100 000

32

CS4

4

101 000

40

CS5

5

110 000

48

CS6

6

111 000

56

CS7

7

000 000

0

Default

101 110

46

EF

IP Precedence Values

precedence values from least to most important.

Table 6-2 Precedence Values

Value

Description

000 (0)

Routine or Best Effort

001 (1)

Priority

010 (2)

Immediate

011 (3)

Flash - mainly used for Voice Signaling or for Video.

100 (4)

Flash Override

101 (5)

Critical -mainly used for Voice RTP.

110 (6)

Internet

111 (7)

Network

QoS Configuration Limits

shows the maximum configuration limits for QoS.

Table 7-1 QoS Maximum Configuration Limits

QoS feature

Maximum Limit

Match criteria per class-map

32

Class-maps per policy map

64

Class-maps per server

64 (with policers)

Policy-maps per server

16

Service Policies per server

128

Cisco Nexus 1000V Quality of Service

Configuration Guide, Release 4.0(4)SV1(1)

November 25, 2009

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 WITH THE 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 version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS” WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM 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, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

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: 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 partnership relationship between Cisco and any other company. (1110R)

Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.

Cisco Nexus 1000V Quality of Service Configuration Guide, Release 4.2(1) SP1(5.1)

© 2009-2016 Cisco Systems, Inc. All rights reserved.