Modular QoS CLI Unconditional Packet Discard

Modular QoS CLI Unconditional Packet Discard

Last Updated: May 17, 2012

Feature History




This feature was introduced.

Supported Platforms

For platforms supported in Cisco IOS Release 12.2(13)T, consult Cisco Feature Navigator.

This module describes the Modular QoS CLI (MQC) Unconditional Packet Discard feature in Cisco IOS Release 12.2(13)T. It includes the following sections:

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to An account on is not required.

Feature Overview

The Modular QoS CLI (MQC) Unconditional Packet Discard feature allows customers to classify traffic matching certain criteria and then configure the system to unconditionally discard any packets matching that criteria. The Modular QoS CLI (MQC) Unconditional Packet Discard feature is configured using the Modular Quality of Service Command-Line Interface (MQC) feature. Packets are unconditionally discarded by using the new drop command within the MQC.


Enhanced System Utilization

This feature allows you to discard (drop), without any further system processing, the packets of a particular class. This function is very useful when you want to discard all the packets for nonessential applications (for instance, Internet browsing applications or unauthorized video applications) and allocate system resources to more essential applications. This feature allows the user to discard those nonessential packets and simultaneously obtain the bit and drop rate statistics for that particular class and the traffic within that class. The statistics are gathered through the CISCO-CLASS-BASED-QOS-MIB.


Packets are unconditionally discarded by configuring the drop action inside a traffic class (inside of a policy map). This drop action is accomplished with the new drop command. Note the following restrictions for configuring the drop action within a traffic class:

  • The discarding action is the only action that can be configured in a traffic class. That is, no other actions can be configured in the traffic class.
  • When a traffic class is configured with the drop command, a "child" (nested) policy cannot be configured for this specific traffic class through the service policy command.
  • The discarding action cannot be configured for the default class known as the class-default class.

Related Features and Technologies

  • Modular quality of service command-line interface (MQC)

Related Documents

  • "Applying QoS Features Using the MQC" module
  • "Classifying Network Traffic" module
  • "Marking Network Traffic" module
  • Cisco IOS Quality of Service Solutions Command Reference

Supported Standards MIBs and RFCs





To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

If Cisco MIB Locator does not support the MIB information that you need, you can also obtain a list of supported MIBs and download MIBs from the Cisco MIBs page at the following URL:

To access Cisco MIB Locator, you must have an account on If you have forgotten or lost your account information, send a blank e-mail to An automatic check will verify that your e-mail address is registered with If the check is successful, account details with a new random password will be e-mailed to you. Qualified users can establish an account on by following the directions found at this URL:



Configuration Tasks

Configuring the Class Map


1.    Router(config)# class-mapclass-map-name

2.    Router(config-cmap)# match access-group {access-group | nameaccess-group-name }

3.    Router(config-cmap)# exit

 Command or ActionPurpose
Step 1
Router(config)# class-mapclass-map-name  

Specifies the name of the class map to be created. If match-all or match-any is not specified, traffic must match all the match criteria to be classified as part of the traffic class. Enters class-map configuration mode.

Step 2
Router(config-cmap)# match access-group {access-group | nameaccess-group-name }  

Specifies that traffic matching the specified access group will be placed in the map class created above. This command provides just an example of the match criterion you can specify. For more information about the additional match criteria available, see the "Applying QoS Features Using the MQC" module.

Step 3
Router(config-cmap)# exit  

Exits from the configuration mode.


Creating a Policy Map


1.    Router (config)# policy-mappolicy-name

2.    Router (config-pmap)# classclass-name

3.    Router (config-pmap)# drop

4.    Router(config-cmap)# exit

 Command or ActionPurpose
Step 1
Router (config)# policy-mappolicy-name



Specifies the name of the policy map to be created. Enters policy-map configuration mode.

Step 2
Router (config-pmap)# classclass-name 

Specifies the name of the traffic class configured earlier in the Configuring the Class Map section above. This traffic class is used to classify traffic to the policy map. Enters policy-map class configuration mode.

Step 3
Router (config-pmap)# drop 

Discards the packets in the specified traffic class.

Step 4
Router(config-cmap)# exit 

Exits policy-map configuration mode.


Attaching the Policy Map to an Interface or a VC


1.    Router(config)# interfacetype number [ name-tag

2.    Router(config-if)# pvc [name] vpi/vci [ilmi | qsaal | smds]

3.   Do one of the following:

  • Router(config-if)# service-policy inputpolicy-map-name

4.    Router(config-if)# exit

 Command or ActionPurpose
Step 1
Router(config)# interfacetype number [ name-tag



Configures the interface type and enters interface configuration mode.

Step 2
Router(config-if)# pvc [name] vpi/vci [ilmi | qsaal | smds] 

(Optional) Creates or assigns a name to an ATM permanent virtual circuit (PVC), and specifies the encapsulation type on an ATM PVC.

Enters ATM VC configuration mode (config-if-atm-vc).

This step is required only if you are attaching the policy map to an ATM PVC.

Step 3
Do one of the following:
  • Router(config-if)# service-policy inputpolicy-map-name


Router(config-if-atm-vc)# service-policy outputpolicy-map-name



Specifies the name of the policy map to be attached to the input or output direction of an interface or VC. The policy map evaluates all traffic entering or leaving that interface or VC.

Step 4
Router(config-if)# exit 

Exits interface configuration mode.


Verifying the Discard Action Configuration in the Traffic Class



Router# show policy-map

Displays the configuration of all classes for a specified service policy map or all classes for all existing policy maps.

Router# show policy-map interface  interface-name

Displays the packet statistics of all classes that are configured for all service policies either on the specified interface or subinterface or on a specific PVC on the interface.

Configuration Examples

Example Configuring the Discard Action Configuration in a Traffic Class

In the following sample configuration, a traffic class called "class1" has been created and configured for use in a policy-map called "policy1." The policy-map policy1 is attached to an output serial interface 2/0. All packets matching access-group 101 are placed in a class called "c1." Packets belonging to this class are discarded.

Router(config)# class-map class1
Router(config-cmap)# match access-group 101
Router(config-cmap)# policy-map policy1
Router(config-pmap)# class c1
Router(config-pmap-c)# drop
Router(config-pmap-c)# interface s2/0
Router(config-if)# service-policy output policy1
Router(config-if)# exit

The following sample output of the show policy-map command displays the contents of the policy map called "policy1." All the packets belonging to the class called "c1" are discarded.

Router# show policy-map policy1
 Policy Map policy1
  Class c1

Example Verifying the Discard Action Configuration in the Policy Map

The following sample output of the show policy-map interface command displays the statistics for the Serial2/0 interface, to which a policy map called "policy1" is attached. The discard action has been specified for all the packets belonging to a class called "c1." In this example, 32000 bps of traffic is sent ("offered") to the class and all of them are dropped. Therefore, the drop rate shows 32000 bps.

Router# show policy-map interface
  Service-policy output: policy1
    Class-map: c1 (match-all)
       10184 packets, 1056436 bytes
       5 minute offered rate 32000 bps, drop rate 32000 bps
       Match: ip precedence 0

Cisco and the Cisco Logo are trademarks of Cisco Systems, Inc. and/or its affiliates in the U.S. and other countries. A listing of Cisco's trademarks can be found at Third party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1005R)

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

© 2012 Cisco Systems, Inc. All rights reserved.