Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configuring Rewrite Rules Based on PLP

date_range 29-Nov-23

Rewrite rules take action on outgoing packets. When tricolor marking (TCM) is enabled, routers support four rewrite packet loss priority (PLP) designations: low, medium-low, medium-high, and high. To include the PLP for a rewrite rule, include the following statements at the [edit class-of-service] hierarchy level:

content_copy zoom_out_map
[edit class-of-service]
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-low | medium-high | high) code-point (alias | bits);
        }
    }
}

In Junos OS, rewrite rules only look at the forwarding class and packet loss priority of the packet (as assigned by a behavior aggregate or multifield classifier at ingress), not at the incoming CoS value, to determine the CoS value to write to the packet header at egress. The inputs for a rewrite rule are the forwarding class and the PLP. The output for a rewrite rule are the CoS values. In other words, a rewrite rule sets the CoS value for each packet exiting the interface with a specified forwarding class and PLP.

For example, if you configure the following, the 000000 CoS value is assigned to all packets exiting the interface with the assured-forwarding forwarding class and medium-high PLP:

content_copy zoom_out_map
class-of-service {
    rewrite-rules {
        dscp dscp-rw {
            forwarding-class assured-forwarding {
                loss-priority medium-high code-point 000000;
            }
        }
    }
}

To use this classifier, you must configure the settings for the assured-forwarding forwarding class at the [edit class-of-service forwarding-classes queue queue-number assured-forwarding] hierarchy level. For more information, see Understanding How Forwarding Classes Assign Classes to Output Queues.

footer-navigation