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 | rate [units] | } [peak-rate {value [units] | percent percentage}]
no police rate {value [units] | percent percentage | rate [units] | | } [peak-rate {value [units] | percent percentage}]
Syntax Description
|
value
|
Specifies the committed information rate (CIR) as an absolute value. Range is from 1 to 4294967295.
|
|
units
|
(Optional) Specifies the unit for the absolute CIR or PIR value. Units can be:
-
bps
—bits per second (default)
-
gbps
—gigabits per second
-
kbps
—kilobits per second
-
mbps
—megabits 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.
|
|
peak-rate
value
|
(Optional) Specifies the peak information rate (PIR) as an absolute value in the specified
units .
|
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 26.3.1 |
The command was enhanced to support absolute rate values on supported bundle interfaces. The command was also enhanced to
support parent policer configuration for two-level hierarchical ingress policing.
|
|
Release 7.0.12
|
This command was introduced.
|
Usage Guidelines
Policer conditional set discard-class is supported.
Policing can be applied only in the ingress direction.
For bundle interfaces on unsupported releases or platforms, configure QoS policers with percentage-based values.
Starting with Cisco IOS XR Release 26.3.1, you can configure the police rate command with absolute units on supported bundle main interfaces and bundle subinterfaces on supported Cisco 8000 Series routers.
This support applies to the documented bundle QoS scope. Bundle aggregate mode is not supported on bundle interfaces, regardless
of whether the policer uses absolute values or percentage-based values.
For bundle policers configured with an absolute value, the configured policer rate is applied per logical hardware unit. On
A100, K100, and P100-based Cisco 8000 routers, the logical hardware unit is a slice. On Q200-based Cisco 8000 routers, the
logical hardware unit is an interface group.
If all bundle members are in the same slice or interface group, the configured policer rate is shared by the members in that
logical hardware unit. If bundle members are spread across slices or interface groups, each participating logical hardware
unit can enforce the configured rate independently. The effective aggregate policing behavior can therefore be higher than
the single configured value.
For bundle policers configured with an absolute value, the configured policer rate must be less than or equal to the bandwidth
of the bundle member interfaces.
You can configure a one-rate, three-color (1R3C) parent policer by using police rate
value
units . You can configure a two-rate, three-color (2R3C) parent policer by using police rate
value
units
peak-rate
value
units .
Use two-level hierarchical ingress policing when you need to enforce an aggregate ingress rate while preserving child policers
for individual traffic classes under that aggregate. Configure the parent committed information rate (CIR) greater than or
equal to the sum of the child CIRs when you want child-conform-aware behavior.
Two-level hierarchical ingress policing is supported for ingress QoS policies on supported physical main interfaces and subinterfaces,
and on supported bundle main interfaces and bundle subinterfaces.
For police rate commands, interpret the percent keyword in this way:
-
For a one-level policy, the percent keyword specifies the committed information rate (CIR), or the peak information rate (PIR) when used with peak-rate percent , as a percentage of the link rate. For example, the command police rate percent 35 configures the CIR as 35 percent of the link rate.
-
For a two-level policy, the percent keyword uses different reference rates for parent and child policers. For a parent policer, the reference rate is the interface
bandwidth, or the sum of member-interface bandwidths for bundle interfaces. For child policers, the reference rate is the
parent committed information rate (CIR) when the parent policer is one-rate, and the parent peak information rate (PIR) when
the parent policer is two-rate.

Note
|
Configured values take into account the Layer 2 encapsulation applied to traffic. This applies to ingress policing. For Ethernet transmission, the encapsulation is considered to be 14 bytes, whereas for IEEE 802.1Q, the encapsulation is 18 bytes.
|
Task ID
|
Task ID
|
Operations
|
|
qos
|
read, write
|
Examples
In this example for MPLS, traffic policing is configured with average rate at 1600 kbps for packets received on HundredGigE
interface 0/1/0/0:
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match mpls experimental topmost 0
RP/0/RP0/CPU0:router(config-cmap)# exit
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:router(config-pmap-c)# police rate 1600 kbps
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# exit
RP/0/RP0/CPU0:router(config)# HundredGigE interface 0/1/0/0
RP/0/RP0/CPU0:router(config-if) service-policy input policy1
This example shows how to configure an absolute policer rate on a bundle interface in the input direction:
Router(config)#class-map match-all bundle_prec3
Router(config-cmap)#match precedence ipv4 3
Router(config-cmap)#exit
Router(config)#policy-map bundle_abs_police
Router(config-pmap)#class bundle_prec3
Router(config-pmap-c)#police rate 30 mbps peak-rate 50 mbps
Router(config-pmap-c)#exit
Router(config-pmap)#end-policy-map
Router(config)#interface Bundle-Ether10
Router(config-if)#service-policy input bundle_abs_police
This example shows how to configure a 2R3C parent policer for two-level hierarchical ingress policing. The child policy map
is attached under the parent class-default class, and the parent policer enforces an aggregate 16 Gbps CIR and 20 Gbps PIR:
Router(config)# policy-map IN_4_CHILD_TEST
Router(config-pmap)# class IN_CMAP_DSCP_56
Router(config-pmap-c)# police rate 1 gbps
Router(config-pmap-c)# exit
Router(config-pmap)# class IN_CMAP_DSCP_48
Router(config-pmap-c)# police rate 2 gbps
Router(config-pmap-c)# exit
Router(config-pmap)# class IN_CMAP_DSCP_40
Router(config-pmap-c)# police rate 6 gbps peak-rate 20 gbps
Router(config-pmap-c-police)# exceed-action transmit
Router(config-pmap-c-police)# exit
Router(config-pmap-c)# exit
Router(config-pmap)# class class-default
Router(config-pmap-c)# police rate 7 gbps peak-rate 20 gbps
Router(config-pmap-c-police)# exceed-action transmit
Router(config-pmap-c-police)# exit
Router(config-pmap-c)# exit
Router(config-pmap)# end-policy-map
Router(config)# policy-map IN_PARENT_4_CHILD_TEST
Router(config-pmap)# class class-default
Router(config-pmap-c)# service-policy IN_4_CHILD_TEST
Router(config-pmap-c)# police rate 16 gbps peak-rate 20 gbps
Router(config-pmap-c-police)# exceed-action transmit
Router(config-pmap-c-police)# exit
Router(config-pmap-c)# exit
Router(config-pmap)# end-policy-map
Router(config)# interface HundredGigE0/0/0/3
Router(config-if)# service-policy input IN_PARENT_4_CHILD_TEST