Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configure and Apply Custom BA Classifiers

This example shows how to configure BA classifiers for a device to determine forwarding treatment of packets.

Requirements

Before you begin, determine the default forwarding class and PLP for each well-known DSCP for which you want to configure for a BA classifier. See Default Behavior Aggregate Classification.

Overview

You configure BA classifiers to classify packets that contain valid DSCPs to appropriate queues. Once configured, you must apply the BA classifier to the correct interfaces. You can override the default IP precedence classifier by defining a classifier and applying it to a logical interface. To define new classifiers for all code point types, include the classifiers statement at the [edit class-of-service] hierarchy level.

In this example, you set the DSCP BA classifier to ba-classifier as the default DSCP map. You set:

  • A best-effort forwarding class as be-class

  • An expedited forwarding class as ef-class

  • An assured forwarding class as af-class

  • A network control forwarding class as nc-class

Finally, you apply the BA classifier to an interface called ge-0/0/0.

Table 1 shows how the behavior aggregate classifier assigns loss priorities to incoming packets in the four forwarding classes.

Table 1: Sample ba-classifier Loss Priority Assignments

ba-classifier Forwarding Class

For CoS Traffic Type

ba-classifier Assignments

be-class

Best-effort traffic

High-priority code point: 000001

ef-class

Expedited forwarding traffic

High-priority code point: 101111

af-class

Assured forwarding traffic

High-priority code point: 001100

nc-class

Network control traffic

High-priority code point: 110001

Configuration

Procedure

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from the configuration mode.

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure behavior aggregate classifiers for a device:

  1. Configure the class of service.

  2. Configure behavior aggregate classifiers for DiffServ CoS.

  3. Configure a best-effort forwarding class classifier.

  4. Configure an expedited forwarding class classifier.

  5. Configure an assured forwarding class classifier.

  6. Configure a network control forwarding class classifier.

  7. Apply the behavior aggregate classifier to an interface.

    Note:

    You can use interface wildcards for interface-name and logical-unit-number.

Results

From configuration mode, confirm your configuration by entering the show class-of-service command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Verify the DSCP Classifier

Purpose

Make sure that the DSCP classifier is configured as expected.

Action

Run the show class-of-service classifiers name ba-classifier command.

Meaning

Notice that the default classifier is incorporated into the customer classifier. If you were to remove the import default statement from the custom classifier, the custom classifier would look like this:

Verify That the Classifier Is Applied to the Interfaces

Purpose

Make sure that the classifier is applied to the correct interfaces.

Action

Run the show class-of-service interface command.

Meaning

The interface is configured as expected.