With TCM, you can configure traffic policing according to two separate modes—color-blind and color-aware. In color-blind mode, the current PLP value is ignored. In color-aware mode, the current PLP values are considered by the policer and can only be increased.
All packets are evaluated by the CIR. If a packet exceeds the CIR, it is evaluated by the PIR. In color-blind mode, the policer supports three loss priorities only: low, medium-high, and high.
In color-blind mode, packets that exceed the CIR but are below the PIR are marked yellow (medium-high). Packets that exceed the PIR are marked red (high), as shown in Table 41.
Table 41: Color-Blind Mode TCM Color-to-PLP Mapping
Color |
PLP |
Meaning |
|---|---|---|
Green |
low |
Packet does not exceed the CIR. |
Yellow |
medium-high |
Packet exceeds the CIR but does not exceed the PIR. |
Red |
high |
Packet exceeds the PIR. |
If you are using color-blind mode and you wish to configure an output policer that marks packets to have medium-low loss priority, you must configure a policer at the [edit firewall policer policer-name] hierarchy level. For example:
- firewall {
-
- policer 4PLP {
-
- if-exceeding {
- bandwidth-limit 40k;
- burst-size-limit 4k;
- }
- then loss-priority medium-low;
- }
- }
Apply this policer at one or both of the following hierarchy levels:
In color-aware mode, the metering treatment the packet receives depends on its classification. Metering can increase a packet’s preassigned PLP, but cannot decrease it, as shown in Table 42.
Table 42: Color-Aware Mode TCM Mapping
The following sections describe color-aware two-rate PLP mapping in more detail.
Packets belonging to the green class have already been marked by a classifier with low PLP. The marking policer can leave the packet’s PLP unchanged or increase the PLP to medium-high or high. Therefore, these packets are metered against both the CIR and the PIR.
For example, if a BA or MF classifier marks a packet with low PLP according to the ToS bits in the IP header, and the two-rate TCM policer is in color-aware mode, the output loss priority is as follows:
Packets belonging to the yellow class have already been marked by a classifier with medium-low or medium-high PLP. The marking policer can leave the packet’s PLP unchanged or increase the PLP to high. Therefore, these packets are metered against the PIR only.
For example, if a BA or MF classifier marks a packet with medium-low PLP according to the ToS bits in the IP header, and the two-rate TCM policer is in color-aware mode, the output loss priority is as follows:
Packets belonging to the yellow class have already been marked by a classifier with medium-low or medium-high PLP. The marking policer can leave the packet’s PLP unchanged or increase the PLP to high. Therefore, these packets are metered against the PIR only.
For example, if a BA or MF classifier marks a packet with medium-high PLP according to the ToS bits in the IP header, and the two-rate TCM policer is in color-aware mode, the output loss priority is as follows:
Packets belonging to the red class have already been marked by a classifier with high PLP. The marking policer can only leave the packet’s PLP unchanged. Therefore, these packets are not metered against the CIR or the PIR and all the packets remain marked as high PLP.