The SR Linux supports policies for assigning traffic to forwarding classes or remarking traffic at egress before it leaves the router. DSCP classifier policies map incoming packets to the appropriate forwarding classes, and DSCP rewrite-rule policies mark outgoing packets with an appropriate DSCP value based on the forwarding class.
![]() | Note: Differences in how QoS functions on 7250 IXR systems compared with 7220 IXR-D2 and D3 systems are noted where applicable. Functionality is not supported on the 7220-D1. |
The following describes how transit unicast packets flow through the SR Linux with a 7250 IXR chassis-based system:
DSCP values | Included DSCP names | Forwarding class |
0 to 7 | CS0/BE | fc0 |
8 to 15 | CS1, AF11 to 13 | fc1 |
16 to 23 | CS2, AF21 to 23 | fc2 |
24 to 31 | CS3, AF31 to 33 | fc3 |
32 to 39 | CS4, AF41 to 43 | fc4 |
40 to 47 | CS5, EF | fc5 |
48 to 55 | CS6/NC1 | fc6 |
56 to 63 | CS7/NC2 | fc7 |
![]() | Note: On ingress VLAN ports, VLAN priority is ignored. If the egress interface is a VLAN-enabled interface, the Priority Code Point (PCP) bits are reset to 0. ECN bits are preserved |
For IPv4/IPv6 packets originated on a 7250 IXR chassis-based system, QoS works as follows:
The DSCP field in the outgoing IPv4/IPv6 packet header is written or modified as listed in Section 14.1.7, Table 12. For router-originated traffic, the values in this table override any rewrite-rule policy applied to the output subinterface.
For IPv4/IPv6 packets terminated on a 7250 IXR chassis-based system, QoS works as follows:
The following describes how transit packets flow through on a 7220 IXR-D2 and D3 system:
![]() | Note: There is no separate DSCP classifier for IPv4 and IPv6 with the 7220 IXR-D2 and D3. There is one policy applied for both IPv4 and IPv6 packets. |
Traffic flow | Packet type | Forwarding class assignment |
bridged -> bridged switched at L2 | IP |
|
bridged -> bridged switched at L2 | non-IP |
|
bridged -> routed through IRB | IP |
|
routed -> routed | IP |
|
For IPv4/IPv6 packets originated on a 7220 IXR-D2 and D3 system, QoS works as follows:
For packets terminated on a 7220 IXR-D2 and D3 based system, a packet is received on a subinterface and determined to need extraction towards the CPM. The packet is directed to one of the 48 queues associated with the CPM as a destination 'physical port' based on its protocol or type.
The 7220 IXR-D2 and D3 have a 4MB CPU queue buffer that is shared across all CPU queues for CPU-terminated traffic.
Self-generated traffic is classified and marked based on the hard-coded mapping rules
Protocol / message type | Forwarding class | DSCP marking |
IPv4 ARP request/reply | 6 | N/A |
ICMPv4 including echo-request1, echo- reply2, dest-unreachable, redirect, time-exceeded, parameter-problem | 0 | 0 |
ICMPv4 echo-request with ToS/DSCP override = X | (lookup X in system-default DSCP classifier) | X |
ICMPv4 echo-reply to echo-request with non-zero DSCP X | (lookup X in system-default DSCP classifier) | X |
UDP traceroute | 0 | 0 |
IPv6 neighbor solicitation | 6 | 48 (CS6/NC1) |
IPv6 neighbor advertisement | 6 | 48 (CS6/NC1) |
All other ICMPv6 including dest unreachable, packet-too-big, time- exceeded, parameter-problem, echo-request, echo-reply, router-solicitation, redirect | 0 | 0 |
ICMPv6 echo-request with DSCP override = X | (lookup X in system-default DSCP classifier) | X |
ICMPv6 echo-reply to echo-request with non-zero DSCP X | (lookup X in system-default DSCP classifier) | X |
BFD | 6 | 48 (CS6/NC1) |
BGP | 6 | 48 (CS6/NC1) |
DNS query | 4 | 34 (AF41) |
FTP/TFTP | 4 | 34 (AF41) |
gNMI | 4 | 34 (AF41) |
JSON RPC | 4 | 34 (AF41) |
LLDP | N/A | N/A |
NTP | 4 | 34 (AF41) |
sFlow | 0 | 0 |
SNMP | 4 | 34 (AF41) |
SSH | 4 | 34 (AF41) |
Syslog | 4 | 34 (AF41) |
TACACS+ | 4 | 34 (AF41) |
1 Echo-request generated by a ping command with no DSCP parameter specified 2 Echo-reply to an echo-request packet with DSCP=0 |
QoS configuration on the SR Linux consists of creating classifier policies for incoming packets, rewrite-rule policies for outgoing packets, and applying the policies to subinterfaces in the inbound or outbound direction.
When a 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; otherwise, the assigned forwarding class is 0.
Example:
The following example specifies a classifier policy:
When a rewrite-rule policy is applied to a subinterface, the policy attempts to match the forwarding class of outbound packets to one of its entries. If there is a match, the DSCP value of the outbound packet is changed to the value specified by the policy. If the forwarding class does not match the rewrite-rule policy, the DSCP value is changed to 0.
Example:
The following example specifies a rewrite-rule policy:
If you apply a classifier policy to input traffic on a subinterface, incoming packets are evaluated against the policy, and matching packets are assigned to the forwarding class 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.
![]() | Note: On 7220 IXR-D2 and D3 systems, separate classifier policies for IPv4 and IPv6 traffic are not supported, but you can apply a common policy that applies to both IPv4 and IPv6 traffic. |
The following example applies a classifier policy to inbound IPv6 traffic on a subinterface with a 7250 IXR chassis:
Example (7250 IXR):
The following example applies a classifier policy to inbound traffic on a subinterface with a 7220 IXR-D2 and D3:
Example (7220 IXR-D2 and D3):
When a rewrite-rule policy is applied to output traffic on a subinterface, outbound packets are evaluated against the policy. For packets matching the policy, the DSCP value is changed to the value specified by the policy. If no rewrite-rule policy is applied to the subinterface, the DSCP value is left unchanged.
![]() | Note: The DSCP rewrite policy that applies to ingress IPv4 and IPv6 packets on the subinterface is not supported on 7220 IXR-D2 and D3 systems. |
The following example applies a rewrite-rule policy to outbound IPv4 traffic on a subinterface with a 7250 IXR chassis:
Example (7250 IXR):
The following example applies a rewrite-rule policy to outbound traffic on a subinterface with a 7220 IXR-D2 and D3:
Example (7220 IXR-D2 and D3):
You can configure the queues for outbound traffic on an interface as either strict priority (SP), weighted round robin (WRR), or mixed mode (SP + WRR). Queues configured as SP are served in priority order from highest forwarding class to lowest before any of the WRR queues.
After the SP queues are served, the WRR queues use the remaining bandwidth according to their configured weights. By default, the output queues on each interface have a weight of 1.
Examples:
The following example configures a the unicast output queue on an interface to be strict priority. This queue is served prior to those configured as WRR. Note that when strict priority is set to false, the queue is configured as WRR. When strict priority is set to true, any configured weight is ignored.
The following example configures weight for the unicast output queue on an interface. After the strict priority queues are served, the other queues use the remaining bandwidth according to the configured weights. Queues that are not configured with a specific weight have a weight of 1.
The following example sets the maximum percentage of port bandwidth that is available to traffic in the unicast output queue. By default traffic in the unicast output queue can use up to 100% of port bandwidth.
Buffer utilization differs between the 7250 IXR and the 7220 IXR-D2 and D3. The 7250 IXR utilizes high bandwidth memory (HBM) and VOQ, while the 7220 IXR-D2 and D3 do not. See Table 13.
Hardware | Buffer memory |
7250 IXR |
|
7220 IXR-D2 and D3 |
|
The following example shows overall buffer usage. Depending on the hardware deployed, the output will vary.
The following shows output for a 7250 IXR:
The following shows output for a 7220 IXR-D2 and D3:
Use the info from state command to display information about traffic subject to classifier and rewrite-rule policies.
Examples:
The following example shows information about traffic subject to a specified classifier policy:
The following example shows information about traffic subject to a specified rewrite-rule policy.
The following example shows information for a specified subinterface:
To display traffic statistics for each output queue on an interface, use the show interface <id> queue-statistics command in running or candidate mode, or the interface port detail command in show mode.
Example:
The following example displays output queue statistics for an interface:
You can reset the queue statistics counters for an interface.
Example:
The following example resets statistics counters for a specified egress queue (multicast) on an interface:
A QoS profile resource refers to the number of classifier and rewrite policies that are applied to interfaces on a line card. Each classifier or rewrite policy that is applied to an interface on a line card counts as one profile resource used.
For example, if you create classifier policy dscp1 and apply it to input IPv4 traffic on an interface, and apply the same dscp1 policy to input IPv6 traffic on a different interface on the same line card, it counts as two classifier profile resources used.
The SR Linux supports up to 15 classifier profile resources and up to 32 rewrite profile resources per line card. You can display the number of QoS profile resources in use for each line card.
Example:
The following example displays the number of used and free classifier and rewrite profile resources for a line card: