[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Rewriting MPLS and IPv4 Packet Headers

You can apply a rewrite rule to MPLS and IPv4 packet headers simultaneously. This allows you to initialize MPLS EXP and IP precedence bits at LSP ingress. You can configure different rewrite rules depending on whether the traffic is VPN or non-VPN.

The default MPLS EXP rewrite table contents are shown in Table 45.

Table 45: Default MPLS EXP Rewrite Table

Forwarding Class

Loss Priority

CoS Value

best-effort

low

000

best-effort

high

001

expedited-forwarding

low

010

expedited-forwarding

high

011

assured-forwarding

low

100

assured-forwarding

high

101

network-control

low

110

network-control

high

111

By default, IP precedence rewrite rules alter the first three bits on the type-of-service (ToS) byte while leaving the last three bits unchanged. This default behavior applies to rewrite rules you configure for MPLS packets with IPv4 payloads.

To override the default MPLS EXP rewrite table and rewrite MPLS and IPv4 packet headers simultaneously, include the protocol statement at the [edit class-of-service interfaces interface-name unit logical-unit-number rewrite-rules exp rewrite-rule-name] hierarchy level:

[edit class-of-service interfaces interface-name unit logical-unit-number rewrite-rules exp rewrite-rule-name]
protocol protocol-types;

The protocol statement defines the types of MPLS packets and packet headers to which the specified rewrite rule is applied. The MPLS packet can be a standard MPLS packet or an MPLS packet with an IPv4 payload. Specify the type of MPLS packet using the following options:

An alternative to overwriting the default with a rewrite-rules mapping is to configure the default packet header rewrite mappings, as shown in Applying Default Rewrite Rules.

By default, IP precedence rewrite rules alter the first three bits on the ToS byte while leaving the last three bits unchanged. This default behavior is not configurable. The default behavior applies to rules you configure by including the inet-precedence statement at the [edit class-of-service rewrite-rules] hierarchy level. The default behavior also applies to rewrite rules you configure for MPLS packets with IPv4 payloads. You configure these types of rewrite rules by including the mpls-inet-both or mpls-inet-both-non-vpn option at the [edit class-of-service interfaces interface-name unit logical-unit-number rewrite-rules exp rewrite-rule-name protocol] hierarchy level.

Example: Rewriting MPLS and IPv4 Packet Headers

On an M320 or T-series routing platform, configure rewrite tables and apply them in various ways to achieve the following results:


[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]