Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Understanding CoS Classifiers

 

Packet classification maps incoming packets to a particular class-of-service (CoS) servicing level. Classifiers map packets to a forwarding class and a loss priority, and assign packets to output queues based on the forwarding class. There are three general types of classifiers:

  • Behavior aggregate (BA) classifiers—DSCP and DSCP IPv6 classify IP and IPv6 traffic, and IEEE 802.1p classifiers classify all other traffic.

  • Fixed classifiers—Fixed classifiers classify all ingress traffic on a physical interface into one forwarding class, regardless of the CoS bits in the packet header.

  • Multifield (MF) classifiers—MF classifiers classify traffic based on more than one field in the packet header and take precedence over BA and fixed classifiers.

By default, OCX Series switches use the default DSCP classifier. The default DSCP classifier maps incoming traffic to the best-effort (queue 0) and network-control (queue 7) forwarding classes.

Note

If you configure a classifier, do not map traffic to the default fcoe (queue 3) or no-loss (queue 4) forwarding classes. (Do not map DSCP code points to the fcoe or no-loss default forwarding classes. On other switches, the fcoe and no-loss default forwarding classes provide lossless transport for Layer 2 traffic. OCX Series switches do not support lossless Layer 2 transport. You can map traffic to queue 3 and queue 4 only if you configure forwarding classes that do not have the no-loss packet drop attribute, and map them to those queues.)

Interfaces and Output Queues

On Gigabit interfaces, 10-Gigabit interfaces, and link aggregation (LAG) interfaces, you can apply classifiers to Layer 3 physical interfaces if the Layer 3 physical interface has at least one defined logical interface. Classifiers applied to Layer 3 physical interfaces are used on all logical interfaces on that physical interface. Understanding Applying CoS Classifiers and Rewrite Rules to Interfaces describes the interaction between classifiers and interfaces in greater detail (see Understanding Applying CoS Classifiers and Rewrite Rules to Interfaces for OCX Series switch information).

You can configure both a BA classifier and an MF classifier on an interface. If you do this, the BA classification is performed first, and then the MF classification is performed. If the two classification results conflict, the MF classification result overrides the BA classification result.

You cannot configure a fixed classifier and a BA classifier on the same interface.

You can configure both a DSCP or a DSCP IPv6 classifier and an IEEE 802.1p classifier on the same interface. IP traffic uses the DSCP or DSCP IPv6 classifier. All other traffic uses the IEEE classifier. You can configure only one DSCP classifier on a physical interface (either one DSCP classifier or one DSCP IPv6 classifier, but not both).

You can create unicast BA classifiers for unicast traffic and multicast BA classifiers for multidestination traffic, which includes multicast, broadcast, and destination lookup fail (DLF) traffic. You cannot assign unicast traffic and multidestination traffic to the same BA classifier.

On each interface, the switch has separate output queues for unicast traffic and for multidestination traffic:

  • The switch supports 12 output queues, with 8 queues dedicated to unicast traffic and 4 queues dedicated to multidestination traffic.

  • Queues 0 through 7 are unicast traffic queues. You can apply only unicast BA classifiers to unicast queues. A unicast BA classifier should contain only forwarding classes that are mapped to unicast queues.

  • Queues 8 through 11 are multidestination traffic queues. You can apply only multidestination BA classifiers to multidestination queues. A multidestination BA classifier should contain only forwarding classes that are mapped to multidestination queues.

You can apply unicast classifiers to one or more interfaces. Multidestination classifiers apply to all of the switch interfaces and cannot be applied to individual interfaces. Use the DSCP multidestination classifier for both IP and IPv6 multidestination traffic. The DSCP IPv6 classifier is not supported for multidestination traffic.

Behavior Aggregate Classifiers

The behavior aggregate classifier maps a class-of-service (CoS) value to a forwarding class and loss priority. The forwarding class determines the output queue. A scheduler uses the loss priority to control packet discard during periods of congestion by associating different drop profiles with different loss priorities.

The switch supports two types of BA classifiers:

  • Differentiated Services Code Point (DSCP) for IP DiffServ (IP and IPv6)

  • IEEE 802.1p CoS bits

BA classifiers are based on fixed-length fields, which makes them computationally more efficient than MF classifiers. Therefore, core devices, which handle high traffic volumes, are normally configured to perform BA classification.

Unless you explicitly configure a classifier and apply it to interfaces, OCX Series switch interfaces use the default DSCP classifier shown in Table 1.

Table 1: Default DSCP IP and IPv6 Unicast Classifiers

Code Point

Forwarding Class

Loss Priority

000000 (be)

best-effort

low

000001

best-effort

low

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 (cs1)

best-effort

low

001001

best-effort

low

001010 (af11)

best-effort

low

001011

best-effort

low

001100 (af12)

best-effort

low

001101

best-effort

low

001110 (af13)

best-effort

low

001111

best-effort

low

010000 (cs2)

best-effort

low

010001

best-effort

low

010010 (af21)

best-effort

low

010011

best-effort

low

010100 (af22)

best-effort

low

010101

best-effort

low

010110 (af23)

best-effort

low

010111

best-effort

low

011000 (cs3)

best-effort

low

011001

best-effort

low

011010 (af31)

best-effort

low

011011

best-effort

low

011100 (af32)

best-effort

low

011101

best-effort

low

011110 (af33)

best-effort

low

011111

best-effort

low

100000 (cs4)

best-effort

low

100001

best-effort

low

100010 (af41)

best-effort

low

100011

best-effort

low

100100 (af42)

best-effort

low

100101

best-effort

low

100110 (af43)

best-effort

low

100111

best-effort

low

101000 (cs5)

best-effort

low

101001

best-effort

low

101011

best-effort

low

101100

best-effort

low

101101

best-effort

low

101110 (ef)

best-effort

low

101111

best-effort

low

110000 (nc1)

network-control

low

110001

network-control

low

110010

network-control

low

110011

network-control

low

110100

network-control

low

110101

network-control

low

110110

network-control

low

110111

network-control

low

111000 (nc2)

network-control

low

111001

network-control

low

111010

network-control

low

111011

network-control

low

111100

network-control

low

111101

network-control

low

111110

network-control

low

111111

network-control

low

Unicast and multicast traffic cannot share the same classifier. You can map unicast traffic and multicast traffic to the same classifier CoS value, but the unicast traffic must belong to a unicast classifier and the multicast traffic must belong to a multidestination classifier.

Default Behavior Aggregate Classification

Juniper Networks Junos OS automatically assigns implicit default classifiers to all logical interfaces based on the type of interface. Table 2 lists different types of interfaces and the corresponding implicit default BA classifiers.

Table 2: Default BA Classification

Type of Interface

Default BA Classification

Layer 3 interface

dscp-default

Note

There are default BA classifiers for the best-effort, fcoe, no-loss, network-control, and mcast forwarding classes.

When you explicitly associate a unicast classifier with a logical interface, you override the default unicast classifier with the explicit unicast classifier.

Note

You can apply only one classifier of each type, DSCP and IEEE 802.1p, to an interface. If both types of classifiers are present, DSCP classifiers take precedence over IEEE 802.1p classifiers.

Importing a Classifier

You can use any existing classifier, including the default classifiers, as the basis for defining a new classifier. You accomplish this using the import statement.

The imported classifier is used as a template and is not modified. The modifications you make become part of a new classifier (and a new template) identified by the name of the new classifier. Whenever you commit a configuration that assigns a new forwarding class-name and loss-priority value to a code-point alias or set of bits, it replaces that entry in the new classifier template. As a result, you must explicitly specify every CoS value in every designation that requires modification.

Multidestination Classifiers

Multidestination classifiers are applied to all interfaces and cannot be applied to individual interfaces. You can configure both a DSCP multidestination classifier and an IEEE multidestination classifer. IP and IPv6 traffic use the DSCP classifier, and all other traffic uses the IEEE classifier.

DSCP IPv6 multidestination classifiers are not supported, so IPv6 traffic uses the DSCP multidestination classifier.

The default multidestination classifier is the IEEE 802.1p multidestination classifier.

Fixed Classifiers

Fixed classifiers map all traffic on a physical interface to a forwarding class and a loss priority. (As opposed to BA classifiers, which map traffic into multiple different forwarding classes based on the IEEE 802.1p CoS bits field value in the VLAN header or the DSCP field value in the type-of-service bits in the packet IP header.) Each forwarding class maps to an output queue. However, when you use a fixed classifier, regardless of the CoS or DSCP bits, all Incoming traffic is classified into the forwarding class specified in the fixed classifier. A scheduler uses the loss priority to control packet discard during periods of congestion by associating different drop profiles with different loss priorities.

You cannot configure a fixed classifier and a DSCP or IEEE 802.1p BA classifier on the same interface. If you configure a fixed classifier on an interface, you cannot configure a DSCP or an IEEE classifier on that interface. If you configure a DSCP classifier, an IEEE classifier, or both classifiers on an interface, you cannot configure a fixed classifier on that interface.

To switch from a fixed classifier to a BA classifier or to switch from a BA classifier to a fixed classifier, deactivate the existing classifier attachment on the interface, and then attach the new classifier to the interface.

Multifield Classifiers

Multifield classifiers examine multiple fields in a packet such as source and destination addresses and source and destination port numbers of the packet. With MF classifiers, you set the forwarding class and loss priority of a packet based on firewall filter rules.

MF classification is normally performed at the network edge because of the general lack of DiffServ code point (DSCP) support in end-user applications. On a switch at the edge of a network, an MF classifier provides the filtering functionality that scans through a variety of packet fields to determine the forwarding class for a packet. Typically, a classifier performs matching operations on the selected fields against a configured value.