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 Default Rewrite Rules

    By default, rewrite rules are not usually applied to interfaces. If you want to apply a rewrite rule, you can either design your own rule and apply it to an interface, or you can apply a default rewrite rule.

    Note: The lone exception is that non-MPC MPLS-enabled interfaces use the default EXP rewrite rule, even if not configured.

    To apply default rewrite rules, include one or more of the following statements at the [edit class-of-service interfaces interface-name unit logical-unit-number rewrite-rules] hierarchy level:

    [edit class-of-service interfaces interface-name unit logical-unit-number rewrite-rules]dscp default;dscp-ipv6 default;exp default;ieee-802.1 default vlan-tag (outer | outer-and-inner);inet-precedence default;

    Table 1 shows the default rewrite rule mappings. These are based on the default bit definitions of DSCP, DSCP IPv6, EXP, IEEE, and IP CoS values, as shown in Default Aliases for CoS Value Bit Patterns Overview, and the default forwarding classes shown in Default Forwarding Classes.

    When the software detects packets whose CoS values match the forwarding class and PLP values in the first two columns in Table 1, the software maps the header bits of those packets to the code-point aliases in the last column in Table 1. The code-point aliases in the last column map to the CoS bits shown in Default Aliases for CoS Value Bit Patterns Overview.

    Table 1: Default Packet Header Rewrite Mappings

    Map from Forwarding Class

    PLP Value

    Map to DSCP/DSCP IPv6/ EXP/IEEE/IP

    expedited-forwarding

    low

    ef

    expedited-forwarding

    high

    ef

    assured-forwarding

    low

    af11

    assured-forwarding

    high

    af12 (DSCP/DSCP IPv6/EXP)

    best-effort

    low

    be

    best-effort

    high

    be

    network-control

    low

    nc1/cs6

    network-control

    high

    nc2/cs7

    In the following example, the ge-1/2/3.0 interface is assigned the default DSCP rewrite rule. One result of this configuration is that each packet exiting the interface with the expedited-forwarding forwarding class and the high or low loss priority has its DSCP bits rewritten to the DSCP ef code-point alias. Default Aliases for CoS Value Bit Patterns Overview shows that this code-point alias maps to the 101110 bits.

    Another result of this configuration is that all packets exiting the interface with the best-effort forwarding class and the high or low loss priority have their EXP bits rewritten to the EXP be code-point alias.Default Aliases for CoS Value Bit Patterns Overview shows that this code-point alias maps to the 000 bits.

    To evaluate all the implications of this example, see Default Aliases for CoS Value Bit Patterns Overview and Table 1.

    class-of-service {interfaces {ge-1/2/3 {unit 0 {rewrite-rules {dscp default;}}}}}

    Modified: 2016-12-06