![]() |
Cisco IOS Quality of Service Solutions Command Reference
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
match access-group through mls ip pbr
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contents
match access-group through mls ip pbrmac packet-classifyTo classify Layer 3 packets as Layer 2 packets, use the macpacket-classify command in interface configuration mode. To return to the default settings, use the no form of this command. Usage GuidelinesThis command is not supported on Cisco 7600 series routers that are configured with a Supervisor Engine 2. You can configure these interface types for multilayer MAC access control list (ACL) quality of service (QoS) filtering:
The ingress traffic that is permitted or denied by a MAC ACL on an interface configured for multilayer MAC ACL QoS filtering is processed by egress interfaces as MAC-layer traffic. You cannot apply egress IP ACLs to traffic that was permitted or denied by a MAC ACL on an interface configured for multilayer MAC ACL QoS filtering. Microflow policing does not work on interfaces that have the macpacket-classify command enabled. The macpacket-classify command causes the Layer 3 packets to be classified as Layer 2 packets and disables IP classification. Traffic is classified based on 802.1Q class of service (CoS), trunk VLAN, EtherType, and MAC addresses. ExamplesThis example shows how to classify incoming and outgoing Layer 3 packets as Layer 2 packets:
Router(config-if)# mac packet-classify
Router(config-if)#
This example shows how to disable the classification of incoming and outgoing Layer 3 packets as Layer 2 packets:
Router(config-if)# no mac packet-classify
Router(config-if)#
This example shows how to enforce Layer 2 policies on BPDU packets:
Router(config-if)# mac packet-classify bpdu
Router(config-if)#
This example shows how to disable Layer 2 policies on BPDU packets:
Router(config-if)# no mac packet-classify bpdu
Router(config-if)#
mac packet-classify use vlanTo enable VLAN-based quality of service (QoS) filtering in the MAC access control lists (ACLs), use the macpacket-classifyusevlan command in global configuration mode. To return to the default settings, use the no form of this command. Usage GuidelinesThis command is supported in PFC3BXL or PFC3B mode only. This command is not supported on Cisco 7600 series routers that are configured with a Supervisor Engine 2. You must use the nomacpacket-classifyusevlan command to disable the VLAN field in the Layer 2 key if you want to apply QoS to the Layer 2 Service Advertising Protocol (SAP)-encoded packets (for example, Intermediate System-to-Intermediate System [IS-IS] and Internet Packet Exchange [IPX]). QoS does not allow policing of non-Advanced Research Protocol Agency (ARPA) Layer 2 packets (for example, IS-IS and IPX) if the VLAN field is enabled. map ipT o classify either all the IPv4 packets, or the IPv4 packets based on either differentiated service code point (DSCP) values or precedence values into high priority or low priority for POS, channelized, and clear-channel SPAs, use the following forms of the mapip command in ingress class-map mode. Use the no forms of this command listed here to remove the IPv4 settings. Command to Classify all the IPv4 Packets
map
ip
all
queue
{strict-priority | 0}
no
map
ip
all
queue
{strict-priority | 0}
Command to Classify IPv4 Packets Based on DSCP Values
map
ip
{dscp-based | dscp {dscp-value | dscp-range} queue {strict-priority | 0}}
no
map
ip
{dscp-based | dscp {dscp-value | dscp-range} queue {strict-priority | 0}}
Command to Classify IPv4 Packets Based on Precedence Values
map
ip
{precedence-based | precedence {precedence-value | precedence-range} queue strict-priority | 0}
no
map
ip
{precedence-based | precedence {precedence-value | precedence-range} queue strict-priority | 0}
Syntax Description
Command DefaultIf there is no configuration of IPv4 DSCP value or precedence values map to high priority specified, the system treats packets with DSCP range EF as high priority and precedence range 6-7 as high priority. Usage GuidelinesTo classify all IPv4 packets as high or low for POS, channelized, or clear-channel SPA, use the mapipallqueuecommand, To classify IPv4 packets with specific DSCP values, enable the DSCP classification using the mapipdscp-basedcommand. To classify IPV4 packets with specific DSCP values as high or low, use the mapipdscp {{dscp-value | dscp-range} queue {strict-priority | 0}} command. To classify IPv4 packets with specific precedence values, enable the precedence classification using the mapipprecedence-basedcommand. To classify IPv4 packets with specific precedence values as high or low, use the mapipprecedence {{precedence-value | precedence-range} queue {strict-priority | 0}} command. ExamplesThe following example shows how to classify all the IPv4 Packets as high priority using the mapipallqueuestrict-prioritycommand: Router# config Router(config)# ingress-class-map 1 Router(config-ing-class-map)# map ip all queue strict-priority The following example shows how to classify IPv4 Packets with DSCP value of cs1 as high priority: Router# config Router(config)# ingress-class-map 1 Router(config-ing-class-map)# map ip dscp-based Router(config-ing-class-map)# map ip dscp cs1 queue strict-priority The following example shows how to classify IPv4 Packets with a precedence value 3 and 5 as high priority: Router# config Router(config)# ingress-class-map 1 Router(config-ing-class-map)# map ip precedence-based Router(config-ing-class-map)# map ip precedence 3 5 queue strict-priority map ipv6T o classify either all the IPv6 packets, or IPv6 packets based on specific traffic class (TC) values as high priority or low priority in the context of POS, channelized, and clear-channel SPAs use the following forms of mapipv6 commands in ingress class-map mode. Use the no forms of this command listed here to remove the IPv6 settings. Command to Classify all the IPv6 Packets
map
ipv6
all
queue
{strict-priority | 0}
no
map
ipv6
all
queue
{strict-priority | 0}
Command to Classify IPv6 Traffic-Class values as High Priority or Low Priority
map
ipv6
tc {tc-value | tc-range} queue {strict-priority | 0}
no
map
ipv6
tc {tc-value | tc-range} queue {strict-priority | 0}
Syntax Description
Command DefaultIf a user does not configure which IPv6 traffic class values map to high priority, the system treats packets the packets with traffic class EF as high priority. Usage GuidelinesTo classify all the IPv6 packets as high priority or low priority in the context of POS, channelized, or clear-channel SPAs, use the mapipv6allqueuecommand. To classify the IPv6 packets with specific traffic class values, use the mapipv6tccs2queuestrict-prioritycommand. ExamplesThe following example shows how to classify all the IPv6 packets as high priority using the mapipv6allqueuestrict-priority command: Router# config Router(config)# ingress-class-map 1 Router(config-ing-class-map)# map ipv6 all queue strict-priority The following example shows how to classify the IPv6 packets with traffic-class values cs2 as high priority: Router# config Router(config)# ingress-class-map 1 Router(config-ing-class-map)# map ip tc cs2 queue strict-priority map mplsT o classify either all the Multiprotocol Label Switching (MPLS) packets or MPLS packets with specified EXP values or range as high priority or low priority for POS, channelized, and clear-channel SPAs the following forms of the mapmpls command are used in ingress class-map mode. Use the no forms of this command listed here to remove the MPLS settings. Command to Classify all the MPLS EXP Values as High Priority or Low Priority
map
mpls
all
queue
{strict-priority | 0}
no
map
mpls
all
queue
Command to Classify the MPLS EXP Values as High Priority or Low Priority
map
mpls
exp
{exp-value | exp-range} queue {strict-priority | 0}
no
map
mpls
exp
{exp-value | exp-range} queue {strict-priority | 0}
Syntax Description
Command DefaultIf a user does not configure which MPLS EXP values map to high priority, the system treats packets with an EXP value of 6-7 as high priority. Usage GuidelinesTo classify all the MPLS packets as high priority or low priority for POS, channelized, or clear-channel SPA, use the mapmplsallqueuecommand. To classify the MPLS packets with specific EXP values, use the mapmplsexp{exp-value|exp-range}queue{strict-priority|0} command. ExamplesThe following example shows how to classify all the MPLS packets as high priority using the mapmplsallqueuestrict-priority command: Router# config Router(config)# ingress-class-map 1 Router(config-ing-class-map)# map mpls all queue strict-priority The following example shows how to classify the MPLS packets with EXP value of 4 as high priority: Router# config Router(config)# ingress-class-map 1 Router(config-ing-class-map)# map mpls exp 4 queue strict-priority match access-groupTo configure the match criteria for a class map on the basis of the specified access control list (ACL), use the match access-group command in QoS class-map configuration or policy inline configuration mode. To remove the ACL match criteria from a class map, use the no form of this command.
match
access-group
{access-group | name access-group-name}
no
match
{access-group | name access-group-name}
Syntax Description
Command ModesQoS class-map configuration (config-cmap) Policy inline configuration (config-if-spolicy-inline) Command History
Usage GuidelinesThe match access-group command specifies a numbered or named 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. A traffic rate is generated for packets that match an access group. In zone-based policy firewalls, only the first packet that creates a session matches the configured policy. Subsequent packets in the flow do not match the filters in the configured policy, but instead match the session directly. The statistics related to subsequent packets are shown as part of the inspect action. Zone-based policy firewalls support only the match access-group, match class-map, and match protocol commands. If you specify more than one match command in a class map, only the last command that you specified will be applied to the class map. The last match command overrides the previously entered match commands. The match access-group command specifies the numbered access list against whose contents packets are checked to determine if they match the criteria specified in the class map. Access lists configured with the log keyword of the access-list command are not supported when you configure the match criteria. For more information about the access-list command, refer to the Cisco IOS IP Application Services Command Reference. When this command is configured in Cisco IOS Release 15.0(1)M and later releases, the firewall inspects only Layer 4 policy maps. In releases prior to Cisco IOS Release 15.0(1)M, the firewall inspects both Layer 4 and Layer 7 policy maps. For class-based weighted fair queueing (CBWFQ), you can define traffic classes based on the match criteria that include ACLs, experimental (EXP) field values, input interfaces, protocols, and quality of service (QoS) labels. Packets that satisfy the match criteria for a class constitute the traffic for that class.
This command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration modes in which you can issue this command. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SETo use the match access-group command, you must configure the service-policy type performance-monitor inline command. Supported Platforms Other than Cisco 10000 Series RoutersTo use the match access-group command, you must configure the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use one of the following commands to configure its match criteria: Cisco 10000 Series RoutersTo 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. Cisco ASR 1000 Series Aggregation Services RoutersCisco ASR 1000 Series Routers do not support more than 16 match statements per class map. An interface with more than 16 match statements rejects the service policy. ExamplesThe following example shows how to specify a class map named acl144 and to configure the ACL numbered 144 to be used as the match criterion for that class: Device(config)# class-map acl144 Device(config-cmap)# match access-group 144 The following example shows how to define a class map named c1 and configure the ACL numbered 144 to be used as the match criterion for that class:
Device(config)# class-map type inspect match-all c1 Device(config-cmap)# match access-group 144 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to configure a service policy for the Performance Monitor in policy inline configuration mode. The policy specifies that packets traversing Ethernet interface 0/0 must match ACL144. Device(config)# interface ethernet 0/0 Device(config-if)# service-policy type performance-monitor inline input Device(config-if-spolicy-inline)# match access-group name ACL144 Device(config-if-spolicy-inline)# exit Related Commands
match application (class-map)To use the metadata application as a match criterion for control plane classification, use the match application command in QoS class-map configuration mode. To remove a previously configured metadata application from being used as a match criterion for control plane classification, use the no form of this command.
match application
{application-group application-group-name
| attribute
{category
{business-and-productivity-tools | voice-and-video} | device-class
device-class-type
| media-type
media-type | sub-category
{remote-access-terminal | voice-video-chat-collaboration}} | application-name
[source
{msp
| nbar
| rsvp} | vendor
vendor-name
version
version-number]}
no match application
{application-group application-group-name
| attribute
{category
{business-and-productivity-tools | voice-and-video} | device-class
device-class-type
| media-type
media-type | sub-category
{remote-access-terminal | voice-video-chat-collaboration}} | application-name
[source
{msp
| nbar
| rsvp} | vendor
vendor-name
version
version-number]}
Syntax Description
Usage GuidelinesEnabling metadata-based control plane classification on a per-platform, per-line card basis for quality of service (QoS) policies involves the following key steps:
You can use the match application command to enable metadata-based filters that can be applied to a class map. Specifying the required application name ensures that the respective policies can be applied only to those flows that match the application name. You can use the match application command in conjunction with any other match commands for specifying match criteria for classes. For example, you can use the match dscp command along with the match application command as the classification criteria for flows. You can use the show metadata flow classification table command to verify the metadata-based classification information. You can use the debug metadata flow all command to verify whether a particular classification has been successfully created.
ExamplesThe following example shows how to configure a class map c1 and specify the metadata application webex-meeting as the matching criterion, thus achieving control plane classification. Only those flows that match the metadata application webex-meeting will be considered for the appropriate action. Device(config)# class-map c1 Device(config-cmap)# match application webex-meeting The following configuration is provided for the completeness of the example. A policy map p1 that uses the previously configured class c1 is created. The requirement in this example is to provide a guaranteed bandwidth of 1 Mb/s to all flows that match the criterion defined for class c1: Device(config)# policy-map p1 Device(config-pmap)# class c1 Device(config-pmap-c)# priority 1 The following configuration example shows how to attach a policy to a target interface: Device(config)# interface gigabitethernet 0/0 Device(config-if)# service-policy output p1 Related Commands
match anyTo configure the match criteria for a class map to be successful match criteria for all packets, use the matchany command in class-map configuration or policy inline configuration mode. To remove all criteria as successful match criteria, use the no form of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesIn the following configuration, all packets traversing Ethernet interface 1/1 will be policed based on the parameters specified in policy-map class configuration mode: Router(config)# class-map matchany Router(config-cmap)# match any Router(config-cmap)# exit Router(config)# policy-map policy1 Router(config-pmap)# class class4 Router(config-pmap-c)# police 8100 1500 2504 conform-action transmit exceed-action set-qos-transmit 4 Router(config-pmap-c)# exit Router(config)# interface ethernet1/1 Router(config-if)# service-policy output policy1 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that all packets traversing Ethernet interface 0/0 will be matched and monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match any Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Related Commands
match atm-clpTo enable packet matching on the basis of the ATM cell loss priority (CLP), use the matchatm-clpcommand in class-map configuration mode. To disable packet matching on the basis of the ATM CLP, use the no form of this command. Command History
Usage GuidelinesThis command is supported on policy maps that are attached to ATM main interfaces, ATM subinterfaces, or ATM permanent virtual circuits (PVCs). However, policy maps (containing the matchatm-clp command) that are attached to these types of ATM interfaces can be input policy maps only . This command is supported on the PA-A3 adapter only . ExamplesIn the following example, a class called "class-c1" has been created using the class-map command, and the matchatm-clp command has been configured inside that class. Therefore, packets are matched on the basis of the ATM CLP and are placed into this class. Router> enable Router# configure terminal Router(config)# class-map class-c1 Router(config-cmap)# match atm-clp Router(config-cmap)# end Related Commands
match atm oamTo enable the control traffic classification on an ATM interface, use the matchatmoamcommand in class-map configuration mode. To disable the control traffic classification, use the no form of this command. Usage GuidelinesUse this command for policy maps attached to ATM interfaces or ATM permanent virtual circuits (PVCs). Policy maps containing the matchatmoam command attached to ATM interfaces or ATM PVCs can be input policy maps only. ExamplesThe following example shows the control traffic classification being configured as the match criterion in a class map. The policy map containing this class map is then applied to the ATM interface. Router# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)# class-map class-oam Router(config-cmap)# match atm oam Router(config-cmap)# exit Related Commands
match atm-vciTo enable packet matching on the basis of the ATM virtual circuit interface (VCI), use the matchatm-vcicommand in class map configuration mode. To disable packet matching on the basis of the ATM VCI, use thenoform of this command. Usage GuidelinesWhen you configure the matchatm-vcicommand in class map configuration mode, you can add this class map to a policy map that can be attached only to an ATM permanent virtual path (PVP).
You can use the matchnot command to match any VC except those you specify in the command. match class-mapTo use a traffic class as a classification policy, use the match class-map command in class-map or policy inline configuration mode. To remove a specific traffic class as a match criterion, use the no form of this command. Command History
Usage GuidelinesThe only method of including both match-any and match-all characteristics in a single traffic class is to use the match class-map command. To combine match-any and match-all characteristics into a single class, do one of the following:
You can also use the match class-map command to nest traffic classes within one another, saving users the overhead of re-creating a new traffic class when most of the information exists in a previously configured traffic class. When packets are matched to a class map, a traffic rate is generated for these packets. In a zone-based firewall policy, only the first packet that creates a session matches the policy. Subsequent packets in this flow do not match the filters in the configured policy, but instead match the session directly. The statistics related to subsequent packets are shown as part of the 'inspect' action. Non-Zone-Based Policy Firewall ExamplesIn the following example, the traffic class called class1 has the same characteristics as traffic class called class2, with the exception that traffic class class1 has added a destination address as a match criterion. Rather than configuring traffic class class1 line by line, you can enter the match class-map class2 command. This command allows all of the characteristics in the traffic class called class2 to be included in the traffic class called class1, and you can simply add the new destination address match criterion without reconfiguring the entire traffic class. Router(config)# class-map match-any class2 Router(config-cmap)# match protocol ip Router(config-cmap)# match qos-group 3 Router(config-cmap)# match access-group 2 Router(config-cmap)# exit Router(config)# class-map match-all class1 Router(config-cmap)# match class-map class2 Router(config-cmap)# match destination-address mac 1.1.1 Router(config-cmap)# exit The following example shows how to combine the characteristics of two traffic classes, one with match-any and one with match-all characteristics, into one traffic class with the match class-map command. The result of traffic class called class4 requires a packet to match one of the following three match criteria to be considered a member of traffic class called class 4: IP protocol and QoS group 4, destination MAC address 1.1.1, or access group 2. Match criteria IP protocol and QoS group 4 are required in the definition of the traffic class named class3 and included as a possible match in the definition of the traffic class named class4 with the match class-map class3 command. In this example, only the traffic class called class4 is used with the service policy called policy1. Router(config)# class-map match-all class3 Router(config-cmap)# match protocol ip Router(config-cmap)# match qos-group 4 Router(config-cmap)# exit Router(config)# class-map match-any class4 Router(config-cmap)# match class-map class3 Router(config-cmap)# match destination-address mac 1.1.1 Router(config-cmap)# match access-group 2 Router(config-cmap)# exit Router(config)# policy-map policy1 Router(config-pmap)# class class4 Router(config-pmap-c)# police 8100 1500 2504 conform-action transmit exceed-action set-qos-transmit 4 Router(config-pmap-c)# exit match cosTo match a packet on the basis of a Layer 2 class of service (CoS)/Inter-Switch Link (ISL) marking, use the matchcos command in class-map configuration or policy inline configuration mode. To remove a specific Layer 2 CoS/ISL marking as a match criterion, use the no form of this command.
match
cos
cos-value
[cos-value [cos-value [cos-value] ]]
no
match
cos
cos-value
[cos-value [cos-value [cos-value] ]]
Syntax Description
Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesIn the following example, the CoS values of 1, 2, and 3 are successful match criteria for the interface that contains the classification policy named cos: Router(config)# class-map cos Router(config-cmap)# match cos 1 2 3 In the following example, classes named voice and video-n-data are created to classify traffic based on the CoS values. QoS treatment is then given to the appropriate packets in the CoS-based-treatment policy map (in this case, the QoS treatment is priority 64 and bandwidth 512). The service policy configured in this example is attached to all packets leaving Fast Ethernet interface 0/0.1. The service policy can be attached to any interface that supports service policies. Router(config)# class-map voice Router(config-cmap)# match cos 7 Router(config)# class-map video-n-data Router(config-cmap)# match cos 5 Router(config)# policy-map cos-based-treatment Router(config-pmap)# class voice Router(config-pmap-c)# priority 64 Router(config-pmap-c)# exit Router(config-pmap)# class video-n-data Router(config-pmap-c)# bandwidth 512 Router(config-pmap-c)# exit Router(config-pmap)# exit Router(config)# interface fastethernet0/0.1 Router(config-if)# service-policy output cos-based-treatment Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criteria of a CoS value of 2 will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match cos 2 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Example of the match cos Command for Matching Traffic Classes Inside a 802.1p Domain by CoS values in Cisco IOS Release 12.2(33)SCFThe following example shows how to match traffic classes for the 802.1p domain with packet CoS values: Router> enable Router# config terminal Router(config)# class-map cos7 Router(config-cmap)# match cos 2 Router(config-cmap)# exit Related Commands
match cos innerTo match the inner cos of QinQ packets on a Layer 2 class of service (CoS) marking, use the matchcosinnercommand in class-map configuration mode. To remove a specific Layer 2 CoS inner tag marking, use the no form of this command. ExamplesIn the following example, the inner CoS-values of 1, 2, and 3 are successful match criteria for the interface that contains the classification policy called cos: Router(config)# class-map cos Router(config-cmap)# match cos inner 1 2 3 Related Commands
match destination-address macTo use the destination MAC address as a match criterion, use the matchdestination-addressmaccommand in class-map configuration or policy inline configuration mode. To remove a previously specified destination MAC address as a match criterion, use the noform of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesThe following example specifies a class map named macaddress and specifies the destination MAC address to be used as the match criterion for this class: Router(config)# class-map macaddress Router(config-cmap)# match destination-address mac 00:00:00:00:00:00 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the specified destination MAC address will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match destination-address mac 00:00:00:00:00:00 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit match discard-classTo specify a discard class as a match criterion, use the matchdiscard-class command in class-map configuration or policy inline configuration mode. To remove a previously specified discard class as a match criterion, use the no form of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. A discard-class value has no mathematical significance. For example, the discard-class value 2 is not greater than 1. The value simply indicates that a packet marked with discard-class 2 should be treated differently than a packet marked with discard-class 1. Packets that match the specified discard-class value are treated differently from packets marked with other discard-class values. The discard-class is a matching criterion only, used in defining per hop behavior (PHB) for dropping traffic. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesThe following example shows that packets in discard class 2 are matched:
Router(config)# class-map d-class-2
Router(config-cmap)# match discard-class 2
Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criteria specified by discard-class 2 will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match discard-class 2 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit match dscpTo identify one or more differentiated service code point (DSCP), Assured Forwarding (AF), and Certificate Server (CS) values as a match criterion, use the match dscp command in class-map configuration or policy inline configuration mode. To remove a specific DSCP value from a class map, use the no form of this command.
match
[ip]
dscp
dscp-value
[dscp-value dscp-value dscp-value dscp-value dscp-value dscp-value dscp-value]
no
match
[ip]
dscp
dscp-value
Syntax DescriptionCommand Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policy type performance-monitor inline command. DSCP Values You must enter one or more differentiated service code point (DSCP) values. The command may include any combination of the following:
For example, if you wanted the DCSP values of 0, 1, 2, 3, 4, 5, 6, or 7 (note that only one of the IP DSCP values must be a successful match criterion, not all of the specified DSCP values), enter the match dscp 01234567 command. This command is used by the class map to identify a specific DSCP value marking on a packet. In this context, dscp-value arguments are used as markings only and have no mathematical significance. For instance, the dscp-value of 2 is not greater than 1. The value simply indicates that a packet marked with the dscp-value of 2 is different than a packet marked with the dscp-value of 1. The treatment of these marked packets is defined by the user through the setting of Quality of Service (QoS) policies in policy-map class configuration mode. Match Packets on DSCP Values To match DSCP values for IPv6 packets only, the match protocol ipv6 command must also be used. Without that command, the DSCP match defaults to match both IPv4 and IPv6 packets. To match DSCP values for IPv4 packets only, use the ip keyword. Without the ip keyword the match occurs on both IPv4 and IPv6 packets. Alternatively, the match protocol ip command may be used with match dscp to classify only IPv4 packets. After the DSCP bit is set, other QoS features can then operate on the bit settings. The network can give priority (or some type of expedited handling) to marked traffic. Typically, you set the precedence value at the edge of the network (or administrative domain); data is then queued according to the precedence. Weighted fair queueing (WFQ) can speed up handling for high-precedence traffic at congestion points. Weighted Random Early Detection (WRED) can ensure that high-precedence traffic has lower loss rates than other traffic during times of congestion. Cisco 10000 Series Routers The Cisco 10000 series routers support DSCP matching of IPv4 packets only. You must include the ip keyword when specifying the DSCP values to use as match criterion. You cannot use the set ip dscp command with the set ip precedence command to mark the same packet. DSCP and precedence values are mutually exclusive. A packet can have one value or the other, but not both. ExamplesThe following example shows how to set multiple match criteria. In this case, two IP DSCP values and one AF value. Router(config)# class-map map1 Router(config-cmap)# match dscp 1 2 af11 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criterion specified by DSCP value 2 will be monitored based on the parameters specified in the flow monitor configuration named fm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match dscp 2 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# end Related Commands
match field
To configure the match criteria for a class map on the basis of the fields defined in the protocol header description files (PHDFs), use the match field command in class-map configuration mode. To remove the specified match criteria, use the no form of this command.
match
field
protocol
protocol-field
{eq [mask] | neq [mask] | gt | lt | range range | regex string}
value
[next next-protocol]
no
match
field
protocol
protocol-field
{eq [mask] | neq [mask] | gt | lt | range range | regex string}
value
[next next-protocol]
Syntax Description
Command History
Usage GuidelinesBefore issuing the match-field command, you must load a PHDF onto the router via the load protocol command. Thereafter, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. Match criteria are defined via a start point, offset, size, value to match, and mask. A match can be defined on a pattern with any protocol field. ExamplesThe following example shows how to configure FPM for blaster packets. The class map contains the following match criteria: TCP port 135, 4444 or UDP port 69; and pattern 0x0030 at 3 bytes from start of IP header. load protocol disk2:ip.phdf load protocol disk2:tcp.phdf load protocol disk2:udp.phdf class-map type stack match-all ip-tcp match field ip protocol eq 0x6 next tcp class-map type stack match-all ip-udp match field ip protocol eq 0x11 next udp class-map type access-control match-all blaster1 match field tcp dest-port eq 135 match start 13-start offset 3 size 2 eq 0x0030 class-map type access-control match-all blaster2 match field tcp dest-port eq 4444 match start 13-start offset 3 size 2 eq 0x0030 class-map type access-control match-all blaster3 match field udp dest-port eq 69 match start 13-start offset 3 size 2 eq 0x0030 policy-map type access-control fpm-tcp-policy class blaster1 drop class blaster2 drop policy-map type access-control fpm-udp-policy class blaster3 drop policy-map type access-control fpm-policy class ip-tcp service-policy fpm-tcp-policy class ip-udp service-policy fpm-udp-policy interface gigabitEthernet 0/1 service-policy type access-control input fpm-policy match flow pdpTo specify a Packet Data Protocol (PDP) flow as a match criterion in a class map, use the matchflowpdp command in class-map configuration mode. To remove a PDP flow as a match criterion, use the no form of this command. Command History
Usage GuidelinesThe matchflowpdp command allows you to match and classify traffic on the basis of a PDP flow. The matchflowpdp command is included with the Flow-Based QoS for GGSN feature available with Cisco IOS Release 12.4(9)T. The Flow-Based QoS for GGSN feature is designed specifically for the Gateway General Packet Radio Service (GPRS) Support Node (GGSN). Per-PDP Policing The Flow-Based QoS for GGSN feature includes per-PDP policing (session-based policing). The matchflowpdp command (when used in conjunction with the class-map command, the policy-map command, the policeratepdp command, and the service-policy command) allows you to configure per-PDP policing (session-based policing) for downlink traffic on a GGSN. Note the following points related to per-PDP policing:
For More Information For more information about the GGSN, along with the instructions for configuring the Flow-Based QoS for GGSN feature, see the Cisco GGSN Release 6.0 Configuration Guide , Cisco IOS Release 12.4(2)XB.
For more information about the GGSN-specific commands, see the Cisco GGSN Release 6.0 Command Reference , Cisco IOS Release 12.4(2)XB. ExamplesThe following example specifies PDP flows as the match criterion in a class map named "class-pdp": class-map class-pdp match flow pdp Related Commands
match fr-dlciTo specify the Frame Relay data-link connection identifier (DLCI) number as a match criterion in a class map, use the matchfr-dlcicommand in class-map configuration or policy inline configuration mode. To remove a previously specified DLCI number as a match criterion, use the no form of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. This match criterion can be used in main interfaces and point-to-multipoint subinterfaces in Frame Relay networks, and it can also be used in hierarchical policy maps. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesIn the following example a class map named "class1" has been created and the Frame Relay DLCI number of 500 has been specified as a match criterion. Packets matching this criterion are placed in class1. Router(config)# class-map class1 Router(config-cmap)# match fr-dlci 500 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the Frame Relay DLCI number of 500 will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match fr-dlci 500 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Related Commands
match input vlanTo configure a class map to match incoming packets that have a specific virtual local area network (VLAN) ID, use the matchinputvlancommand in class map configuration mode. To remove the matching of VLAN IDs, use the no form of this command. Syntax Description
Usage GuidelinesThe matchinputvlan command allows you to create a class map that matches packets with one or more specific VLAN IDs, as they were received on the input (ingress) interface. This enables hierarchical Quality of Service (HQoS) for Ethernet over MPLS (EoMPLS) Virtual Circuits (VC), allowing parent and child relationships between QoS class maps and policy maps. This in turn enables service providers to easily classify and shape traffic for a particular EoMPLS network. In EoMPLS applications, the parent class map typically specifies the maximum bandwidth for all of the VCs in a specific EoMPLS network. Then the child class maps perform other QoS operations, such as traffic shaping, on a subset of this traffic. Do not confuse the matchinputvlan command with the matchvlan command, which is also a class-map configuration command.
The matchinputvlan command can also be confused with the matchinput-interfacevlan command, which matches packets being received on a logical VLAN interface that is used for inter-VLAN routing.
The following restrictions apply when using the matchinputvlan command:
ExamplesThe following example creates a class map and policy map that matches packets with a VLAN ID of 1000. The policy map shapes this traffic to a committed information rate (CIR) value of 10 Mbps (10,000,000 bps). The final lines then apply this policy map to a specific gigabit Ethernet WAN interface. Router# configure terminal Router(config)# class-map match-any vlan1000 Router(config-cmap)# match input vlan 1000 Router(config-cmap)# exit Router(config)# policy-map policy1000 Router(config-pmap)# class vlan1000 Router(config-pmap-c)# exit Router(config-pmap)# shape average 10000000 Router(config-pmap)# interface GE-WAN 3/0 Router(config-if)# service-policy output policy1000 Router(config-if)# The following example shows a class map being configured to match VLAN IDs 100, 200, and 300: Router# configure terminal Router(config)# class-map match-any hundreds Router(config-cmap)# match input vlan 100 200 300 Router(config-cmap)# The following example shows a class map being configured to match all VLAN IDs from 2000 to 2999 inclusive: Router# configure terminal Router(config)# class-map match-any vlan2000s Router(config-cmap)# match input vlan 2000-2999 Router(config-cmap)# The following example shows a class map being configured to match both a range of VLAN IDs, as well as specific VLAN IDs: Router# configure terminal Router(config)# class-map match-any misc Router(config-cmap)# match input vlan 1 5 10-99 2000-2499 Router(config-cmap)# Related Commands
match input-interfaceTo configure a class map to use the specified input interface as a match criterion, use the match input-interface command in class-map configuration or policy inline configuration mode. To remove the input interface match criterion from a class map, use the no form of this command. Command Modes
Policy inline configuration (config-if-spolicy-inline) Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command.
Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SETo enter policy inline configuration mode, you must first enter the service-policy type performance-monitor inline command. Supported Platforms Other Than Cisco 10000 Series RoutersFor class-based weighted fair queueing (CBWFQ), you define traffic classes based on match criteria including input interfaces, access control lists (ACLs), protocols, quality of service (QoS) labels, and experimental (EXP) field values. Packets satisfying the match criteria for a class constitute the traffic for that class. The match input-interface command specifies the name of an input interface to be 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 input-interface command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use one of the following commands to configure its match criteria: If you specify more than one command in a class map, only the last command entered applies. The last command overrides the previously entered commands. Cisco 10000 Series RoutersFor CBWFQ, you define traffic classes based on match criteria including input interfaces, ACLs, protocols, QoS labels, and EXP field values. Packets satisfying the match criteria for a class constitute the traffic for that class. To use the match input-interface command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. ExamplesThe following example specifies a class map named ethernet1 and configures the input interface named ethernet1 to be used as the match criterion for this class: Router(config)# class-map ethernet1 Router(config-cmap)# match input-interface ethernet1 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criteria of the input interface named ethernet1 will be monitored based on the parameters specified in the flow monitor configuration named fm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match input-interface ethernet 1 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Related Commands
match ip rtpTo configure a class map to use the Real-Time Protocol (RTP) port as the match criterion, use the matchiprtpcommand in class-map configuration or policy inline configuration mode. To remove the RTP port match criterion, use the no form of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. This command is used to match IP RTP packets that fall within the specified port range. It matches packets destined to all even User Datagram Port (UDP) port numbers in the range from the starting port number argument to the starting port number plus the port range argument. Use of an RTP port range as the match criterion is particularly effective for applications that use RTP, such as voice or video. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesThe following example specifies a class map named ethernet1 and configures the RTP port number 2024 and range 1000 to be used as the match criteria for this class: Router(config)# class-map ethernet1 Router(config-cmap)# match ip rtp 2024 1000 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criteria of RTP port number 2024 and range 1000 will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match ip rtp 2024 1000 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Related Commands
match mpls experimentalTo configure a class map to use the specified value or values of the experimental (EXP) field as a match criteria, use the matchmplsexperimentalcommand in class-map configuration mode. To remove the EXP field match criteria from a class map, use the no form of this command. Command History
Usage GuidelinesSupported Platforms Other Than the Cisco 10000 Series For class-based weighted fair queueing (CBWFQ), you define traffic classes based on match criteria such as input interfaces, access control lists (ACLs), protocols, quality of service (QoS) labels, and experimental (EXP) field values. Packets satisfying the match criteria for a class constitute the traffic for that class. The matchmplsexperimental command specifies the name of an EXP field value to be used as the match criterion against which packets are compared to determine if they belong to the class specified by the class map. To use the matchmplsexperimental command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use one of the following commands to configure its match criteria:
If you specify more than one command in a class map, only the last command entered applies. The last command overrides the previously entered commands. Cisco 10000 Series This command is available only on the ESR-PRE1 module. For CBWFQ, you define traffic classes based on match criteria such as input interfaces, ACLs, protocols, QoS labels, and EXP field values. Packets satisfying the match criteria for a class constitute the traffic for that class. To use the matchmplsexperimental command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. ExamplesThe following example specifies a class map called ethernet1 and configures the Multiprotocol Label Switching (MPLS) experimental values of 1 and 2 to be used as the match criteria for this class: Router(config)# class-map ethernet1 Router(config-cmap)# match mpls experimental 1 2 Related Commands
match mpls experimental topmostTo match the experimental (EXP) value in the topmost label header, use the matchmplsexperimentaltopmostcommand in class-map configuration or policy inline configuration mode. To remove the EXP match criterion, use the no form of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. You can enter this command on the input interfaces and the output interfaces. It will match only on MPLS packets. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesThe following example shows that the EXP value 3 in the topmost label header is matched: Router(config)# class-map mpls exp Router(config-cmap)# match mpls experimental topmost 3 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criteria of a EXP value of 3 in the topmost label header will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match mpls experimental topmost 3 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Related Commands
match notTo specify the single match criterion value to use as an unsuccessful match criterion, use the matchnotcommand inclass-map configuration or policy inline configuration mode. To remove a previously specified source value to not use as a match criterion, use the noform of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. The matchnotcommand is used to specify a quality of service (QoS) policy value that is not used as a match criterion. When thematchnot command is used, all other values of that QoS policy become successful match criteria. For instance, if the matchnotqos-group4 command is issued in QoS class-map configuration mode, the specified class will accept all QoS group values except 4 as successful match criteria. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesIn the following traffic class, all protocols except IP are considered successful match criteria: Router(config)# class-map noip Router(config-cmap)# match not protocol ip Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 for all protocols except IP will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match not protocol ip Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit match packet length (class-map)To specify the Layer 3 packet length in the IP header as a match criterion in a class map, use the matchpacketlength command in class-map configuration or policy inline configuration mode. To remove a previously specified Layer 3 packet length as a match criterion, use the no form of this command.
match
packet
length
{max maximum-length-value [min minimum-length-value] | min minimum-length-value [max maximum-length-value]}
no
match
packet
length
{max maximum-length-value [min minimum-length-value] | min minimum-length-value [max maximum-length-value]}
Syntax Description
Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. This command considers only the Layer 3 packet length in the IP header. It does not consider the Layer 2 packet length in the IP header. When using this command, you must at least specify the maximum or minimum value. However, you do have the option of entering both values. If only the minimum value is specified, a packet with a Layer 3 length greater than the minimum is viewed as matching the criterion. If only the maximum value is specified, a packet with a Layer 3 length less than the maximum is viewed as matching the criterion. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. ExamplesIn the following example a class map named "class 1" has been created, and the Layer 3 packet length has been specified as a match criterion. In this example, packets with a minimum Layer 3 packet length of 100 bytes and a maximum Layer 3 packet length of 300 bytes are viewed as meeting the match criteria. Router(config)# class-map match-all class1 Router(config-cmap)# match packet length min 100 max 300 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criteria of a minimum Layer 3 packet length of 100 bytes and a maximum Layer 3 packet length of 300 bytes will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match packet length min 100 max 300 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Related Commands
match port-typeTo match the access policy on the basis of the port for a class map, use the matchport-type command in class-map configuration mode. To delete the port type, use the no form of this command. Usage GuidelinesThis command is used because, on the basis of the port on which a user is connecting, the access policies that are applied to it can be different. match precedenceTo identify IP precedence values to use as the match criterion, use the matchprecedence command in class-map configuration or policy inline configuration mode. To remove IP precedence values from a class map, use the no form of this command.
match
[ip]
precedence
{precedence-criteria1 | precedence-criteria2 | precedence-criteria3 | precedence-criteria4}
no
match
[ip]
precedence
{precedence-criteria1 | precedence-criteria2 | precedence-criteria3 | precedence-criteria4}
Syntax Description
Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. You can enter up to four matching criteria, a number abbreviation (0 to 7) or criteria names (critical, flash, and so on), in a single match statement. For example, if you wanted the precedence values of 0, 1, 2, or 3 (note that only one of the precedence values must be a successful match criterion, not all of the specified precedence values), enter the matchipprecedence0123command. The precedence-criteria numbers are not mathematically significant; that is, the precedence-criteria of 2 is not greater than 1. The way that these different packets are treated depends upon quality of service (QoS) policies, set in policy-map configuration mode. You can configure a QoS policy to include IP precedence marking for packets entering the network. Devices within your network can then use the newly marked IP precedence values to determine how to treat the packets. For example, class-based weighted random early detection (WRED) uses IP precedence values to determine the probability that a packet is dropped. You can also mark voice packets with a particular precedence. You can then configure low-latency queueing (LLQ) to place all packets of that precedence into the priority queue. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinline command. Matching Precedence for IPv6 and IPv4 Packets on the Cisco 7600 and 10000 and Series Routers On the Cisco 7600 series and 10000 series routers, you set matching criteria based on precedence values for only IPv6 packets using the matchprotocolcommand with the ipv6 keyword. Without that keyword, the precedence match defaults to match both IPv4 and IPv6 packets. You set matching criteria based on precedence values for IPv4 packets only using the ip keyword. Without the ip keyword the match occurs on both IPv4 and IPv6 packets. Precedence Values and Names The following table lists all criteria conditions by value, name, binary value, and recommended use. You may enter up to four criteria, each separated by a space. Only one of the precedence values must be a successful match criterion. The table below lists the IP precedence values.
Do not use IP precedence 6 or 7 to mark packets, unless you are marking control packets. IPv4-Specific Traffic MatchThe following example shows how to configure the service policy named priority50 and attach service policy priority50 to an interface, matching for IPv4 traffic only. In a network where both IPv4 and IPv6 are running, you might find it necessary to distinguish between the protocols for matching and traffic segregation. In this example, the class map named ipprec5 will evaluate all IPv4 packets entering Fast Ethernet interface 1/0/0 for a precedence value of 5. If the incoming IPv4 packet has been marked with the precedence value of 5, the packet will be treated as priority traffic and will be allocated with bandwidth of 50 kbps. Router(config)# class-map ipprec5 Router(config-cmap)# match ip precedence 5 Router(config)# exit Router(config)# policy-map priority50 Router(config-pmap)# class ipprec5 Router(config-pmap-c)# priority 50 Router(config-pmap-c)# exit Router(config-pmap)# exit Router(config)# interface fa1/0/0 Router(config-if)# service-policy input priority50 IPv6-Specific Traffic MatchThe following example shows the same service policy matching on precedence for IPv6 traffic only. Notice that the match protocol command with the ipv6 keyword precedes the match precedence command. The match protocol command is required to perform matches on IPv6 traffic alone. Router(config)# class-map ipprec5 Router(config-cmap)# match protocol ipv6 Router(config-cmap)# match precedence 5 Router(config)# exit Router(config)# policy-map priority50 Router(config-pmap)# class ipprec5 Router(config-pmap-c)# priority 50 Router(config-pmap-c)# exit Router(config-pmap)# exit Router(config)# interface fa1/0/0 Router(config-if)# service-policy input priority50 Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SEThe following example shows how to use policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 that match the criterion of a match precedence of 4 will be monitored based on the parameters specified in the flow monitor configuration named fm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match precedence 4 Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# end Related Commands
match protocolTo configure the match criterion for a class map on the basis of a specified protocol, use the matchprotocol command in class-map configuration or policy inline configuration mode. To remove the protocol-based match criterion from the class map, use the no form of this command. Command Modes
Command History
Usage GuidelinesThis command can be used with both Flexible NetFlow and Performance Monitor. These products use different commands to enter the configuration mode in which you issue this command. Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE You must first enter the service-policytypeperformance-monitorinlinecommand. Supported Platforms Other Than Cisco 7600 Routers and Cisco 10000 Series Routers For class-based weighted fair queueing (CBWFQ), you define traffic classes based on match criteria protocols, access control lists (ACLs), input interfaces, quality of service (QoS) labels, and Experimental (EXP) field values. Packets satisfying the match criteria for a class constitute the traffic for that class. The matchprotocol 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. The matchprotocolipx command matches packets in the output direction only. To use the matchprotocol command, you must first enter the class-map command to specify the name of the class whose match criteria you want to establish. After you identify the class, you can use one of the following commands to configure its match criteria: If you specify more than one command in a class map, only the last command entered applies. The last command overrides the previously entered commands. To configure NBAR to match protocol types that are supported by NBAR traffic, use the matchprotocol(NBAR)command. Cisco 7600 Series Routers The matchprotocol command in QoS class-map configuration configures NBAR and sends all traffic on the port, both ingress and egress, to be processed in the software on the Multilayer Switch Feature Card 2 (MSFC2). For CBWFQ, you define traffic classes based on match criteria like protocols, ACLs, input interfaces, QoS labels, and Multiprotocol Label Switching (MPLS) EXP field values. Packets satisfying the match criteria for a class constitute the traffic for that class. The matchprotocolcommand 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. If you want to use the matchprotocolcommand, you must first enter the class-map command to specify the name of the class to which you want to establish the match criteria. If you specify more than one command in a class map, only the last command entered applies. The last command overrides the previously entered commands. This command can be used to match protocols that are known to the NBAR feature. For a list of protocols supported by NBAR, see the "Classification" part of the Cisco IOS Quality of Service Solutions Configuration Guide. Cisco 10000 Series Routers For CBWFQ, you define traffic classes based on match criteria including protocols, ACLs, input interfaces, QoS labels, and EXP field values. Packets satisfying the match criteria for a class constitute the traffic for that class. The matchprotocol 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. The matchprotocolipx command matches packets in the output direction only. To use the matchprotocol 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 are matching NBAR protocols, use the matchprotocol(NBAR) command. Match Protocol Command Restrictions (Catalyst 6500 Series Switches Only) Policy maps contain traffic classes. Traffic classes contain one or more match commands that can be used to match packets (and organize them into groups) on the basis of a protocol type or application. You can create as many traffic classes as needed. Cisco IOS Release 12.2(18)ZY includes software intended for use on the Catalyst 6500 series switch that is equipped with a Supervisor 32/PISA engine. For this release and platform, note the following restrictions for using policy maps and matchprotocol commands:
Supported Protocols The table below lists the protocols supported by most routers. Some routers support a few additional protocols. For example, the Cisco 7600 router supports the AARP and DECnet protocols, while the Cisco 7200 router supports the directconnect and PPPOE protocols. For a complete list of supported protocols, see the online help for the matchprotocol command on the router that you are using.
* This protocol is not supported on the Catalyst 6500 series switch that is equipped with a Supervisor 32/PISA engine. ExamplesThe following example specifies a class map named ftp and configures the FTP protocol as a match criterion: Router(config)# class-map ftp Router(config-cmap) # match protocol ftp Cisco Performance Monitor in Cisco IOS Release 15.1(3)T and 12.2(58)SE The following example shows how to use the policy inline configuration mode to configure a service policy for Performance Monitor. The policy specifies that packets traversing Ethernet interface 0/0 for the IP protocol will be monitored based on the parameters specified in the flow monitor configuration namedfm-2: Router(config)# interface ethernet 0/0 Router(config-if)# service-policy type performance-monitor inline input Router(config-if-spolicy-inline)# match protocol ip Router(config-if-spolicy-inline)# flow monitor fm-2 Router(config-if-spolicy-inline)# exit Related Commands
match protocol attribute application-groupTo configure the match criterion for a class map based on the specified application group, use the match protocol attribute application-group command in class-map configuration mode. To remove the application-group match criterion from the class map, use the no form of this command. match protocol attribute application-group application-group [application-name]
no match protocol attribute application-group application-group
Syntax Description
Usage GuidelinesPolicy maps contain traffic classes. Traffic classes contain one or more match commands that can be used to match packets (and organize them into groups) based on an application group. Multiple traffic classes can be created. The following table lists the supported application groups.
match protocol attribute categoryTo configure the match criterion for a class map based on the specified application category, use the match protocol attribute category command in class-map configuration mode. To remove the application category match criterion from the class map, use the no form of this command. match protocol attribute category application-category [application-name]
no match protocol attribute category application-category
Syntax Description
Usage GuidelinesPolicy maps contain traffic classes. Traffic classes contain one or more match commands that can be used to match packets (and organize them into groups) based on an application category. You can create as many traffic classes as needed. The following table lists the supported application categories.
match protocol attribute encryptedTo configure the match criterion for a class map based on encryption, use the match protocol attribute encrypted command in class-map configuration mode. To remove the encryption match criterion from the class map, use the no form of this command. match protocol attribute encrypted {encrypted-no | encrypted-unassigned | encrypted-yes} [application-name]
no match protocol attribute encrypted {encrypted-no | encrypted-unassigned | encrypted-yes}
Syntax Description
Usage GuidelinesPolicy maps contain traffic classes. Traffic classes contain one or more match commands that can be used to match packets (and organize them into groups) based on encryption. Multiple traffic classes can be created. ExamplesThe following examples show how to specify a class map with encryption as a match criterion: Router(config)# class-map my-class Router(config-cmap)# match protocol attribute encrypted encrypted-no ayiya-ipv6-tunneled Router(config)# class-map my-class Router(config-cmap)# match protocol attribute encrypted encrypted-unassigned aurora-cmgr Router(config)# class-map my-class Router(config-cmap)# match protocol attribute encrypted encrypted-yes citrix match protocol attribute sub-categoryTo configure the match criterion for a class map based on the specified application subcategory, use the match protocol attribute sub-category command in class-map configuration mode. To remove the application subcategory match criterion from the class map, use the no form of this command. match protocol attribute sub-category sub-category-name [aplication-name]
no match protocol attribute sub-category sub-category-name
Syntax Description
Usage GuidelinesPolicy maps contain traffic classes. Traffic classes contain one or more match commands that can be used to match packets (and organize them into groups) based on an application subcategory. You can create as many traffic classes as needed. lists the supported application subcategories.
match protocol attribute tunnelTo configure the match criterion for a class map based on tunneling, use the match protocol attribute tunnel command in class-map configuration mode. To remove the tunneling match criterion from the class map, use the no form of this command. match protocol attribute tunnel {tunnel-no | tunnel-unassigned | tunnel-yes} [application-name]
no match protocol attribute tunnel {tunnel-no | tunnel-unassigned | tunnel-yes} [application-name]
Syntax Description
Usage GuidelinesPolicy maps contain traffic classes. Traffic classes contain one or more match commands that can be used to match packets (and organize them into groups) based on tunneling. Multiple traffic classes can be created. ExamplesThe following examples show how to specify a class map with tunneling as a match criterion: Router(config)# class-map mygroup Router(config-cmap)# match protocol attribute tunnel tunnel-no agentx Router(config)# class-map mygroup Router(config-cmap)# match protocol attribute tunnel tunnel-unassigned aris Router(config)# class-map mygroup Router(config-cmap)# match protocol attribute tunnel tunnel-yes rsvp_tunnel match protocol (NBAR)To configure Network-Based Application Recognition (NBAR) to match traffic by a protocol type that is known to NBAR, use the matchprotocolcommandinclass map configuration mode. To disable NBAR from matching traffic by a known protocol type, use the no form of this command.
match
protocol
protocol-name
[variable-field-name value]
no
match
protocol
protocol-name
[variable-field-name value]
Syntax Description
Command History
Usage GuidelinesUse the matchprotocol(NBAR) command to match protocol types that are known to NBAR. NBAR is capable of classifying the following types of protocols:
The table below lists the NBAR-supported protocols available in Cisco IOS software, sorted by category. The table also provides information about the protocol type, the well-known port numbers (if applicable), and the syntax for entering the protocol in NBAR. The table is modified as new protocols are added or supported by different releases.
|