QoS Classification Commands

cef pbts class

To override the default behaviour of the policy based tunnel selection (PBTS), use the cef pbts class command in the global configuration mode.

cef pbts class any | forward-class-value fallback-to { forward-class-value | any | drop }

Syntax Description

forward-class-value

Set the forward-class. You can choose the forward-classs value from 0 to 7. The default value is 0 (zero).

any

Specify any forward-class.

fallback-to forward-class-value| any | drop

Specify to which forward-class it has to fall back during a tunnel failure.

You can either choose the forward-class value from 0 to 7, any, or you can choose to drop the forward-class.

When any class is specified, it takes precedence over other forward-class value (0 to 7) .

Command Default

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 7.5.3

This command was introduced.

Usage Guidelines

When TE tunnels associated with the forward-class goes down, traffic can be redirected to another forward-class, any forward-class or chosen to be dropped using fallback PBTS configuration. This configuration overrides the default behavior when PBTS enabled TE tunnel goes down. You can specify the sequence of preferred fallback classes to revert to when TE tunnel of main forward-class goes down.

When cef pbts class any fallback-to any is specified, then the lowest available forward-class in ascending order of 0 to 7 is chosen as fallback when paths to any class goes down.

Task ID

Task ID

Operations

qos

read, write

Examples

This example shows how to enable fallback during a tunnel failure:


RP/0/RP0/CPU0:router(config)#  cef pbts class 0 fallback-to 1 2 3 5  

class-map

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

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

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

Syntax Description

type qos

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

traffic

(Optional) Specifies traffic type 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

XR Config mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

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.

These commands can be used in a class map match criteria for the ingress direction:

  • match access-group
  • match [not] dscp
  • match [not] mpls experimental topmost
  • match [not] precedence
  • match [not] protocol

Task ID

Task ID

Operations

qos

read, write

Examples

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


RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 1

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 7.0.12

This command was introduced.

Usage Guidelines

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.

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/RP0/CPU0:router(config)# class-map p2
RP/0/RP0/CPU0:router(config-cmap)# match precedence 2
RP/0/RP0/CPU0:router(config-cmap)# end-class-map
RP/0/RP0/CPU0:router(config)# commit

RP/0/RP0/CPU0:router(config)# policy-map pm2 
RP/0/RP0/CPU0:router(config-pmap)# class p2 
RP/0/RP0/CPU0:router(config-pmap-c)# set precedence 3 
RP/0/RP0/CPU0:router(config-pmap-c)# end-policy-map 
RP/0/RP0/CPU0:router(config)# commit 
RP/0/RP0/CPU0:router(config)# end 


RP/0/RP0/CPU0:router# show run policy-map pm2 
policy-map pm2
class p2
set precedence 3
! 
class class-default
! 
end-policy-map
!
  

Task ID

Task ID

Operations

qos

read, write

Examples

This 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/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match precedence 3
RP/0/RP0/CPU0:router(config-cmap)#  exit

RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:routerconfig-pmap-c)# shape average percent 30
RP/0/RP0/CPU0:router(config-pmap-c)# exit


RP/0/RP0/CPU0:router(config-pmap)# class class-default
RP/0/RP0/CPU0:router(config-pmap-c)# shape average percent 20

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.

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 7.0.12

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID

Operations

qos

read, write

Examples

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


RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 1
RP/0/RP0/CPU0:router(config-cmap)# end-class-map 

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 7.0.12

This command was introduced.

Usage Guidelines

No specific guidelines impact the use of this command.

Task ID

Task ID

Operations

qos

read, write

Examples

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


RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# police rate 250
RP/0/RP0/CPU0:router(config-pmap)# end-policy-map 

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.

match access-group {ipv4 | ipv6} access-group-name

Syntax Description

ipv4

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

ipv6

Specifies the name of the IPv6 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 7.0.12

This command was introduced.

Usage Guidelines

For class-based features (such as marking 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.

The match access-group command is supported only in the ingress direction. The maximum allowed entries: 8

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.

QoS classification based on the packet length or TTL (time to live) field in the IPv4 and IPv6 headers is not supported.

When an ACL list is used within a class-map, the deny action of the ACL is ignored and the traffic is classified based on the specified ACL match parameters.

Task ID

Task ID

Operations

qos

read, write

Examples

This 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/RP0/CPU0:router(config)# class-map map1
RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv4 map1
RP/0/RP0/CPU0:router(config-cmap)# match access-group ipv6 map2

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] | | [min-value - max-value]}

no match [not] dscp { [ipv4 | ipv6] dscp-value [dscp-value1 . . . dscp-value7] | | [min-value - max-value]}

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 - 63. Up to 64 IP DSCP values can be specified to match packets. Reserved keywords can be specified instead of numeric values. Table 1 describes the reserved keywords.

min-value

Lower limit of DSCP range to match. Value range is 0 - 63.

max-value

Upper limit of DSCP range to match. Value range is 0 - 63.

Command Default

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

Command Modes

Class map configuration

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

The match dscp command is supported only in the ingress direction. The minimum value is 0 and maximum value is 63. The maximum allowed entries: 64.

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

The match dscp command examines the higher-order six bits in the type of service (ToS) byte of the IP header. If you specify more than one match dscp command in a class map, the new values are added to the existing statement.

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

This example shows how to configure the service policy called policy1 and attach service policy policy1 to an interface HundredGigE 0/7/0/0. In this example, class map dscp14 evaluates all packets entering 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 1000 mbps.


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

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

RP/0/RP0/CPU0:router(config)# interface HundredGigE 0/7/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1

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

not

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 7.0.12

This command was introduced.

Usage Guidelines

The match mpls experimental topmost command is supported only in the ingress direction. The minimum value is 0 and maximum value is 7. The maximum allowed entries: 8.

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

This 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 HundredGigabit Ethernet 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 1000 mbps.


RP/0/RP0/CPU0:router(config)# class-map mplsmap1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 1
RP/0/RP0/CPU0:router(config-cmap)# exit

RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class mplsmap1
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 1000 mbps
RP/0/RP0/CPU0:router(config-pmap-c)#exit
RP/0/RP0/CPU0:router(config-pmap)#exit

RP/0/RP0/CPU0:router(config)# interface HundredGigE 0/0/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input  policy1
  

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

This command was introduced.

Usage Guidelines

The match precedence command is supported only in the ingress direction. The minimum value is 0 and maximum value is 7. The maximum allowed entries: 8.

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, the new values are added to the existing statement.

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.

This 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

This 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 HundredGigabit Ethernet 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 of 1000 mbps.


RP/0/RP0/CPU0:router# configure
RP/0/RP0/CPU0:router(config)# class-map ipprec5
RP/0/RP0/CPU0:router(config-cmap)# match precedence ipv4 5	
RP/0/RP0/CPU0:router(config-cmap)# exit

RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class ipprec5
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 1000 mbps
RP/0/RP0/CPU0:router(config-pmap)# exit

RP/0/RP0/CPU0:router(config)# interface HundredGigE 0/0/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
  

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 qos-group [qos-group-value ]

no match qos-group

Syntax Description

qos-group-value

QoS group value identifier that specifies the exact value from 1 to 7. Range is not supported.

Command Default

No match criteria are specified.

Command Modes

Class map configuration

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

The match qos-group command is supported only in the egress direction. The egress default class will implicitly match qos-group 0. The minimum value is 1 and maximum value is 7. The maximum allowed entries: 7.

The match qos-group command sets the match criteria for examining QoS groups marked on the packet. One class map can match only one qos-group value from 1 to 7. The qos-group values 1 to 7 maps to queue 1 to 7 on the egress port. Queue 0 is reserved for class-default.

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 ingress on the local router to be used locally and the router to give differing levels of service based on the group identifier.

In the ingress policy-map, in order to designate the traffic class to a certain CoSQ other than CoSQ 0, the class-map needs to have an explicit set qos-group x statement, where 'x' is the CoSQ in the range of 0 to 7. The default COSQ is 0. In the egress policy-map, a class-map with a corresponding match qos-group x will allow further Quality of Service actions to be applied to the traffic class. For example,

class-map prec1
  match prec 1
 
policy-map test-ingress
  class prec1
    set qos-group 1
    police rate percent 50
 
 
class-map qg1
  match qos-group 1
 
 
policy-map test-egress
  class qg1
    shape average percent 70

Task ID

Task ID

Operations

qos

read, write

Examples

This example shows a service policy called policy1 attached to an HundredGigabit Ethernet interface 0/1/0/9. In this example, class map qosgroup5 will evaluate all packets leaving HundredGigabit Ethernet interface 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 of 1000 mbps.


RP/0/RP0/CPU0:router(config)# class-map qosgroup5
RP/0/RP0/CPU0:router(config-cmap)# match qos-group 5
RP/0/RP0/CPU0:router(config-cmap)# exit

RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class qosgroup5
RP/0/RP0/CPU0:router(config-pmap-c)# bandwidth 1000 mbps
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit

RP/0/RP0/CPU0:router(config)# interface HundredGigE 0/0/0/0
RP/0/RP0/CPU0:router(config-if)# service-policy output  policy1

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 0 to 1, to be marked on the packet.

Command Default

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

The set discard-class command associates a discard class ID with a packet. After the discard class is set, other QoS services such as Random Early Detection (random-detect) 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 set discard-class command is supported only in the ingress direction. Unconditional discard-class marking is supported.

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


Note


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

  2. Discard class cannot be associated with a QoS profile in peering mode.


Task ID

Task ID

Operations

qos

read, write

Examples

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


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

set forward-class

To associate the class-map with a forward-class, use the set forward-class command in policy-map class configuration mode. To remove a previously set forward-class, use the no form of this command.

set forward-class forward-class-value

Syntax Description

forward-class-value

Number from 1 to 7 that sets the forward-class value.

Command Default

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 7.5.3

This command was introduced.

Usage Guidelines

In policy based traffic selection (PBTS), 0 is the default forward-class. You cannot set forward-class 0 to the class-map.

Task ID

Task ID

Operations

qos

read, write

Examples

In this example, the class-map is associated with the forward-class 1:


RP/0/RP0/CPU0:router(config)#policy-map INGRESS-POLICY
RP/0/RP0/CPU0:router(config-pmap)#class AF42-Class
RP/0/RP0/CPU0:router(config-pmap-c)#set forward-class 1  

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 7.0.12

This command was introduced.

Usage Guidelines

After the DSCP bit is set, other quality-of-service (QoS) services can then operate on the bit settings. The set dscp is supported only in the ingress direction.

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.

Task ID

Task ID

Operations

qos

read, write

Examples

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


RP/0/RP0/CPU0:router (config)# policy-map policy-in 
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set dscp 6
  

set ip encapsulation

To set traffic class imposition for SRv6 encapsulation, use the set ip encapsulation command in policy map class configuration mode.

set ip encapsulation class-of-service cos-value

Syntax Description

class-of-service

Specifies the class of service.

cos-value

Specifies the number that sets the SRv6 encapsulation in the IP header. The value ranges from 0 to 63.

Command Default

None

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 24.2.11

This command was introduced.

Usage Guidelines

  • The set ip encapsulation class-of-service command is not allowed in egress QoS policies.

  • The described behavior is applicable only in pipe mode. When in uniform mode or when propagate mode is active, regardless of QoS policy encapsulation settings, the class-of-service (CoS) from the inner header is always copied to the outer header.

  • The set qos-group action cannot be used in conjunction with the set ip encapsulation class-of-service command.

  • The IP encapsulation marking (set ip encapsulation class-of-service) and the MPLS experimental imposition marking (set mpls experimental) features are mutually exclusive. Both the configurations are not allowed at the same time.

Task ID

Task ID

Operations

qos

read, write

Examples

This example shows how to set the traffic class imposition for SRv6 encapsulations.


RP/0/RP0/CPU0:router(config)# class-map match-any class1
RP/0/RP0/CPU0:router(config-pmap)# match protocol ipv4
RP/0/RP0/CPU0:router(config-pmap-c)# match access-group ipv4 10
RP/0/RP0/CPU0:router(config-cmap-c)# class class-default
RP/0/RP0/CPU0:router(config-cmap-c)# end-class-map
RP/0/RP0/CPU0:router(config)# policy-map SRv6
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# set ip encapsulation class-of-service 55
RP/0/RP0/CPU0:router(config-cmap-c)# class class-default
RP/0/RP0/CPU0:router(config-cmap-c)# end-policy-map
RP/0/RP0/CPU0:router(config)# interface HundredGigE 0/0/0/24
RP/0/RP0/CPU0:router(config-if)# service-policy input SRv6
  

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 {topmost} exp-value

no set mpls experimental {topmost} exp-value

Syntax Description

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 7.0.12

This command was introduced.

Usage Guidelines

After the MPLS experimental bits are set, other QoS services can then operate on the bit settings.

This command is supported only in ingress direction. Unconditional MPLS experimental marking is supported.

The network gives priority (or some type of expedited handling) to the marked traffic. Typically, the MPLS experimental value is set at the edge of the network (or administrative domain) and queuing is acted on it thereafter.

Task ID

Task ID

Operations

qos

read, write

Examples

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


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

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

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

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.

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

No default behavior or values

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

Precedence can be set using a number or corresponding name. After IP Precedence bits are set, other QoS services can then operate on the bit settings.

The set precedence command is supported only in the ingress direction. Unconditional precedence marking is supported.

The network gives priority (or some type of expedited handling) to the marked traffic. IP precedence can be set at the edge of the network (or administrative domain) and have queueing act on it thereafter.

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

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


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

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

RP/0/RP0/CPU0:router(config)# interface HundredGigE 0/1/0/9
RP/0/RP0/CPU0:router(config-if)# service-policy input policy1
  

set qos-group

To set the quality of service (QoS) group identifiers on packets, use the set qos-group command in policy map class configuration mode. To leave the QoS group values unchanged, use the no form of this command.

set qos-group qos-group-value

no set qos-group qos-group-value

Syntax Description

qos-group-value

QoS group ID. An integer from 1 to 7, to be marked on the packet.

The qos-group-value is used to select a CoSQ and eventually to a VOQ

Command Default

No group ID is specified.

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

The set qos-group command is supported only in the ingress direction.

The set qos-group will be used as internal priority to choose the queue on the egress port.

In the ingress policy-map, in order to designate the traffic class to a certain CoSQ other than CoSQ 0, the class-map needs to have an explicit set qos-group x statement, where 'x' is the CoSQ in the range of 0 to 7. The default COSQ is 0. In the egress policy-map, a class-map with a corresponding match qos-group x will allow further Quality of Service actions to be applied to the traffic class. For example,

class-map prec1
  match prec 1
 
policy-map test-ingress
  class prec1
    set qos-group 1
    police rate percent 50
 
 
class-map qg1
  match qos-group 1
 
 
policy-map test-egress
  class qg1
    shape average percent 70

Task ID

Task ID

Operations

qos

read, write

Examples

This example sets the QoS group to 5 for packets that match the MPLS experimental bit 1:


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

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

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

show qos-ea default-queue

To display the queue statistics of aggregate shaper at the pin-down member level, use show qos-ea default-queue command in XR EXEC mode.

show qos-ea default-queue pw-ether pw-ether-interface-number member interface pin-down-interface-type pin-down-interface-path-id output

Command Default

No default behavior or values

Command Modes

XR EXEC mode

Command History

Release Modification
Release 24.3.1

This command was introduced.

Usage Guidelines

You can configure a line card can to allow PWHE aggregate shaper policy to co-exist with subinterface policies. The PWHE aggregate shaper policy will only have a class-default with shape and bandwidth remaining actions.

The PWHE aggregate shaper policy can have:

  • only shape action,

  • only bandwidth remaining action, or

  • shape and bandwidth remaining actions (recommended).

Examples

This example shows a sample output of the show qos-ea default-queue command to verify that the aggregate shaper is enforced on the default traffic class TC_0 for the egress traffic from the PW-Ether1 main interface.

Router(config)#show qos-ea default-queue PW-Ether 1 member interface HundredGigE0/7/0/2 output

Interface Name        =          PE1
Interface Handle      =     1c000180
Location              =     0/7/CPU0
Asic Instance         =            0
VOQ Base              =        53312
Port Speed(kbps)      =    100000000
Local Port            =    etm_local
VOQ Mode              =            8
       ReceivedPkts    ReceivedBytes   DroppedPkts     DroppedBytes
-------------------------------------------------------------------
TC_0 = 150295879       150596322940    762151909       763676346056    
TC_1 = 0               0               0               0               
TC_2 = 0               0               0               0               
TC_3 = 0               0               0               0               
TC_4 = 0               0               0               0               
TC_5 = 0               0               0               0               
TC_6 = 0               0               0               0               
TC_7 = 0               0               0               0