Chapter 17. Configure MTU Settings

17.1. MTU overview

In Red Hat Enterprise Linux OpenStack Platform 7 (kilo), OpenStack Networking has the ability to advertise MTU size to instances, similar to how you might allocate settings out of DHCP. MTU values specify the maximum amount of data a single network packet is able to transfer. This number is variable depending on the most appropriate usage for the application. For example, NFS shares might require a different MTU size to that of a VoIP application.

Note

For Red Hat Enterprise Linux OpenStack Platform 7 (kilo), the supported feature is advertisement of MTU settings over DHCP. You can also use the ‘neutron net-show’ command to see the results of MTU calculation.

MTU settings need to be set consistently from end-to-end in order to work properly. This means that the MTU setting needs to be the same size at every point the packet passes through, including the VM itself, the virtual network infrastructure, the physical network, and the destination server itself.

For example, the red dots in the following diagram indicate the various points where an MTU value would need to be adjusted for traffic between an instance and a physical server. Every interface that handles network traffic will need to have its MTU value changed to accommodate packets of a particular MTU size. This will be required if traffic is expected to travel from the instance 192.168.200.15 through to the physical server 10.20.15.25:

MTU settings

Inconsistent MTU values can result in several network issues, the most common being random packet loss that results in connection drops and slow network performance. Such issues are problematic to troubleshoot, since every possible network point needs to be identified and examined to ensure it has the correct MTU value set.

17.1.1. Configure MTU advertisement

MTU advertisement eases the MTU configuration process by moving MTU settings into the realm of automated DHCP configuration and/or IPv6 RA configuration. As a result, the optimal MTU size is then advertised to instances using DHCPv4 or IPv6 RA.

MTU advertisement is enabled in /etc/neutron/neutron.conf:

advertise_mtu = True

Note that this option is enabled by default in Mitaka, has been deprecated in Newton, and is likely to be removed in a future release. When set, the tenant network’s configured MTU option is advertised to instances using DHCPv4 and IPv6 RAs.

Note

Not all DHCPv4 clients support the automatic configuration of MTU values.

17.2. Configure tenant networks

Specific MTU values can be assigned to tenant networks, which are then distribute to instances using DHCP. Adjust the MTU settings for individual tenant networks in /etc/neutron/plugins/ml2/ml2_conf.ini:

Note: MTU settings are currently not applied at an individual level for VXLAN/GRE networks.

  • path_mtu - This option applies to Layer 3 (routed) traffic, and configures the maximum size a network packet can be. OpenStack Networking references this value to calculate the maximum possible MTU value for tenant networks. These values are calculated by considering the network type:

    • Flat/VLAN: Minimum of (segment_mtu or physical_network_mtus)
    • GRE: Minimum of (segment_mtu, path_mtu) minus (GRE_ENCAP_OVERHEAD which is 42 bytes)
    • VXLAN: Minimum of (segment_mtu, path_mtu) minus (VXLAN_ENCAP_OVERHEAD which is 50 bytes)

The path_mtu setting is a single integer value applied to the L3 mechanism driver. For example:

openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 path_mtu 1450
  • segment_mtu - The option applies to Layer 2 (switched) traffic, and sets the maximum size a layer 2 network packet (also known as a frame) can be before fragmentation occurs.

The segment_mtu setting is a single integer value applied to the L3 mechanism driver. For example:

openstack-config --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 segment_mtu 1475
  • physical_network_mtus - This value maps physical networks to their configured MTU value. Use this setting to apply a custom MTU value to the external and provider networks. For example:
physical_network_mtus = physnet1:1550, physnet2:1500

17.3. Review the updated settings

Verify the existing network mtu value using the neutron command:

# neutron net-show <network>