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 assign packets to output queues based on the associated forwarding class. There are two general types of classifiers:
- Behavior aggregate (BA) classifiers
- Multifield (MF) classifiers
For a specified interface, you can configure both an MF classifier and a BA classifier without conflicts. In such cases, BA classification is performed first, followed by MF classification. If the two classification results conflict, the MF classification result overrides the BA classification result.
![]() |
Note: When a source MAC address is learned, the frame that contains the source MAC address is always sent out on queue 0 while egressing from the network interface, irrespective of the classifier applied to the ingress interface. |
On Juniper Networks EX8200 Ethernet Switches, you can specify BA classifiers for bridged multidestination traffic and IP multidestination traffic. The BA classifier for multicast packets is applied to all interfaces on the EX8200 switch.
Behavior Aggregate Classifiers
The behavior aggregate classifier maps a class-of-service (CoS) value to a forwarding class and loss priority. The forwarding class determines the output queue. The loss priority is used by a scheduler to control packet discard during periods of congestion.
There are three types of BA classifiers:
- Differentiated Services Code Point (DSCP) for IP DiffServ
- IP precedence bits
- IEEE 802.1p CoS bits
BA classifiers are based on fixed-length fields, which makes them computationally more efficient than MF classifiers. Therefore core devices, which handle high traffic volumes, are normally configured to perform BA classification.
Default Behavior Aggregate Classification
Juniper Networks JUNOS Software automatically assigns implicit default classifiers to all logical interfaces based on the type of interface. Table 1 lists different types of interfaces and the corresponding implicit default classifiers.
Table 1: Default BA Classification
Type of Interface |
Default BA Classification |
---|---|
Trunk interface |
ieee8021p-default |
Layer 3 interface |
dscp-default |
Access interface |
Untrusted |
Routed VLAN interface (RVI) |
No default classification |
When you explicitly associate a classifier with a logical interface, you are in effect overriding the implicit default classifier with an explicit classifier.
You can configure routed VLAN interfaces (RVIs) to classify packets. After you do so 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. |
![]() |
Note: On EX8200 switches, only one classifier of a single type DSCP or IEEE 802.1p can be applied to an interface. |
Multifield Classifiers
Multifield 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 DiffServ code point (DSCP) or IP precedence support 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, a classifier performs matching operations on the selected fields against a configured value.