QoS Group Match and Set for Classification and Marking

This feature provides the capability of matching and classifying traffic on the basis of the QoS group value.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature 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 each feature 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.

Prerequisites for QoS Group Match and Set for Classification and Matching

When configuring this feature, you must first create a policy map (sometimes referred to as a service policy or a traffic policy) using the Modular QoS CLI (MQC). Therefore, you should be familiar with the procedure for creating a policy map using the MQC. For more information about creating a policy map (traffic policy) using the MQC, see the “Applying QoS Features Using the MQC” module.

Restrictions for QoS Group Match and Set for Classification and Marking

A policy map containing the set qos-group command can only be attached as an input traffic policy. QoS group values are not usable for traffic leaving a device.

Information About QoS Group Match and Set for Classification and Marking

QoS Group Values

The QoS group value is a number between 0 and 99 that is set using the set qos-group command. The group value can be used to classify packets into QoS groups based on a prefix, autonomous system, and community string. A packet is marked with a QoS group value only while it is being processed within the device. The QoS group value is not included in the packet’s header when the packet is transmitted over the output interface. However, the QoS group value can be used to set the value of a Layer 2 or Layer 3 field that is included as part of the packet’s headers (such as the MPLS EXP, CoS, and DSCP fields).

MQC and Traffic Classification and Marking Based on QoS Group Value

Use the MQC to enable packet classification and marking based on the QoS group value. The MQC is a CLI that allows you to create traffic classes and policies, enable a QoS feature (such as packet classification), and attach these policies to interfaces.

In the MQC, the class-map command is used to define a traffic class that is used to classify traffic (which is then associated with a traffic policy).

The MQC consists of the following three processes:

  • Defining a traffic class using the class-map command.

  • Creating a traffic policy by associating the traffic class with one or more QoS features (using the policy-map command).

  • Attaching the traffic policy to the interface using the service-policy command.

A traffic class contains three major elements: a name, one or more match commands, and, if more than one match command exists in the traffic class, an instruction on how to evaluate these match commands. The traffic class is named in the class-map command line; for example, if you enter the class-map cisco command while configuring the traffic class in the CLI, the traffic class would be named “cisco.”

The match commands are used to specify various criteria for classifying packets. Packets are checked to determine whether they match the criteria specified in the match commands. If a packet matches the specified criteria, that packet is considered a member of the class and is forwarded according to the QoS specifications set in the traffic policy. Packets that fail to meet any of the matching criteria are classified as members of the default traffic class.

A policy map also contains three major elements: a name, a traffic class to associate with one or more QoS features, and any individual set commands you want to use to mark the network traffic.

How to Configure QoS Group Match and Set for Classification and Marking

Configuring the Class Map to Match on the QoS Group Value

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. class-map class-map-name
  4. match qos-group qos-group-value
  5. end

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

class-map class-map-name

Example:


Device(config)# class-map class1

Specifies the name of the class map to be created and enters class-map configuration mode.

Step 4

match qos-group qos-group-value

Example:


Device(config-cmap)# match qos-group 30

Configures the class map to match traffic on the basis of the QoS group value.

  • Enter the exact value from 0 to 99 used to identify a QoS group value.

Step 5

end

Example:


Device(config-cmap)# end

(Optional) Exits class-map configuration mode and returns to privileged EXEC mode.

Creating a Policy Map Using the QoS Group Value

The following example shows how to create a policy map (policy1) using a pre-configured class (class1) and how to set the QoS group value based on the packet’s original 802.1P CoS value.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. policy-map policy-map-name
  4. class {class-name | class-default }
  5. set qos-group cos
  6. end
  7. show policy-map
  8. show policy-map policy-map class class-name
  9. exit

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

policy-map policy-map-name

Example:


Device(config)# policy-map policy1

Specifies the name of the policy map created earlier and enters policy-map configuration mode.

Step 4

class {class-name | class-default }

Example:


Device(config-pmap)# class class1

Specifies the name of the class whose policy you want to create and enters policy-map class configuration mode. This class is associated with the class map created earlier.

  • Enter the name of the class or enter the class-default keyword.

Step 5

set qos-group cos

Example:

Device(config-pmap-c)# set qos-group cos

Sets the QoS group value based on the packet’s original 802.1P CoS value.

Step 6

end

Example:


Device(config-pmap-c)# end

Returns to privileged EXEC mode.

Step 7

show policy-map

Example:


Device# show policy-map

(Optional) Displays all configured policy maps.

Step 8

show policy-map policy-map class class-name

Example:


Device# show policy-map policy1 class class1

(Optional) Displays the configuration for the specified class of the specified policy map.

Step 9

exit

Example:


Device# exit

(Optional) Exits privileged EXEC mode.

Attaching the Policy Map to an Interface

Before you begin

Before attaching the policy map to an interface, the policy map must be created using the MQC.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. interface type number
  4. pvc [name ] vpi / vci [ilmi | qsaal | smds ]
  5. service-policy {input | output } policy-map-name
  6. end

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

interface type number

Example:


Device(config)# interface serial4/0/0 

Configures an interface (or subinterface) type and enters interface configuration mode

Step 4

pvc [name ] vpi / vci [ilmi | qsaal | smds ]

Example:


Device(config-if)# pvc cisco 0/16 ilmi

(Optional) Creates or assigns a name to an ATM PVC, specifies the encapsulation type on an ATM PVC, and enters ATM VC configuration mode.

Note 

This step is required only if you are attaching the policy map to an ATM PVC. If you are not attaching the policy map to an ATM PVC, skip this step.

Step 5

service-policy {input | output } policy-map-name

Example:


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

Example:


Device(config-if-atm-vc)# service-policy input policy1

Specifies the name of the policy map to be attached to either the input or output direction of the interface.

Note 

Policy maps can be configured on ingress or egress devices. They can also be attached in the input or output direction of an interface. The direction (input or output) and the device (ingress or egress) to which the policy map should be attached vary according your network configuration. When using the service-policy command to attach the policy map to an interface, be sure to choose the device and the interface direction that are appropriate for your network configuration.

Step 6

end

Example:


Device(config-if)# end

Example:


Device(config-if-atm-vc)# end

(Optional) Exits interface configuration or ATM VC configuration mode and returns to privileged EXEC mode.

Configuration Examples for QoS Group Match and Set for Classification and Marking

Example: QoS Group Match and Set for Classification and Marking

The following example shows how to create a class map and policy map for QoS group values, and how to attach the policy to an interface.

Device> enable
Device# configure terminal
Device(config)# class-map class1
Device(config-cmap)# match qos-group 30
Device(config-cmap)# exit
Device(config)# policy-map policy1
Device(config-pmap)# class class1
Device(config-pmap-c)# set qos-group cos
Device(config-pmap-c)# exit
Device(config-pmap)# exit
Device(config)# interface serial4/0/0 
Device(config-if)# service-policy input policy1
Device(config-if)# end
      

Additional References for QoS Group Match and Set for Classification and Marking

Related Documents

Related Topic

Document Title

Cisco commands

Cisco IOS Master Command List, All Releases

QoS commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples

Cisco IOS Quality of Service Solutions Command Reference

Classifying network traffic

“Classifying Network Traffic” module

MQC

“Applying QoS Features Using the MQC” module

Marking network traffic

“Marking Network Traffic” module

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html

Feature Information for QoS Group Match and Set for Classification and Marking

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

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 1. Feature Information for QoS Group Match and Set for Classification and Marking

Feature Name

Releases

Feature Information

QoS Group Match and Set for Classification and Marking

Cisco IOS XE Release 2.1

Cisco IOS XE Release 3.2SE

This feature provides the capability of matching and classifying traffic on the basis of the QoS group value.

The following commands were introduced or modified: match qos-group , set qos-group .