Configuring Rewrite Rules Based on PLP
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:
[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:
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.