By default, rewrite rules are not 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. 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 47 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 Table 18, and the default forwarding classes shown in Table 27.
When the software detects packets whose CoS values match the forwarding class and PLP values in the first two columns in Table 47, the software maps the header bits of those packets to the code-point aliases in the last column in Table 47. The code-point aliases in the last column map to the CoS bits shown in Table 18.
Table 47: Default Packet Header Rewrite Mappings
In the following example, the so-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. Table 18 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. Table 18 shows that this code-point alias maps to the 000 bits.
To evaluate all the implications of this example, see Table 18 and Table 47.
- class-of-service {
-
- interfaces {
-
- so-1/2/3 {
-
- unit 0 {
-
- rewrite-rules {
-
dscp default;
- }
- }
- }
- }
- }