[Contents] [Prev] [Next] [Index] [Report an Error]


Configuring Tricolor Marking

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. Tricolor marking (TCM) extends the functionality of class of service (CoS) traffic policing by providing three levels of drop precedence (loss priority or PLP) instead of two. With TCM, you can provision more granular service level agreements (SLAs) across the Differentiated Services (DiffServ) domain.

There are two types of TCM: single-rate and two-rate. The JUNOS software does not support single-rate tricolor marking. For T-series platforms with Enhanced II Flexible PIC Concentrators (FPCs), you can configure two-rate TCM, as defined in RFC 2698, A Two Rate Three Color Marker.

Two-rate TCM enables a "color-aware" method of traffic policing. The high, medium, and low loss priorities are mapped to the colors red, yellow, and green. The color of a packet, which is used or set by the TCM policer, corresponds to the packet's loss priority. Packets with high PLP are marked red, packets with medium PLP are marked yellow, and packets with low PLP are marked green.

Two-rate TCM polices traffic according to the color classification (loss priority) of each packet. Traffic policing is based on two rates: the committed information rate (CIR) and the peak information rate (PIR). The CIR specifies the average rate at which packets are admitted to the network. As each packet enters the network, it is counted. Packets that do not exceed the CIR are marked green, which corresponds to low loss priority. Packets that exceed the CIR but are below the PIR are marked yellow, which corresponds to medium loss priority. Packets that exceed the PIR are marked red, which corresponds to high loss priority. For more information, see How Two-Rate Tricolor Marking Works.

The two-rate TCM policer provides two functions: metering and marking. The policer meters each packet and passes the packet and the metering result to the marker, as shown in Figure 6.


Figure 6: Flow of Tricolor Marking Policer Operation

The meter operates in one of two modes. In the color-blind mode, the meter treats the packet stream as uncolored. Any preset loss priorities are ignored. In the color-aware mode, the meter inspects the packet's PLP field, which has been set by an upstream device as green, yellow, or red; the PLP field has already been set by a behavior aggregate (BA) or multifield (MF) classifier to low, medium, or high. The marker changes the color (PLP) of each incoming IP packet according to the results of the meter.

For information about how to use two-rate TCM with BA and MF classifiers, see Configuring the PLP for a BA Classifier and Configuring the PLP for a Multifield Classifier.

You configure TCM by defining tricolor marking policers, and three levels of packet loss priority (PLP) for classifiers, rewrite rules, random early detection (RED) drop profiles, and firewall filters. To configure TCM, you can include the following statements at the [edit class-of-service] hierarchy level of the configuration:

[edit class-of-service]
tri-color;
classifiers {
    (dscp | dscp-ipv6 | exp | ieee-802.1 | inet-precedence) classifier-name {

        import (classifier-name | default);

        forwarding-class class-name {

            loss-priority (low | medium | high) {

                code-points [ aliases ] [ 6-bit-patterns ];

            }

        }
    }
}
rewrite-rules {
    (dscp | dscp-ipv6 | exp | ieee-802.1 | inet-precedence) rewrite-name {
        import (rewrite-name | default);
        forwarding-class class-name {
            loss-priority (low | medium | high) code-point (alias | bits);
        }
    }
}
schedulers {
    scheduler-name {
        drop-profile-map loss-priority (any | low | medium | high) protocol any 
              drop-profile profile-name;
    }
}

[edit firewall]
policer name {
    then loss-priority (low | medium | high);
}
three-color-policer name {
    two-rate {
        (color-aware | color-blind);
        committed-information-rate bps;
        committed-burst-size bytes;
        peak-information-rate bps;
        peak-burst-size bytes;
    }
}
filter filter-name {
    <family family>{
        term rule-name {
            then {
                three-color-policer {
                    two-rate policer-name;
                }
            }
        }
    }
}

This chapter discusses the following topics:


[Contents] [Prev] [Next] [Index] [Report an Error]