A Single-Rate Three-Color Marker (RFC 2697)



With the Single-Rate Policer, the token bucket is emptied at the end of the second, and any unused tokens are wasted. An improvement to this algorithm is defined in RFC 2697, which details the logic of a Single-Rate Three-Color Marker.
The Single-Rate Three-Color Marker/Policer uses a two token bucket algorithm. Any unused tokens are not discarded at the end of a second, but rather are placed in a second token bucket to be used as credits later for temporary bursts that might exceed the CIR. The initial allowance of tokens placed in this second bucket is called the Excess Burst (Be). This is the maximum number of bits that can exceed the burst size.
This model allows three possible traffic conditions to be identified (hence the term “Three-Color”): conform, exceed, or violate. And, in turn, specific actions can be defined for each of these three states, including transmit, re-mark, or drop.
The Single-Rate Three-Color Marker uses the following definitions within the RFC:
  • CIR: Committed Information Rate; the policed rate
  • CBS: Committed Burst Size (CBS); maximum size of the first token bucket (referred to as Bc within Cisco IOS syntax)
  • EBS: Excess Burst Size (EBS); maximum size of the second token bucket (referred to as Be within Cisco IOS syntax)
  • Tc: Token count of CBS; the instantaneous number of tokens left in the CBS bucket
  • Te: Token count of EBS; the instantaneous number of tokens left in the EBS bucket
  • B: Byte size of offered packet
Figure 1 illustrates the logical flow of the Single-Rate Three-Color Marker/Policer.

 
Figure 1: RFC 2697 Single-Rate Three-Color Policer logic
The Single-Rate Three-Color Policer’s tolerance of temporary bursts, shown in Figure 2, results in fewer TCP retransmissions and thus more efficient bandwidth utilization. Furthermore, it is a highly suitable tool for marking according to RFC 2597 AF classes, which have three “colors” (or drop preferences) defined per class (AFx1, AFx2, or AFx3).
 
Figure 2: RFC 2697 Single-Rate Three-Color Policer effect on traffic flow
Example 1 shows the configuration to police traffic in class-default to a CIR of 256 kbps with a Bc of 1500 bytes and a Be of 3000 bytes. Note that for this policer, the CIR is defined in bps, but Bc and Be are defined in bytes. Additionally, the policer is configured to function as a marker that complies with the Assured Forwarding PHB for AF class 3.
Example 1: RFC 2697 Single-Rate Three-Color Policer Example

Router(config)# policy-map RFC2697-POLICER
Router(config-pmap)# class class-default
Router(config-pmap-c)# police cir 256000 bc 1500 be 3000
Router(config-pmap-c-police)# conform-action set-dscp-transmit af31
Router(config-pmap-c-police)# exceed-action set-dscp-transmit af32
Router(config-pmap-c-police)# violate-action set-dscp-transmit af33

No comments:

Post a Comment