Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Understanding Applying CoS Classifiers and Rewrite Rules to Interfaces

 

At ingress interfaces, classifiers group incoming traffic into classes based on the DSCP or IEEE 802.1p class of service (CoS) code point bits in the packet header. At egress interfaces, you can use rewrite rules to change (re-mark) the code point bits before the interface forwards the packets. At ingress interfaces, classifiers group incoming traffic into classes based on the DSCP or IEEE 802.1p code point bits in the packet header. At egress interfaces, rewrite rules can change (re-mark) the code point bits before the interface forwards the packets.

You can apply classifiers and rewrite rules to interfaces to control the level of CoS applied to each packet as it traverses the system and the network. This topic describes:

Supported Classifier and Rewrite Rule Types

Table 1 shows the supported types of classifiers and rewrite rules:

Table 1: Supported Classifiers and Rewrite Rules

Classifier or Rewrite Rule Type

Description

Fixed classifier

Classifies all ingress traffic on a physical interface into one fixed forwarding class, regardless of the CoS bits in the packet header.

DSCP and DSCP IPv6 unicast classifiers

Classifies IP and IPv6 traffic into forwarding classes and assigns loss priorities to the traffic based on DSCP code point bits.

IEEE 802.1p unicast classifier

Classifies Ethernet traffic into forwarding classes and assigns loss priorities to the traffic based on IEEE 802.1p code point bits.

DSCP multidestination classifier (also used for IPv6 multidestination traffic)

Classifies IP and IPv6 multicast, broadcast, and destination lookup fail (DLF) traffic into multidestination forwarding classes. Multidestination classifiers are applied to all interfaces and cannot be applied to individual interfaces.

IEEE 802.1p multidestination classifier

Classifies Ethernet multicast, broadcast, and destination lookup fail (DLF) traffic into multidestination forwarding classes. Multidestination classifiers are applied to all interfaces and cannot be applied to individual interfaces.

DSCP and DSCP IPv6 rewrite rules

Re-marks the DSCP code points of IP and IPv6 packets before forwarding the packets.

IEEE 802.1p rewrite rule

Re-marks the IEEE 802.1p code points of Ethernet packets before forwarding the packets.

DSCP and IEEE 802.1p classifiers are behavior aggregate (BA) classifiers. Multidestination classifiers are global and apply to all interfaces; you cannot apply a multidestination classifier to individual interfaces.

Classifying packets into forwarding classes assigns packets to the output queues associated with the forwarding classes. Classifying traffic into a forwarding class associates the CoS scheduling for the forwarding class with that traffic.

Note

In addition to BA classifiers and fixed classifiers, which classify traffic based on the CoS field in the packet header, you can use firewall filters to configure 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 Supported for Classifier and Rewrite Rule Configuration

To apply a classifier to incoming traffic or a rewrite rule to outgoing traffic, you need to apply the classifier or rewrite rule to one or more interfaces. When you apply a classifier or rewrite rule to an interface, the interface uses the classifier to group incoming traffic into forwarding classes and uses the rewrite rule to re-mark the CoS code point value of each packet before it leaves the system.

Not all interface types support all types of CoS configuration. This section describes:

Classifier and Rewrite Rule Physical and Logical Interface Support

The ports can function as:

  • Layer 3 physical interfaces (family inet/inet6)

  • Layer 3 logical interfaces (family inet/inet6)

You can apply CoS classifiers and rewrite rules to Layer 3 physical interfaces if at least one logical Layer 3 interface is configured on the physical interface.

Note

The CoS you configure on a Layer 3 physical interface is applied to all of the Layer 3 logical interfaces on that physical interface. This means that each Layer 3 interface uses the same classifiers and rewrite rules for all of the Layer 3 traffic on that interface.

Table 2 shows on which interfaces you can configure and apply classifiers and rewrite rules. For Layer 3 LAGs, configure BA or fixed classifiers on the LAG (ae) interface. The classifier configured on the LAG is valid on all of the LAG member interfaces.

Table 2: Interface Support for Classifier and Rewrite Rule Configuration

CoS Classifiers and Rewrite Rules

Layer 3 Physical Interfaces (If at Least One Logical Layer 3 Interface Is Defined)

Layer 3 Logical Interfaces

Fixed classifier

Yes

Yes

DSCP classifier

Yes

Yes

DSCP IPv6 classifier

Yes

Yes

IEEE 802.1p classifier

Yes

Yes

DSCP rewrite rule

Yes

Yes

DSCP IPv6 rewrite rule

Yes

Yes

IEEE 802.1p rewrite rule

Yes

Yes

Note

DSCP mutidestination and IEEE 802.1p multidestination classifiers are applied to all interfaces and cannot be applied to individual interfaces. No DSCP IPv6 multidestination classifier is supported. IPv6 multidestination traffic uses the DSCP multidestination classifier.

Default Classifiers

If you do not explicitly configure classifiers on an interface, the switch applies default classifiers (see Understanding Default CoS Settings) so that the traffic receives basic CoS treatment. The system applies a default classifier using the following rules:

  • If the physical interface has at least one Layer 3 logical interface configured, it uses the default DSCP classifier.

  • If the physical interface has no logical interface configured, no default classifier is applied.

  • The default multidestination classifier is the IEEE 802.1p multidestination classifier.

Default Rewrite Rules

No default rewrite rules are applied to interfaces. If you want to re-mark packets at the egress interface, you must explicitly configure a rewrite rule.

Classifier Precedence

You can apply multiple unicast classifiers (MF, fixed, DSCP, or IEEE 802.1p) to a physical interface to handle different types of traffic. When you apply more than one classifier to an interface, the system uses an order of precedence to determine which classifier to use on interfaces:

The precedence of unicast classifiers on physical interfaces, from the highest-priority classifier to the lowest-priority classifier, is:

  • MF classifier (no classifier has a higher priority than MF classifiers)

  • Fixed classifier

  • DSCP or DSCP IPv6 classifier

  • IEEE 802.1p classifier

You can apply a DSCP classifier and an IEEE 802.1p classifier to a physical interface. When both classifiers are on an interface, IP traffic uses the DSCP classifier, and all other traffic uses the IEEE classifier.

Note

You cannot apply a fixed classifier and a DSCP or IEEE classifier to the same interface. If a DSCP classifier, an IEEE classifier, or both are on an interface, you cannot apply a fixed classifier to that interface unless you first delete the DSCP and IEEE classifiers. If a fixed classifier is on an interface, you cannot apply a DSCP classifier or an IEEE classifier unless you first delete the fixed classifier.

Classifier Behavior and Limitations

Consider the following behaviors and constraints when you apply classifiers to interfaces:

  • You can configure only one DSCP classifier (IP or IPv6) on a physical interface. You cannot configure both types of DSCP classifier on one physical interface. Both IP and IPv6 traffic use whichever DSCP classifier is configured on the interface.

  • When you configure a DSCP or a DSCP IPv6 classifier on a physical interface and the physical interface has at least one logical Layer 3 interface, all packets (IP, IPv6, and non-IP) use that classifier.

  • An interface with both a DSCP classifier (IP or IPv6) and an IEEE 802.1p classifier uses the DSCP classifier for IP and IPv6 packets, and uses the IEEE classifier for all other packets.

  • Fixed classifiers and BA classifiers (DSCP and IEEE classifiers) are not permitted simultaneously on an 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.

  • When you configure an IEEE 802.1p classifier on a physical interface and a DSCP classifier is not explicitly configured on that interface, the interface uses the IEEE classifier for all types of packets. No default DSCP classifier is applied to the interface. (In this case, if you want a DSCP classifier on the interface, you must explicitly configure it and apply it to the interface.)

  • The system does not apply a default classifier to a physical interface until you create a logical interface on that physical interface. If you configure a Layer 3 logical interface, the system uses the default DSCP classifier.

  • MF classifiers take precedence over BA and fixed classifiers. (Use firewall filters to configure MF classifiers.) When BA or fixed classifiers are present on an interface, you can still configure an MF classifier on that interface.

  • If no explicit classifier (IEEE-802.1 or DSCP or DSCP-IPv6) is configured on an L3 logical interface, a DSCP classifier default (dscp-default) and a DSCP-IPv6 classifier default (dscp-ipv6-default) are configured. All IPv4 traffic uses dscp-default, while IPv6 traffic uses dscp-ipv6-default classifiers for classification. Remaining traffic is classified to be fc=0 and dp=0.

  • When only IEEE802.1p is configured on an L3 logical interface, no dscp-default or dscp-ipv6-default classifiers are configured. All traffic uses IEEE 802.1p classifier for classification.

  • When only one of either a DSCP or DSCP-IPv6 classifier is configured, the default classifier for the other type (either dscp-default or dscp-ipv6-default) is automatically configured.

  • On an L3 logical interface, you cannot configure both a fixed classifier and a BA classifier. If a fixed classifier is configured first, then no BA classifier is allowed on that interface and vice versa.

  • L3 logical interface MF classification is configured with firewall filters and has highest precedence over both BA and fixed classifiers. MF classifiers can be configured even when a BA classifier or fixed classifier is already present on the L3 logical interface.

  • An interface can be simultaneously configured with an IEEE 802.1p classifier, a DSCP classifier, and a DSCP-IPv6 classifier. IP, IPv6, and any remaining traffic are all classified using DSCP, DSCP-IPv6 and 802.1p classifiers respectively.

  • When a classifier is bound to a LAG logical interface, the classifier is internally applied to all member interfaces on both L2 and L3 interfaces.

  • Multicast and unicast traffic are classified using the same classifier,

  • RVI interfaces do not support classifiers.

Rewrite Rule Precedence and Behavior

The following rules apply on interfaces for rewrite rules:

  • If you configure one DSCP (or DSCP IPv6) rewrite rule and one IEEE 802.1p rewrite rule on an interface, both rewrite rules take effect. Traffic with IP and IPv6 headers use the DSCP rewrite rule, and traffic with a VLAN tag uses the IEEE rewrite rule.

  • If you do not explicitly configure a rewrite rule, there is no default rewrite rule, so the system does not apply any rewrite rule to either the physical or logical interface.

  • You can apply either a DSCP rewrite rule or a DSCP IPv6 rewrite rule to any physical interface, but you cannot apply both a DSCP and a DSCP IPv6 rewrite rule to the same physical interface. Both IP and IPv6 packets use the same DSCP rewrite rule, regardless of whether the configured rewrite rule is DSCP or DSCP IPv6.

  • You can apply both a DSCP rewrite rule and a DSCP IPv6 rewrite rule to a logical interface. IPv6 packets are rewritten with DSCP-IPv6 rewrite-rules and IPv4 packets are remarked with DSCP rewrite-rules.

  • Rewrite-rules on RVI are not supported.

  • When rewrite-rules are bound to LAG logical interfaces, the rewrite-rules are internally applied on all the member interfaces. The same rules apply to LAGs in L2 logical interfaces and L3 logical interfaces.