Packet classification refers to the examination of an incoming packet. This function associates the packet with a particular CoS servicing level. Two general types of classifiers are supported—behavior aggregate (BA) classifiers and multifield (MF) classifiers. When both BA and and MF classifications are performed on a packet, the MF classification has higher precedence.
In JUNOS software, classifiers associate incoming packets with a forwarding class (FC) and packet loss priority (PLP) and, based on the associated forwarding class, assign packets to output queues. FC and PLP associated with a packet specify the behavior of a hop, within the system, to process the packet. The per hop behavior (PHB) comprises packet forwarding, policing, scheduling, shaping, and marking. For example, a hop can put a packet in one of the priority queues according to its FC and then manage the queues by checking a packet's PLP. JUNOS software supports up to eight FCs and four PLPs.
A behavior aggregate (BA) classifier operates on a packet as it enters the device. Using behavior aggregate classifiers, the device aggregates different types of traffic into a single forwarding class to receive the same forwarding treatment. The CoS value in the packet header is the single field that determines the CoS settings applied to the packet. Behavior aggregate classifiers allow you to set the forwarding class and loss priority of a packet based on the Differentiated Services (DiffServ) code point (DSCP) value, DSCP IPv4 value, IP precedence value, MPLS EXP bits, or IEEE 802.1p value. The default classifier is based on the IP precedence value. For more information, see Default Behavior Aggregate Classifiers.
JUNOS software performs BA classification for a packet by examining its layer 2, layer 3, and CoS-related parameters as shown in Table 174.
Table 174: BA Classification
| Layer | CoS Parameter |
|
Layer 2 |
IEEE 802.1p value: User Priority |
|
Layer 3 |
IPv4 precedence IPv4 Differentiated Services code point (DSCP) value |
![]() |
Note: A BA classifier evaluates Layer 2 and Layer 3 parameters independently; the results that generate from Layer 2 parameters override the results that generate from the Layer 3 parameters. |
With JUNOS software, all logical interface are automatically assigned a default IP precedence classifier when the logical interface is configured. This default traffic classifier maps IP precedence values to a forwarding class and packet loss priority as shown in Table 175. These mapping results take effect for an ingress packet until it is further processed by another classifcation method.
Table 175: Default IP Precedence Classifier
A multifield (MF) classifier is a second method for classifying traffic flows. Unlike the behavior aggregate classifier, a multifield classifier can examine multiple fields in the packet—for example, the source and destination address of the packet or the 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.
![]() |
Note: For a specified interface, you can configure both an MF classifier and a BA classifier without conflicts. Because the classifiers are always applied in sequential order, the BA classifier followed by the MF classifier, any BA classification result is overridden by an MF classifier, if they conflict. |
JUNOS software performs MF traffic classification by directly scrutinizing multiple fields of a packet to classify a packet without having to rely upon the output of the previous BA traffic classification. JUNOS software can simultaneously check a packet's data ranging from layer 2 to layer 7 as shown in Table 176
Table 176: MF Classification
Using JUNOS software, you configure an MF classifier with a firewall filter and its associated match conditions. This enables you to use any filter match criteria to locate packets that require classification. For more information on firewall filters and policies, see the JUNOS Software Security Configuration Guide.