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. |
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 6.1.42 |
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.
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. 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/(config)# class-map dscp14
RP/0/(config-cmap)# match dscp ipv4 14
RP/0/(config-cmap)# exit
RP/0/(config)# policy-map policy1
RP/0/(config-pmap)# class dscp14
RP/0/(config-pmap-c)#bandwidth 1000 mbps
RP/0/(config-pmap-c)#exit
RP/0/(config-pmap)# exit
RP/0/(config)# interface HundredGigE 0/7/0/0
RP/0/(config-if)# service-policy input policy1