Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

rewrite-rules (Interfaces)

Syntax

rewrite-rules {dscp (rewrite-name | default) protocol mpls;dscp-ipv6 (rewrite-name | default) protocol mpls;exp (rewrite-name | default) protocol protocol-types;exp-push-push-push default;exp-swap-push-push default;ieee-802.1 (rewrite-name | default) vlan-tag (outer | outer-and-inner);ieee-802.1ad (rewrite-name | default) vlan-tag (outer | outer-and-inner);inet-precedence (rewrite-name | default) protocol mpls;}

Hierarchy Level

[edit class-of-service interfaces interface-name],[edit class-of-service interfaces interface-name unit logical-unit-number]

Release Information

Statement introduced before Junos OS Release 7.4.

Description

Associate a rewrite-rules configuration or default mapping with a specific interface.

The [edit class-of-service interfaces interface-name] hierarchy level is not supported on M Series routers.

The [edit class-of-service interfaces interface-name unit logical-unit-number] hierarchy level is not supported on ACX Series routers.

On an MX Series router and on an EX Series switch, exp-push-push-push, exp-swap-push-push, and frame-relay-de are not supported on an integrated routing and bridging (IRB) interface.

On an ACX Series router, only the outer tag is supported for dscp, inet-precedence, and ieee802.1.

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.

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.

Options

rewrite-name—Name of a rewrite-rules mapping configured at the [edit class-of-service rewrite-rules] hierarchy level.

default—The default mapping.

The remaining statements are explained separately.

Required Privilege Level

interface—To view this statement in the configuration.

interface-control—To add this statement to the configuration.

Published: 2013-08-28