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

Configuring and Applying Rewrite Rules

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 routers. 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 Services Router 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 Services Router's Fast Ethernet interface fe-0/0/0. The rewrite rules replace the DSCPs on packets in the four forwarding classes, as shown in Table 122.

Table 122: Sample rewrite-dscps Rewrite Rules to Replace DSCPs

mf-classifier Forwarding Class

For CoS Traffic Type

rewrite-dscps Rewrite Rules

be-class

Best-effort traffic

Low-priority code point: 000000

High-priority code point: 000001

ef-class

Expedited forwarding traffic

Low-priority code point: 101110

High-priority code point: 101111

af-class

Assured forwarding traffic

Low-priority code point: 001010

High-priority code point: 001100

nc-class

Network control traffic

Low-priority code point: 110000

High-priority code point: 110001

To configure and apply rewrite rules for the Services Router:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 123.
  3. Go on to Configuring and Applying Behavior Aggregate Classifiers .

Table 123: Configuring and Applying Rewrite Rules

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Class of service level in the configuration hierarchy.

  1. In the J-Web interface, select Configuration>View and Edit>Edit Configuration.
  2. Next to Class of service, click Configure or Edit.

From the [edit] hierarchy level, enter

edit class-of-service

Configure rewrite rules for DiffServ CoS.

  1. Click Configure next to Rewrite rules.
  2. Click Add new entry next to Dscp.
  3. In the Name box, type the name of the rewrite rules—for example, rewrite-dscps.

Enter

edit rewrite-rules dscp rewrite-dscps

Configure best-effort forwarding class rewrite rules.

  1. Click Add new entry next to Forwarding class.
  2. In the Class name box, type the name of the previously configured best-effort forwarding class—be-class.
  3. Click Add new entry next to Loss priority.
  4. From the Loss val list, select low.
  5. In the Code point box, type the value of the low-priority code point for best-effort traffic—for example, 000000.
  6. Click OK.
  7. Click Add new entry next to Loss priority.
  8. From the Loss val list, select high.
  9. In the Code point box, type the value of the high-priority code point for best-effort traffic—for example, 000001.
  10. Click OK twice.

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.

  1. Click Add new entry next to Forwarding class.
  2. In the Class name box, type the name of the previously configured expedited forwarding class—ef-class.
  3. Click Add new entry next to Loss priority.
  4. From the Loss val list, select low.
  5. In the Code point box, type the value of the low-priority code point for expedited forwarding traffic—for example, 101110.
  6. Click OK.
  7. Click Add new entry next to Loss priority.
  8. From the Loss val list, select high.
  9. In the Code point box, type the value of the high-priority code point for expedited forwarding traffic—for example, 101111.
  10. Click OK twice.

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.

  1. Click Add new entry next to Forwarding class.
  2. In the Class name box, type the name of the previously configured assured forwarding class—af-class.
  3. Click Add new entry next to Loss priority.
  4. From the Loss val list, select low.
  5. In the Code point box, type the value of the low-priority code point for assured forwarding traffic—for example, 001010.
  6. Click OK.
  7. Click Add new entry next to Loss priority.
  8. From the Loss val list, select high.
  9. In the Code point box, type the value of the high-priority code point for assured forwarding traffic—for example, 001100.
  10. Click OK twice.

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.

  1. Click Add new entry next to Forwarding class.
  2. In the Class name box, type the name of the previously configured network control forwarding class—nc-class.
  3. Click Add new entry next to Loss priority.
  4. From the Loss val list, select low.
  5. In the Code point box, type the value of the low-priority code point for network control traffic—for example, 110000.
  6. Click OK.
  7. Click Add new entry next to Loss priority.
  8. From the Loss val list, select high.
  9. In the Code point box, type the value of the high-priority code point for network control traffic—for example, 110001.
  10. Click OK four times.

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.

  1. Click Add new entry next to Interfaces
  2. In the Interface name box, type the name of the interface—for example, fe-0/0/0.
  3. Click Add new entry next to Unit.
  4. In the Unit number box, type the logical interface unit number—0.
  5. Click Configure next to Rewrite rules.
  6. In the Rewrite rules name box, under Dscp, type the name of the previously configured rewrite rules—rewrite-dscps.
  7. Click OK.

From the [edit class of service] hierarchy level, enter

set interfaces fe-0/0/0 unit 0 rewrite-rules dscp rewrite-dscps


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