M Commands

match access-group

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

match access-group name acl-name

no match access-group name acl-name

Syntax Description

acl-name

Name of the ACL.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

4.1(2)

This command was updated to allow matching on IPv6 ACLs and IPv4 ACLs.

Usage Guidelines


Note


The permit and deny ACL keywords do not affect the matching of packets.

This command does not require a license.

Examples

This example shows how to create a qos class map that matches characteristics of the ACL my_acl:

switch(config)# class-map class_acl
switch(config-cmap-qos)# match access-group name my_acl

Related Commands

Command

Description

show class-map

Displays class maps.

match class-map

To match on the match commands in a specified class map, use the match class-map command in the class map configuration mode. To remove the match on the specified class map, use the no form of this command.

match [not] class-map class-map-name

no match [not] class-map class-map-name

Syntax Description

not

(Optional) Negates the specified match result.

class-map-name

Specified class-map name where the match commands need to be matched.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

This example shows how to match on the matches specified in class map named my_test:

switch(config)# class-map my_test
switch(config-cmap-qos)# match class-name my_test

Related Commands

Command

Description

show class-map

Displays class maps.

match cos (class map type network-qos)

To define the class of traffic in a type network qos class map, use the match cos command. To remove the match configuration, use the no form of this command.

match cos cos-list

no match cos cos-list

Syntax Description

cos-list

CoS value or list of specified CoS values. Valid values are from 0 to 7.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

5.1(1)

This command was introduced.

Usage Guidelines

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.
  • Specify a noncontiguous list of values by separating each value by a comma.

This command does not require a license.

Examples

This example shows how to match on the CoS value for a type network qos class map:

switch(config)# class-map type network-qos match-any eth
switch(config-cmap-nqos)# match cos 3-5
switch(config-cmap-nqos)#

Related Commands

Command

Description

show class-map

Displays class maps.

match cos (class map type qos)

To define the class of traffic using the class of service (CoS) value in a type qos class map, use the match cos command. To remove the match on the CoS value, use the no form of this command.

match [not] cos cos-list

no match [not] cos cos-list

Syntax Description

not

(Optional) Negates the specified match result.

cos-list

Specified CoS value or list of specified CoS values. Valid values are from 0 to 7.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.

  • Specify a noncontiguous list of values by separating each value by a comma.


Note


Only class maps of type qos support the optional not keyword form of this command. Class maps of type queuing do not support the not keyword.

This command does not require a license.

Examples

This example shows how to match on the CoS value for a type qos class map:

switch(config)# class-map class_acl
switch(config-cmap-qos)# match cos 5-7

Related Commands

Command

Description

show class-map

Displays class maps.

match cos (class map type queuing)

To define the class of traffic in a type queuing class map, use the match cos command. To remove the match configuration, use the no form of these commands.

match cos cos-list

no match cos cos-list

Syntax Description

cos-list

Specified class of service (CoS) value or list of specified CoS values. Valid values are from 0 to 7.

Command Default

None

Command Modes

Class-map type queuing configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.
  • Specify a noncontiguous list of values by separating each value by a comma.

Any modifications that you make to the class map type queuing changes the configuration for all ports of the specified port type on all VDCs.


Note


Only class maps of type qos support the optional not keyword form of this command.

This command does not require a license.

Examples

This example shows how to modify a type queuing class map to match on CoS:

switch(config)# class-map type queuing match-any 8q2t-in-q4
switch(config-cmap-que)# match cos 3
switch(config-cmap-que)# 

Related Commands

Command

Description

show class-map

Displays class maps.

match discard-class

To identify specific discard class values as a match criteria, use the match discard-class command. To remove specified discard class values as a match criteria, use the no form of this command.

match [not] discard-class discard-class-list

no match [not] discard-class discard-class-list

Syntax Description

not

(Optional) Negates the specified match result.

discard-class-list

Specified discard class value or list of discard class values. Valid values are from 0 to 63.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

The discard-class value is an internal label and is not part of the packet payload or any packet header. The discard-class values have no mathematical significance.

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.
  • Specify a noncontiguous list of values by separating each value by a comma.

This command does not require a license.

Examples

This example shows how to match on the discard class value 5:

switch(config)# class-map my_test
switch(config-cmap-qos)# match discard-class 5

Related Commands

Command

Description

show class-map

Displays class maps.

match dscp

To identify specific Differentiated Services Code Point (DSCP) values as classification criteria to specify range of DSCP values under class-map, use the match dscp command. To remove specified DSCP values under class-map, use the no form of this command. The CLI is available for QoS policy and for Ingress queuing policy under class-maps "2q4t-8e-in-q1" and "2q4t-8e-in-q-default".

match dscp value

no match dscp value

Syntax Description

value

Specifies the list of DSCP values. The range is from 0 to 63.

Command Default

Disabled by default

Command Modes

Class-map mode

Command History

Release

Modification

6.1(2)

Starting with the Cisco NX-OS 6.1(2) release, DSCP to IVL is supported on IPV6 using F2E modules.

6.1(1)

Starting from 6.1(1) release DSCP to IVL is supported on ingress direction on F2 modules using match dscp value command with Class-maps "2q4t-8e-in-q1" and "2q4t-8e-in-q-default".

4.0

This command was introduced.

Usage Guidelines

match dscp command is only applicable to queues which have at least one cos value associated with it. Default queue should always have cos value associated with it if not all DSCP value are mapped to non-default ingress queue.

The dscp queuing is automatically disabled when the user removes all the match dscp’s (using “no match” statements).

If match dscp values is used under 2q4t-8e-in-q1 with a few DSCP values, all remaining values get mapped to the default queue.

Below are some of the restrictions for this command:
  • Only supports ingress queues for F2 modules for 8E template. (It does not support egress queues, M1 queues, or fabric-qos queues.)

  • Ingress queues must have at least one cos value associated with it without restriction which Cos value is used.

  • Cannot be used in user defined class-maps.

  • Cannot be used in a user configuration session.

  • Command must be disabled for ISSD otherwise the ISSD will be disruptive.

  • By default DSCP to IVL is disabled.

  • Queue-limit command cannot be specified based on COS or DSCP value. The configured queue-limit sizes are applicable for both DSCP and COS values.

  • There are no additional statistics generated to differentiate how many packets are matched on DSCP or COS.

  • When DSCP to IVL is enabled an interface will use DSCP value as trusted for IP packets and COS value will be trusted for NON-IP packets.

  • Fabric Path Interface and FEX Port-channel interfaces do not support DSCP to IVL mapping.

  • DSCP to IVL is not supported for IPv6 packets.

  • DSCP to IVL mapping change is disruptive operation and might cause BFD/Routing protocols to Flap.

This command does not require a license.

Examples

This example shows how to match the DSCP value:

switch(config)# class-map type queuing match-any q4t-8e-in-q1
switch(config-cmap-que)# match dscp 1
switch(config-cmap-que)# 

Related Commands

Command

Description

show class-map

Displays class maps.

match ip rtp

To configure a class map to use the Real-Time Protocol (RTP) port as a match criteria, use the match ip rtp command. To remove the RTP port as a match criteria, use the no form of this command.

match [not] ip rtp port-list

no match [not] ip rtp port-list

Syntax Description

not

(Optional) Negates the specified match result.

port-list

Specified User Datagram Protocol (UDP) or list of UDP ports that are using RTP. Valid values are from 2000 to 65535.

Command Default

None

Command Modes


Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.
  • Specify a noncontiguous list of values by separating each value by a comma.

This command does not require a license.

Examples

This example shows how to match on a port using RTP:

switch(config)# class-map my_test
switch(config-cmap-qos)# match ip rtp 2300

Related Commands

Command

Description

show class-map

Displays class maps.

match packet length

To configure a class map to use Layer 3 packet length in the IP header as a match criteria, use the match packet length command. To remove a previously specified Layer 3 packet length as a match criteria, use the no form of this command.

match [not] packet length packet-length-list

no match [not] packet length packet-length-list

Syntax Description

not

(Optional) Negates the specified match result.

packet-length-list

Specified Layer 3 packet length or list of packets lengths specified in bytes. Valid values are from 1 to 9198.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.
  • Specify a noncontiguous list of values by separating each value by a comma.

This command does not require a license.

Examples

This example shows how to match on a Layer 3 packet length of 600 to 660:

switch(config)# class-map my_test
switch(config-cmap-qos)# match packet length 600-660

Related Commands

Command

Description

show class-map

Displays class maps.

match precedence

To configure a class map to use the precedence value in the Type of Service (ToS) byte field of the IP header as a match criteria, use the match precedence command. To remove the precedence values as a match criteria, use the no form of this command.

match [not] precedence precedence-list

no match [not] precedence precedence-list

Syntax Description

not

(Optional) Negates the specified match result.

precedence-list

Specified IP precedence value or list of IP precedence values specified in bytes. Valid values are shown in the Table 1.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

For a list of precedence values, see the following table:

Table 1 Precedence Values

Precedence Value

List of Precedence Values

<0-7>

IP precedence value

critical

Critical precedence (5)

flash

Flash precedence (3)

flash-override

Flash override precedence (4)

immediate

Immediate precedence (2)

internet

Internetwork control precedence (6)

network

Network control precedence (7)

priority

Priority precedence (1)

routine

Routine precedence (0)

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.
  • Specify a noncontiguous list of values by separating each value by a comma.

This command does not require a license.

Examples

This example shows how to match on an IP precedence value:

switch(config)# class-map my_test
switch(config-cmap-qos)# match precedence 7

Related Commands

Command

Description

show class-map

Displays class maps.

match protocol

To configure a class map to use a specific protocol as a match criterion, use the match protocol command. To remove the specified protocol as a match criteria, use the no form of this command.

match [not] protocol protocol-name

no match [not] protocol protocol-name

Syntax Description

not

(Optional) Negates the specified match result.

protocol-name

Specified protocol name. Valid values are shown in Table 1.

Command Default

None

Command Modes

Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

The list of valid protocol names is shown in following table:

Table 2 Protocol Names

Argument

Description

arp

Address Resolution Protocol (ARP)

bridging

Bridging

cdp

Cisco Discovery Protocol (CDP)

clns

Connectionless Network Service (CLNS)

clns_es

CLNS End Systems

clns_is

CLNS Intermediate System

dhcp

Dynamic Host Configuration (DHCP)

isis

Intermediate system to intermediate system (IS-IS)

ldp

Label Distribution Protocol (LDP)

netbios

NetBIOS Extended User Interface (NetBEUI)


Note


A maximum of eight different protocols can be matched at a time.

To specify more than one protocol, enter the match protocol command with the desired protocol value each time.

This command does not require a license.

Examples

This example shows how to match on a specified protocol:

switch(config)# class-map my_test
switch(config-cmap-qos)# match protocol ldp

Related Commands

Command

Description

show class-map

Displays class maps.

match qos-group

To configure a class map to use a specific qos group value as a match criterion, use the match qos-group command. To remove the specified protocol as a match criteria, use the no form of this command.

match [not] qos-group qos-group-list

no match [not] qos-group qos-group-list

Syntax Description

not

(Optional) Negates the specified match result.

qos-group-list

Specified qos group value or list of qos group values specified in bytes. Valid values are from 1 to 126.

Command Default

None

Command Modes


Class-map type qos configuration

Command History

Release

Modification

4.0

This command was introduced.

Usage Guidelines

The qos group is an internal label and is not part of the packet payload or any packet header. The qos group values have no mathematical significance. For example, a qos group value of 2 is not greater than 1; the values are used only to internally differentiate qos groups. As such, this value has local significance only.

You can match on the qos group only in egress policies because its value is undefined until you set it in an ingress policy.

To specify a list of values, use one of the following options:

  • Specify a range of values by separating each value with a dash.

  • Specify a noncontiguous list of values by separating each value by a comma.

This command does not require a license.

Examples

This example shows how to match on a specified qos group value:

switch(config)# class-map my_test
switch(config-cmap-qos)# match qos-group 6

Related Commands

Command

Description

show class-map

Displays class maps.

mtu

To configure the maximum transmission unit (MTU) size in a network qos policy, use the mtu command.

mtu [ mtu_size ]

Syntax Description

mtu_size

(Optional) MTU size. The range is from 1500 to 9216.

Command Default

None

Command Modes

Policy-map type network qos configuration

Command History

Release

Modification

6.1(1)

Added the usage guidelines and the command output.

5.1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

The Fabric Extender(FEX) port channel requires a minimum MTU setting of 1058 for traffic with CoS 5-7. The FEX fails when the MTU is less than 1058 and does not register with the switch.

Examples

This example shows how to configure the MTU size in a network policy:

switch# configure terminal
switch(config)# policy-map type queuing my-4q-4e-drop-out
switch(config-pmap-que)# class type queuing 1p3q1t-8e-out-pq1
switch(config-pmap-que)# priority level 2
switch(config-pmap-que)# mtu 1500
switch(config-pmap-que)#

switch(config)# policy-map type network-qos nenq-7e
switch(config-pmap-nqos)# class type network-qos c-nq-7e-drop
switch(config-pmap-nqos-c)# mtu 1057
MTU less than 1058 for CoS 5-7 can bring down FEX port-channels. Do you want to continue? (yes/no) [no]

Related Commands

Command

Description

congestion-control

Configures congestion control in a network qos policy.

pause

Configure no-drop per CoS.

priority

Marks the priority level in a traffic queue.

shape

Configures the traffic rate for a given traffic profile.