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

Configuring and Applying Rewrite Rules (Required)

You optionally 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 155.

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

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 156.
  3. Go on to Configuring and Applying Behavior Aggregate Classifiers (Required).

Table 156: Configuring and Applying Rewrite Rules

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

In the configuration editor hierarchy, select Class of service.

From the top of the configuration hierarchy, 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 points 000000

set forwarding-class be-class loss-priority high code points 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 points 101110

set forwarding-class ef-class loss-priority high code points 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 points 001010

set forwarding-class af-class loss-priority high code points 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 twice.

Enter

set forwarding-class nc-class loss-priority low code points 110000

set forwarding-class nc-class loss-priority high code points 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. In the Rewrite rules box, type the name of the previously configured rewrite rules—rewrite-dscps.
  4. Click OK.

Enter

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


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