You can configure rewrite rules to replace DiffServ code points (DSCPs) on packets received from the customer or host with the values expected by other devices. You do not have to configure rewrite rules if the received packets already contain valid DSCPs. Rewrite rules apply the forwarding class information and packet loss priority used internally by the device to establish the DSCP on outbound packets. Once configured, you must apply the rewrite rules to the correct interfaces.
The following example shows how to create the rewrite rules rewrite-dscps and apply them to the device's Gibabit Ethernet interface ge-0/0/0. The rewrite rules replace the DSCPs on packets in the four forwarding classes, as shown in Table 197.
Table 197: Sample rewrite-dscps Rewrite Rules to Replace DSCPs
To configure and apply rewrite rules for the device:
Table 198: Configuring and Applying Rewrite Rules
|
Task |
J-Web Configuration Editor |
CLI Configuration Editor |
|---|---|---|
|
Navigate to the Class of service level in the configuration hierarchy. |
|
From the [edit] hierarchy level, enter edit class-of-service |
|
Configure rewrite rules for DiffServ CoS. |
|
Enter edit rewrite-rules dscp rewrite-dscps |
|
Configure best-effort forwarding class rewrite rules. |
|
Enter set forwarding-class be-class loss-priority low code-point 000000 set forwarding-class be-class loss-priority high code-point 000001 |
|
Configure expedited forwarding class rewrite rules. |
|
Enter set forwarding-class ef-class loss-priority low code-point 101110 set forwarding-class ef-class loss-priority high code-point 101111 |
|
Configure assured forwarding class rewrite rules. |
|
Enter set forwarding-class af-class loss-priority low code-point 001010 set forwarding-class af-class loss-priority high code-point 001100 |
|
Configure network control class rewrite rules. |
|
Enter set forwarding-class nc-class loss-priority low code-point 110000 set forwarding-class nc-class loss-priority high code-point 110001 |
|
Apply rewrite rules to an interface. (See the interface naming conventions in Network Interface Naming.) |
|
From the [edit class of service] hierarchy level, enter set interfaces ge-0/0/0 unit 0 rewrite-rules dscp rewrite-dscps |