ON THIS PAGE
Example: Configuring Behavior Aggregate Classifiers
This example shows how to configure behavior aggregate classifiers for a device to determine forwarding treatment of packets.
Requirements
Before you begin, determine the forwarding class and PLP that are assigned by default to each well-known DSCP that you want to configure for the behavior aggregate classifier. See Default Behavior Aggregate Classification.
Overview
You configure behavior aggregate classifiers to classify packets that contain valid DSCPs to appropriate queues. Once configured, you must apply the behavior aggregate 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 behavior aggregate 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, and a network control forwarding class as nc-class. Finally, you apply the behavior aggregate 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
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:
- Configure the class of service.[edit]user@host# edit class-of-service
- Configure behavior aggregate classifiers for DiffServ
CoS.[edit class-of-service]user@host# edit classifiers dscp ba-classifieruser@host# set import default
- Configure a best-effort forwarding class classifier.[edit class-of-service classifiers dscp ba-classifier]user@host# set forwarding-class be-class loss-priority high code-points 000001
- Configure an expedited forwarding class classifier.[edit class-of-service classifiers dscp ba-classifier]user@host# set forwarding-class ef-class loss-priority high code-points 101111
- Configure an assured forwarding class classifier.[edit class-of-service classifiers dscp ba-classifier]user@host# set forwarding-class af-class loss-priority high code-points 001100
- Configure a network control forwarding class classifier.[edit class-of-service classifiers dscp ba-classifier]user@host# set forwarding-class nc-class loss-priority high code-points 110001
- Apply the behavior aggregate classifier to an interface.[edit]user@host# set class-of-service interfaces ge-0/0/0 unit 0 classifiers dscp ba-classifier
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.
user@host> show class-of-service classifiers
name ba-classifier
Classifier: ba-classifier, Code point type: dscp, Index: 10755 Code point Forwarding class Loss priority 000000 best-effort low 000001 be-class high 000010 best-effort low 000011 best-effort low 000100 best-effort low 000101 best-effort low 000110 best-effort low 000111 best-effort low 001000 best-effort low 001001 best-effort low 001010 assured-forwarding low 001011 best-effort low 001100 af-class high 001101 best-effort low 001110 assured-forwarding high 001111 best-effort low 010000 best-effort low 010001 best-effort low 010010 best-effort low 010011 best-effort low 010100 best-effort low 010101 best-effort low 010110 best-effort low 010111 best-effort low 011000 best-effort low 011001 best-effort low 011010 best-effort low 011011 best-effort low 011100 best-effort low 011101 best-effort low 011110 best-effort low 011111 best-effort low 100000 best-effort low 100001 best-effort low 100010 best-effort low 100011 best-effort low 100100 best-effort low 100101 best-effort low 100110 best-effort low 100111 best-effort low 101000 best-effort low 101001 best-effort low 101010 best-effort low 101011 best-effort low 101100 best-effort low 101101 best-effort low 101110 expedited-forwarding low 101111 ef-class high 110000 network-control low 110001 nc-class high 110010 best-effort low 110011 best-effort low 110100 best-effort low 110101 best-effort low 110110 best-effort low 110111 best-effort low 111000 network-control low 111001 best-effort low 111010 best-effort low 111011 best-effort low 111100 best-effort low 111101 best-effort low 111110 best-effort low 111111 best-effort low
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:
user@host> show class-of-service classifier
name ba-classifier
Classifier: ba-classifier, Code point type: dscp, Index: 10755 Code point Forwarding class Loss priority 000001 be-class high 001100 af-class high 101111 ef-class high 110001 nc-class high
Verifying 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.
user@host> show class-of-service interface ge-0/0/0
Physical interface: ge-0/0/0, Index: 144 Queues supported: 8, Queues in use: 4 Scheduler map: <default>, Index: 2 Congestion-notification: Disabled Logical interface: ge-0/0/0.0, Index: 333 Object Name Type Index Classifier ba-classifier dscp 10755
Meaning
The interface is configured as expected.