Single-Rate Policers
The earliest policers use a Single-Rate Two-Color Marker/Policer model with a single token bucket algorithm. In this model, traffic is identified as one of two states (colors):conforming (to the CIR) or exceeding (the CIR). Marking and dropping actions are performed on each of these two states of traffic. Any unused tokens left in the bucket at the end of the second/cycle are discarded. In other words, one CIR worth of tokens is granted at the beginning of a second, and at the end of the second, the bucket is emptied. This type of marker/policer is fairly crude and, when defined to drop, rather than re-mark packets, can result in the traffic policing pattern
Note |
Although a policer can be deployed at ingress or egress interfaces, they are generally deployed at the network edge on traffic ingress. After all, there is little point in spending valuable CPU cycles routing and processing packets that are only going to be dropped.
|
Dual-Rate Policers
Random traffic patterns, whether network traffic or otherwise, generally do not respond well to crude single-rate policers. As an analogy, consider automobile traffic that is “policed” by traffic lights at intersections that have only two states/colors: green (for go) and red (to stop). Additionally, these lights could fluctuate from one state to the other without any warning or allowance. Some drivers would be arbitrarily penalized when the lights changed from one moment to the next, and the overall traffic flow would be inefficient.
However, as with traffic lights, if a third state (the yellow light) is introduced, traffic flows much better. The yellow light indicates to drivers that they are approaching the limit and allows them to react accordingly. Similarly with network traffic, a moderate allowance for burst, allows for the possibility of feeding back to the application that the transmission limits are being reached (that is, by re-marking some exceeding traffic) and allows for the applications to react accordingly (whether they do is a different matter, but at least the possibility is presented).
Therefore, with dual rate policers, there are three traffic states. Continuing the traffic light analogy, these follow:
- Conform (green light): Traffic is within the defined rate and is transmitted without any penalty.
- Exceed (yellow light): Traffic is surpassing the defined rate, yet an allowance for burst allows for a moderate penalty (typically re-marking) to be applied.
- Violate (red light): Traffic is surpassing both the defined rate and any burst allowances and should, thus, have the maximum penalty applied (which might be a second-degree of re-marking or dropping).
There are two standards-defined Dual-Rate policers (as defined in RFC 2697 and 2698, respectively). The sections that follow take a closer look at each of these.
No comments:
Post a Comment