Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    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:

    [edit class-of-service interfaces interface-name unit logical-unit-number]
    rewrite-rules {dscp (rewrite-name | <default>)protocol protocol-types;dscp-ipv6 (rewrite-name | <default>) protocol protocol-typesexp (rewrite-name | <default>)protocol protocol-types;exp-push-push-push <default>;exp-swap-push-push <default>;ieee-802.1 (rewrite-name | <default>) inet-prec vlan-tag (outer | outer-and-inner);inet-precedence (rewrite-name | <default>)protocol protocol-types;}

    On M120, M320 with an Enhanced III FPC, MX Series routers and T 4000 routers with Type 5 FPCs and EX Series switches, 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:

    [edit class-of-service interfaces]
    ge-2/1/1unit 10 {rewrite-rules {dscp ssf-dscp protocol mpls; # Applies to IPv4 packets entering MPLS tunneldscp-ipv6 ss-v6dscp protocol mpls; # Applies to IPv6 packets entering MPLS tunnelexp ss-exp; # Sets label EXP bits independently}}}

    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:

    • On M320 routers, DSCP rewrite is supported on IQ, IQ2, IQE, and IQ2E PICs when used with the Enhanced III FPC.
    • On M120 routers, DSCP rewrite is supported on IQ, IQ2, IQE, and IQ2E PICs.

    DSCP and DCSP IPv6 rewrite rules are supported on MX Series routers with MPC/MIC interfaces and EX Series switches.

    DSCP rewrite rules are not supported on T Series routers when IQ, IQ2, IQE, IQ2E, 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.

    Modified: 2016-12-06