MTU configuration for instances

shubjero shubjero at gmail.com
Mon Sep 13 14:18:28 UTC 2021


Hey Openstackers,

I am trying to determine how to configure/manipulate an OpenStack
instances MTU configuration upon deployment/creation. I know that in
neutron.conf you can set the 'global_physnet_mtu = value' and
'path_mtu = value' in ml2_conf.ini. In our case we are setting these
to 9000 as the physical interfaces of our control plane and compute
nodes are all using 9000 mtu however the bonded interfaces for our
various networks are 8900.

With this mtu configured, we've noticed that our OpenStack neutron
networks within a tenancy are auto-selecting a mtu of 8958 as from
what I've read it will take the 9000 mtu and minus the approriate
overhead to pass the underlying physical network properly but I think
because our bonded interfaces are 8900 this has started to introduce
some problems in instances with operating systems that hard code the
MTU from Neutron networks.

When an instance gets deployed it may (Ubuntu 20.04) or may not
(Ubuntu 18.04) retrieve the network mtu from neutron metadata service
and builds it in to the netplan configuration as provided below.

My question is, where in Neutron could I configure a lower MTU for the
instances? I am not sure if I should change my global_physnet_mtu and
path_mtu to 8900 OR some other configuration option? Thanks all!

----

# curl --silent
http://169.254.169.254/openstack/2018-08-27/network_data.json | jq .
{
  "links": [
    {
      "id": "tap4318b50a-76",
      "vif_id": "4318b50a-7685-4777-917f-eea947aa1cb6",
      "type": "ovs",
      "mtu": 8958, <--- Matches the MTU of the underlying OpenStack
network attached to this instance
      "ethernet_mac_address": "fa:16:3e:a4:19:44"
    }
  ],
  "networks": [
    {
      "id": "network0",
      "type": "ipv4_dhcp",
      "link": "tap4318b50a-76",
      "network_id": "4acb077c-0656-4731-ba42-031a22af7931"
    }
  ],
  "services": []
}

----

# cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        ens3:
            dhcp4: true
            match:
                macaddress: fa:16:3e:a4:19:44
            mtu: 8958 <--- MTU gets hard-coded in the config for
Ubuntu 20.04 but not Ubuntu 18.04.
            set-name: ens3



More information about the openstack-discuss mailing list