[CentOS-virt] proper bridging technoque

Nico Kadel-Garcia nkadel at gmail.com
Thu Nov 21 18:32:58 UTC 2013


I was under the impression that the relevant MTU settings were on the
*node's* local ifcfg-eth* configurations. Did something change with
KVM internal networking in the last year?

On Thu, Nov 21, 2013 at 1:03 PM, Digimer <lists at alteeve.ca> wrote:
> The problem is that there are no ifcfg-vnetX config files. They are
> dynamically created as VMs are created or migrated to a node. You could
> manually (or via script) change the MTU, but that would mean that the
> MTU on the bridge would drop momentarily when new VMs start. This could
> break network traffic for any existing VMs (or real devices) using large
> frames.
>
> I'm not a fan of udev either, but in this case, it is the best option.
> Of course, I am certainly open to hearing alternative methods if they exist.
>
> On 21/11/13 08:39, Nico Kadel-Garcia wrote:
>> Stay out of udev if you can. It's often overwritten by component
>> addition and manipulation MTU is parsed, and overridden, by options in
>> /etc/sysconfig/network-scripts/ifcfg-[device]. I find it much safer to
>> read and manage there, and if new devices are added or replaced, the
>> behavior is dominated by the "HWADDR" associated config files there,
>> no matter what "udev" thinks the device number or name should be..
>
> <snip>
>
>>>
>>> Another update;
>>>
>>>   To make sure the VMs' vnetX devices are created with a larger MTU, you
>>> *sill* need to update udev[1].
>>>
>>>   Append to /etc/udev/rules.d/70-persistent-net.rules;
>>>
>>> ====
>>> # Make all VMs' vnetX devices come up with an MTU of 9000.
>>> SUBSYSTEM=="net", ACTION=="add", KERNEL=="vnet*", ATTR{mtu}="9000"
>>> ====
>>>
>>>   Assuming you find that you can use an MTU of '9000', of course. No
>>> need to reboot or even restart networking. Just add that line and then
>>> provision/boot your VMs. If the VMs are already running, you can adjust
>>> the MTU of the existing 'vnetX' devices with:
>>>
>>> ifconfig vnetX mtu 9000
>>>
>>> Cheers!
>>>
>>> PS - Credit for the udev rule:
>>>
>>> http://linuxaleph.blogspot.ca/2013/01/how-to-network-jumbo-frames-to-kvm-guest.html
>>>
>>> --
>>> Digimer
>>> Papers and Projects: https://alteeve.ca/w/
>>> What if the cure for cancer is trapped in the mind of a person without
>>> access to education?
>>> _______________________________________________
>>> CentOS-virt mailing list
>>> CentOS-virt at centos.org
>>> http://lists.centos.org/mailman/listinfo/centos-virt
>> _______________________________________________
>> CentOS-virt mailing list
>> CentOS-virt at centos.org
>> http://lists.centos.org/mailman/listinfo/centos-virt
>>
>
>
> --
> Digimer
> Papers and Projects: https://alteeve.ca/w/
> What if the cure for cancer is trapped in the mind of a person without
> access to education?
> _______________________________________________
> CentOS-virt mailing list
> CentOS-virt at centos.org
> http://lists.centos.org/mailman/listinfo/centos-virt


More information about the CentOS-virt mailing list