Cisco ASR 9000 Series Aggregation Services Router Modular Quality of Service Command Reference, Release 4.2.x
Congestion Management Commands
Downloads: This chapterpdf (PDF - 630.0KB) The complete bookPDF (PDF - 1.94MB) | Feedback

Congestion Management Commands

Congestion Management Commands

This chapter describes the commands used to manage congestion. For detailed information about congestion management concepts, configuration tasks and examples, see the Configuring Congestion Management chapter in the Cisco ASR 9000 Series Aggregation Services Router Modular Quality of Service Configuration Guide

police rate

To configure traffic policing and enter policy map police configuration mode, use the police rate command in policy map class configuration mode. To remove traffic policing from the configuration, use the no form of this command.

police rate { value [units] | percent percentage } [ burst burst-size [burst-units] ] [ peak-rate { value [units] | percent percentage } ] [ peak-burst peak-burst [burst-units] ]

no police rate { value [units] | percent percentage } [ burst burst-size [burst-units] ] [ peak-rate { value [units] | percent percentage } ] [ peak-burst peak-burst [burst-units] ]

Syntax Description

value

Committed information rate (CIR). Range is from 1 to 4294967295.

units

(Optional) Unit of measurement for the CIR. Values can be:

  • bps —bits per second (default)
  • gbps —gigabits per second
  • kbps —kilobits per second
  • mbps —megabits per second
  • pps —packets per second

percent percentage

Specifies the police rate as a percentage of the CIR. Range is from 1 to 100. See the Usage Guidelines for information on how to use this keyword.

burst burst-size

(Optional) Specifies the burst size (in the specified burst-units ). Range is from 1 to 4294967295.

burst-units

(Optional) Unit of measurement for the burst values. Values can be:

  • bytes —bytes (default)
  • gbytes —gigabytes
  • kbytes —kilobytes
  • mbytes —megabytes
  • ms —milliseconds
  • us —microseconds
  • packets —packets

peak-rate value

(Optional) Specifies the Peak Information Rate (PIR) in the specified units . Range is from 1 to 4294967295.

peak-burst peak-burst

(Optional) Specifies the peak burst size in the specified burst-units . Range is from 1 to 4294967295.

Command Default

No restrictions on the flow of data are applied to any interface.

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Release 4.0.1

The pps and packets keywords were added.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The police rate can set the DSCP, the precedence, or the discard class for IP packets, and experimental and discard-class values for MPLS packets.

Policing can be applied in both ingress and egress directions.

The parameters set by the action keywords are rounded by the hardware. To check the actual values programmed in the hardware use the show qos interface command.

For police rate commands, interpret the percent keyword in this way:

  • For a one-level policy, the percent keyword specifies the CIR as a percentage of the link rate. For example, the command police rate percent 35 configures the CIR as 35% of the link rate.
  • For a two-level policy, in the parent policy, the percent keyword specifies the parent CIR as a percentage of the link rate. In the child policy, the percent keyword specifies the child CIR as a percentage of the maximum policing or shaping rate of the parent. If traffic policing or shaping is not configured on the parent, the parent inherits the interface policing or shaping rate.

Hierarchical policing is also supported. In such a configuration, both parent and child policies have class-maps containing policing statements, as in this example:

!
policy-map child
 class gold
  police rate percent 50 
  conform-action set precedence immediate 
  exceed-action drop
 !
!
policy-map parent
 class match_all
  police rate 10000 kbps burst 15000 
  exceed-action drop
  service-policy child
 !

The router supports hierarchical ingress policing, which consists of a two-level hierarchical policy-map. The two levels are:

  • Parent level: Consists of a class-default or match-vlan class (in nCmD model) only and has policing with only transmit/drop actions.
  • Child level: Consists of a flat policy that can be configured with any action other than the queuing action. This level does not contain configurations that require a continuous bit support.

You can police the ingress interface while applying different classification submodels on the ingress interfaces. The order of the actions within the hierarchical policy-map is from child to parent as specified by the Modular Quality of Service command-line interface (MQC). This is with the exception of the queuing action (shape), which is executed after any police/set actions. If a police action is configured in a child policy, the child police action is executed before the parent police action.

The police action is invoked with only transmit/drop actions under the conform-action and exceed-action options specified for class-default traffic.

This example explains a hierarchical policer configuration:

!
policy-map parent
 class class-default

service-policy child
  police rate percent 50 
  conform-action transmit 
  exceed-action drop

 !

Note


Configured values take into account the Layer 2 encapsulation applied to traffic. This applies to both ingress and egress policing. For Ethernet transmission, the encapsulation is considered to be 14 bytes, whereas for IEEE 802.1Q, the encapsulation is 18 bytes.


The policer uses an incremental step size of 64 kbps. The configured value is rounded down to the nearest 64 kbps. The value shown in the output of the running-configuration shows the configured value as entered by the user.

If the burst value is not specifically configured, it is automatically set to 100 msec-worth of the CIR value. For example, if a CIR value of 1,000,000 kbps is entered, the burst value is calculated to be 12,500,000 bytes. However, the maximum burst value supported is 2,097,120 bytes.

When you define policers, for optimum performance use these formulas to determine the burst values:

Bc = CIR bps * (1 byte / 8 bits) * 1.5 seconds

Be =2 * Bc

For example, if CIR = 2,000,000 bps, the calculated burst value is 2,000,000 * (1/8) * 1.5 = 375,000 bytes. Set the peak-burst value according to the formula peak-burst = 2 * burst.

A police rate minimum of 8 pps and a granularity of 8 pps is supported.

Task ID

Task ID

Operations

qos

read, write

Examples

Example

In this example for MPLS, traffic policing is configured with the average rate at 250 kbps, and the normal burst size at 50 bytes for all packets leaving GigabitEthernet interface 0/1/0/9:

RP/0/RSP0/CPU0:router(config)# class-map class1            
RP/0/RSP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RSP0/CPU0:router(config-cmap)# exit

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# police rate 250 kbps burst 50
RP/0/RSP0/CPU0:router(config-pmap-c-police)#conform-action set mpls experimental topmost 4
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if) service-policy input policy1
  

In this example, traffic policing is configured with an average rate of 200 pps, and a normal burst size of 50 packets, for all packets in class-map class1, leaving GigabitEthernet interface 0/1/0/9:

RP/0/RSP0/CPU0:router(config)# policy-map pps-1r2c
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# police rate 200 pps burst 50 packets
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit

RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if) service-policy output policy1

Related Commands

Command

Description

child-conform-aware

Prevents the parent policer from dropping any ingress traffic that conforms to the maximum rate specified in the child policer.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

policy-map

To create or modify a policy map that can be attached to one or more interfaces to specify a service policy, use the policy-map command in global configuration mode. To delete a policy map, use the no form of this command.

policy-map [ type qos ] policy-name

no policy-map [ type qos ] policy-name

Syntax Description

type qos

(Optional) Specifies a quality-of-service (QoS) policy map.

policy-name

Name of the policy map.

Command Default

A policy map does not exist until one is configured. Because a policy map is applied to an interface, no restrictions on the flow of data are applied to any interface until a policy map is created.

Type is QoS when not specified.

Command Modes

Global configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Use the policy-map command to specify the name of the policy map to be created, added to, or modified before you can configure policies for classes whose match criteria are defined in a class map. Entering the policy-map command enables policy map configuration mode in which you can configure or modify the class policies for that policy map.

You can configure class policies in a policy map only if the classes have match criteria defined for them. Use the class-map and match commands to configure the match criteria for a class. Because you can configure a maximum of 1024 classes in one policy map, no policy map can contain more than 1024 class policies. The maximum number of 1024 classes per policy includes the implicit default class and its child policies.

A single policy map can be attached to multiple interfaces concurrently.

The maximum number of policy maps supported is 2000.


Note


When a policy map is applied on a physical port, all subinterfaces under the same physical port inherit the same policy.


Task ID

Task ID

Operations

qos

read, write

Examples

The following examples show how to create a policy map called policy1 and configures two class policies included in that policy map. The policy map is defined to contain policy specification for class1 and the default class (called class-default) to which packets that do not satisfy configured match criteria are directed. Class1 specifies policy for traffic that matches access control list 136.

RP/0/RSP0/CPU0:router(config)# class-map class1
RP/0/RSP0/CPU0:router(config-cmap)# match access-group ipv4 136

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# police cir 250
RP/0/RSP0/CPU0:router(config-pmap-c)# set precedence 3
RP/0/RSP0/CPU0:router(config-pmap-c)# exit

RP/0/RSP0/CPU0:router(config-pmap)# class class-default
RP/0/RSP0/CPU0:router(config-pmap-c)# queue-limit bytes 1000000
  

Related Commands

Command

Description

class (policy-map)

Specifies the name of the class whose policy you want to create or change.  

class-map

Defines a traffic class and the associated rules that match packets to the class.  

priority (QoS)

To assign a priority to a class of traffic belonging to a policy map, use the priority command in policy map class configuration mode. To remove a previously specified priority for a class, use the no form of this command.

priority [ level priority-level ]

no priority

Syntax Description

level priority-level

(Optional) Sets the class priority level value. Values are 1 or 2. Default level is 1. Level 1 traffic has higher priority.

Command Default

No default action.

Command Modes

Policy map class configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The priority command configures low-latency queueing (LLQ), providing strict priority queueing (PQ). Strict PQ allows delay-sensitive data such as voice to be dequeued and sent before packets in other queues are dequeued. When a class is marked as high priority using the priority command, we recommend that you configure a policer to limit the priority traffic. This policer ensures that the priority traffic does not starve all other traffic on the line card, which protects low-priority traffic from starvation. Use the police rate to explicitly configure the policer.

The priority command sets up classes based on a variety of criteria (not just User Datagram Protocol [UDP] ports) and assigns a priority to them.

The bandwidth and priority commands cannot be used in the same class, within the same policy map. These commands can be used together in the same policy map .

Within a policy map, you can give one or more classes priority status. When multiple classes within a single policy map are configured as priority classes, all traffic from these classes is queued to the same, single, priority queue.

Fabric QoS is configured using the priority command in the ingress service policy.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to configure priority queuing for the policy map named policy1:

RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# priority level 2


Related Commands

Command

Description

bandwidth (QoS)

Specifies the minimum bandwidth allocated to a class belonging to a policy map.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

show fmgr interface

To display ternary content addressable memory (TCAM) feature entries for QoS, use the show fmgr interface command in EXEC mode.

show fmgr interface type interface-path-id feature { policer | qos | qos-all } { input | output } [ all | dup-bank | hw | ipv4-mpls | ipv6 | l2 | location node-id | sw ]

Syntax Description

type

Interface type. For more information, use the question mark (?) online help function.

interface-path-id

Physical interface or virtual interface.

Note   

Use the show interfaces command to see a list of all interfaces currently configured on the router.

For more information about the syntax for the router, use the question mark (?) online help function.

feature

Displays feature specific information.

policer

Displays policer entries.

qos

Displays QoS entries.

qos-all

Displays entries for both QoS and policer.

input

Specifies the ingress direction.

output

Specifies the egress direction.

all

(Optional) Displays all TCAM entries.

dup-bank

(Optional) Displays entries from the duplicate bank in turbo mode.

hw

(Optional) Reads from the hardware.

ipv4-mpls

(Optional) Displays ipv4-mpls entries.

ipv6

(Optional) Displays ipv6 entries.

l2

(Optional) Displays Layer 2 entries.

location node-id

(Optional) Identifies the location of the interface whose TCAM information you want to display. The node-id is expressed in the rack/slot/module notation.

Note   

Use the show platform command to see the location of all nodes installed in the router.

sw

(Optional) Reads from the software.

Command Default

No default behavior or values

Command Modes

EXEC

Command History

Release

Modification

Release 3.2

This command was introduced.

Release 3.5.0

The in keyword was replaced with the input keyword.

The out keyword was replaced with the output keyword.

The l2 keyword was added.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

qos

read

Examples

The following sample output shows how to display all ingress QoS and policer TCAM entries for a Gigabit Ethernet interface:

RP/0/RSP0/CPU0:router# show fmgr interface GigabitEthernet 0/1/5/0 feature qos-all in

QOS ENTRIES
===============================================================================
Interface = GigabitEthernet0_1_5_0     Feature = qos     Direction = in
TCAM Fields:
ip/mpls  bndl  vlg_id  cid  dscp  exp  dc  qos-id

CSRAM Fields:
prio sh_q red_ctr qos_grp dc l2_mark l3_mark l3_mark_val max_th seg_size min_th
1st_seg pol_has_hpq
===============================================================================
No QoS configured on this interface


POLICER ENTRIES
===============================================================================
Interface = GigabitEthernet0_1_5_0     Feature = policer     Direction = in
TCAM Fields:
IPv4: ip/mpls vlg_id l2_cos drid ip_src l4_proto frag dscp ip_dest qos_grp dc d
st_port qos-id
MPLS: ip/mpls vlg_id l2_cos label exp qos_grp dc qos-id

CSRAM Fields:
cid token1 stats_ptr conform1 exceed1 violate1 token2 conform2 exceed2 violate2
===============================================================================
No QoS configured on this interface


POLICER ENTRIES
===============================================================================
Interface = GigabitEthernet0_1_5_0     Feature = policer     Direction = in
TCAM Fields:
IPv6: ipv6 vlg_id l2_cos dest_port src_port ip_dest ip_src ext_dst ext_rtg ext_
h ext_frag dest_rng_id dc qos_grp l4_proto dscp/prec qos-id

CSRAM Fields:
cid token1 stats_ptr conform1 exceed1 violate1 token2 conform2 exceed2 violate2
===============================================================================
No QoS configured on this interface

RP/0/RP0/CPU0:router#
  

The following table describes the significant fields shown in the display.

Table 1 show fmgr interface Field Descriptions

Field

Description

QOS ENTRIES

Displays the following QoS information:

  • Interface—Interface type and identifier.
  • Feature—Feature currently running on the specified interface.
  • Direction—Direction of interface (ingress or egress).

CSRAM Fields

General CSRAM information.

POLICER ENTRIES

General policer and TCAM information for the specified interface.

show hw-module qos output shape granularity location

To display shape granulary information, use the show hw-module qos output shape granularity location command in EXEC mode.

show hw-module qos output shape granularity location { all | interface-path-id }

Syntax Description

all

Displays shape granularity information for all interfaces.

interface-path-id

Physical location of the Shared Interface Processor (SIP). Naming notation is rack/slot/module; a slash between values is required as part of the notation.

  • rack —Chassis number of the rack.
  • slot —Physical slot number of the modular services card or line card.
  • module —Module number. A physical layer interface module (PLIM) is always 0.

Command Default

None

Command Modes

EXEC (#)

Command History

Release Modification
Release 3.9.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes the proper task IDs. If you suspect user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Examples

Example

This sample output shows how to display shape granularity for the output interface at location 0/1/CPU0:

RP/0/RSP0/CPU0:router# show hw-module qos output shape granularity location 0/1/CPU0

============= ==================================== 
               QOS SHAPING GRANULARITY              
              ==================================== 
              Configured    HW            LC      
 Location     Shape         Programmed    reload  
              Granularity   Granularity   (Y / N) 
============  ===========   ============ ========
 0/1/CPU0         ---         256Kbps        N
--------------------------------------------------
  

Table 1 describes the significant fields shown in the display.

Table 2 show hw-module qos output shape granularity location Field Descriptions

Field

Description

Configured Shape Granularity

User-configured shape granularity for the specified location.

HW Programmed Granularity

Hardware programmed shape granularity for the specified location.

LC reload (Y/N)

Specifies whether a line card reload will be required to enable the user configured shape granularity.

Related Commands

Command

Description

hw-module qos output shape granularity location

Configures shape granularity.  

show policy-map interface

To display policy configuration information for all classes configured for all service policies on the specified interface, use the show policy-map interface command in EXEC mode.

show policy-map interface type interface-path-id [ input | output ]

Syntax Description

type

Interface type. For more information, use the question mark (?) online help function.

interface-path-id

Physical interface instance. Naming notation is rack/slot/module/port and a slash between values is required as part of the notation.

  • rack—Chassis number of the rack.
  • slot—Physical slot number of the line card.
  • module—Module number. A physical layer interface module (PLIM) is always 0.
  • port—Physical port number of the interface.
Note   

In references to a Management Ethernet interface located on a route processor card, the physical slot number is alphanumeric (RSP0 or RSP1) and the module is CPU0.

Example: interface MgmtEth0/RSP0/CPU0/0.

For more information about the syntax for the router, use the question mark (?) online help function.

input

(Optional) Displays per class statistics on inbound traffic for the specified policy map and interface.

output

(Optional) Displays per class statistics on outbound traffic for the specified policy map and interface.

Command Default

No default behavior or values

Command Modes

EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Release 4.0.0

The show policy-map interface command output was updated to show IPHC statistics.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

The show policy-map interface command displays the statistics for classes in the service policy attached to an interface.

Task ID

Task ID

Operations

qos

read

Examples

The following sample output shows how to display policy statistics information for all classes on the TenGigE interface 0/6/1/0 that are in the output and input direction:

RP/0/RSP0/CPU0:router# show policy-map interface tengige 0/6/1/0

TenGigE0/6/1/0 input: policy1

Class class1
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Policing statistics                (packets/bytes)     (rate - kbps)
    Policed(conform)    :                   0/0                    0
    Policed(exceed)     :                   0/0                    0
    Policed(violate)    :                   0/0                    0
    Policed and dropped :                   0/0
  Queueing statistics
    Queue ID                             : 44
    Taildropped(packets/bytes)           : 0/0
Class class-default
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Queueing statistics
    Queue ID                             : 44
    High watermark  (bytes)/(ms)         : 0/0
    Inst-queue-len  (bytes)/(ms)         : 0/0
    Avg-queue-len   (bytes)/(ms)         : 0/0
    Taildropped(packets/bytes)           : 0/0

TenGigE0/6/1/0 output: policy4

Class class1
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Policing statistics                (packets/bytes)     (rate - kbps)
    Policed(conform)    :                   0/0                    0
    Policed(exceed)     :                   0/0                    0
    Policed(violate)    :                   0/0                    0
    Policed and dropped :                   0/0
  Queueing statistics
    Queue ID                             : 51
    Taildropped(packets/bytes)           : 0/0
Class class-default
  Classification statistics          (packets/bytes)     (rate - kbps)
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Queueing statistics
    Queue ID                             : 51
    High watermark  (bytes)/(ms)         : 0/0
    Inst-queue-len  (bytes)/(ms)         : 0/0
    Avg-queue-len   (bytes)/(ms)         : 0/0
    Taildropped(packets/bytes)           : 0/0
  

The following sample output shows how to display policy statistics information for all classes on the Serial interface 0/0/3/0/3:0 that are in the output direction:

RP/0/RSP0/CPU0:router# show policy-map interface Serial0/0/3/0/3:0 output

show policy-map int  Serial0/0/3/0/3:0  output
Mon May 18 22:06:14.698 UTC 
Serial0/0/3/0/3:0 output: p1
Class class-default
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Queueing statistics
    Queue ID                             : 0
    High watermark  (Unknown)            : 0
    Inst-queue-len  (packets)            : 0
    Avg-queue-len   (packets)            : 0
    Taildropped(packets/bytes)           : 0/0
  Compression Statistics
    Header ip rtp
    Sent Total       (packets)           : 880
    Sent Compressed  (packets)           : 877
    Sent full header (packets)           : 342
    Saved            (bytes)             : 31570
    Sent             (bytes)             : 24750
    Efficiency improvement factor        : 2.27
  

The following table describes the significant fields shown in the display.

Table 3 show policy-map interface Field Descriptions

Field

Description

Classification statistics

Matched

Number of packets or bytes that matched this class.

Transmitted

Number of packets or bytes transmitted for this class.

Total Dropped

Number of packets or bytes dropped for this class.

Policing statistics

Policed(conform)

Number of packets or bytes that conformed to the police rate for this class.

Policed(exceed)

Number of packets or bytes that exceeded the police rate for this class.

Policed(violate)

Number of packets or bytes that violated the police rate for this class.

Policed and dropped

Number of packets or bytes dropped by the policer of this class.

Queueing statistics

Queue ID

Queue number of the packet in this class.

High watermark (bytes)/(ms)

Maximum length of the queue.

Inst-queue-len (bytes)/(ms)

Instantaneous length of the queue.

Avg-queue-len (bytes)/(ms)

Average length of the queue.

Taildropped (bytes)

Number of bytes taildropped for this queue.

Compression Statistics

Sent Total

Total number of packets sent.

Sent Compressed

Number of compressed packets sent.

Sent full header

Number of packets sent with a full header.

Saved

Number of bytes saved.

Sent

Number of bytes sent.

Efficiency improvement factor

Ratio of the packet’s original full size to the packet’s compressed size.

show policy-map shared-policy-instance

To display the statistics for all details of the shared policy instance, use the show policy-map shared-policy-instance command in EXEC mode.

show policy-map shared-policy-instance instance-name member member-interface [ input | output ] location node-id

Syntax Description

instance-name

String of up to 32 characters to identify the shared policy instance.

member

Identifies a specific bundle member link.

member-interface

Identifies interface type and interface-path-id.

input

(Optional) Display the policy map attached to the input interface.

output

(Optional) Display the policy map attached to the output interface.

location node-id

Location of node. The node-id argument is entered in the rack/slot/module notation.

Command Default

If neither input nor output is selected, statistics for both are displayed.

Command Modes

EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Release 3.9.0

This command was updated to support shared policy instance over bundle interfaces.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

QoS statistics are only available for the shared policy instance. There are no per-member interface QoS statistics.

Task ID

Task ID

Operations

qos

read, write

Examples

The following example shows how to display statistics for all details of the shared policy instance named inst-shape:

RP/0/RSP0/CPU0:router# show policy-map shared-policy-instance inst-shape input location 0/RSP0/CPU0

 input: shape
Class class-default
  Classification statistics         (packets/bytes)      (rate - kbps)
    Matched          :                     0/0                     0
    Transmitted      :                     0/0                     0
    Total Dropped    :                     0/0                     0
    Policy child Class class-default
      Classification statistics         (packets/bytes)      (rate - kbps)
        Matched             :                  0/0                     0
        Transmitted         :                  0/0                     0
        Total Dropped       :                  0/0                     0
      Queueing statistics
        Queue ID                            : 268435466
        High watermark  (Unknown
        Inst-queue-len  (packets)           : 0
        Avg-queue-len   (Unknown)
        Taildropped(packets/bytes)          : 0/0
        Queue(conform)      :                  0/0                     0
        Queue(exceed)       :                  0/0                     0
        RED random drops(packets/bytes      : 0/0
  
RP/0/RSP0/CPU0:router:router#show policy-map shared-policy-instance spi1 location 0/1/cPU0 

Shared Policy Instance spi1 input: hier_l2_ingress

Class class-default
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Policing statistics                (packets/bytes)     (rate - kbps) 
    Policed(conform)    :                   0/0                    0
    Policed(exceed)     :                   0/0                    0
    Policed(violate)    :                   0/0                    0
    Policed and dropped :                   0/0                  
    Policy child_hier_l2_ingress Class cos3
      Classification statistics          (packets/bytes)     (rate - kbps)
Matched             :                   0/0                    0
Transmitted         :                   0/0                    0
Total Dropped       :                   0/0                    0
      Policing statistics                (packets/bytes)     (rate - kbps) 
Policed(conform)    :                   0/0                    0
Policed(exceed)     :                   0/0                    0
Policed(violate)    :                   0/0                    0
Policed and dropped :                   0/0                  
Policed and dropped(parent policer)  : 0/0
    Policy child_hier_l2_ingress Class cos4
      Classification statistics          (packets/bytes)     (rate - kbps)
Matched             :                   0/0                    0
Transmitted         :                   0/0                    0
        Total Dropped       :                   0/0                    0
      Policing statistics                (packets/bytes)     (rate - kbps) 
        Policed(conform)    :                   0/0                    0
        Policed(exceed)     :                   0/0                    0
        Policed(violate)    :                   0/0                    0
        Policed and dropped :                   0/0                  
        Policed and dropped(parent policer)  : 0/0
    Policy child_hier_l2_ingress Class cos5
      Classification statistics          (packets/bytes)     (rate - kbps)
        Matched             :                   0/0                    0
        Transmitted         :                   0/0                    0
        Total Dropped       :                   0/0                    0
      Policing statistics                (packets/bytes)     (rate - kbps) 
        Policed(conform)    :                   0/0                    0
        Policed(exceed)     :                   0/0                    0
        Policed(violate)    :                   0/0                    0
        Policed and dropped :                   0/0                  
        Policed and dropped(parent policer)  : 0/0
    Policy child_hier_l2_ingress Class class-default
      Classification statistics          (packets/bytes)     (rate - kbps)
        Matched             :                   0/0                    0
        Transmitted         :                   0/0                    0
        Total Dropped       :                   0/0                    0

Shared Policy Instance spi1 output: l2_egress

Class qos_grp1
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Queueing statistics
    Queue ID                             : 18 
    High watermark                       : N/A 
    Inst-queue-len  (packets)            : 0
    Avg-queue-len   (packets)            : 0
    Taildropped(packets/bytes)           : 0/0
Class class-default
  Classification statistics          (packets/bytes)     (rate - kbps)
    Matched             :                   0/0                    0
    Transmitted         :                   0/0                    0
    Total Dropped       :                   0/0                    0
  Queueing statistics
    Queue ID                             : 19 
    High watermark                       : N/A 
    Inst-queue-len  (packets)            : 0
    Avg-queue-len   (packets)            : 0
    Taildropped(packets/bytes)           : 0/0

Related Commands

Command

Description

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

service-policy (interface)

Attachs a policy map to an input interface or output interface to be used as the service policy for that interface.  

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

show policy-map targets

To display information about the interfaces on which policy maps are applied, use the show policy-map targets command in EXEC mode.

show policy-map targets [ location node-id | pmap-name name | type performance-traffic [ location node-id | pmap-name name ] | type qos [ location node-id | pmap-name name ] ]

Syntax Description

location node-id

(Optional) Displays information about the interfaces on which policy maps are applied for the specified location. The node-id argument is entered in the rack/slot/module notation.

pmap-name name

(Optional) Displays information about the interfaces on which the specified policy map is applied.

type performance-traffic

(Optional) Displays information about the interfaces on which Realtime Application Flow Monitoring policy maps are applied.

type qos

(Optional) Displays information about the interfaces on which QoS policy maps are applied. This is the default type.

Command Default

The default QoS policy type is QoS.

Command Modes

EXEC

Command History

Release

Modification

Release 3.9.0

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

For a short period of time while a QoS policy is being modified, there might not be any policy in effect on the interfaces in which the modified policy is used. For this reason, modify QoS policies that affect the fewest number of interfaces at a time. Use the show policy-map targets command to identify the number of interfaces that will be affected during policy map modification.

Task ID

Task ID

Operations

qos

read

Examples

In this example, the Gigabit Ethernet interface 0/1/0/0 has one policy map attached as a main policy. Outgoing traffic on this interface will be affected if the policy is modified:

RP/0/RSP0/CPU0:router# show policy-map targets

Fri Jul 16 16:38:24.789 DST
1) Policymap: policy1    Type: qos
     Targets (applied as main policy):
       GigabitEthernet0/1/0/0 output
     Total targets: 1

     Targets (applied as child policy):
     Total targets: 0
  

Related Commands

Command

Description

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.  

show qos inconsistency

To display inconsistency information for the QoS policy on an interface, use the show qos inconsistency command in EXEC mode.

show qos inconsistency { detail warning-type { file filename | location node-id } | summary { file filename | location node-id } }

Syntax Description

detail

Displays interface and policy name details of the inconsistency.

warning-type

Selects the warning types to display:

  • 0—All warning types
  • 1—ANCP - No shaper at top policy map
  • 2—ANCP - Multiple classes at top policy map
  • 3—ANCP - Downstream rate less than shaper rate
  • 4—ANCP - Downstream rate more than port speed
  • 5—ANCP - Policy resolution failure
  • 6—ANCP - Traffic manager program failure
  • 7—Port speed - Policy resolution failure
  • 8—Port speed - Traffic manager program failure
  • 9—Bundle member addition failure
  • 10—Interface state not matching system configuration

file filename

Specify a file name, such as disk0:tmp.log or bootflash:.

location node-id

Displays detailed QoS information for the designated node. The node-id argument is entered in the rack/slot/module notation.

summary

Displays summary counts of QoS inconsistency warnings.

Command Default

No default behavior or values

Command Modes

EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

qos

read

Examples

The following example provides detail about QoS policy inconsistency, for all warning types:

RP/0/RSP0/CPU0:router# show qos inconsistency detail 0 location 0/7/CPU0 

Interface Lists with QoS Inconsistency Warning:
=========================================================

                     Node 0/7/CPU0
---------------------------------------------------------

Interfaces with QoS Inconsistency:  ANCP - No Shaper at top policymap
==========================================================================
Interface                  Direction  Policy Name             SPI Name
--------------------------------------------------------------------------
GigabitEthernet0/7/0/1.5     output    parent-none              

Interfaces with QoS Inconsistency:  ANCP - Downstream Rate less than Shaper Rate
==========================================================================
Interface                  Direction  Policy Name             SPI Name
--------------------------------------------------------------------------
GigabitEthernet0/7/0/1       output    parent                  SPI1
GigabitEthernet0/7/0/1.2     output    parent                   
GigabitEthernet0/7/0/1       output    normal-policy-name      normal-spi-name
  

The following example displays summary counts of inconsistency warnings:

RP/0/RSP0/CPU0:router#
RP/0/RSP0/CPU0:router# show qos inconsistency summary location 0/7/CPU0 

Summary Counts of QoS Inconsistency Warnings:
=========================================================


                     Node 0/7/CPU0

   Inconsistency Warning Type                 Count
--------------------------------------------------------
ANCP - No Shaper at top policymap:               1
ANCP - Downstream Rate less than Shaper Rate:    4
  

Related Commands

Command

Description

show qos interface

Displays QoS information for a specific interface.  

show qos shared-policy-instance

To list interface details for a specific location of a specific shared policy instance, attached to either an input or output interface, use the show qos shared-policy-instance command in EXEC mode.

show qos shared-policy-instance instance-name { input | output } location node-id

Syntax Description

instance-name

String of up to 32 characters to identify the shared policy instance.

input

Displays details for the shared policy instance attached to the input interface.

output

Displays details for the shared policy instance attached to the output interface

location node-id

Location of node. The node-id argument is entered in rack/slot/module notation.

Command Default

No default behavior or values

Command Modes

EXEC

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Release 3.9.0

This command was updated to support shared policy instance over bundle interfaces.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

Task ID

Task ID

Operations

qos

read, write

Examples

This example shows the results of the command to show details of the shared policy instance attached to the input interface at location 0/RSP0/CPU0:

RP/0/RSP0/CPU0:router# show qos shared-policy-instance instancetwo input location 0/RSP0/CPU0

shared-policy-instance: instancetwo input Bandwidth: 10000000 kbps
Policy: shape Total number of classes: 2
-----------------------------------------------------------------------
Level: 0 Policy: shape Class: class-default
QueueID: N/A
Shape Profile: 1 CIR: 16 kbps CBS: 1024 bytes PIR: 128000 kbps PBS:1605632
bytes WFQ Profile: 1 Committed Weight: 1 Excess Weight: 1
Bandwidth: 0 kbps, Parent Bandwidth: 10000000 kbps, Excess Ratio: 1
-----------------------------------------------------------------------
Level: 1 Policy: child Class: class-default Parent Policy: shape Class: class-default
QueueID: 268435466 (Priority Normal)
Queue Limit: 1572 kbytes Profile: 1 Scale Profile: 14 WFQ Profile: 2 
Committed Weight: 10 Excess Weight: 1020
Bandwidth: 0 kbps, Parent Bandwidth: 0kbps, Excess Ratio: 1
--------------------------------------------------------------------------
  
RP/0/RSP0/CPU0:router:#show qos shared-policy-instance spi1 input location 0/1/cPU0 

Instancespi1  --   Direction: input
Policy                   hier_l2_ingress
Total number of classes:   5
-----------------------------------------------
MPLS vmrid               160
IPV4 vmrid               159
IPV6 vmrid               158
    LEVEL1 class: classid    =  0x1
    class name               =   class-default
    Policer average                 = 600 mbits/sec (600000 kbps)
    Policer conform burst           = dflt (16777215 bytes)
    Policer conform action          = Just TX
    Policer exceed  action          = DROP PKT

      LEVEL2 class: classid    =  0x2
      class name               =   cos3
      Policer average                 = 100 mbits/sec (100032 kbps)
      Policer conform burst           = dflt (3126000 bytes)
      Policer conform action          = SET EXP AND TX
      Policer conform action value    = 1
      Policer exceed  action          = SET EXP AND TX
      Policer exceed  action value    = 2

      LEVEL2 class: classid    =  0x3
      class name               =   cos4
      Policer average                 = 100 mbits/sec (100032 kbps)
      Policer conform burst           = dflt (3126000 bytes)
      Policer conform action          = SET EXP AND TX
      Policer conform action value    = 3
      Policer exceed  action          = SET EXP AND TX
      Policer exceed  action value    = 4

      LEVEL2 class: classid    =  0x4
      class name               =   cos5
      Policer average                 = 100 mbits/sec (100032 kbps)
      Policer conform burst           = dflt (3126000 bytes)
      Policer conform action          = SET EXP AND TX
      Policer conform action value    = 5
      Policer exceed  action          = SET EXP AND TX
      Policer exceed  action value    = 6

      LEVEL2 class: classid    =  0x5
      class name               =   class-default
RP/0/RSP0/CPU0:router:#show qos shared-policy-instance spi1 output location 0/1/cPU0 

Instancespi1  --   Direction: output
Policy                   l2_egress
Total number of classes:   2
-----------------------------------------------
MPLS vmrid               17
IPV4 vmrid               16
IPV6 vmrid               24
    LEVEL1 class: classid    =  0x1
    class name               =   qos_grp1
    queue ID                 =   18
    port ID                  =   2 (Bandwidth = 1000000, MTU = 1522)
    Queue Max. BW.           =   250 mbits/sec (250000 kbps)
    Queue Max. Burst         =   200 ms (4194304 bytes)
    Queue Limit              =   16384 packets (16384 pkts)

    LEVEL1 class: classid    =  0x2
    class name               =   class-default
    queue ID                 =   19
    port ID                  =   2 (Bandwidth = 1000000, MTU = 1522)
    Weight                   =   1 ( BW Remaining % = 0)
    Queue Limit              =   16384 packets (16384 pkts)

Related Commands

Command

Description

show policy-map shared-policy-instance

Displays the statistics for all details of the shared policy instance.  

violate-action

To configure the action to take on packets that violate the rate limit, use the violate-action command in policy map police configuration mode. To remove a conform action from the policy-map, use the no form of this command.

violate-action { drop | set options | transmit }

no violate-action { drop | set options | transmit }

Syntax Description

drop

Drops the packet.

set options

Configures the specified packet properties. Replace options with one of the following keywords or keyword arguments:

  • cos [inner] value—Sets the class of service value. Range is 0 to 7.
    • inner —(Optional) Specifies the inner (CE) VLAN.
  • discard-class value —Sets the discard class value. Range is 0 to 7.
  • dscp value—Sets the differentiated services code point (DSCP) value and sends the packet. See Table 1 for a list of valid values.
  • mpls experimental {topmost | imposition} value—Sets the experimental (EXP) value of the Multiprotocol Label Switching (MPLS) packet topmost label or imposed label. Range is 0 to 7.
  • precedence precedence—Sets the IP precedence and sends the packet. See Table 1 for a list of valid values.
  • qos-groupvalue—Sets QoS group value. Range is 0 to 63.

transmit

Transmits the packets.

Command Default

No default behavior or values

Command Modes

Policy map police configuration

Command History

Release

Modification

Release 3.7.2

This command was introduced.

Usage Guidelines

To use this command, you must be in a user group associated with a task group that includes appropriate task IDs. If the user group assignment is preventing you from using a command, contact your AAA administrator for assistance.

For more information regarding the traffic policing feature refer to the police rate command.

The violate-action command can set the DSCP, the precedence, or the discard class for IP packets, and experimental and discard-class values for MPLS packets.

Task ID

Task ID

Operations

qos

read, write

Examples

In the following example for MPLS, traffic policing is configured to drop packets that violate the rate limit:

RP/0/RSP0/CPU0:router(config)# class-map class1
RP/0/RSP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RSP0/CPU0:router(config-cmap)# exit
RP/0/RSP0/CPU0:router(config)# policy-map policy1
RP/0/RSP0/CPU0:router(config-pmap)# class class1
RP/0/RSP0/CPU0:router(config-pmap-c)# police rate 250 kbps burst 50 
RP/0/RSP0/CPU0:router(config-pmap-c-police)# violate-action drop
RP/0/RSP0/CPU0:router(config-pmap-c-police)# exit
RP/0/RSP0/CPU0:router(config-pmap-c)# exit
RP/0/RSP0/CPU0:router(config-pmap)# exit
RP/0/RSP0/CPU0:router(config)# interface gigabitethernet 0/1/0/9
RP/0/RSP0/CPU0:router(config-if) service-policy input policy1
  

Related Commands

Command

Description

conform-action

Configures the action to take on packets that conform to the rate limit.  

exceed-action

Configures the action to take on packets that exceed the rate limit.  

police rate

Configures traffic policing and enters policy map police configuration mode.  

policy-map

Creates or modifies a policy map that can be attached to one or more interfaces to specify a service policy.  

show policy-map interface

Displays policy configuration information for all classes configured for all service policies on the specified interface.