Configuring Behavior Aggregate Classifiers
You can override the default IP precedence classifier (ipprec-compatibility
) by defining a custom behavior aggregate
(BA) classifier and applying it to a logical interface or by applying
one of the other default BA classifiers to a logical interface.
The BA classifiers map sets the forwarding class and packet loss priority (PLP) for a specific set of code-point aliases or bit patterns. The inputs of the map are CoS values aliases or bit patterns. The outputs of the map are the forwarding class and the PLP. For more information about how CoS maps work, see Mapping CoS Component Inputs to Outputs.
The classifiers work as follows:
dscp
—Handles incoming IPv4 packets.dscp-ipv6
—Handles incoming IPv6 packets.exp
—Handles MPLS packets using Layer 2 headers.ieee-802.1
—Handles Layer 2 CoS.ieee-802.1ad
—Handles IEEE 802.1ad formats (including DEI bit).inet-precedence
—Handles incoming IPv4 packets. IP precedence mapping requires only the upper three bits of the DSCP field.
A classifier takes a specified Cos value as either the literal bit 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.
On M Series, MX Series, and T Series routers, and EX Series switches 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 Managing Congestion by Setting Packet Loss Priority for Different Traffic Flows.
Use the following configuration statements to define new classifiers for all CoS value types:
[edit class-of-service] classifiers { (dscp | dscp-ipv6 | exp | ieee-802.1 | ieee-802.1ad | inet-precedence) classifier-name { import [classifier-name | default]; forwarding-class class-name { loss-priority level code-points [ aliases ] [ bit-patterns ]; } } }
To define a new classifier for all CoS value types:
When tricolor marking is
enabled, four classifier PLP designations are supported: low
, medium-low
, medium-high
, and high
. For example, in the following configuration, the assured-forwarding
forwarding class and medium-low
PLP are assigned to all
packets entering the interface with the 101110
CoS value:
Map the
assured-forwarding
forwarding class andmedium-low
PLP to the CoS value of101110
.[edit class-of-service classifiers dscp class1] user@host# set forwarding-class assured forwarding loss-priority medium-low code-points 101110
Verify the configuration.
[edit class-of-service classifiers dscp class1] user@host# show
forwarding-class assured-forwarding { loss-priority medium-low code-points 101110; }
To use this classifier, you must configure the settings for the
assured-forwarding
forwarding class at the[edit class-of-service forwarding-classes queue queue-number assured-forwarding]
hierarchy level. For more information, see Understanding How Forwarding Classes Assign Classes to Output Queues.
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 CoS value alias or bit pattern, 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. For instance,
to import the default DSCP classifier:
Specify the type and name of the new classifier. For example, to create a new DSCP type classifier called class1:
[edit] user@host# edit class-of-service classifiers dscp class1
Specify the default DSCP classifier.
[edit class-of-service classifiers dscp class1] user@host# set import default