Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring Classifiers

Packet classification associates incoming packets with a particular CoS servicing level. Classifiers associate packets with a forwarding class and loss priority and assign packets to output queues based on the associated forwarding class. You apply classifiers to ingress interfaces.

Configuring Classifiers

Step-by-Step Procedure

To configure an IEEE 802.1 BA classifier named ba-classifier as the default IEEE 802.1 classifier:

  1. Associate code point 000 with forwarding class be and loss priority low:

  2. Associate code point 011 with forwarding class fcoe and loss priority low:

  3. Associate code point 100 with forwarding class no-loss and loss priority low:

  4. Associate code point 110 with forwarding class nc and loss priority low:

  5. Apply the classifier to ingress interface xe-0/0/10:

Requirements

This example uses the following hardware and software components:

  • One switch.

  • Junos OS Release 15.1X53-D10 or later for the QFX Series.

Overview

Junos OS supports three general types of classifiers:

  • Behavior aggregate or CoS value traffic classifiers—Examine the CoS value in the packet header. The value in this single field determines the CoS settings applied to the packet. BA classifiers allow you to set the forwarding class and loss priority of a packet based on the Differentiated Services code point (DSCP or DSCP IPv6) value, IEEE 802.1p value, or MPLS EXP value. (EXP classifiers can be applied only to family mpls interfaces.)

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

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

This example describes how to configure a BA classifier called ba-classifier as the default IEEE 802.1 mapping of incoming traffic to forwarding classes, and apply it to ingress interface xe-0/0/10. The BA classifier assigns loss priorities, as shown in Table 1, to incoming packets in the four default forwarding classes. You can adapt the example to DSCP traffic by specifying a DSCP classifier instead of an IEEE classifier, and by applying DSCP bits instead of CoS bits.

To set multifield classifiers, use firewall filter rules.

Table 1: ba-classifier Loss Priority Assignments

Forwarding Class

CoS Traffic Type

ba-classifier Loss Priority to IEEE 802.1p Code Point Mapping

Packet Drop Attribute

be

Best-effort traffic

Low loss priority code point: 000

drop

fcoe

Guaranteed delivery for Fibre Channel over Ethernet (FCoE) traffic

Low loss priority code point: 011

no-loss

no-loss

Guaranteed delivery for TCP traffic

Low loss priority code point: 100

no-loss

nc

Network-control traffic

Low loss priority code point: 110

drop

Verification

To verify the classifier configuration, perform these tasks:

Verifying the Classifier Configuration

Purpose

Verify that you configured the classifier with the correct forwarding classes, loss priorities, and code points.

Action

List the classifier configuration using the operational mode command show configuration class-of-service classifiers ieee-802.1 ba-classifier:

Verifying the Ingress Interface Configuration

Purpose

Verify that the classifier ba-classifier is attached to ingress interface xe-0/0/10.

Action

List the ingress interface using the operational mode command show configuration class-of-service interfaces xe-0/0/10: