|
The Single Rate Three Color Marker
The Single Rate Three Color Marker (srTCM) is a combined metering algorithm that is able to set multiple conformance levels (not only in or out of profile). It has been defined in RFC 2697.
The srTCM has two token buckets and one token accumulation rate. When the token bucket which has a token accumulation rate is full, further tokens ‘overspill’ into the excess token bucket.
The parameters of the srTCM are:
Committed Information Rate (CIR)
Committed Burst Size (CBS)
Excess Burst Size (EBS)
Color-mode flag (a boolean attribute)
Due to the two token buckets, the srTCM is able to declare three conformance levels:
Green - when sufficient tokens are present in bucket B1
Yellow - when B1 has insufficient tokens, but B2 has
Red - when neither B1 nor B2 have sufficient tokens
The srTCM has two operating modes: color aware and color-blind. In color blind mode all incoming packets are treated equal. In color-aware mode packets arrive pre-colored to the meter.
The evaluation of conformance is a sequential process. In color blind mode first bucket B1 is checked for tokens. If there are sufficient tokens in B1 then the frame is declared ‘green’ and an equivalent amount of tokens are removed from B1. Tokens in B2 are not decremented. If there are insufficient tokens in B1, then the logical function looks for tokens in B2. Conformance is ‘yellow’ in case B2 had sufficient tokens, otherwise it is red, and no tokens are removed.
In color aware mode the token removal logic is different:
if a packet arrives Red, it will remain red and no tokens will be removed
if packet allows Yellow, it will be checked only against the yellow bucket. In the absence of sufficient tokens in EBS, the packet color is downgraded to Red, else remains yellow and only EBS is decremented
if packet arrives as Green, it will be checked against B1 first. In case of sufficient tokens, the packet remains Green and only B1 is decremented. Otherwise, B2 is checked, and if there are sufficient tokens then the packet is downgraded to Yellow, and only B2 is decremented. If B2 does not have sufficient tokens neither then the packet is downgraded immediately to Red. |