DSCP classifier policy configuration for input traffic

When a DSCP classifier policy is applied to a subinterface, the policy attempts to match the 6-bit DSCP value in the IP header of incoming packets to one of its entries. If there is a match, the incoming packet is assigned to the specified forwarding class and drop probability; otherwise, the assigned forwarding class is 0 and the assigned drop probability is low.

Packets that require a similar treatment (per-hop behavior) are grouped into an FC, also known as a behavior aggregate. 7220 IXR and 7250 IXR platforms differentiate up to eight forwarding classes.

The drop probability can be one of high, medium, or low. If a queue management profile with different WRED slopes is bound to a queue, then packets in that queue with a high drop probability are the first to be dropped when the queue experiences congestion, followed by packets with a medium drop probability, then by packets with a low drop probability. The default is low.

Configuring DSCP classifier policies

To reference a forwarding-class in any QoS policy, the forwarding-class must first be explicitly mapped to an output queue. For information about mapping the named forwarding classes to named queues, see Named queues and forwarding classes.

To configure a DSCP classifier policy, set custom forwarding-class and drop-probability values to apply to one or more incoming DSCP values using the qos classifiers dscp-policy command.

The following example creates a DSCP classifier policy:

--{ candidate shared default }--[  ]--
# info qos classifiers
    qos {
        classifiers {
            dscp-policy new-policy {
                dscp 0 {
                    forwarding-class forwarding-class-0
                    drop-probability high
                }
                dscp 8 {
                    forwarding-class forwarding-class-1
                    drop-probability high
                }
            }
        }
    }
Note: To create a new DSCP classification policy based on the default policy, you can copy the default policy from state in candidate mode, as shown in the following example:
# copy from state /qos classifiers dscp-policy default to /qos classifiers dscp-policy test

Using a DSCP classifier for VXLAN traffic

On 7720 IXR systems, you can use a classifier policy to classify ingress packets received from any remote VXLAN VTEP. The policy applies to payload packets after VXLAN decapsulation is performed.

To apply a DSCP classifier to all VXLAN traffic, specify a configured DSCP policy under the qos classifiers vxlan-default context.

The following example shows how the DSCP classifier policy created in the previous example (new‑policy) can be applied for VXLAN traffic:

--{ candidate shared default }--[  ]--
# info qos classifiers
    qos {
        classifiers {
            vxlan-default new-policy
        }
    }

DSCP classifier policy application to subinterfaces

If you apply a DSCP classifier policy to input traffic on a subinterface, incoming packets are evaluated against the policy, and matching packets are assigned to the forwarding class and drop probability specified by the policy. If no classifier policy is applied to the subinterface, the system default DSCP classifier (with the reserved name default) is used.

Applying a DSCP classifier policy to input traffic (7250 IXR)

On the 7250 IXR, to apply a DSCP classifier to input traffic on a subinterface, specify an IPv4 or IPv6 DSCP policy (or both) using the qos interfaces interface input classifiers command.

The following example applies DSCP classifier policies to inbound IPv4 and IPv6 traffic on a subinterface of a 7250 IXR system:

Apply a DSCP classifier to input traffic (7250 IXR)

--{ candidate shared default }--[  ]--
# info qos interfaces interface ethernet-1/1
    qos {
        interfaces {
            interface ethernet-1/1 {
                interface-ref {
                    interface ethernet-1/1
                    subinterface 1 
                }
                input {
                    classifiers {
                        ipv4-dscp-policy new-v4-policy
                        ipv6-dscp-policy new-v6-policy
                        }
                    }
                }
            }
        }
    }

Applying a DSCP classifier policy to input traffic (7220 IXR)

On the 7220 IXR, to apply a DSCP classifier to input traffic on a subinterface, specify a DSCP policy using the qos interfaces interface input classifiers command.

Note: The 7220 IXR systems do not support separate classifier policies for IPv4 and IPv6 traffic, but you can apply a common policy that applies to both IPv4 and IPv6 traffic.

The following example applies a DSCP classifier policy to inbound traffic on a subinterface of a 7220 IXR system:

Apply a DSCP classifier to input traffic (7220 IXR)

# info qos interfaces interface ethernet-1/1
    qos {
        interfaces {
            interface ethernet-1/1 {
                interface-ref {
                    interface ethernet-1/1
                    subinterface 1
                }
                input {
                    classifiers {
                        dscp-policy new-v4-v6-policy
                        }
                    }
                }
            }
        }
    }