Change instances MTU in Neutron

Asked by Claude Durocher

With Fuel 6.0, we've increased the MTU to 9000. Now we want to use a MTU of 9000 for the instances in OpenStack. My guess is that can be done by changing a dnsmasq option.

I've logged to one of the controller and found that dnsmasq use a file for setting options (/var/lib/neutron/dhcp/2fe5c1fc-4af8-480a-a4cd-7c57357a27a6/opts). This file contains :

tag:tag0,option:dns-server,10.10.10.2,10.10.10.4
tag:tag0,option:router,192.168.111.1

I think I could add "dhcp-option-force=26,9000" to that file (on all controlers) but is there a cleaner way to do this?

Question information

Language:
English Edit question
Status:
Answered
For:
Fuel for OpenStack Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Fabrizio Soppelsa (fsoppelsa) said :
#1

Greetings ClaudeD,
to set the MTU for the instances (tap devices) with a Neutron setup, you'll have to configure Nova

/etc/nova/nova.conf with the following:
network_device_mtu = 9000

And finally restart the nova-compute and nova-api services.

You can change the default values for instances through:
1. uncomment the line 'dnsmasq_config_file = ' in the file '/etc/neutron/dhcp_agent.ini' in each controller node. (DON'T COPY the changed file on other controllers). Add the patch to the dnsmasq configuration file 'dnsmasq.conf'. Usually it is located here: '/etc/neutron/dnsmasq-neutron.conf'
2. Create and edit the /etc/neutron/dnsmasq-neutron.conf file on each node and add the following keys: 'dhcp-option-force=26,9000'
3. Kill any existing dnsmasq processes: `killall dnsmasq`
4. `crm resource restart p_neutron-dhcp-agent`

Best regards,
Fabrizio
Mirantis Fuel Team

Revision history for this message
Evgeny Kozhemyakin (ekozhemyakin) said :
#2

Hello,

/var/lib/neutron/.../opts is the same as --dhcp-option flag for dnsmasq.

I think a better way is to put this "dhcp-option-force=26,9000" in some /etc/neuntron/dnsmasq.conf file
and set the path to it in /etc/neutron/dhcp_agent.ini
like described here http://docs.openstack.org/admin-guide-cloud/content/openvswitch_plugin.html

Revision history for this message
Claude Durocher (claude-d) said :
#3

Hi,

I'm not getting it to work correctly (new vms dont get mtu set to 9000).
Here's what I tried :

# on each compute node:

vi /etc/nova/nova.conf
 [DEFAULT]
 ...
 network_device_mtu = 9000

service nova-compute restart

# on each controler node:

service nova-api restart

vi /etc/neutron/dnsmasq-neutron.conf
 dhcp-option-force=26,9000

vi /etc/neutron/dhcp_agent.ini
 dnsmasq_config_file=/etc/neutron/dnsmasq-neutron.conf

# on the controler node where p_neutron-dhcp-agen is running:

killall dnsmasq
crm resource restart p_neutron-dhcp-agent

Claude

2015-03-02 4:41 GMT-05:00 Fabrizio Soppelsa <
<email address hidden>>:

> Your question #262918 on Fuel for OpenStack changed:
> https://answers.launchpad.net/fuel/+question/262918
>
> Status: Open => Answered
>
> Fabrizio Soppelsa proposed the following answer:
> Greetings ClaudeD,
> to set the MTU for the instances (tap devices) with a Neutron setup,
> you'll have to configure Nova
>
> /etc/nova/nova.conf with the following:
> network_device_mtu = 9000
>
> And finally restart the nova-compute and nova-api services.
>
> You can change the default values for instances through:
> 1. uncomment the line 'dnsmasq_config_file = ' in the file
> '/etc/neutron/dhcp_agent.ini' in each controller node. (DON'T COPY the
> changed file on other controllers). Add the patch to the dnsmasq
> configuration file 'dnsmasq.conf'. Usually it is located here:
> '/etc/neutron/dnsmasq-neutron.conf'
> 2. Create and edit the /etc/neutron/dnsmasq-neutron.conf file on each node
> and add the following keys: 'dhcp-option-force=26,9000'
> 3. Kill any existing dnsmasq processes: `killall dnsmasq`
> 4. `crm resource restart p_neutron-dhcp-agent`
>
> Best regards,
> Fabrizio
> Mirantis Fuel Team
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/fuel/+question/262918/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/fuel/+question/262918
>
> You received this question notification because you asked the question.
>

Revision history for this message
Claude Durocher (claude-d) said :
#4

Interestingly, I tried with a Ubuntu image and the MTU is set to 9000....

Seems like a bug with the cirros image!

Revision history for this message
Claude Durocher (claude-d) said :
#5

I'm almost finished with my tests but I still have one problem : when I ping the public interface between two instances in my cloud, I have a MTU mismatch:

ping -M do -s 8972 10.17.79.34
PING 10.17.79.34 (10.17.79.34) 8972(9000) bytes of data.
From 10.17.79.34 icmp_seq=1 Frag needed and DF set (mtu = 1500)
ping: local error: Message too long, mtu=1500

So is there a missing setting in OVS?

Revision history for this message
Evgeny Kozhemyakin (ekozhemyakin) said :
#6

Are you sure you set MTU for all the nodes?
Like here https://answers.launchpad.net/fuel/+question/251704

Can you help with this problem?

Provide an answer of your own, or ask Claude Durocher for more information if necessary.

To post a message you must log in.