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 dscp { [ipv4 | |
ipv6] dscp-value [dscp-value1 . . . dscp-value7] | | [min-value -
max-value]}
no match 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 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.
|
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 3.7.2
|
This command
was introduced.
|
Release 5.2.0
|
The
min-value
and
max-value
variables were added.
|
Usage Guidelines
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
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. In this example, class map dscp14 evaluates all
packets entering
Packet-over-SONET/SDH (POS)
interface 0/1/0/0for
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