The single rate three color meter is typically used for implementing the corresponding three color marker defined in [RFC2697]. Its configuration is shown in figure 2.4.
Also this meter is created with a macro whose names corresponds to the meter's acronym, e.g.
$tcm = srTCM(cir 1Mbps,cbs 50kB,ebs 40kB);
srTCM has the following parameters:
Parameter | Unit | Description |
cbs | Bytes | Committed burst size |
cir | bps | Committed information rate |
ebs | Bytes | Extended burst size |
mpu | Bytes | Minimum policed unit |
Only mpu is optional, all other parameters are required.
The color assigned by a three color meter is tested with macros meter_color, where color is one of green, yellow, and red.
Example:
#include "fields.tc" #include "meters.tc" $m = srTCM(cir 1Mbps,cbs 100kB,ebs 40kB); ... class if ip_dst:8 == 10.0.0.0 && srTCM_green($m); class if ip_dst:8 == 10.0.0.0 && srTCM_yellow($m); class if ip_dst:8 == 10.0.0.0 && srTCM_red($m); ...