On M320 and T-series platforms, you can selectively set the DSCP field of MPLS-tagged IPv4 and IPv6 packets to
000000. In the same packets, you can set the MPLS EXP field according to a configured rewrite table, which is based on the forwarding classes that you set in incoming packets using a BA or MF classifier.Queue selection is based on the forwarding classes you assign in scheduler maps. This means that you can direct traffic to a single output queue, regardless of whether the DSCP field is unchanged or rewritten to
000000. To do this, you must configure an MF classifier that matches selected packets and modifies them with thedscp 0action.Selective marking of DSCP fields to
0, without affecting output queue assignment, can be useful. For example, suppose you need to use the MPLS EXP value to configure CoS applications for core provider routers. At the penultimate egress provider edge (PE) router where the MPLS labels are removed, the CoS bits need to be provided by another value, such as DSCP code points. This case illustrates why it is useful to mark both the DSCP and MPLS EXP fields in the packet. Furthermore, it is useful to be able to mark the two fields differently, because the CoS rules of the core provider router might differ from the CoS rules of the egress penultimate router. At egress, as always, you can use a rewrite table to rewrite the MPLS EXP values corresponding to the forwarding classes that you need to set.In the following example, term
1of the MF classifier matches packets with DSCP001100code points coming from a certain VRF, rewrites the bits to DSCP000000, and sets the forwarding class tobest-effort. In term2, the classifier matches packets with DSCP010110code points and sets the forwarding class tobest-effort. Because term2does not include thedscp 0action modifier, the DSCP010110bits remain unchanged. Because the classifier sets the forwarding class for both code points tobest-effort, both traffic types are directed to the same output queue.firewall {family inet {filter vrf-rewrite {term 1 {from {dscp001100;}then {dscp 0;forwarding-class best-effort;}}term 2 {from {dscp010110;}then {forwarding-class best-effort;}}}}}Applying the MF Classifier
Apply the filter to an input interface corresponding to the VRF:
interfaces {so-0/1/0 {unit 0 {family inet {filter input vrf-rewrite;}}}}