Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Defining CoS Classifiers (CLI Procedure)

date_range 14-Dec-23

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. Junos OS supports two general types of classifiers:

  • Behavior aggregate (BA) classifier—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) value, IP precedence value, or IEEE 802.1p value. EX Series switches except EX4300 switches support two types of loss priorities: high and low. EX4300 switches support three types of loss priorities: high, medium-high, and low.

    You can configure BA classifiers for the following CoS marker types:

    • dscp and dscp-ipv6—Handles incoming IPv4 and IPv6 packets, respectively.

    • ieee-802.1—Handles Layer 2 CoS.

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

  • Multifield (MF) classifier—Examine multiple fields in the 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.

The following example describes how to configure a BA classifier (ba-classifier) as the default DSCP map for handling IPv4 traffic and to apply the BA classifier to either a specific Gigabit Ethernet interface or to all the Gigabit Ethernet interfaces on the switch. The BA classifier assigns loss priorities, as shown in Table 1, to incoming packets in the four forwarding classes.

You can use the same procedure to set MF classifiers (except that you would use firewall filter rules).

Table 1: BA-classifier Loss Priority Assignments
Forwarding Class For CoS Traffic Type ba-classifier Assignment

be

Best-effort traffic

High-priority code point: 000001

ef

Expedited-forwarding traffic

High-priority code point: 101110

af

Assured-forwarding traffic

High-priority code point: 001100

nc

Network-control traffic

High-priority code point: 110001

To configure a DSCP BA classifier named ba-classifier as the default DSCP map:

  • Associate code point 000001 with forwarding class be and loss priority high:

    content_copy zoom_out_map
    [edit class-of-service classifiers]
    user@switch# set dscp ba-classifier import default forwarding-class be loss-priority high code-points 000001 
  • Associate code point 101110 with forwarding class ef and loss priority high:

    content_copy zoom_out_map
    [edit class-of-service classifiers]
    user@switch# set dscp ba-classifier forwarding-class ef loss-priority high code-points 101110 
  • Associate code point 001100 with forwarding class af and loss priority high:

    content_copy zoom_out_map
    [edit class-of-service classifiers]
    user@switch# set dscp ba-classifier forwarding-class af loss-priority high code-points 001100 
  • Associate code point 110001 with forwarding class nc and loss priority high:

    content_copy zoom_out_map
    [edit class-of-service classifiers]
    user@switch# set dscp ba-classifier forwarding-class nc loss-priority high code-points 110001 
  • Apply the classifier to a specific interface or to all Gigabit Ethernet interfaces on the switch.

    • To apply the classifier to a specific interface:

      content_copy zoom_out_map
      [edit class-of-service interfaces]
      user@switch# set ge-0/0/0 unit 0 classifiers dscp ba-classifier 
    • To apply the classifier to all Gigabit Ethernet interfaces on the switch, use wildcards for the interface name and the logical-interface (unit) number:

      content_copy zoom_out_map
      [edit class-of-service interfaces]
      user@switch# set ge-* unit * classifiers dscp ba-classifier 
external-footer-nav