[libvirt-users] OVS / KVM / libvirt / MTU

Hey there, I hope anyone can bring some light in the following problem. <interface type='bridge'> <source bridge='cloudbr0'/> <mtu size='2000'/> <mac address='02:00:74:76:00:01'/> <model type='virtio'/> <virtualport type='openvswitch'> </virtualport> <vlan trunk='no'> <tag id='2097'/> </vlan><link state='up'/> </interface> we have an base bridge for example and cloudbr0. After we add an mtu to the vm bridge here it seems the base bridge gets the same mtu like the vnet adapter. Is this normal behaviour of libvirt together with OVS? —ovs-vsctl show 5b154321-534d-413e-9761-60476ae06640 Bridge "cloudbr0" Port "cloudbr0" Interface "cloudbr0" type: internal —MTU from the bridge after set an MTU into the XML File (before we had here 9000) mtu : 2000 mtu_request : [] name : "cloudbr0" ofport : 65534 —MTU of the vnet interface mac_in_use : "fe:00:74:76:00:01" mtu : 1450 mtu_request : 1450 name : „vnet2" Thanks for help… __ Sven Vogel Teamlead Platform EWERK RZ GmbH Brühl 24, D-04109 Leipzig P +49 341 42649 - 11 F +49 341 42649 - 18 S.Vogel@ewerk.com www.ewerk.com Geschäftsführer: Dr. Erik Wende, Hendrik Schubert, Frank Richter Registergericht: Leipzig HRB 17023 Zertifiziert nach: ISO/IEC 27001:2013 DIN EN ISO 9001:2015 DIN ISO/IEC 20000-1:2011 EWERK-Blog | LinkedIn | Xing | Twitter | Facebook Auskünfte und Angebote per Mail sind freibleibend und unverbindlich. Disclaimer Privacy: Der Inhalt dieser E-Mail (einschließlich etwaiger beigefügter Dateien) ist vertraulich und nur für den Empfänger bestimmt. Sollten Sie nicht der bestimmungsgemäße Empfänger sein, ist Ihnen jegliche Offenlegung, Vervielfältigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzüglich den Absender und löschen Sie die E-Mail (einschließlich etwaiger beigefügter Dateien) von Ihrem System. Vielen Dank. The contents of this e-mail (including any attachments) are confidential and may be legally privileged. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. Thank you.

On 7/23/19 8:00 PM, Sven Vogel wrote:
Hey there,
I hope anyone can bring some light in the following problem.
<interface type='bridge'> <source bridge='cloudbr0'/> <mtu size='2000'/> <mac address='02:00:74:76:00:01'/> <model type='virtio'/> <virtualport type='openvswitch'> </virtualport> <vlan trunk='no'> <tag id='2097'/> </vlan><link state='up'/> </interface>
we have an base bridge for example and cloudbr0. After we add an mtu to the vm bridge here it seems the base bridge gets the same mtu like the vnet adapter.
Is this normal behaviour of libvirt together with OVS?
I wouldn't say it is 'normal', but this behaviour is not specific to libvirt. I mean, if you create a tap device yourself by hand and then plug it into an ovs bridge the same thing will happen. If you don't want to change MTU of the bridge then just don't set it for <interface/> and libvirt will copy whatever MTU the bridge has over to the new TAP device. Michal

Hi Michal, Thanks for your answer. I don’t understand why an interface created without mtu gets only 1500 visible in the virtual machine but if I create an interface with mtu higher than 1500 e.g. 2000 the bridge will change too. Before the bridge was e.g. by 9000. I ask because you wrote if I don’t set an mtu of the interface I will get the mtu of the bridge. But it seems so. Can you clarify it a little better for me? Cheers Sven Von meinem iPhone gesendet __ Sven Vogel Teamlead Platform EWERK RZ GmbH Brühl 24, D-04109 Leipzig P +49 341 42649 - 11 F +49 341 42649 - 18 S.Vogel@ewerk.com www.ewerk.com Geschäftsführer: Dr. Erik Wende, Hendrik Schubert, Frank Richter Registergericht: Leipzig HRB 17023 Zertifiziert nach: ISO/IEC 27001:2013 DIN EN ISO 9001:2015 DIN ISO/IEC 20000-1:2011 EWERK-Blog | LinkedIn | Xing | Twitter | Facebook Auskünfte und Angebote per Mail sind freibleibend und unverbindlich. Disclaimer Privacy: Der Inhalt dieser E-Mail (einschließlich etwaiger beigefügter Dateien) ist vertraulich und nur für den Empfänger bestimmt. Sollten Sie nicht der bestimmungsgemäße Empfänger sein, ist Ihnen jegliche Offenlegung, Vervielfältigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzüglich den Absender und löschen Sie die E-Mail (einschließlich etwaiger beigefügter Dateien) von Ihrem System. Vielen Dank. The contents of this e-mail (including any attachments) are confidential and may be legally privileged. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. Thank you.
Am 29.07.2019 um 13:20 schrieb Michal Privoznik <mprivozn@redhat.com>:
On 7/23/19 8:00 PM, Sven Vogel wrote: Hey there, I hope anyone can bring some light in the following problem. <interface type='bridge'> <source bridge='cloudbr0'/> <mtu size='2000'/> <mac address='02:00:74:76:00:01'/> <model type='virtio'/> <virtualport type='openvswitch'> </virtualport> <vlan trunk='no'> <tag id='2097'/> </vlan><link state='up'/> </interface> we have an base bridge for example and cloudbr0. After we add an mtu to the vm bridge here it seems the base bridge gets the same mtu like the vnet adapter. Is this normal behaviour of libvirt together with OVS?
I wouldn't say it is 'normal', but this behaviour is not specific to libvirt. I mean, if you create a tap device yourself by hand and then plug it into an ovs bridge the same thing will happen. If you don't want to change MTU of the bridge then just don't set it for <interface/> and libvirt will copy whatever MTU the bridge has over to the new TAP device.
Michal

On 7/29/19 9:23 PM, Sven Vogel wrote:
Hi Michal,
Thanks for your answer.
I don’t understand why an interface created without mtu gets only 1500 visible in the virtual machine but if I create an interface with mtu higher than 1500 e.g. 2000 the bridge will change too. Before the bridge was e.g. by 9000. I ask because you wrote if I don’t set an mtu of the interface I will get the mtu of the bridge. But it seems so.
Can you clarify it a little better for me?
I don't know enough about OVS internals to answer that, sorry. Maybe we should ask OVS developers why OVS bridge behaves this way. Michal

In general if no MTU is set on interface creation the default value is 1500. On OVS the bridge MTU is automatically set to the smallest port MTU. So you just have to set the MTU of each port of the bridge. Take a look at: https://bugzilla.redhat.com/show_bug.cgi?id=1160897 It is a bit of a pain to read but seems to confirm the statement about the OVS MTU value being set by the MTU of the ports. I have been using OVS with Xen and a few years ago I had to wrap my head around this problem. Once you start setting the MTU to something other than 1500 you will find you need to set ALL the MTU values of ALL your interfaces. Otherwise some inherited default will bite you. On 7/31/19 4:39 AM, Michal Privoznik wrote:
On 7/29/19 9:23 PM, Sven Vogel wrote:
Hi Michal,
Thanks for your answer.
I don’t understand why an interface created without mtu gets only 1500 visible in the virtual machine but if I create an interface with mtu higher than 1500 e.g. 2000 the bridge will change too. Before the bridge was e.g. by 9000. I ask because you wrote if I don’t set an mtu of the interface I will get the mtu of the bridge. But it seems so.
Can you clarify it a little better for me?
I don't know enough about OVS internals to answer that, sorry. Maybe we should ask OVS developers why OVS bridge behaves this way.
Michal
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
-- Alvin Starr || land: (647)478-6285 Netvel Inc. || Cell: (416)806-0133 alvin@netvel.net ||

Hi Alvin, Thanks for the help. :) This sounds good. My head also wrap about this problem. The question for me is why they use the smallest? Cheers Sven __ Sven Vogel Teamlead Platform EWERK DIGITAL GmbH Br?hl 24, D-04109 Leipzig P +49 341 42649 - 11 F +49 341 42649 - 18 S.Vogel@ewerk.com www.ewerk.com Gesch?ftsf?hrer: Dr. Erik Wende, Hendrik Schubert, Frank Richter Registergericht: Leipzig HRB 17023 Zertifiziert nach: ISO/IEC 27001:2013 DIN EN ISO 9001:2015 DIN ISO/IEC 20000-1:2011 ISAE 3402 Typ II Assessed EWERK-Blog<https://blog.ewerk.com/> | LinkedIn<https://www.linkedin.com/company/ewerk-group> | Xing<https://www.xing.com/company/ewerk> | Twitter<https://twitter.com/EWERK_Group> | Facebook<https://de-de.facebook.com/EWERK.IT/> Mit Handelsregistereintragung vom 09.07.2019 ist die EWERK RZ GmbH auf die EWERK IT GmbH verschmolzen und firmiert nun gemeinsam unter dem Namen: EWERK DIGITAL GmbH, f?r weitere Informationen klicken Sie hier<https://www.ewerk.com/ewerkdigital>. Ausk?nfte und Angebote per Mail sind freibleibend und unverbindlich. Disclaimer Privacy: Der Inhalt dieser E-Mail (einschlie?lich etwaiger beigef?gter Dateien) ist vertraulich und nur f?r den Empf?nger bestimmt. Sollten Sie nicht der bestimmungsgem??e Empf?nger sein, ist Ihnen jegliche Offenlegung, Vervielf?ltigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverz?glich den Absender und l?schen Sie die E-Mail (einschlie?lich etwaiger beigef?gter Dateien) von Ihrem System. Vielen Dank. The contents of this e-mail (including any attachments) are confidential and may be legally privileged. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. Thank you. Am 31.07.2019 um 15:50 schrieb Alvin Starr <alvin@netvel.net<mailto:alvin@netvel.net>>: In general if no MTU is set on interface creation the default value is 1500. On OVS the bridge MTU is automatically set to the smallest port MTU. So you just have to set the MTU of each port of the bridge. Take a look at: https://bugzilla.redhat.com/show_bug.cgi?id=1160897 It is a bit of a pain to read but seems to confirm the statement about the OVS MTU value being set by the MTU of the ports. I have been using OVS with Xen and a few years ago I had to wrap my head around this problem. Once you start setting the MTU to something other than 1500 you will find you need to set ALL the MTU values of ALL your interfaces. Otherwise some inherited default will bite you.

On Thu, 8 Aug 2019 at 10:08, Sven Vogel <S.Vogel@ewerk.com> wrote:
The question for me is why they use the smallest?
Because otherwise some frames won't get through because the interface can't receive them, and the job of network equipment is to enable and maintain communication :-).
Cheers
Sven
- Peter [...]
Am 31.07.2019 um 15:50 schrieb Alvin Starr <alvin@netvel.net>:
In general if no MTU is set on interface creation the default value is 1500.
On OVS the bridge MTU is automatically set to the smallest port MTU. So you just have to set the MTU of each port of the bridge.
Take a look at: https://bugzilla.redhat.com/show_bug.cgi?id=1160897 It is a bit of a pain to read but seems to confirm the statement about the OVS MTU value being set by the MTU of the ports.
I have been using OVS with Xen and a few years ago I had to wrap my head around this problem. Once you start setting the MTU to something other than 1500 you will find you need to set ALL the MTU values of ALL your interfaces. Otherwise some inherited default will bite you.

Hi Peter, Maybe my English it not good enough. I would understand the highest but not the smallest. You know? :) You mean if any VM has 2000 set and another will set 3000 we get 3000 for all on the bridge? What I don’t understand is if the bridgec already has 9000 set as MTU they will be shrined down?!? For me I think it lags of some functionality. __ Sven Vogel Teamlead Platform EWERK DIGITAL GmbH Brühl 24, D-04109 Leipzig P +49 341 42649 - 11 F +49 341 42649 - 18 S.Vogel@ewerk.com www.ewerk.com Geschäftsführer: Dr. Erik Wende, Hendrik Schubert, Frank Richter Registergericht: Leipzig HRB 17023 Zertifiziert nach: ISO/IEC 27001:2013 DIN EN ISO 9001:2015 DIN ISO/IEC 20000-1:2011 ISAE 3402 Typ II Assessed EWERK-Blog<https://blog.ewerk.com/> | LinkedIn<https://www.linkedin.com/company/ewerk-group> | Xing<https://www.xing.com/company/ewerk> | Twitter<https://twitter.com/EWERK_Group> | Facebook<https://de-de.facebook.com/EWERK.IT/> Mit Handelsregistereintragung vom 09.07.2019 ist die EWERK RZ GmbH auf die EWERK IT GmbH verschmolzen und firmiert nun gemeinsam unter dem Namen: EWERK DIGITAL GmbH, für weitere Informationen klicken Sie hier<https://www.ewerk.com/ewerkdigital>. Auskünfte und Angebote per Mail sind freibleibend und unverbindlich. Disclaimer Privacy: Der Inhalt dieser E-Mail (einschließlich etwaiger beigefügter Dateien) ist vertraulich und nur für den Empfänger bestimmt. Sollten Sie nicht der bestimmungsgemäße Empfänger sein, ist Ihnen jegliche Offenlegung, Vervielfältigung, Weitergabe oder Nutzung des Inhalts untersagt. Bitte informieren Sie in diesem Fall unverzüglich den Absender und löschen Sie die E-Mail (einschließlich etwaiger beigefügter Dateien) von Ihrem System. Vielen Dank. The contents of this e-mail (including any attachments) are confidential and may be legally privileged. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system. Thank you. Am 08.08.2019 um 11:43 schrieb Peter Crowther <peter.crowther@melandra.com<mailto:peter.crowther@melandra.com>>: On Thu, 8 Aug 2019 at 10:08, Sven Vogel <S.Vogel@ewerk.com<mailto:S.Vogel@ewerk.com>> wrote: The question for me is why they use the smallest? Because otherwise some frames won't get through because the interface can't receive them, and the job of network equipment is to enable and maintain communication :-). Cheers Sven - Peter [...] Am 31.07.2019 um 15:50 schrieb Alvin Starr <alvin@netvel.net<mailto:alvin@netvel.net>>: In general if no MTU is set on interface creation the default value is 1500. On OVS the bridge MTU is automatically set to the smallest port MTU. So you just have to set the MTU of each port of the bridge. Take a look at: https://bugzilla.redhat.com/show_bug.cgi?id=1160897 It is a bit of a pain to read but seems to confirm the statement about the OVS MTU value being set by the MTU of the ports. I have been using OVS with Xen and a few years ago I had to wrap my head around this problem. Once you start setting the MTU to something other than 1500 you will find you need to set ALL the MTU values of ALL your interfaces. Otherwise some inherited default will bite you.
participants (4)
-
Alvin Starr
-
Michal Privoznik
-
Peter Crowther
-
Sven Vogel