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. The SR Linux differentiates up to eight forwarding classes.

The drop probability can be one of high, medium, or low. If a queue-template 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 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 fc0
                    drop-probability high
                }
                dscp 8 {
                    forwarding-class fc1
                    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 a 7720 IXR-D2/D2L, D3/D3L, D4, and D5 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 used 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 input classifiers command.

The following example applies a DSCP classifier policy to inbound IPv6 traffic on a subinterface with a 7250 IXR system:

--{ candidate shared default }--[  ]--
# info interface ethernet-1/1
    interface ethernet-1/1 {
        subinterface 1 {
            qos {
                input {
                    classifiers {
                        ipv6-dscp-policy new-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 input classifiers command.

Note: The 7220 IXR-D2/D2L, D3/D3L, D4, and D5 and 7220 IXR-H2, H3, and H4 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 with a 7220 IXR-D2/D2L, D3/D3L, D4, and D5 or 7220 IXR-H2, H3, and H4 system:

--{ candidate shared default }--[  ]--
# info interface ethernet-1/1
    interface ethernet-1/1 {
        subinterface 1 {
            qos {
                input {
                    classifiers {
                        dscp-policy new-policy
                    }
                }
            }
        }
    }