Quality of Service Packet Marking

Table of Contents

Quality of Service Packet Marking
Feature Overview
Supported Platforms
Supported Standards, MIBs, and RFCs
Prerequisites
Configuration Tasks
Monitoring and Maintaining Quality of Service Packet Marking
Configuration Examples
Command Reference
set ip dscp
set ip precedence
set qos-group
Glossary

Quality of Service Packet Marking


This document describes the Quality of Service (QoS) Packet Marking feature. It includes information on the benefits of the new feature, supported platforms, related documents, and so on.

This document includes the following sections:

Feature Overview

The QoS Packet Marking feature provides users with a user-friendly command-line interface for efficient packet marking by which users can differentiate packets by designating them different identifying values. The QoS Packet Marking feature allows users to perform the following tasks:

  • Mark packets by setting the IP precedence bits or the IP differentiated services code point (DSCP) in the Type of Service (ToS) byte.
  • Associate a local QoS group value with a packet.

After setting the IP precedence bits or the IP DSCP, a user can classify a packet based on the IP precedence bit or IP DSCP value. These classifications are then used to apply user-defined differentiated QoS services to the packet.

Associating a packet with a local QoS group allows users to associate a group ID with a packet. The group ID can be used to classify packets into QoS groups based on prefix, autonomous system, and community string.

A user can assign up to 8 IP precedence markings, 64 IP DSCP markings, and 100 QoS group markings.

The QoS Packet Marking feature is configured with the Modular Quality of Service Command-Line Interface (Modular QoS CLI). For additional information on the Modular QoS CLI, see the Modular Quality of Service Command-Line Interface document on CCO and the Documentation CD-ROM.

Benefits

Packet Marking Through IP Precedence, QoS Group, and DSCP Value Setting

Packet marking allows you to partition your network into multiple priority levels or classes of service (CoS).

  • Use QoS packet marking to set the IP precedence or DSCP values for packets entering the network. Networking devices within your network can then use the adjusted IP precedence values to determine how the traffic should be treated. For example, distributed weighted random early detection (DWRED) uses IP precedence values to determine the probability that a packet will be dropped.
  • Use QoS packet marking to assign packets to a QoS group. The router uses the QoS group to determine how to prioritize packets for transmission.

Restrictions

  • The QoS Packet Marking feature can only mark packets traveling on Cisco Express Forwarding (CEF) switching paths. In order to use the QoS Packet Marking feature, Cisco Express Forwarding must be configured on both the interface receiving the packet and the interface sending the packet.
  • QoS packet marking can be configured on an interface or a subinterface.
  • QoS packet marking is not supported on the following interfaces:
    • Fast EtherChannel
    • Tunnel
    • PRI
    • Any interface that does not support Cisco Express Forwarding

Related Features and Technologies

  • Modular QoS Command-Line Interface
  • Cisco Express Forwarding

Related Documents

  • Modular Quality of Service Command-Line Interface
  • Cisco Express Forwarding feature module

Supported Platforms

  • Cisco 7100 series
  • Cisco 7200 series
  • Cisco 7500 series with a Versatile Interface Processor (VIP)

Supported Standards, MIBs, and RFCs

Standards

None

MIBs

None

For descriptions of supported MIBs and how to use MIBs, see the Cisco MIB web site on CCO at http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml.

RFCs

None

Prerequisites

Cisco Express Forwarding (CEF) must be configured on the interface before QoS packet marking can be used.

For additional information on Cisco Express Forwarding, see the Cisco Express Forwarding and Distributed Cisco Express Forwarding feature modules.

Configuration Tasks

See the following sections for configuration tasks for the QoS Packet Marking feature.

Configuring an IP Precedence Value

To mark a packet by setting the IP precedence bit in the Type of Service (ToS) byte, perform the following tasks:

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 number

Specifies the IP precedence of packets within a traffic class. The number is in the range 0 to 7.

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Configuring an IP DSCP Value

To mark a packet by setting the IP differentiated services code point (DSCP), perform the following tasks:

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 of packets within a traffic class. The number is in the range 0 to 63.

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Configuring a QoS Group Value

To associate a local Quality of Service group value with a packet, perform the following steps:

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 group-id

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

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Monitoring and Maintaining Quality of Service Packet Marking

Use the show policy-map [interface [interface-spec [input | output [class class-name]]]] command to display the configuration of a policy map and to retrieve information regarding QoS packet marking features that are configured in policy map configuration mode.

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, which are 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 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.

Configuration Examples

This section provides the following configuration examples:

  • Configuring an IP Precedence Value
  • Configuring an IP DSCP Value
  • Configuring a Quality of Service Group Value

Configuring an IP Precedence Value

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, the IP precedence bit in the ToS byte is set to 3.

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

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Configuring an IP DSCP Value

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 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

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Configuring a QoS Group Value

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

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Command Reference

This section documents new or modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.1 command reference publications.

set ip dscp

To mark a packet by setting the IP differentiated services code point (DSCP) in the Type of Service byte, use the set ip dscp policy map configuration command. To remove a previously set IP DSCP value, use the no form of this command.

set ip dscp ip-dscp-value
no set ip dscp ip-dscp-value

Syntax Description

ip-dscp-value

A value that sets the IP DSCP value in the range 0 to 63.

Defaults

No default behavior or values.

Command Modes

Policy map configuration

Command History

Release Modification

12.0(5)XE

This command was introduced in policy map configuration mode.

Usage Guidelines

Once the IP DSCP bit is set, other QoS services can then operate on the bit settings.

The network gives priority (or some type of expedited handling) to marked traffic. Typically, you set IP precedence at the edge of the network (or administrative domain) and have queueing act on it thereafter. Weighted Fair Queueing (WFQ) can speed up handling for high-precedence traffic at congestion points. Weighted random early detection (WRED) ensures that high-precedence traffic has lower loss rates than other traffic during times of congestion.

Examples

In the following example, the IP DSCP Type of Service byte is set to 8 in the policy map named policy1:

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

All packets that satisfy the match criteria of class1 are marked with the IP DSCP value of 8. How packets marked with the IP DSCP value of 8 are treated is determined by the network configuration.

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Related Commands

Command Description

policy-map policy-name

Specifies the name of the service policy to configure.

service-policy policy-map-name

Specifies the name of the service policy to be attached to the interface.

show policy-map

Displays all configured service policies.

show policy-map policy-map-name

Displays the user-specified service policy.

show policy-map interface

Displays statistics and configurations of all input and output service policies, which are attached to an interface.

set ip precedence

To set the precedence value in the IP header, use the set ip precedence policy map configuration command. To leave the precedence value alone, use the no form of this command.

set ip precedence number
no set ip precedence

Syntax Description

number

A number in the range of 0 to 7 that sets the precedence bit in the IP header.

Defaults

This command is disabled by default.

Command Modes

Policy map configuration

Command History

Release Modification

11.0

This command was introduced.

12.0(5)XE

This command was introduced in the modular Quality of Service command-line interface.

Usage Guidelines

Once the IP precedence bits are set, other QoS services such as weighted fair queueing (WFQ) and weighted random early detection (WRED) then operate on the bit settings.

The network gives priority (or some type of expedited handling) to marked traffic through the application of WFQ or WRED at points downstream in the network. Typically, you set IP precedence at the edge of the network (or administrative domain) and have queueing act on it thereafter. WFQ can speed up handling for certain precedence traffic at congestion points. WRED can ensure that certain precedence traffic has lower loss rates than other traffic during times of congestion.

Examples

The following example sets the IP precedence to 5 for packets that satisfy the match criteria of class map class1:

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

All packets that satisfy the match criteria of class1 are marked with the IP precedence value of 5. How packets marked with the IP precedence value of 5 are treated is determined by the network configuration.

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Related Commands

Command Description

policy-map policy-name

Specifies the name of the service policy to configure.

service-policy policy-map-name

Specifies the name of the service policy to be attached to the interface.

show policy-map

Displays all configured service policies.

show policy-map policy-map-name

Displays the user-specified service policy.

show policy-map interface

Displays statistics and configurations of all input and output service policies, which are attached to an interface.

set qos-group

To set a group ID that can be used later to classify packets, use the set ip qos-group policy map configuration command. To remove the group ID, use the no form of this command.

set qos-group group-id
no set qos-group group-id

Syntax Description

group-id

Group ID number in the range 0 to 99.

Defaults

This command is disabled by default. No group ID is specified.

Command Modes

Policy map configuration

Command History

Release Modification

11.1 CC

This command was introduced.

12.0(5)XE

This command was introduced in the modular Quality of Service command-line interface.

Usage Guidelines

This command allows you to associate a group ID with a packet. The group ID can be used later to classify packets into QoS groups based on prefix, autonomous system, and community string.

To display QoS group information, use the show ip cef command.

Examples

The following example sets the QoS group to 1 for all packets that match the class 1 class map. These packets are then rate limited based on the QoS group ID.

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

This command is applied while creating a service policy in policy map configuration mode. This service policy is not yet attached to an interface. For information on attaching a service policy to an interface, see the Modular Quality of Service Command-Line Interface  document.

Related Commands

Command Description

policy-map policy-name

Specifies the name of the service policy to configure.

service-policy policy-map-name

Specifies the name of the service policy to be attached to the interface.

show policy-map

Displays all configured service policies.

show policy-map policy-map-name

Displays the user-specified service policy.

show policy-map interface

Displays statistics and configurations of all input and output service policies, which are attached to an interface.

Glossary

CEF—Cisco Express Forwarding. An advanced Layer 3 IP switching technology that optimizes network performance and scalability for networks with large and dynamic traffic patterns, such as the Internet, on networks characterized by intensive Web-based applications, or interactive sessions.

DSCP—differentiated services code point.

WRED—Weighted Random Early Detection. A congestion avoidance mechanism that drops packets selectively based on IP precedence.

QoSThe performance of a transmission across a network. To ensure that receivers get the quality they expect---a video image that is smooth rather than choppy, for example---various strategies have been developed that enable routers to give preference to one set of packets over others that arrive at the routers at the same moment. These strategies are known as Quality of Service features.

QoS group—Internal QoS group ID for a packet used to determine weighted fair queuing characteristics for that packet.

Traffic Policing—Rate limit, conform actions, and exceed actions that apply to traffic matching a certain criteria.

Modular QoS CLI—Modular Quality of Service Command-Line Interface. A CLI used to configure QoS that allows users to specify a traffic class independently of QoS policies.

WFQ—Weighted Fair Queueing. Congestion management algorithm that identifies conversations (in the form of traffic streams), separates packets that belong to each conversation, and ensures that capacity is shared fairly between these individual conversations. WFQ is an automatic way of stabilizing network behavior during congestion and results in increased performance and reduced retransmission.