Configuring Two-Rate Tricolor Marking
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.
This topic describes how to configure each mode for two-rate TCM and includes the following sections:
Configuring Color-Blind Mode for Two-Rate Tricolor Marking
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 1.
Color |
PLP |
Meaning |
---|---|---|
Green |
|
Packet does not exceed the CIR. |
Yellow |
|
Packet exceeds the CIR but does not exceed the PIR. |
Red |
|
Packet exceeds the PIR. |
If you are using color-blind mode and you want 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:
[edit firewall family family filer filter-name term rule-name then policer policer-name]
[edit interfaces interface-name unit logical-unit-number family family filter filter-name]
Configuring Color-Aware Mode for Two-Rate Tricolor Marking
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 2.
Incoming PLP |
Packet Metered Against |
Possible Cases |
Outgoing PLP |
Outgoing PLP (MPCs Only) |
---|---|---|---|---|
|
CIR and PIR |
Packet does not exceed the CIR. |
|
|
Packet exceeds the CIR but not the PIR. |
|
|
||
Packet exceeds the PIR. |
|
|
||
|
PIR only |
Packet does not exceed the CIR. |
|
|
Packet does not exceed the PIR. |
|
|
||
Packet exceeds the PIR. |
|
|
||
|
PIR only |
Packet does not exceed the CIR. |
|
|
Packet does not exceed the PIR. |
|
|
||
Packet exceeds the PIR. |
|
|
||
|
Not metered by the policer. |
All cases. |
|
|
The following sections describe color-aware two-rate PLP mapping in more detail.
- Effect on Low PLP of Two-Rate Policer
- Effect on Medium-Low PLP of Two-Rate Policer
- Effect on Medium-High PLP of Two-Rate Policer
- Effect on High PLP of Two-Rate Policer
Effect on Low PLP of Two-Rate Policer
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 multifield 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:
If the rate of traffic flow is less than the CIR, packets remain marked as low PLP.
If the rate of traffic flow is greater than the CIR but less than the PIR, some of the packets are marked as medium-high PLP, and some of the packets remain marked as low PLP.
If the rate of traffic flow is greater than the PIR, some of the packets are marked as high PLP, and some of the packets remain marked as low PLP.
Effect on Medium-Low PLP of Two-Rate Policer
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 multifield 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:
If the rate of traffic flow is less than the CIR, packets remain marked as medium-low PLP. (MPCs mark the packets as medium-high.)
If the rate of traffic flow is greater than the CIR/CBS but less than the PIR, packets remain marked as medium-low PLP. (MPCs mark the packets as medium-high.)
If the rate of traffic flow is greater than the PIR, some of the packets are marked as high PLP, and some of the packets remain marked as medium-low PLP.
Effect on Medium-High PLP of Two-Rate Policer
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 multifield 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:
If the rate of traffic flow is less than the CIR, packets remain marked as medium-high PLP.
If the rate of traffic flow is greater than the CIR but less than the PIR, packets remain marked as medium-high PLP.
If the rate of traffic flow is greater than the PIR, some of the packets are marked as high PLP, and some of the packets remain marked as medium-high PLP.
Effect on High PLP of Two-Rate Policer
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.