Configuring Single-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 single-rate TCM and includes the following sections:
Configuring Color-Blind Mode for Single-Rate Tricolor Marking
All packets are evaluated by the CBS. If a packet exceeds the CBS, it is evaluated by the EBS. In color-blind mode, the policer supports three loss priorities only: low, medium-high, and high.
In color-blind mode, packets that exceed the CBS but are below the EBS are marked yellow (medium-high). Packets that exceed the EBS are marked red (high), as shown in Table 1.
Color |
PLP |
Meaning |
---|---|---|
Green |
|
Packet does not exceed the CBS. |
Yellow |
|
Packet exceeds the CBS but does not exceed the EBS. |
Red |
|
Packet exceeds the EBS. |
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:
[edit firewall family family filter 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 Single-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 |
---|---|---|---|
|
CBS and EBS |
Packet does not exceed the CBS. |
|
Packet exceeds the CBS but not the EBS. |
|
||
Packet exceeds the EBS. |
|
||
|
EBS only |
Packet does not exceed the CBS. |
|
Packet does not exceed the EBS. |
|
||
Packet exceeds the EBS. |
|
||
|
EBS only |
Packet does not exceed the CBS. |
|
Packet does not exceed the EBS. |
|
||
Packet exceeds the EBS. |
|
||
|
Not metered by the policer. |
All cases. |
|
The following sections describe single-rate color-aware PLP mapping in more detail.
- Effect on Low PLP of Single-Rate Policer
- Effect on Medium-Low PLP of Single-Rate Policer
- Effect on Medium-High PLP of Single-Rate Policer
- Effect on High PLP of Single-Rate Policer
Effect on Low PLP of Single-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 CBS and the EBS.
For example, if a BA or multifield classifier marks a packet with low PLP according to the type-of-service (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 CBS, packets remain marked as low PLP.
If the rate of traffic flow is greater than the CBS but less than the EBS, 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 EBS, 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 Single-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 EBS 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 CBS, packets remain marked as medium-low PLP.
If the rate of traffic flow is greater than the CBS but less than the EBS, packets remain marked as medium-low PLP.
If the rate of traffic flow is greater than the EBS, 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 Single-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 EBS 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 CBS, packets remain marked as medium-high PLP.
If the rate of traffic flow is greater than the CBS but less than the EBS, packets remain marked as medium-high PLP.
If the rate of traffic flow is greater than the EBS, 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 Single-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 CBS or the EBS and all the packets remain marked as high PLP.