Specifications
2-418
Catalyst 4500 Series Switch Cisco IOS Command Reference—Release IOS XE 3.3.0XO(15.1(1)XO)
OL_28738 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
police (two rates)
Usage Guidelines R efer to RFC 2698-Two Rate Thre e Color Marker.
Two-rate traffic poli cing us es two to ken buc kets—Tc and Tp—f or polic ing tr affic at t wo i ndependent
rates. Note the following points about the two token buckets:
• The Tc toke n bucket is updated at the CIR value each time a packet arrives at the two-rate policer.
The Tc token bucket can contain up to the c onfirm burst (Bc) value.
• The Tp token bucket is updated at the PIR value each time a packet arrives at the two-rate policer.
The Tp token bucket can contain up to the pea k burst (Be) value.
Updating Token Buckets
The following scenario illustrates how the token buckets are updated:
A packet of B bytes arrives at time t. The last packet arrived at time t1. The CIR and the PIR token
buckets at time t are represented by Tc(t) and Tp(t), respectively. Using these values and in this scenario,
the token buckets are updated as follow s:
Tc(t) = min(CIR * (t-t1) + Tc(t1), Bc)
Tp(t) = min(PIR * (t-t1) + Tp(t1), Be)
Marking Traffic
The two-rate policer marks pa ckets as either conformi ng, exceeding, or viola ting a specified rate. The
following points (using a packet of B bytes) illustrate how a packet is marked:
• If B > Tp(t), the packet is marked as violating the specified rate.
• If B > Tc(t), the packet is marked as exceeding the specified rate, and the Tp(t) token bucket is
updated as Tp(t) = Tp(t) – B.
Otherwise, the packet is marked as conforming to the specified rate, and both token buckets—Tc(t) and
Tp(t)—are updated as follows :
Tp(t) = Tp (t) – B
Tc(t) = Tc (t) – B
For example, if the CIR is 10 0 kbps, the PIR is 20 0 kbps, and a da ta stream w ith a rate of 250 k bps arri ves
at the two-rate policer, the packet would be marked as follows:
• 100 kbps wo uld be marked as confor ming to the rate.
• 100 kbps wo uld be marked as exceeding the rate.
• 50 kbps wou ld be marked as violating the rate.
Marking Packets and Assigning Actions Flowchart
The flowchart in Figure 2-1 illustrates how the two-rate policer marks packets and assigns a
corresponding action (t hat is, violate, exceed, or conform) to the packet.