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 associates incoming packets with a particular class-of-service (CoS) servicing level. Classifiers associate packets with a forwarding class and loss priority, and packets are associated to an output queue based on the forwarding class. You can define classifiers for the following interfaces:

  • IPv4 and IPv6 traffic to network interfaces, aggregated Ethernet interfaces (also known as link aggregation groups (LAGs))

  • On switches that support the ELS configuration style, inter-VLAN routing functions use an integrated routing and bridging (IRB) interface named irb

  • On switches that do not support the ELS configuration style, inter-VLAN routing functions use a routed VLAN interface (RVI) named vlan

There are two general types of classifiers:

  • Behavior aggregate (BA) classifiers

  • Multifield (MF) classifiers

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. If the two classification results conflict, the MF classification result overrides the BA classification result.

Behavior Aggregate Classifiers

BA classifiers are based on fixed-length fields in the packet header, which makes them computationally more efficient than MF classifiers. Therefore core devices that handle high traffic volumes are normally configured to perform BA classification. The BA classifier maps packets to a forwarding class and a loss priority. The forwarding class determines the output queue for a packet. The loss priority is used by a scheduler to control packet discard during periods of congestion.

These are the following types of BA classifiers:

  • dscp—Differentiated Services Code Point (DSCP) for IP DiffServ. Handles incoming IPv4 packets.

  • dscp-ipv6—Handles incoming IPv6 packets.

  • ieee-802.1—Handles Layer 2 CoS (IEEE 802.1p).

  • inet-precedence—Handles incoming IPv4 packets. IP precedence mapping requires only the upper three bits of the DSCP field.

A BA 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.

Default Behavior Aggregate Classification

Juniper Networks Junos operating system (Junos OS) automatically assigns implicit default BA classifiers to logical interfaces based on the type of interface. Table 1 lists different types of interfaces and the corresponding implicit default BA classification.

Table 1: Default BA Classification

Type of Interface

Default BA Classification

Trunk interfaces

ieee8021p-default

Layer 3 interface (IPv4)

dscp-default

Layer 3 interface (IPv6)

dscp-ipv6-default

Access interface

Untrusted

Routed VLAN interface (RVI)

No default classification

When you explicitly associate a BA classifier with a logical interface, you are overriding the implicit (default) BA classifier with an explicit BA classifier.

Table 2 describes the BA classifier types you can configure on Layer 2 and Layer 3 interfaces.

Table 2: Allowed BA Classification

Type of Interface

Allowed BA Classification

Layer 2 interface

IEEE 802.1p, IP precedence, DSCP, DSCP IPv6

Layer 3 interface (IPv4)

IEEE 802.1p, IP precedence, DSCP

Layer 3 interface (IPv6)

IEEE 802.1p, IP precedence, DSCP IPv6

You cannot apply DSCP and IP precedence classifiers to the same interface. You also cannot apply IEEE 802.1p classifiers to an interface with classifiers of any other type. DSCP IPv6 classifiers can be applied to an interface with either DSCP or IP precedence classifiers, because they apply to different types of packets.

Note:

On EX4300 switches, the three classifiers (DSCP, DSCP IPv6, and IEEE 802.1p) can co-exist on an L2 interface along with a fixed classifier. BA classification takes precedence over fixed classification.

If you have not explicitly configured a classifier on a logical interface, the default classifiers are assigned and classification works as follows:

  • To a logical interface configured with an IPv4 address, a DSCP classifier is assigned by default, and IPv4 and IPv6 packets are classified using the DSCP classifier.

  • To logical interface configured with an IPv6 address, a DSCP IPv6 classifier is assigned by default, and IPv4 and IPv6 packets are classified using the DSCP IPv6 classifier.

Note:

On EX8200 switches, you can configure either one classifier of type DSCP or IEEE802.1p, or you can configure one classifier each of type DSCP and IEEE802.1p.

You can configure IRB interfaces on switches that support the ELS configuration style, or routed VLAN interfaces on switches that do not support the ELS configuration style. After you do this, the User Priority (UP) bits in the incoming packets are rewritten according to the default IEEE 802.1p rewrite rule.

Note:

By default, all BA classifiers classify traffic into either the best-effort forwarding class or the network-control forwarding class.

Multifield Classifiers

Multifield (MF) 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 support for DSCP or IP precedence classifiers in end-user applications. On an edge switch, an MF classifier provides the filtering functionality that scans through a variety of packet fields to determine the forwarding class for a packet. Typically, any classifier performs matching operations on the selected fields against a configured value.