Related Documentation
Applying Rewrite Rules to Output Logical Interfaces
To assign the rewrite-rules configuration to the output logical interface, include the rewrite-rules statement at the [edit class-of-service interfaces interface-name unit logical-unit-number] hierarchy level:
On M120, M320 with an Enhanced III FPC, MX Series routers and T 4000 routers with Type 5 FPCs, you can combine the dscp or inet-prec and exp options to set the DSCP or IP precedence bits and MPLS EXP bits independently on IP packets entering an MPLS tunnel.
For IQ PICs, you can configure only one IEEE 802.1 rewrite rule on a physical port. All logical ports (units) on that physical port should apply the same IEEE 802.1 rewrite rule. If you configure more than one IEEE 802.1 rewrite rule for the IQ PIC, the configuration check fails.
In the following example, the DSCP bits specified in ss-dscp are applied to packets entering the MPLS tunnel on ge-2/1/1, and the DSCP bits specified in ss-v6dscp are applied to IPv6 packets. The EXP bits are set to the bit configuration specified in ss-exp:
You can use interface wildcards for interface-name and logical-unit-number. You can also include Layer 2 and Layer 3 rewrite information in the same configuration.
![]() | Note: On M Series routers only, if you include the control-word statement at the [edit protocols l2circuit neighbor address interface interface-name] hierarchy level, the software cannot rewrite MPLS EXP bits. DSCP and DSCP IPv6 rewrite rules are supported on M Series and T Series routers when non-queuing PICs are installed, but are disabled when queuing PICs are installed with the following exceptions:
DSCP and DCSP IPv6 rewrite rules are supported on MX Series routers with MPC/MIC interfaces. DSCP rewrite rules are not supported on T Series routers when IQ, IQ2, IQE, IQ2E, SONET/SDH OC48/STM16 IQE, or PD-5-10XGE-SFPP PICs are installed. For IQ PICs, you can configure only one IEEE 802.1 rewrite rule on a physical port. All logical ports (units) on that physical port should apply the same IEEE 802.1 rewrite rule. On M320 and T Series routers (except for T4000 routers with Type 5 FPCs), for a single interface, you cannot enable a rewrite rule on a subset of forwarding classes. You must assign a rewrite rule to either none of the forwarding classes or all of the forwarding classes. When you assign a rewrite rule to a subset of forwarding classes, the commit does not fail, and the subset of forwarding classes works as expected. However, the forwarding classes to which the rewrite rule is not assigned are rewritten to all zeros. For example, if you configure a Differentiated Services code point (DSCP) rewrite rule, the bits in the forwarding classes to which you do not assign the rewrite rule are rewritten to 000000; if you configure an IP precedence rewrite rule, the bits in the forwarding classes to which you do not assign the rewrite rule are rewritten to 000. |