Defining CoS Classifiers (CLI Procedure)
Packet classification associates incoming packets with a particular CoS servicing level. Classifiers associate packets with a forwarding class and loss priority and, based on the associated forwarding class, assign packets to output queues. JUNOS software supports two general types of classifiers:
- Behavior aggregate or CoS value traffic classifiers—Examines 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, and IEEE 802.1p value. The default classifier is based on the DSCP value.
- Multifield traffic classifiers—Examines 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 procedure describes how to configure the DSCP BA classifier ba-classifier as the default DSCP map and apply it to the Gigabit Ethernet interface ge-0/0/0 of the EX-series switch. The BA classifier assigns loss priorities, as shown in Table 1, to incoming packets in the four forwarding classes.
Table 1: BA-classifier Loss Priority Assignments
To configure CoS classifiers using the CLI:
- Associate code point 000001 with forwarding
class be and loss priority high:
[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:
[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:
[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:
[edit class-of-service classifiers]
user@switch# set dscp ba-classifier forwarding-class nc loss-priority high code-points 110001 - Apply the DSCP BA classifier to Gigabit Ethernet
interface ge-0/0/0:
[edit class-of-service interfaces]
user@switch# set ge-0/0/0 unit 0 classifiers dscp ba-classifier