Tricolor Marking Policer Overview
Networks police traffic by limiting the input or output transmission rate of a class of traffic on the basis of user-defined criteria. Policing traffic allows you to control the maximum rate of traffic sent or received on an interface and to partition a network into multiple priority levels or classes of service.
Policers require you to apply limits to the traffic flow and set a consequence for packets that exceed these limits—usually a higher loss priority—so that packets exceeding the policer limits are discarded first.
Juniper Networks routing platform architectures can support three types of policer:
- Two-color—A two-color policer (or “policer” when used without qualification) meters the traffic stream and classifies packets into two categories of packet loss priority (PLP) according to a configured bandwidth and burst-size limit. You can mark packets that exceed the bandwidth and burst-size limit in some way, or simply discard them. A policer is most useful for metering traffic at the port (physical interface) level.
- Single-rate tricolor marking (TCM)—This type of policer is defined in RFC 2697, A Single Rate Three Color Marker, as part of an assured forwarding (AF) per-hop-behavior (PHB) classification system for a Differentiated Services (DiffServ) environment. This type of policer meters traffic based on the configured committed information rate (CIR), committed burst size (CBS), and the excess burst size (EBS). Traffic is marked as belonging to one of three categories (green, yellow, or red) based on whether the packets arriving are below the CBS (green), exceed the CBS (yellow) but not the EBS, or exceed the EBS (red). Single-rate TCM is most useful when a service is structured according to packet length and not peak arrival rate.
- Two-rate TCM—This type of policer is defined in RFC 2698, A Two Rate Three Color Marker, as part of an assured forwarding (AF) per-hop-behavior (PHB) classification system for a Differentiated Services (DiffServ) environment. This type of policer meters traffic based on the configured CIR and peak information rate (PIR), along with their associated burst sizes, the CBS and peak burst size (PBS). Traffic is marked as belonging to one of three categories (green, yellow, or red) based on whether the packets arriving are below the CIR (green), exceed the CIR (yellow) but not the PIR, or exceed the PIR (red). Two-rate TCM is most useful when a service is structured according to arrival rates and not necessarily packet length.
You can configure policers at the queue, logical interface, or Layer 2 (MAC) level. Only a single policer is applied to a packet at the egress queue, and the search for policers occurs in this order:
- Queue level
- Logical interface level
- Layer 2 (MAC) level
TCM is not bound by a green-yellow-red coloring convention. Packets are usually marked with low, medium, or high PLP bit configurations based on color, so both TCM schemes extend the functionality of class-of-service (CoS) traffic policing by providing three levels of drop precedence (loss priority) instead of the two normally available in port-level policers. Both single-rate and two-rate TCM schemes can operate in two modes:
- Color-blind—In color-blind mode, the TCM policer assumes that all packets examined have not been previously marked or metered. In other words, the TCM is “blind” to any previous coloring a packet might have had.
- Color-aware—In color-aware mode, the TCM policer
assumes that all packets examined have been previously marked or metered.
In other words, the TCM is “aware” of the previous coloring
a packet might have had. In color-aware mode, the TCM policer can
increase the PLP of a packet, but never decrease it. For example,
if a color-aware TCM meters a packet with a medium PLP marking, it
can raise the PLP level to high, but cannot reduce the PLP level to
low.

Note: We recommend you use the naming convention policertypeTCM#-color type when configuring TCM policers. Because policers can be numerous and must be applied correctly to work, a simple naming convention makes it easier to apply the TCM policers properly.
For example, the first single-rate, color-aware TCM configured would be named srTCM1-ca. The second two-rate, color-blind TCM configured would be named trTCM2-cb.