Guest

Cisco IOS Software Releases 12.2 T

Percentage-Based Policing and Shaping

Table Of Contents

Percentage-Based Policing and Shaping

Feature Overview

Benefits

Restrictions

Related Features and Technologies

Related Documents

Supported Platforms

Supported Standards, MIBs, and RFCs

Prerequisites

Configuration Tasks

Configuring Policing and Shaping Based on Bandwidth Percentage

Attaching the Policy Map to an Interface or a VC

Verifying the Policing and Shaping Bandwidth Percentage Setting

Troubleshooting Tips

Configuration Examples

Specifying Traffic Policing Based on a Bandwidth Percentage Example

Specifying Traffic Shaping Based on a Bandwidth Percentage Example

Verifying That CEF Is Enabled Example

Command Reference

police (percent)

shape (percent)

show policy-map

show policy-map interface


Percentage-Based Policing and Shaping


Feature History

Release
Modification

12.2(13)T

This feature was introduced.

Supported Platforms

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


This document describes the Percentage-Based Policing and Shaping feature in Cisco IOS Release 12.2(13)T. It includes the following sections:

Feature Overview

Supported Platforms

Supported Standards, MIBs, and RFCs

Configuration Tasks

Configuration Examples

Command Reference

Feature Overview

Cisco IOS quality of service (QoS) offers two kinds of traffic regulation mechanisms—traffic policing and traffic shaping. A traffic policer typically drops traffic that violates a specific rate. A traffic shaper typically delays excess traffic using a buffer to hold packets and shapes the flow when the data rate to a queue is higher than expected.

Traffic shaping and traffic policing can work in tandem and can be configured in a class map. Class maps organize data packets into specific categories ("classes") that can, in turn, receive a user-defined QoS treatment when used in policy maps (sometimes referred to as "service policies").

Before this feature, traffic policing and traffic shaping were configured on the basis of a user-specified amount of bandwidth available on the interface. Policy maps were then configured on the basis of that specific amount of bandwidth, meaning that separate policy maps were required for each interface.

This feature provides the ability to configure traffic policing and traffic shaping based on a percentage of bandwidth available on the interface. Configuring traffic policing and traffic shaping in this manner enables customers to use the same policy map for multiple interfaces with differing amounts of bandwidth.

This feature also provides the option of specifying burst sizes in milliseconds (ms) when configuring traffic policing and shaping based on a percentage of bandwidth.

Configuring traffic policing and shaping based on a percentage of bandwidth is accomplished by using the police (percent) and shape (percent) commands. For more information about these commands, see the "Command Reference" section later in this document.

For more information on traffic policing and traffic shaping, refer to the chapter "Policing and Shaping Overview" in the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.

Benefits

Increased Flexibility

This feature provides the ability to configure traffic policing and traffic shaping based on a percentage of bandwidth available on an interface. Configuring traffic policing and traffic shaping in this manner enables customers to use the same policy map for multiple interfaces with differing amounts of bandwidth.

Restrictions

The shape (percent) command, when used in "child" (nested) policy maps, is not supported on the Cisco 7500, the Cisco 7200, or lower series routers. Therefore, the shape (percent) command cannot be configured for use in nested policy maps on these routers.

Related Features and Technologies

Modular QoS command-line interface (CLI) (Modular QoS CLI)

Class-based weighted fair queueing (CBWFQ)

Class-based packet marking

Traffic policing

Two-rate policing

Traffic shaping

Related Documents

Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2

Cisco IOS Quality of Service Solutions Command Reference, Release 12.2

Cisco IOS Switching Services Configuration Guide, Release 12.2

Cisco IOS Switching Services Command Reference, Release 12.2

Class-Based Marking, Cisco IOS Release 12.2(2)T feature module

Two-Rate Policer, Cisco IOS Release 12.2(4)T feature module

Policer Enhancements—Multiple Actions, Cisco IOS Release 12.2(8)T feature module

RFC 2697, A Single Rate Three Color Marker

RFC 2698, A Two Rate Three Color Marker

Supported Platforms

Determining Platform Support Through Cisco Feature Navigator

Cisco IOS software is packaged in feature sets that are supported on specific platforms. To obtain updated information about platform support for this feature, access Cisco Feature Navigator. Cisco Feature Navigator dynamically updates the list of supported platforms as new platform support is added for the feature.

Cisco Feature Navigator is a web-based tool that enables you to determine which Cisco IOS software images support a specific set of features and which features are supported in a specific Cisco IOS image. You can search by feature or release. In the release section, you can compare releases side by side to display both the features unique to each software release and the features that releases have in common.

To access Cisco Feature Navigator, you must have an account on Cisco.com. If you have forgotten or lost your account information, send a blank e-mail to cco-locksmith@cisco.com. An automatic check will verify that your e-mail address is registered with Cisco.com. 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 Cisco.com by following the directions at http://www.cisco.com/register.

Cisco Feature Navigator is updated regularly when major Cisco IOS software releases and technology releases occur. For the most current information, go to the Cisco Feature Navigator home page at the following URL:

http://www.cisco.com/go/fn

Availability of Cisco IOS Software Images

Platform support for particular Cisco IOS software releases is dependent on the availability of the software images for those platforms. Software images for some platforms may be deferred, delayed, or changed without prior notice. For updated information about platform support and availability of software images for each Cisco IOS software release, refer to the online release notes or, if supported, Cisco Feature Navigator.

Supported Standards, MIBs, and RFCs

Standards

None

MIBs

None

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

http://tools.cisco.com/ITDIT/MIBS/servlet/index

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:

http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml

To access Cisco MIB Locator, you must have an account on Cisco.com. If you have forgotten or lost your account information, send a blank e-mail to cco-locksmith@cisco.com. An automatic check will verify that your e-mail address is registered with Cisco.com. 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 Cisco.com by following the directions found at this URL:

http://www.cisco.com/register

RFCs

RFC 2697, A Single Rate Three Color Marker

RFC 2698, A Two Rate Three Color Marker

Prerequisites

On a Cisco 7500 series router, Distributed Cisco Express Forwarding (dCEF) must be configured on the interface before you can use the Percentage-Based Policing and Shaping feature. For additional information on dCEF, refer to the Cisco IOS Switching Services Configuration Guide, Release 12.2.

Configuration Tasks

See the following sections for configuration tasks for the Percentage-Based Policing and Shaping feature. Each task in the list is identified as either required or optional.

Configuring Policing and Shaping Based on Bandwidth Percentage (required)

Attaching the Policy Map to an Interface or a VC (required)

Verifying the Policing and Shaping Bandwidth Percentage Setting (optional)

Configuring Policing and Shaping Based on Bandwidth Percentage

To configure traffic policing and shaping based on a percentage of bandwidth available on an interface, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router (config)# policy-map policy-name

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

Step 2 

Router(config-pmap)# class-map class-map-name

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

Step 3 

Router(config-pmap-c)# police cir percent percent [bc conform-burst-in-msec] pir percent percent] [be peak-burst-in-msec]

Configures traffic policing.

Step 4 

Router(config-pmap-c)# shape {average | peak} percent percent [bc] [be]

Configures traffic shaping using either an average or peak traffic shaping rate based on a percentage of available bandwidth.

Step 5 

Router (config-pmap-c)# service-policy policy-map-name

Specifies the name of a policy map to be used as a child policy map for this class.

Step 6 

Router(config-pmap-c)# exit

Exits policy-map class configuration mode.

Attaching the Policy Map to an Interface or a VC

To attach the policy map to an interface or a virtual circuit (VC), use the following command in interface configuration mode. To attach the policy map to a VC, use the following command in ATM VC configuration mode.

Command
Purpose

Router(config-if)# service-policy output1 policy-map-name


or


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


Specifies the name of the policy map to be attached to the input direction of an interface or VC.

The policy map evaluates all traffic entering that interface or VC.

1 Traffic shaping is supported on service policies attached to output interfaces or output VCs only.


Verifying the Policing and Shaping Bandwidth Percentage Setting

To verify the policing and shaping bandwidth percentages in the class map and the associated policy map, use the following commands in EXEC mode, as needed:

Command
Purpose

Router# show class-map

Displays all information about a class map, including the match criterion.

Router# show policy-map

Displays all configured 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 permanent virtual circuit (PVC) on the interface.


Troubleshooting Tips

For input traffic policing on a Cisco 7500 series router, verify that dCEF is enabled on the interface on which traffic policing is configured.

For output traffic policing on a Cisco 7500 series router, ensure that the incoming traffic is dCEF-switched. Traffic policing cannot be used on the switching path unless dCEF switching is enabled.

Configuration Examples

This section provides the following configuration examples:

Specifying Traffic Policing Based on a Bandwidth Percentage Example

Specifying Traffic Shaping Based on a Bandwidth Percentage Example

Verifying That CEF Is Enabled Example

Specifying Traffic Policing Based on a Bandwidth Percentage Example

The following example configures traffic policing using a committed information rate (CIR) and a peak information rate (PIR) based on a percentage of bandwidth. In this example, a CIR of 20 percent and a PIR of 40 percent have been specified. Additionally, an optional bc value and be value (300 ms and 400 ms, respectively) have been specified.

Router (config)# policy-map policy1

Router(config-pmap)# class-map class1

Router(config-pmap-c)# police cir percent 20 bc 300 ms pir percent 40 be 400 ms

Router (config-pmap-c)# service-policy child-policy1

Router(config-pmap-c)# exit

Router(config-pmap-c)# interface serial 3/1

Router(config-if)# service-policy output policy1


The purpose of the burst parameters (bc and be values) is to drop packets gradually, as is done with Weighted Random Early Detection (WRED), and to avoid tail drop. Setting sufficiently high burst values helps to ensure good throughput.

Specifying Traffic Shaping Based on a Bandwidth Percentage Example

The following example configures traffic shaping using an average shaping rate based on a percentage of bandwidth. In this example, 25 percent of the bandwidth has been specified. Additionally, an optional bc value and be value (300 ms and 400 ms, respectively) have been specified.

Router (config)# policy-map policy1

Router(config-pmap)# class-map class1

Router(config-pmap-c)# shape average percent 25 300 ms 400 ms

Router (config-pmap-c)# service-policy child-policy1

Router(config-pmap-c)# exit

Router(config-pmap-c)# interface serial 3/1

Router(config-if)# service-policy output policy1


The purpose of the bc and be values is to drop packets gradually, as is done with WRED, and to avoid tail drop. Setting sufficiently high burst values helps to ensure good throughput.

Verifying That CEF Is Enabled Example

As mentioned previously, on a Cisco 7500 series router, dCEF must be configured on the interface before you can use the Percentage-Based Policing and Shaping feature. The show ip cef summary command can be used to confirm that dCEF is enabled and is being used for IP switching. In rare instances, this command displays "IP Distributed CEF without switching" in the command output. This indicates that dCEF is disabled. The following sample output of the show ip cef summary command indicates that dCEF is disabled:

Router# show ip cef summary 

    IP Distributed CEF with switching (Table Version 36), flags=0x0
      18 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 3
      18 leaves, 19 nodes, 22136 bytes, 45 inserts, 27 invalidations
      0 load sharing elements, 0 bytes, 0 references
      universal per-destination load sharing algorithm, id 680E93E2
      3(0) CEF resets, 1 revisions of existing leaves
      Resolution Timer:Exponential (currently 1s, peak 1s)
      0 in-place/0 aborted modifications
      refcounts: 5136 leaf, 5120 node

For information on enabling dCEF, refer to the Cisco IOS Switching Services Configuration Guide, Release 12.2.

When you configure a feature that requires special handling or is not yet supported in the dCEF switching paths, packets are forwarded to the next switching layer for handling. In this instance, the output of the show cef interface command displays "Packets switched to this interface on line card are dropped to next slow path" as shown in the following sample output.

Router# show cef interface Serial 10/0/0:28 

    Serial10/0/0:28 is up (if_number 38) 
      Internet address is 90.0.0.1/8 
      ICMP redirects are never sent 
      Per packet loadbalancing is disabled 
      Inbound  access list is not set 
      Interface is marked as point to point interface 
      Packets switched to this interface on linecard are dropped to next slow path 
      Hardware idb is Serial10/0/0:28 
      Fast switching type 4, interface type 20 
      IP Distributed CEF switching enabled
      Fast flags 0x0. ifindex 37(37) 
      Slot 10 Slot unit 0 VC 28 
      Hardware transmit queue ptr 0x48001AE0 (0x48001AE0) 
      Transmit limit accumulator 0x48000102 (0x48000102) 
      IP MTU 1500

For more information about the show ip cef interface command, refer to the Cisco IOS Switching Services Command Reference, Release 12.2.

Command Reference

This section documents modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.2 command reference publications.

police (percent)

shape (percent)

show policy-map

show policy-map interface

police (percent)

To configure traffic policing based on a percentage of bandwidth available on an interface, use the police command in policy-map class configuration mode. To remove traffic policing from the configuration, use the no form of this command.

police cir percent percent [bc conform-burst-in-msec] [pir percent percent]
[be peak-burst-in-msec]

no police cir percent percent [bc conform-burst-in-msec] [pir percent percent]
[
be peak-burst-in-msec]

Syntax Description

cir

Committed information rate. Indicates that the cir will be used for policing traffic.

percent

Specifies that percent of bandwidth will be used for calculating the cir.

percent

Specifies the bandwidth percentage. Valid range is a number from 1 to 100.

bc

(Optional) Conform burst (bc) size used by the first token bucket for policing traffic.

conform-burst-in-msec

(Optional) Specifies the bc value in milliseconds (ms). Valid range is a number from 1 to 2000.

pir

(Optional) Peak information rate. Indicates that the pir will be used for policing traffic.

percent

(Optional) Specifies that a percentage of bandwidth will be used for calculating the pir.

percent

(Optional) Specifies the bandwidth percentage. Valid range is a number from 1 to 100.

be

(Optional) Peak burst (be) size used by the second token bucket for policing traffic.

peak-burst-in-msec

(Optional) Specifies the be size in ms. Valid range is a number from 1 to 2000.


Defaults

This command is disabled by default.

Command Modes

Policy-map class configuration

Command History

Release
Modification

11.1 CC

The rate-limit command was introduced.

12.0(5)XE

This police command, which was closely related to the rate-limit command, was introduced.

12.1(1)E

This command was integrated into Cisco IOS Release 12.2(1)E.

12.1(5)T

This command was integrated into Cisco IOS Release 12.1(5)T.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T. This command was modified for the Percentage-Based Policing and Shaping feature.


Usage Guidelines

This command calculates the cir and pir based on a percentage of the maximum amount of bandwidth available on the interface. When a policy map is attached to the interface, the equivalent cir and pir values in bits per second (bps) are calculated based on the interface bandwidth and the percent value entered with this command. The show policy-map interface command can then be used to verify the bps rate calculated.

The calculated cir and pir bps rates must be in the range of 8000 and 2000000000 bps. If the rates are outside this range, the associated policy map cannot be attached to the interface. If the interface bandwidth changes (for example, more is added), the bps values of the cir and the pir are recalculated based on the revised amount of bandwidth. If the cir and pir percentages are changed after the policy map is attached to the interface, the bps values of the cir and pir are recalculated.

This command also allows you to specify the values for the conform burst size and the peak burst size in milliseconds. If you want bandwidth to be calculated as a percentage, the conform burst size and the peak burst size must be specified in milliseconds (ms).

Policy maps can be configured in two-level (nested) hierarchies; a top (or "parent") level and a secondary (or "child") level. The police (percent) command can be configured for use in either a parent or child policy map.

The police (percent) command uses the maximum rate of bandwidth available as the reference point for calculating the bandwidth percentage. When the police (percent) command is configured in a child policy map, the police (percent) command uses the bandwidth amount specified in the next higher-level policy (in this case, the parent policy map). If the parent policy map does not specify the maximum bandwidth rate available, the police (percent) command uses the maximum bandwidth rate available on the next higher level (in this case, the physical interface, the highest point in the hierarchy) as the reference point. The police (percent) command always looks to the next higher level for the bandwidth reference point. The following sample configuration illustrates this point:

Policymap parent_policy
 class parent
  shape average 512000
  service-policy child_policy

Policymap child_policy
 class normal_type
  police cir percent 30

In this sample configuration, there are two hierarchical policies; one called parent_policy and one called child_policy. In the policy map called child_policy, the police command has been configured in the class called normal_type. In this class, the percentage specified by for the police (percent) command is 30 percent. The command will use 512 kbps, the peak rate, as the bandwidth reference point for class parent in the parent_policy. The police (percent) command will use 512 kbps as the basis for calculating the cir rate (512 kbps * 30 percent).

interface serial 4/0
 service-policy output parent_policy

Policymap parent_policy
 class parent
  bandwidth 512
  service-policy child_policy

In the above example, there is one policy map called parent_policy. In this policy map, a peak rate has not been specified. The bandwidth command has been used, but this command does not represent the maximum rate of bandwidth available. Therefore, the police (percent) command will look to the next higher level (in this case Serial interface 4/0) to get the bandwidth reference point. Assuming the bandwidth of the Series interface s4/0 is 1.5 Mbps, the police (percent) command will use 1.5 Mbps as the basis for calculating the cir rate (1500000 * 30 percent).

How Bandwidth Is Calculated

The police (percent) command is often used in conjunction with the bandwidth and priority commands. The bandwidth and priority commands can be used to calculate the total amount of bandwidth available on an entity (for example, a physical interface). When the bandwidth and priority commands calculate the total amount of bandwidth available on an entity, the following guidelines are invoked:

If the entity is a physical interface, the total bandwidth is the bandwidth on the physical interface.

If the entity is a shaped ATM pemanent virtual circuit (PVC), the total bandwidth is calculated as follows:

For a variable bit rate (VBR) virtual circuit (VC), the sustained cell rate (SCR) is used in the calculation.

For an available bit rate (ABR) VC, the minimum cell rate (MCR) is used in the calculation.

For more information on bandwidth allocation, refer to the chapter "Congestion Management Overview" in the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.

Examples

The following example configures traffic policing using a cir and a pir based on a percentage of bandwidth. In this example, a cir of 20 percent and a pir of 40 percent have been specified. Additionally, an optional bc value and be value (300 ms and 400 ms, respectively) have been specified.

Router (config)# policy-map policy1

Router(config-pmap)# class-map class1

Router(config-pmap-c)# police cir percent 20 bc 300 ms pir percent 40 be 400 ms

Router (config-pmap-c)# service-policy child-policy1

Router(config-pmap-c)# exit

Router(config-pmap-c)# interface serial 3/1

Router(config-if)# service-policy output policy1

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

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

shape (percent)

Specifies average or peak rate traffic shaping based on a percentage of bandwidth available on an interface.

show policy-map

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

show policy-map interface

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.


shape (percent)

To specify average or peak rate traffic shaping on the basis of a percentage of bandwidth available on an interface, use the shape command in policy-map class configuration mode. To remove traffic shaping, use the no form of this command.

shape {average | peak} percent percent [bc] [be]

no shape {average | peak} percent percent [bc] [be]

Syntax Description

average

Specifies average rate traffic shaping.

peak

Specifies peak rate traffic shaping.

percent

Specifies that percent of bandwidth will be used for either the average rate or peak rate traffic shaping.

percent

Specifies the bandwidth percentage. Valid range is a number from 1 to 100.

bc

(Optional) Specifies the committed burst (bc) size in milliseconds. Valid range is a number from 10 to 2000.

be

(Optional) Specifies the excess burst (be) size in milliseconds. Valid range is a number from 10 to 2000.


Defaults

This command is disabled by default.

Command Modes

Policy-map class configuration

Command History

Release
Modification

12.1(2)T

This command was introduced.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T. This command was modified for the Percentage-Based Policing and Shaping feature.


Usage Guidelines

This command calculates the committed information rate (CIR) based on a percentage of the available bandwidth on the interface. Once a policy map is attached to the interface, the equivalent cir value in bits per second (bps) is calculated based on the interface bandwidth and the percent value entered with this command. The show policy-map interface command can then be used to verify the cir bps value calculated.

The calculated cir bps rate must be in the range of 8000 and 154400000 bps. If the rate is less than 8000 bps, the associated policy map cannot be attached to the interface. If the interface bandwidth changes (for example, more is added), the cir bps values are recalculated based on the revised amount of bandwidth. If the cir percentage is changed after the policy map is attached to the interface, the bps value of the cir is recalculated.

This command also allows you to specify the values for the conform burst size and the peak burst size in milliseconds. If you want bandwidth to be calculated as a percentage, the conform burst size and the peak burst size must be specified in milliseconds (ms).

The shape (percent) command, when used in "child" (nested) policy maps, is not supported on the Cisco 7500, the Cisco 7200, or lower series routers. Therefore, the shape (percent) command cannot be configured for use in nested policy maps on these routers.

How Bandwidth Is Calculated

The shape (percent) command is often used in conjunction with the bandwidth and priority commands. The bandwidth and priority commands can be used to calculate the total amount of bandwidth available on an entity (for example, a physical interface). When the bandwidth and priority commands calculate the total amount of bandwidth available on an entity, the following guidelines are invoked:

If the entity is a physical interface, the total bandwidth is the bandwidth on the physical interface.

If the entity is a shaped ATM permanent virtual circuit (PVC), the total bandwidth is calculated as follows:

For a variable bit rate (VBR) virtual circuit (VC), the sustained cell rate (SCR) is used in the calculation.

For an available bit rate (ABR) VC, the minimum cell rate (MCR) is used in the calculation.

For more information on bandwidth allocation, refer to the chapter "Congestion Management Overview" in the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.

Examples

The following example configures traffic shaping using an average shaping rate based on a percentage of bandwidth. In this example, 25 percent of the bandwidth has been specified. Additionally, an optional bc value and be value (300 ms and 400 ms, respectively) have been specified.

Router (config)# policy-map policy1

Router(config-pmap)# class-map class1

Router(config-pmap-c)# shape average percent 25 300 ms 400 ms

Router (config-pmap-c)# service-policy child-policy1

Router(config-pmap-c)# exit

Router(config-pmap-c)# interface serial 3/1

Router(config-if)# service-policy output policy1

Related Commands

Command
Description

bandwidth

Specifies or modifies the bandwidth allocated for a class belonging to a policy map.

class (policy-map)

Specifies the name of the class whose policy you want to create or change, and the default class (commonly known as the class-default class) before you configure its policy.

police (percent)

Configures traffic policing based on a percentage of bandwidth available on an interface.

policy-map

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

priority

Gives priority to a class of traffic belonging to a policy map.

service-policy

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

shape max-buffers

Specifies the maximum number of buffers allowed on shaping queues.


show policy-map

To display the configuration of all classes for a specified service policy map or all classes for all existing policy maps, use the show policy-map command in EXEC mode.

show policy-map [policy-map]

Syntax Description

policy-map

(Optional) Name of the service policy map whose complete configuration is to be displayed.


Defaults

All existing policy map configurations are displayed.

Command Modes

EXEC

Command History

Release
Modification

12.0(5)T

This command was introduced.

12.0(5)XE

This command was incorporated into Cisco IOS Release 12.0(5)XE.

12.0(7)S

This command was incorporated into Cisco IOS Release 12.0(7)S.

12.1(1)E

This command was incorporated into Cisco IOS Release 12.1(1)E.

12.2(13)T

This command was integrated into Cisco IOS Release 12.2(13)T. The output was modified for the Percentage-Based Policing and Shaping feature.


Usage Guidelines

The show policy-map command displays the configuration of a service policy map created using the policy-map command. You can use the show policy-map command to display all class configurations comprising any existing service policy map, whether or not that service policy map has been attached to an interface.

Examples

The following example displays the contents of two service policy maps—one called "policy1" and one called "policy2." In policy1, traffic policing based on a committed information rate (CIR) of 50 percent has been configured. In policy 2, traffic shaping based on an average rate of 35 percent has been configured.

Router# show policy-map policy1

Policy Map policy1 
 class class1 
    police cir percent 50 

Router# show policy-map policy2

Policy Map policy2 
 class class2 
    shape average percent 35 

The following example displays the contents of the service policy map called "po1":

Router# show policy-map po1

Policy Map po1 
 Weighted Fair Queueing 
    Class class1 
       Bandwidth 937 (kbps) Max thresh 64 (packets) 
    Class class2 
        Bandwidth 937 (kbps)  Max thresh 64 (packets)
    Class class3 
        Bandwidth 937 (kbps)  Max thresh 64 (packets) 
    Class class4 
        Bandwidth 937 (kbps)  Max thresh 64 (packets) 

The following example displays the contents of all policy maps on the router:

Router# show policy-map 

Policy Map poH1 
 Weighted Fair Queueing 
    Class class1 
       Bandwidth 937 (kbps) Max thresh 64 (packets) 
    Class class2 
        Bandwidth 937 (kbps)  Max thresh 64 (packets)
    Class class3 
        Bandwidth 937 (kbps)  Max thresh 64 (packets) 
    Class class4 
        Bandwidth 937 (kbps)  Max thresh 64 (packets) 
Policy Map policy2 
 Weighted Fair Queueing 
    Class class1 
       Bandwidth 300 (kbps) Max thresh 64 (packets) 
    Class class2 
        Bandwidth 300  (kbps)  Max thresh 64 (packets)
    Class class3 
        Bandwidth 300 (kbps)  Max thresh 64 (packets) 
    Class class4 
        Bandwidth 300 (kbps)  Max thresh 64 (packets) 

Table 1 describes the significant fields shown in the display.

Table 1 show policy-map Field Descriptions 

Field
Description

Policy Map

Name of policy map displayed.

Weighted Fair Queueing

Indicates that Weighted Fair Queueing has been enabled.

Class

Name of class configured in policy map displayed.

Police

Indicates that traffic policing based on specified percentage of bandwidth has been enabled.

Shape

Indicates that traffic shaping based on specified percentage of bandwidth has been enabled.

Bandwidth

Bandwidth, in kbps, configured for this class.

Max threshold

Maximum threshold. Maximum Weighted Random Early Detection (WRED) threshold in number of packets.


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.

show policy-map class

Displays the configuration for the specified class of the specified policy map.

show policy-map interface

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.



show policy-map interface

To display the packet statistics of all classes that are configured for all service policies either on the specified interface or subinterface or on a specific permanent virtual circuit (PVC) on the interface, use the show policy-map interface command in EXEC mode.

show policy-map interface interface-name [vc [vpi/] vci][dlci dlci] [ input | output]

Syntax Description

interface-name

Name of the interface or subinterface whose policy configuration is to be displayed.

vc

(Optional) For ATM interfaces only, shows the policy configuration for a specified PVC. The name can be up to 16 characters long.

vpi/

(Optional) ATM network virtual path identifier (VPI) for this PVC. On the Cisco 7200 and 7500 series routers, this value ranges from 0 to 255. The absence of both the forward slash (/) and a vpi value defaults the vpi value to 0.

If this value is omitted, information for all virtual circuits (VCs) on the specified ATM interface or subinterface is displayed.

The vpi and vci arguments cannot both be set to 0; if one is 0, the other cannot be 0.

vci

(Optional) ATM network virtual channel identifier (VCI) for this PVC. This value ranges from 0 to 1 less than the maximum value set for this interface by the atm vc-per-vp command. Typically, the lower values 0 to 31 are reserved for specific traffic (F4 Operation, Administration, and Maintenance (OAM), switched virtual circuit (SVC) signaling, Integrated Local Management Interface (ILMI), and so on) and should not be used.

The VCI is a 16-bit field in the header of the ATM cell. The VCI value is unique only on a single link, not throughout the ATM network, because it has local significance only.

The vpi and vci arguments cannot both be set to 0; if one is 0, the other cannot be 0.

dlci

(Optional) Indicates a specific PVC for which policy configuration will be displayed.

dlci

(Optional) Specific data-link connection identifier (DLCI) number used on the interface. Policy configuration for the corresponding PVC will be displayed when a DLCI is specified.

input

(Optional) Indicates that the statistics for the attached input policy will be displayed.

output

(Optional) Indicates that the statistics for the attached output policy will be displayed.


Defaults

This command has no default behavior or values.

Command Modes

EXEC

Command History

Release
Modification

12.0(5)T

This command was introduced.

12.0(5)XE

This command was integrated into Cisco IOS Release 12.0(5)XE.

12.0(7)S

This command was integrated into Cisco IOS Release 12.0(7)S.

12.1(1)E

This command was integrated into Cisco IOS Release 12.1(1)E.

12.1(2)T

This command was integrated into Cisco IOS Release 12.1(2)T. This command was modified to display information about the policy for all Frame Relay PVCs on the interface, or, if a DLCI is specified, the policy for that specific PVC. This command was also modified to display the total number of packets marked by the QoS set action.

12.1(3)T

This command was integrated into Cisco IOS Release 12.1(3)T. This command was modified to display per-class accounting statistics.

12.2(4)T

This command was modified for the Two-Rate Policer. It now can display burst parameters and associated actions.

12.2(8)T

The command was modified for the Policer Enhancement — Multiple Actions feature. This command now displays the multiple actions configured for packets conforming to, exceeding, or violating a specific rate.


Usage Guidelines

The show policy-map interface command displays the configuration for classes on the specified interface or the specified PVC only if a service policy has been attached to the interface or the PVC.

Examples

The following sample output of the show policy-map interface command shows traffic policing configured using a committed information rate (CIR) based on a bandwidth of 20 percent. The CIR and committed burst (bc) in milliseconds (ms) are included in the display.

Router# show policy-map interface Serial3/1

 Serial3/1 

  Service-policy output: mypolicy

    Class-map: gold (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      police:
          cir 20 % bc 10 ms
          cir 2000000 bps, bc 2500 bytes
          pir 40 % be 20 ms
          pir 4000000 bps, be 10000 bytes
     conformed 0 packets, 0 bytes; actions: 
      transmit 
     exceeded 0 packets, 0 bytes; actions: 
       drop
      violated 0 packets, 0 bytes; actions:
       drop
      conformed 0 bps, exceed 0 bps, violate 0 bps

Table 2 describes the significant fields shown in the display.

Table 2 show policy-map interface Configured for Percentage-Based Policing and Shaping Field Descriptions1  

Field
Description

Service-policy output

Name of the output service policy applied to the specified interface or VC.

Class-map

Class of traffic being displayed. Output is displayed for each configured class in the policy. The choice for implementing class matches (for example, match-all or match-any) can also appear next to the traffic class.

packets and bytes

Number of packets (also shown in bytes) identified as belonging to the class of traffic being displayed.

offered rate

Rate, in kbps, of packets coming in to the class.

police

Indicates that traffic policing based on a percentage of bandwidth has been enabled. Also, displays the bandwidth percentage, the CIR, and the committed burst (bc) size in milliseconds.

conformed, actions

Displays the number of packets and bytes marked as conforming to the specified rates, and the action to be taken on those packets.

exceeded, actions

Displays the number of packets and bytes marked as exceeding the specified rates, and the action to be taken on those packets.

1 A number in parentheses may appear next to the service-policy output name, class-map name, and match criteria information. The number is for Cisco internal use only and can be disregarded.


The following sample output of the show policy-map interface command displays the statistics for the serial 3/2 interface. Traffic shaping has been enabled on this interface, and an average rate of 20 percent of the bandwidth has been specified.

Router# show policy-map interface Serial3/2

Serial3/2 

  Service-policy output: p1

    Class-map: c1 (match-all)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      Traffic Shaping
        Target/Average      Byte   Sustain    Excess      Interval  Increment  Adapt
        Rate              Limit  bits/int  bits/int    (ms)     (bytes)   Active 
         20 %                       10 (ms)    20 (ms)
        201500/201500       1952   7808       7808        38         976       -

        Queue     Packets   Bytes     Packets   Bytes     Shaping
        Depth                         Delayed   Delayed   Active
        0         0         0         0         0         no

Table 3 describes the significant fields shown in the display.

Table 3 show policy-map interface Configured for Percentage-Based Policing and Shaping Field Descriptions1  

Field
Description

Service-policy output

Name of the output service policy applied to the specified interface or VC.

Class-map

Class of traffic being displayed. Output is displayed for each configured class in the policy. The choice for implementing class matches (for example, match-all or match-any) can also appear next to the traffic class.

packets and bytes

Number of packets (also shown in bytes) identified as belonging to the class of traffic being displayed.

offered rate

Rate, in kbps, of packets coming in to the class.

drop rate

Rate, in kbps, at which packets are dropped from the class. The drop rate is calculated by subtracting the number of successfully transmitted packets from the offered rate.

Match

Match criteria specified for the class of traffic. Choices include criteria such as the Layer 3 packet length, IP precedence, IP differentiated services code point (DSCP) value, Multiprotocol Label Switching (MPLS) experimental value, access groups, and quality of service (QoS) groups. For more information about the variety of match criteria options that are available, refer to the chapter "Configuring the Modular Quality of Service Command-Line Interface" in the Cisco IOS Quality of Service Solutions Configuration Guide, Release 12.2.

Traffic Shaping

Indicates that traffic shaping based on a percentage of bandwidth has been enabled.

Target /Average Rate

Rate (percentage) used for shaping traffic and the number of packets meeting that rate.

Byte Limit

Maximum number of bytes that can be transmitted per interval. Calculated as follows:

((Bc+Be) /8 ) x 1

Sustain bits/int

Committed burst (Bc) rate.

Excess bits/int

Excess burst (Be) rate.

Interval (ms)

Time interval value in milliseconds (ms).

Increment (bytes)

Number of credits (in bytes) received in the token bucket of the traffic shaper during each time interval.

Adapt Active

Indicates whether adaptive shaping is enabled.

Queue Depth

Current queue depth of the traffic shaper.

Packets

Total number of packets that have entered the traffic shaper system.

Bytes

Total number of bytes that have entered the traffic shaper system.

Packets Delayed

Total number of packets delayed in the queue of the traffic shaper before being transmitted.

Bytes Delayed

Total number of bytes delayed in the queue of the traffic shaper before being transmitted.

Shaping Active

Indicates whether the traffic shaper is active. For example, if a traffic shaper is active, and the traffic being sent exceeds the traffic shaping rate, a "yes" appears in this field.

1 A number in parentheses may appear next to the service-policy output name, class-map name, and match criteria information. The number is for Cisco internal use only and can be disregarded.


Related Commands

Command
Description

police (percent)

Configures traffic policing based on a percentage of bandwidth available on an interfaces.

shape (percent)

Specifies average or peak rate traffic shaping based on a percentage of bandwidth available on an interface.

show frame-relay pvc

Displays statistics about PVCs for Frame Relay interfaces.

show policy-map

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

show policy-map class

Displays the configuration for the specified class of the specified policy map.