Configuring a port-based policer

Use a port policer to bandwidth-limit incoming traffic. The port drops or re-marks violating traffic.
Note

Note

This command does not apply on all hardware platforms.

About this task

The interface policer has two configurable rates: peak rate (PIR) and service or committed rate (CIR). Traffic above PIR is marked as red. Traffic above CIR is qualified as yellow. Normally, CIR is lower than PIR. However, in CLI you can configure these rates to equal values. Each rate has a maximum burst size associated with it, peak burst size (PBS) and committed burst size (CBS) respectively. You cannot configure the burst sizes. These values ensure maximum traffic fairness between the ports; the CBS value is lower than the PBS value. Depending on the traffic pattern, this configuration can result in a small percentage of traffic qualified as yellow or above CIR, but not red or above PIR, even if the rates are equal.

Procedure

  1. Enter GigabitEthernet Interface Configuration mode:

    enable

    configure terminal

    interface GigabitEthernet {slot/port[/sub-port][-slot/port[/sub-port]][,...]}

    Note

    Note

    If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.

  2. Configure the policing limit:

    qos if-policer [port {slot/port[-slot/port][,...]}] peak-rate <64-100000000> svc-rate <64-100000000>

Example

Configure the policing limit to a peak-rate of 10000 and the service rate limit to 5000 for port 4/10:

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#interface gigabitethernet 4/10 
Switch:1(config-if)#qos if-policer port 4/10 peak-rate 10000 svc-rate 5000 

Variable Definitions

Use the data in the following table to use the qos if-policer command.

Variable

Value

peak-rate<64-100000000>

Specifies the peak rate limit in Kbps.

port {slot/port[-slot/port][,...]}

Identifies the slot and the port.

svc-rate<64-100000000>

Specifies the service rate limit in Kbps.