MTU
SR Linux supports four types of MTU parameters:
The following sections outline each MTU parameter and their respective functions in SR Linux.
Port MRU
The maximum receive unit (MRU) of a port is the maximum size of an Ethernet frame, measured in bytes, that can be received on the port. The MRU includes the Ethernet header (MAC SA, MAC DA, ethertype, VLAN tags) and does not include the 4-byte CRC and the physical layer overhead (preamble and SFD). Received packets that exceed the port MRU are dropped and counted in the in-error-packets statistic. They are also counted in in-packets and in-octets by a control plane aggregation process.
The default and non-configurable MRU on IXR-based switches is 10 000 bytes.
On 7220 IXR platforms, the port MRU is always equal to the configured port MTU. The forwarding chip does not have a separate MRU register.
Port MTU
The maximum transmission unit (MTU) of a port is the maximum size of an Ethernet frame, measured in bytes, that can be transmitted from the port. The MTU includes the Ethernet header (MAC SA, MAC DA, ethertype, VLAN tags) and does not include the 4-byte CRC and the physical layer overhead (preamble and SFD). Packets scheduled for transmission that exceed the port MTU and do not exceed an IP MTU are dropped and not counted.
For Ethernet-X ports, the MTU value is taken from the system mtu default-port-mtu configuration. If there is no configuration under the system mtu default-port-mtu context, the default value is set to 9232 bytes.
For mgmt0 and mgmt0-standby ports, the default is 1514 bytes, but you can change the value for each port individually in the interface mtu command context.
Port MTU is not configurable for system0 and loN (loopback) interfaces.
7250 IXR linecards support a maximum of eight different port MTU values. When eight different port MTU values are configured on a linecard and an additional port MTU value configuration is attempted, the associated port goes down and a comment is automatically added to the info from running output with the port oper-down-reason being port-mtu-resource-exceeded. To bring up the downed port, use the following steps:
- Free up at least one MTU resource that is already consumed.
- Commit the change.
- On the port that needs the MTU resource, change the admin-state of the port to enable.
The 7220 IXR and 7730 SXR platforms do not have limits on the maximum number of different port MTU values supported.
IP MTU
The IP MTU of a routed subinterface is the maximum size of an IPv4 or IPv6 packet, measured in bytes, that can be transmitted from the subinterface. It includes the IP header but does not include the Ethernet header. SR Linux does not support fragmentation of IPv4 packets, even those for which fragmentation is allowed, and packets that exceed the IP MTU are dropped.
For subinterfaces of Ethernet-X ports, the default value is taken from system mtu default-ip-mtu. If there is no configuration under the system mtu default-ip-mtu context, the default value is set to 1500 bytes.
IP MTU configuration is not supported for subinterfaces of system0 and loN (loopback) ports. For subinterfaces of the mgmt0 port, the default IP MTU is 1500 bytes, but you can change this in the interface subinterface ip-mtu command context.
Each 7250 IXR IMM supports a maximum of four different IP MTU values (including the default). When four different port MTU values are configured on a linecard and an additional IP MTU value configuration is attempted, the associated subinterface goes down and a comment is automatically added to the info from running output with the subinterface oper-down-reason being ip-mtu-resource-exceeded.
The 7220 IXR and 7730 SXR platforms do not have limits on the maximum number of different IP MTU values supported.
If the IP MTU value of a subinterface and the Ethernet including VLAN overhead value exceeds the port MTU of the associated port, the subinterface goes down with the oper-down-reason being ip-mtu-too-large. In addition, the info from running output displays the ### Subinterface MTU too large for interface MTU message.
IPv4 fragmentable packets that exceed the IP MTU are dropped and counted as out-error-packets on 7250 IXR Gen 2 platforms and as in-discarded-packets on 7220 IXR-Dx platforms, except on the 7220 IXR-D4 and 7220 IXR-D5. All other IPv4 and IPv6 packets that are not fragmentable and that exceed the IP MTU are dropped without counting. These packets generate the appropriate ICMP error messages.
MPLS MTU
The MPLS MTU defines the maximum size of an MPLS packet, including the size of the transmitted label stack (4 bytes × number of label stack entries), that is allowed to be transmitted out of a routed subinterface. If an MPLS packet containing any payload exceeds the MPLS MTU, it is not forwarded and is instead extracted to the CPM for ICMP error message generation. Once the extracted packet reaches the CPM, the xdp-cpm skips all MPLS labels until the BOS is found and looks for an IP header to use for the packet-too-big ICMP error message generation. The generated ICMP message contains the following information:
- The destination IP address copied from the source IP address found in the extracted IP header.
- The source IP address is the incoming interface primary IP address (if the incoming interface index is provided by PD), or the loopback/system IP of the default network instance.
The transmission of the generated packet-too-big ICMP message depends on the icmp-tunneling configuration. If icmp-tunneling is configured to true, the error message is injected in the forward direction of the LSP by resetting all MPLS TTL values to 255 and performing an ILM lookup on the top label. If icmp-tunneling is configured to false, the error message is routed back to source based on route lookup in the default network instance.
In the packet-too-big ICMP message, the encoded MTU is based on the highest possible IP MTU that is still supported by the MPLS MTU. This is calculated by subtracting the size of the transmitted label stack that was extracted to the CPM from the MPLS MTU of the egress subinterface.