Cisco ASR 9000 Series Aggregation Services Router Modular Quality of Service Command Reference, Release 4.2.x
Packet Classification Commands
Downloads: This chapterpdf (PDF - 820.0KB) The complete bookPDF (PDF - 1.94MB) | Feedback

Packet Classification Commands

Packet Classification Commands

This chapter describes the commands used for QoS packet classification. For detailed information about Packet Classification concepts, configuration tasks and examples, see the Configuring Modular QoS Service Packet Classification and Marking chapter in the Cisco ASR 9000 Series Aggregation Services Router Modular Quality of Service Configuration Guide

class (policy-map)

To specify the name of the class whose policy you want to create or change, use the class command in policy map configuration mode. To remove a class from the policy map, use the no form of this command.

class [ type qos ] { class-name | class-default }

no class [ type qos ] { class-name | class-default }

Syntax Description

type qos

(Optional) Specifies a quality-of-service (QoS) class.

class-name

Name of the class for which you want to configure or modify policy.

class-default

Configures the default class.

Command Default

No class is specified.

Type is QoS when not specified.

Command Modes

Policy map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

You must be in a user group associated with a task group that includes the proper task IDs. The command reference guides include the task IDs required for each command. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Policy Map Configuration Mode

Within a policy map, the class (policy-map) command can be used to specify the name of the class whose policy you want to create or change. The policy map must be identified first.

To identify the policy map (and enter the required policy map configuration mode), use the policy-map command before you use the class (policy-map) command. After you specify a policy map, you can configure the policy for new classes or modify the policy for any existing classes in that policy map.

Class Characteristics

The class name that you specify in the policy map ties the characteristics for that class—that is, its policy—to the class map and its match criteria, as configured using the class-map command.

The class-default keyword is used for configuring default classes. It is a reserved name and cannot be used with user-defined classes. It is always added to the policy map (type qos) even if the class is not configured. For example, the following configuration shows that the class has not been configured, but the running configuration shows ‘class class-default’.

RP/0/RSP0/CPU0:router(config)# policy-map pm1 
RP/0/RSP0/CPU0:router(config-pmap)# end-policy-map 
RP/0/RSP0/CPU0:router(config)# end 
!
RP/0/RSP0/CPU0:router# show running-config 
!
policy-map pm1
 class class-default
 !        
 end-policy-map
!
  

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to create a policy map called policy1, which is defined to shape class1 traffic at 30 percent and default class traffic at 20 percent.

RP/0/RSP0/CPU0:router(config)# class-map class1
RP/0/RSP0/CPU0:router(config-cmap)# match precedence 3
!
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:routerconfig-pmap-c)# shape average 100 mbps
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# class class-default
RP/0/RSP0/CPU0:router(config-pmap-c)# shape average 50 mbps
  

The default class is used for packets that do not satisfy configured match criteria for class1. Class1 must be defined before it can be used in policy1, but the default class can be directly used in a policy map, as the system defines it implicitly.

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

class-map

To define a traffic class and the associated rules that match packets to the class, use the class-map command in global configuration mode. To remove an existing class map from the router, use the no form of this command.

class-map [ type qos ] [match-all] [match-any] class-map-name

no class-map [ type qos ] [match-all] [match-any] class-map-name

Syntax Description

type qos

(Optional) Specifies a quality-of-service (QoS) class-map.

match-all

(Optional) Specifies a match on all of the match criteria.

match-any

(Optional) Specifies a match on any of the match criteria. This is the default.

class-map-name

Name of the class for the class map. The class name is used for the class map and to configure policy for the class in the policy map. The class name can be a maximum of 63 characters, must start with an alphanumeric character, and in addition to alphanumeric characters, can contain any of the following characters: . _ @ $ % + | # : ; - =

Command Default

Type is QoS when not specified.

Command Modes

Global configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

You must be in a user group associated with a task group that includes the proper task IDs. The command reference guides include the task IDs required for each command. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The class-map command specifies the name of the class for which you want to create or modify class map match criteria. Use of this command enables class map configuration mode in which you can enter any match command to configure the match criteria for this class. Packets arriving on the interface are checked against the match criteria configured for a class map to determine if the packet belongs to that class.

The following commands can be used in a class map:

  • match access-group
  • match atm
  • match [not] cos
  • match destination-address
  • match [not] discard-class
  • match [not] dscp
  • match frame-relay dlci
  • match [not] mpls experimental topmost
  • match [not] precedence
  • match precedence
  • match [not] protocol
  • match [not] qos-group
  • match source-address
  • match vlan
  • match vpls

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to specify class101 as the name of a class and defines a class map for this class. The packets that match the access list 101 are matched to class class101.

RP/0/RSP0/CPU0:router(config)# class-map class101
RP/0/RSP0/CPU0:router(config-cmap)# match access-group ipv4 101

Related Commands

Command

Description

class (policy-map)

Specifies the name of the class whose policy you want to create or change.  

match access-group

Identifies a specified access control list (ACL) number as the match criteria for a class map.  

match destination-address

Identifies a specific destination MAC address explicitly as a match criterion in a class map.  

match discard-class

Identifies specific discard class values as a match criteria for a class map.  

match dscp

Identifies specific IP differentiated services code point (DSCP) values as match criteria for a class map.  

match mpls experimental topmost

Identifies specific three-bit experimental (EXP) field values in the topmost Multiprotocol Label Switching (MPLS) label as match criteria for a class map.  

match precedence

Identifies IP precedence values as match criteria.  

match protocol

Identifies a specific protocol as the match criterion for a class map.  

match qos-group

Identifies specific quality-of-service (QoS) group values as match criteria in a class map.  

match source-address

Identifies a specific source MAC address as match criterion in a class map.  

match vlan

Identifies selected VLAN IDs as the match criteria for a class map.  

end-class-map

To end the configuration of match criteria for the class and to exit class map configuration mode, use the end-class-map command in class map configuration mode.

end-class-map

Syntax Description

This command has no keywords or arguments.

Command Default

No default behavior or values

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to end the class map configuration and exit class map configuration mode:

RP/0/RSP0/CPU0:router(config)# class-map class101
RP/0/RSP0/CPU0:router(config-cmap)# match access-group ipv4 101
RP/0/RSP0/CPU0:router(config-cmap)# end-class-map 
RP/0/RSP0/CPU0:router(config)# 

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

end-policy-map

To end the configuration of a policy map and to exit policy map configuration mode, use the end-policy-map command in policy map configuration mode.

end-policy-map

Syntax Description

This command has no keywords or arguments.

Command Default

No default behavior or values

Command Modes

Policy map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to end the policy map configuration and exit policy map configuration mode.

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# police

 rate
 250
RP/0/RSP0/CPU0:router(config-pmap-c)# set precedence 3
RP/0/RSP0/CPU0:router(config-pmap)# end-policy-map 
RP/0/RSP0/CPU0:router(config)#

Related Commands

Command

Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

exceed-action

To configure the action to take on packets that exceed the rate limit, use the exceed-action command in policy map police configuration mode. To remove an exceed action from the policy-map, use the no form of this command.

exceed-action [ drop | set options | transmit ]

no exceed-action [ drop | set options | transmit ]

Syntax Description

drop

(Optional) Drops the packet.

set options

Configures the specified packet properties. Replace options with one of the following keywords or keyword arguments:

  • atm-clp value —Sets the cell loss priority (CLP) bit.
  • cos [inner] value —Sets the class of service value. Range is 0 to 7.
  • cos value —Sets the class of service value. Range is 0 to 7.
  • dei —Sets the drop eligible indicator (DEI). Can be 0 or 1.
  • discard-class value —Sets the discard class value. Range is 0 to 7.
  • dscp value —Sets the differentiated services code point (DSCP) value and sends the packet. See Table 1 for a list of valid values.
  • dscp [tunnel] value —Sets the differentiated services code point (DSCP) value and sends the packet. See Table 1 for a list of valid values. With the tunnel keyword, the DSCP is set in the outer header.
  • fr-de value —Sets the Frame Relay discard eligible (DE) bit on the Frame Relay frame then transmits that packet. In congested environments, frames with the DE bit set to 1 are discarded before frames with the DE bit set to 0. The frame relay DE bit has only one bit and has only two settings, 0 or 1. The default DE bit setting is 0.
  • mpls experimental {topmost | imposition} value —Sets the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost label or imposed label. Range is 0 to 7.
  • precedence precedence —Sets the IP precedence and sends the packet. See Table 1 for a list of valid values.
  • precedence [tunnel] precedence —Sets the IP precedence and sends the packet. See Table 1 for a list of valid values. With the tunnel keyword, the precedence is set in the outer header.
  • qos-group value —Sets the QoS group value.
  • qos-group value —Sets the QoS group value. Range is 0 to 63.
  • srp-priority value —Sets the Spatial Reuse Protocol (SRP) priority. Range is 0 to 7

transmit

(Optional) Transmits the packets.

Command Default

By default, if no action is configured on a packet that exceeds the rate limit, the packet is dropped.

Command Modes

Policy map police configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Release 4.0.0

The set dei keyword was added.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

For more information regarding the traffic policing feature, see the police rate command.

  • experimental, qos-group, and discard class values, or
  • experimental and qos-group values, or
  • experimental and discard class values

The set dei action in policy maps is supported on 802.1ad packets for:

  • Ingress and egress
  • Layer 2 subinterfaces
  • Layer 2 main interfaces
  • Layer 3 main interfaces

Note


The set DEI action is ignored for traffic on interfaces that are not configured for 802.1ad encapsulation.


Task ID

Task ID

Operations

qos

read, write

Examples

In the following example for MPLS, traffic policing is configured to drop traffic that exceeds the rate limit:

RP/0/RSP0/CPU0:router(config)# class-map class1
RP/0/RSP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RSP0/CPU0:router(config-cmap)# exit

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# police rate 250 kbps burst 50
RP/0/RSP0/CPU0:router(config-pmap-c-police)# exceed-action drop
RP/0/RSP0/CPU0:router(config-pmap-c-police)# exit
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface pos 0/5/0/0
RP/0/RSP0/CPU0:router(config-if) service-policy input policy1

In this example, the police rate is set to 5 Mbps. Conforming traffic is marked with a DEI value of 0; traffic that exceeds the police rate is marked with a DEI value of 1.

RP/0/RSP0/CPU0:router(config)# policy-map 1ad-mark-dei
RP/0/RSP0/CPU0:router(config-pmap)# class c1
RP/0/RSP0/CPU0:router(config-pmap-c)# police rate 5 mbps
RP/0/RSP0/CPU0:router(config-pmap-c-police)# conform-action set dei 0
RP/0/RSP0/CPU0:router(config-pmap-c-police)# exceed-action set dei 1
RP/0/RSP0/CPU0:router(config-pmap-c-police)# end-policy-map

Related Commands

Command

Description

conform-action

Configures the action to take on packets that conform to the rate limit.  

exceed-color

(Used for SIP 700 cards only.) Configures preclassification of ingress Layer 2 Frame Relay packets that have been previously marked as discard eligible on an upstream node. These previously-marked packets are analyzed and preclassified by the color-aware policer on the ingress interface as part of the 2-rate 3-color (2R3C) traffic policing feature.  

police rate

Configures traffic policing and enters policy map police configuration mode.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

violate-action

Configures the action to take on packets that violate the rate limit.  

match cos

To identify specified class of service (CoS) values as a match criteria in a class map, use the match cos command in class map configuration mode. To remove a specified CoS class value from the matching criteria for a class map, use the no form of this command.

match [not] cos { cos-value [ cos-value1 ... cos-value7 ] | inner inner-cos-value [ inner cos-value1 ... inner cos-value7 ] }

no match [not] cos { cos-value [ cos-value1 ... cos-value7 ] | inner inner-cos-value [ inner cos-value1 ... inner cos-value7 ] }

Syntax Description

not

(Optional) Negates the specified match result.

cos-value

Identifier that specifies the exact value from 0 to 7. Up to eight CoS identifiers can be specified to match packets.

inner

(Optional) Specifies the inner CoS value in, for example, a QinQ configuration.

inner-cos-value

Identifier that specifies the exact value from 0 to 7. Up to eight inner CoS identifiers can be specified to match packets.

Command Default

No match criteria are specified.

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match cos command specifies a class of service that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.

To use the match cos command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match cos command in a class map, the values of subsequent match statements are added to the first match cos command.

The match cos command is supported on egress Layer 2 interfaces, Layer 2 subinterfaces, and Layer 3 physical interfaces. Layer 3 physical interfaces are supported, because it is possible for a Layer 3 interface to have underlying Layer 2 subinterfaces.

  • Ingress and egress
  • Layer 2 main interfaces and subinterfaces
  • Layer 3 main interfaces

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map cos146 evaluates all packets entering Packet-over-SONET (POS) interface 0/1/0/0 .100 for class of service values of 1, 4, or 6. If the incoming packet has been marked with any of these CoS values, the packet is queued to the class queue with the bandwidth setting of 300 kbps.

RP/0/RSP0/CPU0:router(config)# class-map cos146
RP/0/RSP0/CPU0:router(config-cmap)# match cos 1 4 6
RP/0/RSP0/CPU0:router(config-cmap)# exit

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class cos146
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface
 pos 0/1/0/0

RP/0/RSP0/CPU0:router(config-if)# service-policy
 input

 policy1

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

match discard-class

Identifies specific discard class values as a match criteria for a class map.  

match protocol

Identifies a specific protocol as the match criterion for a class map.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

set cos

Sets the Layer 2 class of service (CoS) value of an outgoing packet.  

match vlan

To identify selected VLAN IDs as the match criteria for a class map, use the match vlan command in class map configuration mode. To remove VLAN ID match criteria from a class map, use the no form of this command.

match vlan [ inner ] vlanid [ vlanid1 ... vlanid7 ]

no match vlan [ inner ] vlanid [ vlanid1 ... vlanid7 ]

Syntax Description

inner

(Optional) Specifies the inner VLAN for the match in, for example, a QinQ configuration.

vlanid

VLAN identifier that specifies the exact value from 1 to 4094 or a range of values from 1 to 4094. Up to eight values can be specified in a match statement.

Command Default

No match criteria are specified.

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match vlan command specifies a VLAN ID that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.

To use the match vlan command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match vlan command in a class map, up to eight values of the subsequent match statements are added to the first match vlan command, exceeding which, the statement is rejected.

This command is supported only on Layer 3 ingress.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map vlan1 evaluates all packets entering Gigabit Ethernet interface 0/1/0/0 for VLAN IDs of 1234, 1698, and all the VLAN IDs in the range 3000 to 4000. If the incoming packet has been marked with any of these VLAN IDs, the packet is queued to the class queue with the bandwidth setting of 300 kbps.

RP/0/RSP0/CPU0:router(config)# class-map vlan1  
RP/0/RSP0/CPU0:router(config-cmap)# match vlan 1234 1698 3000-4000          
RP/0/RSP0/CPU0:router(config-cmap)# exit 
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class vlan1
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300 
RP/0/RSP0/CPU0:router(config-pmap-c)# exit  
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/0
RP/0/RSP0/CPU0:router(config-if)# service-policy input policy1
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

match ethertype

To identify selected Ethernet type fields as the match criteria for a class map, use the match ethertype command in class map configuration mode. To remove the Ethernet type fields match criteria from a class map, use the no form of this command.

match ethertype ethertype_field

no match ethertype ethertype_field

Syntax Description

ethertype_field

Ethernet type field that specifies the Ethernet service. Values can be:

  • <1536-65535>—Ethertype value; only 2054 (the value representing ARP) is supported.
  • arp —Match on address resolution protocol.
  • ipv4 (not supported).
  • ipv6 (not supported).
Caution   

If you specify any value other than the supported values, the system allows you to commit the configuration. However, if you try to commit a configuration that applies the policy-map (containing the invalid ethertype match) to an interface, the system rejects the commit action.

Command Default

No match criteria are specified.

Command Modes

Class map configuration

Command History

Release Modification

Release 4.1.0

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID Operation
qos

read, write

Examples

Example

This example shows how to configure Ethernet type:

RP/0/RSP0/CPU0:router(config)# class-map match-any arp_1            
RP/0/RSP0/CPU0:router(config-cmap)# match ethertype arp
RP/0/RSP0/CPU0:router(config-cmap)# exit
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

match fr-de

To match packets on the basis of the Frame Relay discard eligibility (DE) bit setting, use the match fr-de command in class-map configuration mode. To remove the match criterion, use the no form of this command.

match fr-de fr-de-bit-value

no match fr-de fr-de-bit-value

Syntax Description

not

(Optional) Negates the specified match result.

fr-de-bit-value

Specifies the Frame Relay DE bit. Value can be 1.

Command Default

Packets are not matched on the basis of the Frame Relay DE bit setting.

Command Modes

Class map configuration

Command History

Release

Modification

Release 4.0.0

This command was introduced .

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

This match criterion can be used under a subinterface (L2 PVC) using the service-policy command, and it is supported in the ingress direction only. This match criterion can also be used in hierarchical policy maps.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to create a class called match-fr-de and match packets on the basis of the Frame Relay DE bit setting. Packets match Frame Relay DE bit 1.

RP/0/RSP0/CPU0:router(config)# class-map match-fr-d
RP/0/RSP0/CPU0:router(config-cmap)# match fr-de 1
RP/0/RSP0/CPU0:routerrouter(config-cmap)# end

To match Frame Relay DE bit 0, use this configuration:

RP/0/RSP0/CPU0:router(config)# class-map match-not-fr-de
RP/0/RSP0/CPU0:router(config-cmap)# match not fr-de 1
RP/0/RSP0/CPU0:router(config-cmap)# end

Related Commands

Command

Description

set fr-de

Changes the discard eligible (DE) bit setting in the address field of a Frame Relay frame to 1 for all traffic leaving an interface.  

match frame-relay dlci

To specify a Frame Relay packet data-link connection identifier (DLCI) number or number range as a match criterion in a class map, use the match frame-relay dlci command in class map configuration mode. To remove a previously specified DLCI number as a match criterion, use the no form of this command.

match frame-relay dlci [ Dlci | StartDlci-EndDlci ]

no match frame-relay dlci [ Dlci | StartDlci-EndDlci ]

Syntax Description

Dlci

A DLCI number associated with the packet. Range is from 16 to 1007.

StartDlci-EndDlci

A DLCI number range from 16 to 1007. Numbers are separated by a hyphen.

Command Default

No DLCI number is specified.

Command Modes

Class map configuration

Command History

Release

Modification

Release 4.0.0

This commandwas introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match criterion for the match frame-relay dlci command can be used only on hierarchical policy maps.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to create the fr-dlci class map, and specify the Frame Relay DLCI number range 100-200 as a match criterion. Packets with DLCIs matching this criterion are placed in fr-dlci. In this example, class map fr-dlci evaluates all packets entering Packet-over-SONET/SDH (POS) interface 0/1/0/0.1 for DLCIs in the range from 100 through 200. If the incoming packet has been marked with the DLCI in the range from 100 through 200, the packet is queued to the class queue with the bandwidth setting of 300 kbps.

RP/0/RSP0/CPU0:router(config)# class-map fr-dlci
RP/0/RSP0/CPU0:router(config-cmap)# match frame-relay dlci 100-200
RP/0/RSP0/CPU0:router(config-cmap)# end
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class fr-dlci
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface pos 0/1/0/0.1
RP/0/RSP0/CPU0:router(config)# service-policy output policy1

RP/0/RSP0/CPU0:router(config)# interface pos 0/1/0/0.1 point-to-point pvc 16
RP/0/RSP0/CPU0:router(config-subif)# pvc 16
RP/0/RSP0/CPU0:router(config-fr-vc)# service-policy output policy1

Related Commands

match access-group

To identify a specified access control list (ACL) number as the match criteria for a class map, use the match access-group command in class map configuration mode. To remove ACL match criteria from a class map, use the no form of this command.

match access-group ipv4 access-group-name

no match access-group ipv4 access-group-name

Syntax Description

ipv4

Specifies the name of the IPv4 access group to be matched.

access-group-name

ACL whose contents are used as the match criteria against which packets are checked to determine if they belong to this class.

Command Default

By default, if neither IPv6 nor IPv4 is specified as the match criteria for a class map, IPv4 addressing is used.

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

For class-based features (such as marking, Modified Deficit Round Robin [MDRR], and policing), you define traffic classes based on match criteria, including ACLs and input interfaces. Packets satisfying the match criteria for a class constitute the traffic for that class.

The match access-group command specifies an ACL whose contents are used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.

Access Control Entries with TCP fields such as, SYN, ACK and FIN in the corresponding ACL are not supported.

To use the match access-group command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. You can specify up to eight IPv4 and IPv6 ACLs in a match statement.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to specify a class map called map1 and configures map1 to be used as the match criteria for this class:

RP/0/RSP0/CPU0:router(config)# class-map map1
RP/0/RSP0/CPU0:router(config-cmap)# match access-group ipv4 map1

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

match destination-address

To identify a specific destination MAC address explicitly as a match criterion in a class map, use the match destination-address command in class map configuration mode. To remove a specific destination MAC address from the matching criteria for a class map, use the no form of this command.

match destination-address mac address

no match destination-address mac address

Syntax Description

mac

Specifies a MAC address.

address

Specifies a destination MAC address.

Command Default

No default behavior or values

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match destination-address command specifies a destination address that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.

To use the match destination-address command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match destination-address command in a class map, only the last command entered applies.

The match destination-address command is supported only on an output service policy.

Layer 2 match criteria on a Layer 3 target, or Layer 3 match criteria on a Layer 2 target, is not allowed. The match destination-address command is supported on egress Layer 2 interfaces, Layer 2 subinterfaces, and Layer 3 physical interfaces. Layer 3 physical interfaces are supported, because it is possible for a Layer 3 interface to have underlying Layer 2 subinterfaces.

The command is allowed on a policy map that is attached to an Ethernet interface. The command is invalid on a policy that is attached to a Packet-over-SONET/SDH (POS) interface or a routed VLAN subinterface.

The match 48-bit MAC address is specified in xxxx.xxxx.xxxx format on L2VPN PE interfaces.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to match a destination MAC address:

RP/0/RSP0/CPU0:router(config)#class-map match-any A
RP/0/RSP0/CPU0:router(config-cmap)# match destination-address mac 000.f0d0.2356

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

match discard-class

To identify specific discard class values as a match criteria for a class map, use the match discard-class command in class map configuration mode. To remove specified discard class values from the matching criteria for a class map, use the no form of this command.

match [ not ] discard-class discard-class-value [ discard-class-value1 ... discard-class-value7 ]

no match [ not ] discard-class discard-class-value [ discard-class-value1 ... discard-class-value7 ]

Syntax Description

not

(Optional) Negates the specified match result.

discard-class-value

Discard class identifier. You can specify up to eight discard class identifiers to match packets. Class identifiers are separated by white spaces. Range is 0 to 7.

Command Default

No default behavior or values

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match discard-class command specifies a discard class that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.

To use the match discard-class command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match discard-class command in a class map, the new values are added to the existing match statement.

The match discard-class command sets the match criteria for examining discard classes marked on the packet. Up to eight discard class values can be matched in one match statement. For example, match discard-class 0 1 2 3 4 5 6 7 returns matches for discard class values 0, 1, 2, 3, 4, 5, 6, and 7. Only one of the seven values is needed to yield a match (OR operation).

The discard class value is used as a matching criterion only. The value has no mathematical significance. For instance, the discard class value 2 is not greater than 1. The value simply indicates that a packet marked with the discard class of 2 should be treated differently than a packet marked with a discard class value of 1.


Note


The match discard-class command is applied only for egress policies.


Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows a service policy called policy1 attached to an interface. In this example, class map discard class5 is created to evaluate all packets leaving GigabitEthernet interface 0/1/0/9 for a discard-class value of 5. Packets marked with the discard class value of 5 are queued to a class queue with the bandwidth setting 300 kbps.

RP/0/RSP0/CPU0:router(config)# class-map discard-class5
RP/0/RSP0/CPU0:router(config-cmap)# match discard-class 5
RP/0/RSP0/CPU0:router(config-cmap)# exit
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class discard-class5
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if)# service-policy output policy1

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

set discard-class

Sets the discard class and Quality of Service (QoS) group identifiers on IP Version 4 (IPv4) or Multiprotocol Label Switching (MPLS) packets.  

set qos-group

Sets the quality of service (QoS) group identifiers on packets.  

match dscp

To identify specific IP differentiated services code point (DSCP) values as match criteria for a class map, use the match dscp command in class map configuration mode. To remove a DSCP value from a class map, use the no form of this command.

match [not] dscp [ ipv4 | ipv6 ] dscp-value [ dscp-value1 . .. dscp-value7 ]

no match [not] dscp [ ipv4 | ipv6 ] dscp-value [ dscp-value1 . .. dscp-value7 ]

Syntax Description

not

(Optional) Negates the specified match result.

ipv4

(Optional) Specifies the IPv4 DSCP value.

ipv6

(Optional) Specifies the IPv6 DSCP value.

dscp-value

IP DSCP value identifier that specifies the exact value or a range of values. Range is 0 to 63. Up to eight IP DSCP values can be specified to match packets. Reserved keywords can be specified instead of numeric values. Table 1 describes the reserved keywords.

Command Default

Matching on both IP Version 4 (IPv4) and IPv6 packets is the default.

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match dscp command specifies a DSCP value that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.

To use the match dscp command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match dscp command in a class map, only the last command entered applies.

The match dscp command examines the higher-order six bits in the type of service (ToS) byte of the IP header. Only one of the eight values is needed to yield a match (OR operation).

The command supports only eight IP DSCP values. If you try to configure more match statements after all the eight values are matched, the statements get rejected.

The IP DSCP value is used as a matching criterion only. The value has no mathematical significance. For instance, the IP DSCP value 2 is not greater than 1. The value simply indicates that a packet marked with the IP DSCP value of 2 should be treated differently than a packet marked with an IP DSCP value of 1. The treatment of these marked packets is defined by the user through the setting of QoS policies in policy map class configuration mode.

Table 1 IP DSCP Reserved Keywords

DSCP Value

Reserved Keyword

0

default

10

AF11

12

AF12

14

AF13

18

AF21

20

AF22

22

AF23

26

AF31

28

AF32

30

AF33

34

AF41

36

AF42

38

AF43

46

EF

8

CS1

16

CS2

24

CS3

32

CS4

40

CS5

48

CS6

56

CS7

ipv4

ipv4 dscp

ipv6

ipv6 dscp

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map dscp14 evaluates all packets entering Packet-over-SONET/SDH (POS) interface 0/1/0/0 for an IP DSCP value of 14. If the incoming packet has been marked with the IP DSCP value of 14, the packet is queued to the class queue with the bandwidth setting of 300 kbps.

RP/0/RSP0/CPU0:router(config)# class-map dscp14
RP/0/RSP0/CPU0:router(config-cmap)# match dscp ipv4 14
RP/0/RSP0/CPU0:router(config-cmap)# exit

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class dscp14
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface pos 0/1/0/0
RP/0/RSP0/CPU0:router(config-if)# service-policy input policy1

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

set dscp

Marks a packet by setting the IP differentiated services code point (DSCP) in the type of service (ToS) byte.  

match precedence

Identifies IP precedence values as match criteria.  

match mpls experimental topmost

To identify specific three-bit experimental (EXP) field values in the topmost Multiprotocol Label Switching (MPLS) label as match criteria for a class map, use the match mpls experimental topmost command in class map configuration mode. To remove experimental field values from the class map match criteria, use the no form of the command.

match [ not ] mpls experimental topmost exp-value [ exp-value1 ...exp-value7 ]

no match [ not ] mpls experimental topmost exp-value [ exp-value1 ...exp-value7 ]

Syntax Description

not

(Optional) Negates the specified match result.

exp-value

Experimental value that specifies the exact value from 0 to 7. Up to eight experimental values can be specified to match MPLS headers.

Command Default

No default behavior or values

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match mpls experimental topmost command is used by the class map to identify MPLS experimental values matching on a packet.

To use the match mpls experimental topmost command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match mpls experimental topmost command in a class map, the new values are added to the existing match statement.

This command examines the three experimental bits contained in the topmost label of an MPLS packet. Up to eight experimental values can be matched in one match statement. For example, match mpls experimental topmost 2 4 5 7 returns matches for experimental values of 2, 4, 5, and 7. Only one of the four values is needed to yield a match (OR operation).

The experimental values are used as a matching criterion only. The value has no mathematical significance. For instance, the experimental value 2 is not greater than 1. The value indicates that a packet marked with the experimental value of 2 should be treated differently than a packet marked with the EXP value of 1. The treatment of these different packets is defined by the user through the setting of QoS policies in policy map class configuration mode.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map mplsmap1 evaluates all packets entering GigabitEthernet interface 0/1/0/9 for an MPLS experimental value of 1. If the incoming packet has been marked with the MPLS experimental value of 1, the packet is queued to the class queue with the bandwidth setting of 300 kbps.

RP/0/RSP0/CPU0:router(config)# class-map mplsmap1
RP/0/RSP0/CPU0:router(config-cmap)# match mpls experimental topmost 1
RP/0/RSP0/CPU0:router(config-cmap)# exit
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class mplsmap1
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if)# service-policy input output policy1
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

match dscp

Identifies specific IP differentiated services code point (DSCP) values as match criteria for a class map.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

set mpls experimental

 

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

match precedence

To identify IP precedence values as match criteria, use the match precedence command in class map configuration mode. To remove precedence values from a class map, use the no form of this command.

match [ not ] precedence [ ipv4 | ipv6 ] precedence-value [ precedence-value1 ... precedence-value7 ]

no match [ not ] precedence [ ipv4 | ipv6 ] precedence-value [ precedence-value1 ... precedence-value7 ]

Syntax Description

not

(Optional) Negates the specified match result.

ipv4

(Optional) Specifies the IPv4 precedence value.

ipv6

(Optional) Specifies the IPv6 precedence value.

precedence-value

An IP precedence value identifier that specifies the exact value. Range is from 0 to 7. Reserved keywords can be specified instead of numeric values. Table 1 describes the reserved keywords.

Up to eight precedence values can be matched in one match statement.

Command Default

Matching on both IP Version 4 (IPv4) and IPv6 packets is the default.

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match precedence command specifies a precedence value that is used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map.

To use the match precedence command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match precedence command in a class map, only the last command entered applies.

The match precedence command examines the higher-order three bits in the type of service (ToS) byte of the IP header. Up to eight precedence values can be matched in one match statement. For example, match precedence ipv4 0 1 2 3 4 5 6 7 returns matches for IP precedence values of 0, 1, 2, 3, 4, 5, 6, and 7. Only one of the eight values is needed to yield a match (OR operation).

The precedence values are used as a matching criterion only. The value has no mathematical significance. For instance, the precedence value 2 is not greater than 1. The value simply indicates that a packet marked with the precedence value of 2 is different than a packet marked with the precedence value of 1. The treatment of these different packets is defined by the user through the setting of QoS policies in policy map class configuration mode.

The following table lists the IP precedence value number and associated name in descending order of importance.

Table 2 IP Precedence Values and Names

Value

Name

0

routine

1

priority

2

immediate

3

flash

4

flash-override

5

critical

6

internet

7

network

ipv4

ipv4 precedence

ipv6

ipv6 precedence

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface. In this example, class map ipprec5 evaluates all packets entering GigabitEthernet interface 0/1/0/9 for a precedence value of 5. If the incoming packet has been marked with the precedence value of 5, the packet is queued to the class queue with the bandwidth setting 300 kbps.

RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# class-map ipprec5
RP/0/RSP0/CPU0:router(config-cmap)# match precedence ipv4 5	
RP/0/RSP0/CPU0:router(config-cmap)# exit
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class ipprec5
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if)# service-policy input policy1
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

set precedence

Sets the precedence value in the IP header.  

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

match protocol

To identify a specific protocol as the match criterion for a class map, use the match protocol command in class map configuration mode. To remove protocol-based match criteria from a class map, use the no form of this command.

match [not] protocol protocol-value [ protocol-value1 . .. protocol-value7 ]

no match [not] protocol protocol-value [ protocol-value1 . .. protocol-value7 ]

Syntax Description

not

(Optional) Negates the specified match result.

protocol-value

A protocol identifier. A single value for protocol-value (any combination of numbers and names) can be matched in one match statement.

Command Default

No default behavior or values

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Definitions of traffic classes are based on match criteria, including protocols, access control lists (ACLs), input interfaces, QoS labels, and experimental (EXP) field values. Packets satisfying the match criteria for a class constitute the traffic for that class.

The match protocol command specifies the name of a protocol to be used as the match criteria against which packets are checked to determine if they belong to the class specified by the class map. Available protocol names are listed in the table that follows.

The protocol-value argument supports a range of protocol numbers. After you identify the class, you may use the match protocol command to configure its match criteria.

Table 3 Protocol Names and Descriptions

Name

Description

ahp

Authentication Header Protocol

eigrp

Cisco Enhanced Interior Gateway Routing Protocol

esp

Encapsulation Security Payload

gre

Cisco Generic Routing Encapsulation Tunneling

icmp

Internet Control Message Protocol

igmp

Internet Gateway Message Protocol

igrp

Cisco IGRP Routing protocol

ipinip

IP in IP tunneling

ipv4

Any IPv4 protocol

ipv6

Any IPv6 protocol

mpls

Any MPLS packet

nos

KA9Q NOS Compatible IP over IP Tunneling

ospf

Open Shortest Path First, Routing Protocol

pcp

Payload Compression Protocol

pim

Protocol Independent Multicast

sctp

Stream Control Transmission Protocol

tcp

Transport Control Protocol

udp

User Datagram Protocol

Task ID

Task ID

Operations

qos

read, write

Examples

In the following example, all TCP packets belong to class class1:

RP/0/RSP0/CPU0:router(config)# class class1
RP/0/RSP0/CPU0:router(config-cmap)# match protocol tcp
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

match access-group

Identifies a specified access control list (ACL) number as the match criteria for a class map.  

match mpls experimental topmost

Identifies specific three-bit experimental (EXP) field values in the topmost Multiprotocol Label Switching (MPLS) label as match criteria for a class map.  

match qos-group

Identifies specific quality-of-service (QoS) group values as match criteria in a class map.  

match qos-group

To identify specific quality-of-service (QoS) group values as match criteria in a class map, use the match qos-group command in class map configuration mode. To remove a specific QoS group value from the matching criteria for a class map, use the no form of this command.

match [ not ] qos-group [ qos-group-value 1 ... qos-group-value8 ]

no match [ not ] qos-group

Syntax Description

not

(Optional) Negates the specified match result.

qos-group-value

QoS group value identifier that specifies the exact value from 0 to 63 or a range of values from 0 to 63. Up to eight values can be entered in one match statement.

Command Default

No match criteria are specified.

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match qos-group command sets the match criteria for examining QoS groups marked on the packet. Up to eight QoS group values can be matched in one match statement. For example, match qos-group 4 9 11 15 16 21 30 31 returns matches for QoS group values of 4, 9, 11, 15, 16, 21, 30, and 31. Only one of the eight values is needed to yield a match (OR operation).

The QoS group value is used as a matching criterion only. The value has no mathematical significance. For instance, the QoS group value 2 is not greater than 1. The value simply indicates that a packet marked with the QoS group value of 2 should be treated differently than a packet marked with a QoS group value of 1. The treatment of these different packets is defined using the service-policy command in policy map class configuration mode.

The QoS group setting is limited in scope to the local router. Typically, the QoS group is set on the local router and is used in conjunction with WRED or MDRR to give differing levels of service based on the group identifier.

The match qos-group command is supported only on egress policies.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows a service policy called policy1 attached to an interface. In this example, class map qosgroup5 will evaluate all packets leaving GigabitEthernet 0/1/0/9 for a QoS group value of 5. If the packet has been marked with the QoS group value of 5, the packet is queued to the class queue with the bandwidth setting 300 kbps.

RP/0/RSP0/CPU0:router(config)# class-map qosgroup5
RP/0/RSP0/CPU0:router(config-cmap)# match qos-group 5
RP/0/RSP0/CPU0:router(config-cmap)# exit
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class qosgroup5
RP/0/RSP0/CPU0:router(config-pmap-c)# bandwidth 300
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if)# service-policy output policy1
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

set discard-class

Sets the discard class and Quality of Service (QoS) group identifiers on IP Version 4 (IPv4) or Multiprotocol Label Switching (MPLS) packets.  

set qos-group

Sets the quality of service (QoS) group identifiers on packets.  

match source-address

To identify a specific source MAC address as match criterion in a class map, use the match source-address command in class map configuration mode. To remove a specific source MAC address from the matching criteria for a class map, use the no form of this command.

match source-address mac address

no match source-address mac address

Syntax Description

mac

Specifies a MAC address

address

Specifies a source MAC address.

Command Default

No default behavior or values

Command Modes

Class map configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The match source-address command specifies a source address that is used as the match criterion against which packets are checked to determine if they belong to the class specified by the class map.

To use the match source-address command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. If you specify more than one match source-address command in a class map, only the last command entered applies.

This command is supported on an input service policy only.

Layer 2 match criteria on a Layer 3 target, or Layer 3 match criteria on a Layer 2 target is not allowed.

The match source-address command is supported on egress Layer 2 interfaces, Layer 2 subinterfaces, and Layer 3 physical interfaces. Layer 3 physical interfaces are supported, because it is possible for a Layer 3 interface to have underlying Layer 2 subinterfaces.

The match source-address command is allowed on a policy map that is attached to an Ethernet interface. The command is invalid on a policy that is attached to a Packet-over-SONET/SDH (POS) interface or a routed VLAN subinterface.

The match 48-bit MAC address is specified in xxxx.xxxx.xxxx format on L2VPN PE interfaces.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to match a source MAC address:

RP/0/RSP0/CPU0:router(config)# class-map match-any A
RP/0/RSP0/CPU0:router(config-cmap)# match source-address mac 0003.f0d0.2356

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

set fr-de

To change the discard eligible (DE) bit setting in the address field of a Frame Relay frame to 1 for all traffic leaving an interface, use the set fr-de command in policy map configuration mode. To remove the DE bit setting, use the no form of this command.

set fr-de [fr-de-bit-value]

no set fr-de [fr-de-bit-value]

Syntax Description

not

(Optional) Negates the specified match result.

fr-de-bit-value

(Optional) Specifies the Frame Relay DE bit. Value can be 0 or 1. Value can be 1.

Command Default

The default value is 0.

Command Modes

Policy map configuration

Command History

Release

Modification

Release 4.0.0

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

To disable this command in a traffic policy, use the no set fr-de command in policy map configuration mode of the traffic policy.

If the DE bit is already set to 1, no changes are made to the frame.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to set the DE bit using the set fr-de command in the traffic policy. The router sets the DE bit of outbound packets belonging to the ip-precedence class.

RP/0/RSP0/CPU0:router(config)# class-map ip-precedence
RP/0/RSP0/CPU0:router(config-cmap)# match precedence 0 1
RP/0/RSP0/CPU0:router(config-cmap)# exit
RP/0/RSP0/CPU0:router(config)# policy-map set-de
RP/0/RSP0/CPU0:router(config-pmap)# class ip-precedence
RP/0/RSP0/CPU0:router(config-pmap-c)# set fr-de 1
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface serial 0/1/0/0/1
RP/0/RSP0/CPU0:router(config-if)# no ip address
RP/0/RSP0/CPU0:router(config-if)# encapsulation frame-relay
RP/0/RSP0/CPU0:router(config-if)# interface serial 0/1/0/0.1 point-to-point
RP/0/RSP0/CPU0:router(config-subif)# ip address 10.1.1.1 255.255.255.252
RP/0/RSP0/CPU0:router(config-subif)# pvc 16
RP/0/RSP0/CPU0:router(config-fr-vc)# service-policy output set-de
  

Related Commands

Command

Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

set discard-class

To set the discard class and Quality of Service (QoS) group identifiers on IP Version 4 (IPv4) or Multiprotocol Label Switching (MPLS) packets, use the set discard-class command in policy map class configuration mode. To leave the discard-class values unchanged, use the no form of this command.

set discard-class discard-class-value

no set discard-class discard-class-value

Syntax Description

discard-class-value

Discard class ID. An integer from 0 to 7, to be marked on the packet.

Command Default

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The set discard-class command associates a discard class ID with a packet. After the discard class is set, other QoS services such as Modified Deficit Round Robin (MDRR) and Weighted Random Early Detection (WRED) can operate on the bit settings.

Discard-class indicates the discard portion of the per hop behavior (PHB). The set discard-class command is typically used in Pipe mode. Discard-class is required when the input PHB marking is used to classify packets on the output interface.

The discard-class values can be used to specify the type of traffic that is dropped when there is congestion.


Note


Marking of the discard class has only local significance on a node.


Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to set the discard class value to 5 for packets that match the MPLS experimental bits 1:

RP/0/RSP0/CPU0:router(config)# class-map cust1
RP/0/RSP0/CPU0:router(config-cmap)# match mpls experimental topmost 1
RP/0/RSP0/CPU0:router(config-cmap)# exit
RP/0/RSP0/CPU0:router(config)# policy-map policy2
RP/0/RSP0/CPU0:router(config-pmap)# class cust1
RP/0/RSP0/CPU0:router(config-pmap-c)# set discard-class 5
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if)# service-policy input policy2
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

service-policy (interface)

Attachs a policy map to an input interface or output interface to be used as the service policy for that interface.  

set dscp

To mark a packet by setting the IP differentiated services code point (DSCP) in the type of service (ToS) byte, use the set dscp command in policy-map class configuration mode. To remove a previously set DSCP value, use the no form of this command.

set dscp [tunnel] dscp-value

no set dscp [tunnel] dscp-value

Syntax Description

tunnel

(Optional) Sets the DSCP on the outer IP header. This command is available on Layer 3 interfaces in the ingress direction.

dscp-value

Number from 0 to 63 that sets the DSCP value. Reserved keywords can be specified instead of numeric values. Table 1 describes the reserved keywords.

Command Default

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Release 3.9.1

The tunnel keyword on Layer 3 interfaces in the ingress direction was added.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

After the DSCP bit is set, other quality-of-service (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 the DSCP value at the edge of the network (or administrative domain); data then is queued based on the DSCP value. Modified Deficit Round Robin (MDRR) can speed up handling for high DSCP traffic at congestion points. Weighted Random Early Detection (WRED) ensures that high DSCP traffic has lower loss rates than other traffic during times of congestion.

Reserved keywords can be specified instead of numeric values. Table 1 describes the reserved keywords.

Task ID

Task ID

Operations

qos

read, write

Examples

In the following example, the DSCP ToS byte is set to 8 in the policy map called policy1. All packets that satisfy the match criteria of class1 are marked with the DSCP value of 8. The network configuration determines how packets are marked.

RP/0/RSP0/CPU0:router (config)# policy-map policy1 
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# set dscp 8
  

Related Commands

Command

Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

service-policy (interface)

Attachs a policy map to an input interface or output interface to be used as the service policy for that interface.  

set precedence

Sets the precedence value in the IP header.  

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

set mpls experimental

To set the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost or imposition labels, use the set mpls experimental command in policy map configuration mode. To leave the EXP value unchanged, use the no form of this command.

set mpls experimental { imposition | topmost } exp-value

no set mpls experimental { imposition | topmost } exp-value

Syntax Description

imposition

Specifies to set the EXP value of the imposition label.

topmost

Specifies to set the EXP value of the topmost label.

exp-value

Value of the MPLS packet label. Range is 0 to 7.

Command Default

No MPLS experimental value is set

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

After the MPLS experimental bits are set, other QoS services such as Modified Deficit Round Robin (MDRR) and Weighted Random Early Detection (WRED) then operate on the bit settings.

The network gives priority (or some type of expedited handling) to the marked traffic through the application of MDRR or WRED at points downstream in the network. Typically, the MPLS experimental value is set at the edge of the network (or administrative domain) and queueing is acted on it thereafter. MDRR can speed up handling for high-priority traffic at congestion points. WRED ensures that high-priority traffic has lower loss rates than other traffic during times of congestion.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to set the MPLS experimental to 5 for packets that match access list 101:

RP/0/RSP0/CPU0:router(config)# class-map class1
RP/0/RSP0/CPU0:router(config-cmap)# match access-group ipv4 acl101
RP/0/RSP0/CPU0:router(config-cmap)# exit

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# set mpls experimental  topmost 5
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface  pos 0/7/0/0
RP/0/RSP0/CPU0:router(config-if)# service-policy  output policy1
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

service-policy (interface)

Attachs a policy map to an input interface or output interface to be used as the service policy for that interface.  

set precedence

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

set precedence [tunnel] value

no set precedence [tunnel] value

Syntax Description

tunnel

(Optional) Sets the IP precedence on the outer IP header. This command is available on Layer 3 interfaces in the ingress direction.

value

Number or name that sets the precedence bits in the IP header. Range is from 0 to 7. Reserved keywords can be specified instead of numeric values. Table 1 describes the reserved keywords.

Command Default

Command Modes

Command History

Release 3.7.2

This command was introduced.

Release 3.9.1

The tunnel keyword on Layer 3 interfaces in the ingress direction was added.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Precedence can be set using a number or corresponding name. After IP Precedence bits are set, other QoS services such as Modified Deficit Round Robin (MDRR) and Weighted Random Early Detection (WRED) then operate on the bit settings.

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

The mapping from keywords such as 0 (routine) and 1 (priority) to a precedence value is useful only in some instances. That is, the use of the precedence bit is evolving. You can define the meaning of a precedence value by enabling other features that use the value. In the case of high-end Internet QoS, IP precedences can be used to establish classes of service that do not necessarily correspond numerically to better or worse handling in the network.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to set the IP precedence to 5 (critical) for packets that match the access control list named customer1:

RP/0/RSP0/CPU0:router(config)# class-map class1
RP/0/RSP0/CPU0:router(config-cmap)# match access-group ipv4 customer1
RP/0/RSP0/CPU0:router(config-cmap)# exit

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# set precedence 5
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if)# service-policy output policy1
  

Related Commands

Command

Description

class-map

Defines a traffic class and the associated rules that match packets to the class.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

service-policy (interface)

Attachs a policy map to an input interface or output interface to be used as the service policy for that interface.  

shape average

To shape traffic to the indicated bit rate according to the algorithm specified, use the shape average command in policy map class configuration mode. To remove traffic shaping, use the no form of this command.

shape average { percent percentage | rate [units] }

no shape average { percent percentage | rate [units] }

Syntax Description

percent percentage

Specifies the interface bandwidth in percentage. Values can be from 1 to 100.

rate

Average shaping rate in the specified units. Values can be from 1 to 4294967295.

units

(Optional) Units for the bandwidth. Values can be:

  • bps—bits per second (default)
  • gbps—gigabits per second
  • kbps—kilobits per second
  • mbps—megabits per second

Command Default

units: bps

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

For shape average commands in the child policy, the reference used for percentage parameters is relative to the maximum rate of the parent. If shaping or policing is not configured on the parent, then the parent inherits the interface rate.

If you have both shape and bandwidth configured for a class, ensure that the shape percent value is always greater than the percent value for bandwidth.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example sets traffic shaping to 50 percent of the parent shaper rate:

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# shape average percent 50
  

The following example shows how to set traffic shaping to 100000 kbps:

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# shape average 100000 kbps
  

show qos interface

To display QoS information for a specific interface, use the show qos interface command in EXEC mode.

show qos interface type interface-path-id { input | output } [ location node-id ]

Syntax Description

type

Interface type. For more information, use the question mark (?) online help function.

interface-path-id

Either a physical interface instance or a virtual interface instance as follows:

  • Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.
    • rack : Chassis number of the rack.
    • slot : Physical slot number of the modular services card or line card.
    • module : Module number. A physical layer interface module (PLIM) is always 0.
    • port : Physical port number of the interface.
    Note   

    In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric ( RSP0 RP0 or RP1 ) and the module is CPU0. Example: interface MgmtEth0/ RSP0 RP1 /CPU0/0.

  • Virtual interface instance. Number range varies depending on interface type.

For more information about the syntax for the router, use the question mark (?) online help function.

input

Attaches the specified policy map to the input interface.

output

Attaches the specified policy map to the output interface.

location node-id

(Optional) Displays detailed QoS information for the designated node. The node-id argument is entered in the rack/slot/module notation.

Command Default

No default behavior or values

Command Modes

EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The show qos interface command displays configuration for all classes in the service policy that is attached to an interface.

Use this command to check the actual values programmed in the hardware from the action keywords in the police rate command.

Task ID

Task ID

Operations

qos

read

Examples

The following sample output shows the QoS information on a GigabitEthernet interface:

show qos interface gig0/0/0/11.1 output

Wed Mar 18 18:25:20.140 UTC 
Interface: GigabitEthernet0_0_0_11.1 output Bandwidth: 1000000 kbps ANCP: 999936 kbps 
Policy: parent-3play-subscriber-line Total number of classes: 5
----------------------------------------------------------------------
Level: 0 Policy: parent-3play-subscriber-line Class: class-default
QueueID: N/A
Shape Profile: 1 CIR: 200000 kbps (200 mbps)
CBS: 100352 bytes PIR: 999936 kbps PBS: 12517376 bytes
WFQ Profile: 1 Committed Weight: 51 Excess Weight: 100
Bandwidth: 200000 kbps, BW sum for Level 0: 1000000 kbps, Excess Ratio: 100
----------------------------------------------------------------------
Level: 1 Policy: child-3play Class: 3play-voip
Parent Policy: parent-3play-subscriber-line Class: class-default
QueueID: 136 (Priority 1)
Queue Limit: 16 kbytes Profile: 3 Scale Profile: 0
Policer Profile: 0 (Single)
Conform: 65 kbps (65 kbps) Burst: 1598 bytes (0 Default)
Child Policer Conform: TX
Child Policer Exceed: DROP
Child Policer Violate: DROP
----------------------------------------------------------------------
Level: 1 Policy: child-3play Class: 3play-video
Parent Policy: parent-3play-subscriber-line Class: class-default
QueueID: 137 (Priority 2)
Queue Limit: 8 kbytes (11 Unknown) Profile: 4 Scale Profile: 0
Policer Profile: 24 (Single)
Conform: 128 kbps (128 kbps) Burst: 1598 bytes (0 Default)
Child Policer Conform: TX
Child Policer Exceed: DROP
Child Policer Violate: DROP
WRED Type: COS based Table: 0 Profile: 4 Scale Profile: 0 Curves: 3
Default RED Curve Thresholds Min : 8 kbytes Max: 8 kbytes
WRED Curve: 1 Thresholds Min : 8 kbytes Max: 8 kbytes
 Match: 3
WRED Curve: 2 Thresholds Min : 8 kbytes Max: 8 kbytes
 Match: 4
----------------------------------------------------------------------
Level: 1 Policy: child-3play Class: 3play-premium
Parent Policy: parent-3play-subscriber-line Class: class-default
QueueID: 138 (Priority Normal)
Queue Limit: 2097 kbytes Profile: 2 Scale Profile: 0
WFQ Profile: 6 Committed Weight: 1020 Excess Weight: 1020
Bandwidth: 200000 kbps, BW sum for Level 1: 200000 kbps, Excess Ratio: 1
----------------------------------------------------------------------
Level: 1 Policy: child-3play Class: class-default
Parent Policy: parent-3play-subscriber-line Class: class-default
QueueID: 139 (Priority Normal)
Queue Limit: 65 kbytes Profile: 1 Scale Profile: 3
WFQ Profile: 0 Committed Weight: 1 Excess Weight: 1020
Bandwidth: 0 kbps, BW sum for Level 1: 200000 kbps, Excess Ratio: 1
----------------------------------------------------------------------
  

Related Commands

Command

Description

show qos inconsistency

Displays inconsistency information for the QoS policy on an interface.