Cisco IOS Quality of Service Solutions Configuration�Guide, Release�12.2
Configuring Class-Based Packet Marking
Downloads: This chapterpdf (PDF - 165.0KB) | Feedback

Configuring Class-Based Packet Marking

Table Of Contents

Configuring Class-Based Packet Marking

Class-Based Packet Marking Configuration Task List

Configuring an IP Precedence Value

Configuring an IP DSCP Value

Configuring a QoS Group Value

Configuring a Class of Service Value

Changing an ATM Cell Loss Priority Bit Setting

Verifying the Class-Based Packet Marking Feature

Class-Based Packet Marking Configuration Examples

Configuring an IP Precedence Value Example

Configuring an IP DSCP Value Example

Configuring a QoS Group Value Example

Configuring a Classifying CoS Values Example

Changing the ATM CLP Value Example


Configuring Class-Based Packet Marking


This chapter describes the tasks for configuring the Class-Based Packet Marking feature.

For complete conceptual information, see the section "Class-Based Packet Marking" in the "Classification Overview" chapter in this book.

For a complete description of the Class-Based Packet Marking commands in this chapter, refer to the Cisco IOS Quality of Service Solutions Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online.

To identify the hardware platform or software image information associated with a feature, use the Feature Navigator on Cisco.com to search for information about the feature or refer to the software release notes for a specific release. For more information, see the "Identifying Supported Platforms" section in the "Using Cisco IOS Software" chapter in this book.

Class-Based Packet Marking Configuration Task List

To configure the Class-Based Packet Marking feature, perform the tasks described in the following sections. Although all of the tasks in the sections are optional, you must either configure an IP Precedence value or an IP differentiated services code point (DSCP) value (the tasks in the first or second section).

Configuring an IP Precedence Value (Optional)

Configuring an IP DSCP Value (Optional)

Configuring a QoS Group Value (Optional)

Configuring a Class of Service Value (Optional)

Changing an ATM Cell Loss Priority Bit Setting (Optional)

Verifying the Class-Based Packet Marking Feature (Optional)

This task list includes the instructions for configuring either an IP Precedence value or an IP DSCP value. However, other match criteria can be used used as well. For information about other match criteria, see the section "Creating a Traffic Class" in the chapter "Configuring the Modular Quality of Service Command-Line Interface" in this book.

See the end of this chapter for the section "Class-Based Packet Marking Configuration Examples."

Configuring an IP Precedence Value

To mark a packet by setting the IP Precedence bits in the ToS byte, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# policy-map policy-name

Specifies the name of the service policy to configure.

Step 2 

Router(config-pmap)# class class-name

Specifies the name of a predefined class, which was defined with the class-map command, included in the service policy.

Step 3 

Router(config-pmap-c)# set ip precedence ip-precedence-value

Specifies the IP precedence of packets within a traffic class. The ip-precedence-value is in the range from 0 to 7.

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Configuring an IP DSCP Value

To mark a packet by setting the IP DSCP value, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# policy-map policy-name

Specifies the name of the service policy to configure.

Step 2 

Router(config-pmap)# class class-name

Specifies the name of a predefined class, which was defined with the class-map command, included in the service policy.

Step 3 

Router(config-pmap-c)# set ip dscp ip-dscp-value

Specifies the IP DSCP value of packets within a traffic class. The number is in the range from 0 to 63.

Reserved keywords such as EF (expedited forwarding) and AF11 (assured forwarding class AF11) can be specified instead of numeric values.

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Configuring a QoS Group Value

To associate a local QoS group value with a packet, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# policy-map policy-name

Specifies the name of the service policy to configure.

Step 2 

Router(config-pmap)# class class-name

Specifies the name of a predefined class, which was defined with the class-map command, included in the service policy.

Step 3 

Router(config-pmap-c)# set qos-group qos-group-value

Specifies a QoS group value to associate with the packet. The number is in the range from 0 to 99.

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Configuring a Class of Service Value

To mark a packet with a specific class of service (CoS) value, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# policy-map policy-name

Specifies the name of the service policy to configure.

Step 2 

Router(config-pmap)# class class-name

Specifies the name of a predefined class, which was defined with the class-map command, included in the service policy.

Step 3 

Router(config-pmap-c)# set cos cos-value

Specifies a CoS value or values to associate with the packet. The number is in the range from 0 to 7.

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.


Note A service policy that contains the set cos command can only be attached as an output service policy. The set cos command cannot be applied to packets entering an interface.


Changing an ATM Cell Loss Priority Bit Setting

To set the Cell Loss Priority (CLP) bit to 1 on all packets matching a specified class, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# policy-map policy-name

Specifies the name of the policy map to configure.

Step 2 

Router(config-pmap)# class class-name

Specifies the name of a predefined class included in the service policy.

Step 3 

Router(config-pmap-c)# set atm-clp

Changes the ATM CLP bit setting for all packets matching the specified class from 0 to 1.

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Verifying the Class-Based Packet Marking Feature

To verify the Class-Based Packet Marking feature, display the configuration of a policy map, and retrieve information regarding QoS packet marking features that are configured in policy-map configuration mode, use the following commands in EXEC mode, as needed:

Command
Purpose

Router# show policy-map

Displays all configured policy maps.

Router# show policy-map policy-map-name

Displays the user-specified policy map.

Router# show policy-map interface

Displays statistics and configurations of all input and output policies attached to an interface.

Router# show policy-map interface interface-spec

Displays configuration and statistics of the input and output policies attached to a particular interface.

Router# show policy-map interface interface-spec [input]

Displays configuration and statistics of the input policy attached to an interface.

Router# show policy-map interface interface-spec [output]

Displays configuration and statistics of the output policy attached to an interface.

Router# show policy-map interface-spec [input | output] [class class-name]

Displays the configuration and statistics for the class name configured in the policy.


Class-Based Packet Marking Configuration Examples

The following sections provide Class-Based Packet Marking configuration examples:

Configuring an IP Precedence Value Example

Configuring an IP DSCP Value Example

Configuring a QoS Group Value Example

Configuring a Classifying CoS Values Example

Changing the ATM CLP Value Example

For information on how to configure Class-Based Packet Marking, see the section "Class-Based Packet Marking Configuration Task List" in this chapter.

Configuring an IP Precedence Value Example

In the following example, a service policy called policy1 is created. This service policy is associated to a previously defined classification policy through the use of the class command. This example assumes that a classification policy called class1 was previously configured.

In the following example, the IP Precedence bit in the Type of Service (ToS) byte is set to 1:

Router(config)# policy-map policy1 
Router(config-pmap)# class class1 
Router(config-pmap-c)# set ip precedence 1

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Configuring an IP DSCP Value Example

In the following example, a service policy called policy1 is created. This service policy is associated to a previously defined classification policy through the use of the class command. This example assumes that a classification policy called class1 was previously configured.

In the following example, the IP DSCP value in the ToS byte is set to 5:

Router(config)# policy-map policy1 
Router(config-pmap)# class class1 
Router(config-pmap-c)# set ip dscp 5

Router(config-pmap-c)# class class2 
Router(config-pmap-c)# set ip dscp ef

After you configure the settings shown for voice packets at the edge, all intermediate routers are configured to provide low latency treatment to the voice packets, as follows:

Router(config)# class-map voice
Router(config-cmap)# match ip dscp ef
Router(config)# policy qos-policy
Router(config-pmap)# class voice
Router(config-pmap-c)# priority 24

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Configuring a QoS Group Value Example

In the following example, a service policy called policy1 is created. This service policy is associated to a previously defined classification policy through the use of the class command. This example assumes that a classification policy called class1 was previously configured.

In the following example, the QoS group value is set to 4:

Router(config)# policy-map policy1 
Router(config-pmap)# class class1 
Router(config-pmap-c)# set qos-group 4

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Configuring a Classifying CoS Values Example

In the following example, a service policy called policy1 is created. This service policy is associated to a previously defined classification policy through the use of the class command. This example assumes that a classification policy called class1 was previously configured.

In the following example, the CoS value is set to 5:

Router(config)# policy-map policy1 
Router(config-pmap)# class class1 
Router(config-pmap-c)# set cos 5

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.

Changing the ATM CLP Value Example

In the following example, a service policy called policy1 is created. This service policy is associated to a previously defined classification policy through the use of the class command. This example assumes that a classification policy called class1 was previously configured.

In this example, all packets with IP Precedence values of 0 or 1 are sent with the CLP bit set to 1:

Router(config)# policy-map policy1
Router(config-pmap)# class class1
Router(config-pmap-c)# set atm-clp

The service policy configured in this section is not yet attached to an interface. For information on attaching a service policy to an interface, see the chapter "Modular Quality of Service Command-Line Interface Overview" in this book.