Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Defining Classifiers

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:

[edit class-of-service]
classifiers {(dscp | dscp-ipv6 | exp | ieee-802.1 | inet-precedence) classifier-name {import [classifier-name | default];forwarding-class class-name {loss-priority level code-points [ aliases ] [ bit-patterns ];}}}

The map sets the forwarding class and PLP for a specific set of code-point aliases and bit patterns. The inputs of the map are code-point aliases and bit patterns. The outputs of the map are the forwarding class and the PLP. For more information about how CoS maps work, see CoS Inputs and Outputs Overview.

The classifiers work as follows:

  • dscp—Handles incoming IPv4 packets.
  • dscp-ipv6—Handles incoming IPv6 packets. For more information, see Applying DSCP IPv6 Classifiers.
  • exp—Handles MPLS packets using Layer 2 headers.
  • ieee-802.1—Handles Layer 2 CoS.
  • inet-precedence—Handles incoming IPv4 packets. IP precedence mapping requires only the upper three bits of the DSCP field.

A classifier takes a specified bit pattern as either the literal pattern or as a defined alias and attempts to match it to the type of packet arriving on the interface. If the information in the packet’s header matches the specified pattern, the packet is sent to the appropriate queue, defined by the forwarding class associated with the classifier.

The code-point aliases and bit patterns are the input for the map. The loss priority and forwarding class are outputs of the map. In other words, the map sets the PLP and forwarding class for a given set of code-point aliases and bit patterns.

Note: On M Series, MX Series, and T Series routers that do not have tricolor marking enabled, the loss priority can be configured only by setting the PLP within a multifield classifier. This setting can then be used by the appropriate drop profile map and rewrite rule. For more information, see Setting Packet Loss Priority.

Importing a Classifier

You can use any table, including the default, in the definition of a new classifier by including the import statement. The imported classifier is used as a template and is not modified. Whenever you commit a configuration that assigns a new class-name and loss-priority value to a code-point alias or set of bits, it replaces that entry in the imported classifier template. As a result, you must explicitly specify every CoS value in every designation that requires modification.

To do this, include the import default statement at the [edit class-of-service classifiers type classifier-name] hierarchy level:

[edit class-of-service classifiers type classifier-name]import default;

For instance, to import the default DSCP classifier, include the dscp default statement at the [edit class-of-service classifiers dscp classifier-name] hierarchy level:

[edit class-of-service classifiers dscp classifier-name]import default;

Published: 2013-02-11

Supported Platforms

Published: 2013-02-11