A Two-Rate Three-Color Marker (RFC 2698)



The Single-Rate Three-Color Marker/Policer presented a significant improvement for policers, in that it made an allowance for temporary traffic bursts (if the overall average transmitted rate was equal to or below the CIR). However, the variation in the amount of accumulated excess burst credits could cause a degree of unpredictability in traffic flows. To improve on this, a Two-Rate Three-Color Marker/Policer was defined in RFC 2698. This policer addresses the Peak Information Rate (PIR), which is unpredictable in the RFC 2697 model. Furthermore, the Two-Rate Three-Color Marker/Policer allows for a sustainable excess burst (negating the need to accumulate credits to accommodate temporary bursts).
The Two-Rate Three-Color Marker/Policer uses the following parameters to meter the traffic stream:
  • PIR: Peak Information Rate; the maximum rate traffic ever allowed
  • PBS: Peak Burst Size; the maximum size of the first token bucket (referred to as Be within Cisco IOS syntax)
  • CIR: Committed Information Rate; the policed rate
  • CBS: Committed Burst Size; the maximum size of the second token bucket (referred to as Bc within Cisco IOS syntax)
  • Tp: Token count of CBS; the instantaneous number of tokens left in the PBS bucket
  • Tc: Token count of EBS; the instantaneous number of tokens left in the CBS bucket
  • B: Byte Size of Offered Packet
The Two-Rate Three-Color Policer also uses a two-token bucket algorithm, but the logic varies slightly. Rather than transferring unused tokens from one bucket to another, this policer has two separate buckets that are filled each second with two separate token rates. The first bucket is filled with the PIR amount of tokens, and the second bucket is filled with the CIR amount of tokens. Any unused tokens are discarded (from both buckets) at the end of each second. In this model, the Be works the same as the Bc, except for the PBS bucket (not the CBS bucket). This means that Be represents the peak limit of traffic that can be sent during a subsecond Interval. The logic varies further in that the initial check is to see if the traffic is within the PIR, and only then is the traffic compared against the CIR. (That is, a violate condition is checked for first, then an exceed condition, and finally a conform condition, which is the reverse of the logic of the previous model.) Figure 1 illustrates this logic.
 
Figure 1: RFC 2698 Two-Rate Three-Color Policer logic
The Two-Rate Three-Color Marker allows for sustainable excess bursts (and is not dependent on accumulating credits) and has a hard-top peak limit, as shown in Figure 2.

 
Figure 2: RFC 2698 Two-Rate Three-Color policer effect on traffic flow
Example 1 shows the configuration to police traffic on class-default to a CIR of 256 kbps with a Bc of 1500 bytes and a PIR of 512 kbps with a Be of 3000 bytes. Note that for this policer, CIR and PIR are defined in bps, but Bc and Be are defined in bytes. As before, the policer is configured to function as a marker that complies with the Assured Forwarding PHB, but this time for AF class 4.
Example 1: RFC2698 Two-Rate Three-Color Policer Example

Router(config)# policy-map RFC2698-POLICER
Router(config-pmap)# class class-default
Router(config-pmap-c)# police cir 256000 bc 1500 pir 512000 be 3000
Router(config-pmap-c-police)# conform-action set-dscp-transmit af41
Router(config-pmap-c-police)# exceed-action set-dscp-transmit af42
Router(config-pmap-c-police)# violate-action set-dscp-transmit af42

1 comment:

Buy Routers And Switches said...

Very informative post. I was looking for information about this topic and this post really helped me a lot. Thanks for sharing. Also you may want to take a look at these amazing Cisco products.

C9300-24P-E
C9400-LC-48UX
C9400-PWR-3200AC
C9500-24X-A

Post a Comment