Two-Rate Rate-Limits ! 93
Chapter 3: Creating Rate-Limit Profiles
Ta b l e 10 indicates the interaction between the rate settings and the actual traffic
rate to determine the action taken by a rate-limit rule in a policy when applied to a
traffic flow. This implementation is known as a two-rate, three-color marking
mechanism.
Ta b l e 11 presents equations that can represent the algorithm for the two-rate
rate-limit profile, where:
! B = size of packet in bytes
! Tp = size of peak token bucket in bytes (maximum size of this bucket is the
configured peak burst)
! Tc = size of the committed token bucket in bytes (maximum size of this bucket
is the configured committed burst)
! t = time.
Table 10: Policy Action Applied Based on Rate Settings and Traffic Rate
Peak Rate Committed Rate = 0 Committed Rate Not 0
Peak rate = 0 ! All traffic assigned the exceeded
action
! Traffic <= committed rate
assigned the committed action
! Traffic > committed rate assigned
the exceeded action
Peak rate not 0
! Traffic <= peak rate assigned the
conformed action
! Traffic > peak rate assigned the
exceeded action
! Traffic <= committed rate
assigned the committed action
! Committed rate < Traffic < peak
rate assigned the conformed action
! Traffic > peak rate assigned the
exceeded action
Table 11: Two-Rate Rate-Limit Profile Algorithms
Step Result
if not color-aware, use green as the
incoming packet color, otherwise use the
actual packet color
if incoming packet color is green:
if Tc(t) >= B
! Packet is marked as green
! Tc(t) is decremented by B
! Tp(t) is decremented by B (allow Tp(t) < 0 if
necessary)
if Tp(t) >= B and Tc(t) < B
! Packet is marked as yellow
! Tp(t) is decremented by B
if Tp(t) < B and Tc(t) < B
! Packet is marked as red
if incoming packet color is yellow (only
occurs in color-aware operation)
if Tp(t) >= B
! Packet is marked as yellow
! Tp(t) is decremented by B