Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding CoS Packet Flow
- Understanding Default CoS Settings
- Understanding Applying CoS Classifiers and Rewrite Rules to Interfaces
- Example: Configuring Unicast Classifiers
- Example: Configuring Multidestination (Multicast, Broadcast, DLF) Classifiers
- Defining CoS Unicast BA Classifiers (DSCP, DSCP IPv6, IEEE 802.1p)
- Defining CoS Multidestination (Multicast, Broadcast, DLF) BA Classifiers
- QFX Series standalone switches
- Understanding CoS MPLS EXP Classifiers and Rewrite Rules
- Configuring a Global MPLS EXP Classifier
- Configuring Rewrite Rules for MPLS EXP Classifiers
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 a loss priority, and assign packets to output queues based on the associated forwarding class. There are three general types of classifiers:
- Behavior aggregate (BA) classifiers—DSCP and DSCP IPv6 classify IP and IPv6 traffic, EXP classifies MPLS traffic, and IEEE 802.1p classifiers classify all other traffic. (Although this topic covers EXP classifiers, for more details about EXP classifiers, see Understanding CoS MPLS EXP Classifiers and Rewrite Rules. EXP classifiers are applied only on 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 packet header.
- Multifield (MF) classifiers—MF classifiers classify traffic based on more than one field in the packet header and take precedence over BA and fixed classifiers.
Interfaces and Output Queues
On Gigabit Ethernet interfaces, 10-Gigabit Ethernet interfaces, and link aggregation (LAG) interfaces, you can apply classifiers to Layer 2 logical interfaces and to Layer 3 physical interfaces if the Layer 3 physical interface has at least one defined logical interface. Classifiers applied to Layer 3 physical interfaces are used on all logical interfaces on that physical interface. Understanding Applying CoS Classifiers and Rewrite Rules to Interfaces describes the interaction between classifiers and interfaces in greater detail.
You can configure both a BA classifier and an MF classifier on an interface. If you do this, the BA classification is performed first and then the MF classification is performed. If the two classification results conflict, the MF classification result overrides the BA classification result.
You cannot configure a fixed classifier and a BA classifier on the same interface.
You can configure both a DSCP or a DSCP IPv6 classifier and an IEEE 802.1p classifier on the same interface. IP traffic uses the DSCP or DSCP IPv6 classifier. All other traffic uses the IEEE classifier (except when you configure a global EXP classifier; in that case, MPLS traffic uses the EXP classifier providing that the interface is configured as family mpls). You can configure only one DSCP classifier on a physical interface (either one DSCP classifier or one DSCP IPv6 classifier, but not both).
Although you can configure as many EXP classifiers as you want, the switch uses only one MPLS EXP classifier as a global classifier on all interfaces. After you configure an MPLS EXP classifier, you can configure it as the global EXP classifier by including the EXP classifier in the [edit class-of-service system-defaults classifiers exp] hierarchy. All switch interfaces that are configured as family mpls use the EXP classifier specified using this configuration statement to classify MPLS traffic.
You can create unicast BA classifiers for unicast traffic and multicast BA classifiers for multidestination traffic, which includes multicast, broadcast, and destination lookup fail (DLF) traffic. You cannot assign unicast traffic and multidestination traffic to the same BA classifier.
On each interface, the switch has separate output queues for unicast traffic and for multidestination traffic:
- The switch supports 12 output queues, with 8 queues dedicated to unicast traffic and 4 queues dedicated to multidestination traffic.
- Queues 0 through 7 are unicast traffic queues. You can apply only unicast BA classifiers to unicast queues. A unicast BA classifier should contain only forwarding classes that are mapped to unicast queues.
- Queues 8 through 11 are multidestination traffic queues. You can apply only multidestination BA classifiers to multidestination queues. A multidestination BA classifier should contain only forwarding classes that are mapped to multidestination queues.
You can apply unicast classifiers to one or more interfaces. Multidestination classifiers and EXP classifiers apply to all of the switch interfaces and cannot be applied to individual interfaces. Use the DSCP multidestination classifier for both IP and IPv6 multidestination traffic. The DSCP IPv6 classifier is not supported for multidestination traffic.
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. A scheduler uses the loss priority to control packet discard during periods of congestion by associating different drop profiles with different loss priorities.
The switch supports three types of BA classifiers:
- Differentiated Services Code Point (DSCP) for IP DiffServ (IP and IPv6)
- IEEE 802.1p CoS bits
- MPLS EXP (applies only to interfaces configured as family mpls)
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.
Unicast and multicast traffic cannot share the same classifier. You can map unicast traffic and multicast traffic to the same classifier CoS value, but the unicast traffic must belong to a unicast classifier and the multicast traffic must belong to a multidestination classifier.
Default Behavior Aggregate Classification
Juniper Networks Junos OS 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 BA classifiers.
Table 1: Default BA Classification
Type of Interface | Default BA Classification |
---|---|
Layer 2 interface in trunk mode or in tagged-access mode | ieee8021p-default |
Layer 3 interface | dscp-default |
Layer 2 interface in access mode | ieee8021p-untrusted |
![]() | Note: There are default BA classifiers for the best-effort, fcoe, no-loss, network-control, and mcast forwarding classes. |
![]() | Note: There is no default MPLS EXP classifier. You must configure an EXP classifier and apply it globally to all interfaces that are configured as family mpls by including it in the [edit class-of-service system-defaults classifiers exp] hierarchy. On family mpls interfaces, if a fixed classifier is present on the interface, the EXP classifier overrides the fixed classifier. If an EXP classifier is not configured, then if a fixed classifier is applied to the interface, the MPLS traffic uses the fixed classifier. If no EXP classifier and no fixed classifier is applied to the interface, MPLS traffic is treated as best-effort traffic. DSCP classifiers are not applied to MPLS traffic. Because the EXP classifier is global, you cannot configure some ports to use a fixed IEEE 802.1p classifier for MPLS traffic on some interfaces and the global EXP classifier for MPLS traffic on other interfaces. When you configure a global EXP classifier, all MPLS traffic on all interfaces uses the EXP classifier, even interfaces that have a fixed classifier. |
When you explicitly associate a unicast classifier with a logical interface, you override the default unicast classifier with the explicit unicast classifier.
![]() | Note: You can apply only one classifier of each type, DSCP and IEEE 802.1p, to a Layer 2 interface. If both types of classifiers are present, DSCP classifiers take precedence over IEEE 802.1p classifiers. (If you also configure a global EXP classifier, only MPLS traffic on interfaces configured as family mpls uses the EXP classifier, and other traffic uses the configured or default classifier for that traffic type.) |
Importing a Classifier
You can use any existing classifier, including the default classifiers, as the basis for defining a new classifier. You accomplish this using the import statement.
The imported classifier is used as a template and is not modified. The modifications you make become part of a new classifier (and a new template) identified by the name of the new classifier. Whenever you commit a configuration that assigns a new class-name and loss-priority value to a code-point alias or set of bits, it replaces that entry in the new classifier template. As a result, you must explicitly specify every CoS value in every designation that requires modification.
Multidestination Classifiers
Multidestination classifiers are applied to all interfaces and cannot be applied to individual interfaces. You can configure both a DSCP multidestination classifier and an IEEE multidestination classifer. IP and IPv6 traffic use the DSCP classifier, and all other traffic uses the IEEE classifier.
DSCP IPv6 multidestination classifiers are not supported, so IPv6 traffic uses the DSCP multidestination classifier.
The default multidestination classifier is the IEEE 802.1p multidestination classifier.
PFC Priorities
The eight IEEE 802.1p code points correspond to the eight priorities that priority-based flow control (PFC) uses to differentiate traffic classes for lossless transport. When you map a forwarding class (which maps to an output queue) to an IEEE 802.1p CoS value, the IEEE 802.1p CoS value identifies the priority.
Although you can map a priority to any output queue (by mapping the priority to a forwarding class), we recommend that the priority and the unicast forwarding class match in a one-to-one correspondence in which priority 0 is assigned to queue 0, priority 1 is assigned to queue 1, and so on, as shown in Table 2. A one-to-one correspondence of queue and priority numbers makes it easier to configure and maintain the mapping of forwarding classes to priorities and queues.
Table 2: Default IEEE 802.1p Code Point to PFC Priority, Output Queue, and Forwarding Class Mapping
IEEE 802.1p Code Point | PFC Priority | Unicast Output Queue | Forwarding Class and Packet Drop Attribute |
---|---|---|---|
000 | 0 | 0 | best-effort (drop) |
001 | 1 | 1 | best-effort (drop) |
010 | 2 | 2 | best-effort (drop) |
011 | 3 | 3 | fcoe (no-loss) |
100 | 4 | 4 | no-loss (no-loss) |
101 | 5 | 5 | best-effort (drop) |
110 | 6 | 6 | network-control (drop) |
111 | 7 | 7 | network-control (drop) |
![]() | Note: By convention, deployments with converged server access typically use IEEE 802.1p priority 3 (011) for FCoE traffic. The default mapping of the fcoe forwarding class is to queue 3. Apply priority-based flow control (PFC) to the entire FCoE data path to configure the end-to-end lossless behavior that FCoE requires. We recommend that you use priority 3 for FCoE traffic unless your network architecture requires that you use a different priority. |
Fixed Classifiers on Ethernet Interfaces
Fixed classifiers map all traffic on an interface to a forwarding class and a loss priority. (As opposed to BA classifiers, which map traffic into multiple different forwarding classes based on the CoS field value in the packet header.) The forwarding class determines the output queue. Incoming traffic of all IEEE 802.1p priorities is classified into the forwarding class specified in the fixed classifier. A scheduler uses the loss priority to control packet discard during periods of congestion by associating different drop profiles with different loss priorities.
You cannot configure a fixed classifier and a DSCP or IEEE 802.1p BA classifier on the same interface. If you configure a fixed classifier on an interface, you cannot configure a DSCP or an IEEE classifier on that interface. If you configure a DSCP classifier, an IEEE classifier, or both classifiers on an interface, you cannot configure a fixed classifier on that interface.
![]() | Note: Because EXP classifiers are global, you can configure both a global EXP classifier and also apply fixed classifiers on interfaces. When both the global EXP classifier and a fixed classifier are applied to an interface, MPLS traffic on interfaces configured as family mpls uses the EXP classifier and all other traffic uses the fixed classifier. |
To switch from a fixed classifier to a BA classifier or to switch from a BA classifier to a fixed classifier, deactivate the existing classifier attachment on the interface, and then attach the new classifier to the interface.
![]() | Note: If you configure a fixed classifier that classifies all incoming traffic into the fcoe forwarding class (or any forwarding class designed to handle FCoE traffic), you must ensure that all traffic that enters the interface is FCoE traffic and is tagged with the FCoE IEEE 802.1p code point (priority). |
Fixed Classifiers on Native Fibre Channel Interfaces (NP_Ports)
Applying a fixed classifier to a native Fibre Channel (FC) interface (NP_Port) is a special case. By default, native FC interfaces classify incoming traffic from the FC SAN into the fcoe forwarding class and map the traffic to IEEE 802.1p priority 3 (code point 011). When you apply a fixed classifier to an FC interface, you also configure a priority rewrite value for the interface. The FC interface uses the priority rewrite value as the IEEE 802.1p tag value for all incoming packets instead of the default value of 3.
For example, if you specify a priority rewrite value of 5 (code point 101) for an FC interface, the interface tags all incoming traffic from the FC SAN with priority 5 and classifies the traffic into the forwarding class specified in the fixed classifier.
![]() | Note: The forwarding class specified in the fixed classifier on FC interfaces must be a lossless forwarding class. |
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) support in end-user applications. On a switch at the edge of a network, 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.
Packet Classification for Routed VLAN Interfaces (RVIs)
You cannot apply classifiers directly to routed VLAN interfaces (RVIs) because the members of RVIs are VLANs, not ports. However, you can apply classifiers to the VLAN port members of an RVI. You can also apply MF classifiers to RVIs.
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding CoS Packet Flow
- Understanding Default CoS Settings
- Understanding Applying CoS Classifiers and Rewrite Rules to Interfaces
- Example: Configuring Unicast Classifiers
- Example: Configuring Multidestination (Multicast, Broadcast, DLF) Classifiers
- Defining CoS Unicast BA Classifiers (DSCP, DSCP IPv6, IEEE 802.1p)
- Defining CoS Multidestination (Multicast, Broadcast, DLF) BA Classifiers
- QFX Series standalone switches
- Understanding CoS MPLS EXP Classifiers and Rewrite Rules
- Configuring a Global MPLS EXP Classifier
- Configuring Rewrite Rules for MPLS EXP Classifiers
Published: 2014-07-23
Supported Platforms
Related Documentation
- QFabric System, QFX Series standalone switches
- Understanding CoS Packet Flow
- Understanding Default CoS Settings
- Understanding Applying CoS Classifiers and Rewrite Rules to Interfaces
- Example: Configuring Unicast Classifiers
- Example: Configuring Multidestination (Multicast, Broadcast, DLF) Classifiers
- Defining CoS Unicast BA Classifiers (DSCP, DSCP IPv6, IEEE 802.1p)
- Defining CoS Multidestination (Multicast, Broadcast, DLF) BA Classifiers
- QFX Series standalone switches
- Understanding CoS MPLS EXP Classifiers and Rewrite Rules
- Configuring a Global MPLS EXP Classifier
- Configuring Rewrite Rules for MPLS EXP Classifiers