[ovirt-users] oVirt / OVN / MTU

Numan Siddique nusiddiq at redhat.com
Mon Dec 12 14:14:38 UTC 2016


Hi Devin,

Below is one example of creating dhcp options and associating them with
logical ports using ovn-nbctl commands. Please see the links shared by
Lance for more details.

Lets say you have a network with cidr - 10.0.0.0/24.

One example would be

$ovn-nbctl dhcp-options-create 10.0.0.0/24

Run the command ovn-nbctl dhcp-options-list and store the uuid of it in any
variable (DHCP_UUID)
Now create the dhcp options for this DHCP_UUID just created.
There are 4 dhcp options which needs to be defined (they are mandatory)
  - server_id
  - server_mac
     -  router
     - lease_time

since you want to add mtu option as well, you can add the dhcp options as

$ovn-nbctl dhcp-options-set-options $DHCP_UUID  server_id=10.0.0.1
server_mac=00:00:00:00:00:10 router=10.0.0.1 lease_time=3600 mtu=1400

The above is just an example. You can see the dhcp options set by running
$ovn-nbctl dhcp-options-get-options $DHCP_UUID


​The dhcp options defined here have no value unless you associate these
with the logical switch port.

$ovn-nbctl lsp-set-dhcpv4-options $LPORT_NAME $DHCP_UUID​

Suppose if you have 3 logical ports - lp1, lp2 and lp3, you can associate
it as
$ovn-nbctl lsp-set-dhcpv4-options lp1 $DHCP_UUID​
$ovn-nbctl lsp-set-dhcpv4-options lp2 $DHCP_UUID​
$ovn-nbctl lsp-set-dhcpv4-options lp3 $DHCP_UUID​


Please let us know if you have any more questions.

You can refer to this blog to get some more inner details of how native
DHCP is supported in ovn -
https://numansiddiqueblog.wordpress.com/2016/08/09/native-dhcp-support-in-ovn/

Thanks
Numan


On Mon, Dec 12, 2016 at 7:28 PM, Lance Richardson <lrichard at redhat.com>
wrote:

> Hi Devin,
>
> This blog posting does a good job of explaining how to configure OVN
> DHCP support:
>
>     http://blog.spinhirne.com/2016/09/an-introduction-to-ovn-routing.html
>
> The ovn-nb man page lists the DHCP options that can be provided, including
> mtu:
>
>     http://openvswitch.org/support/dist-docs/
> ​​
> ovn-
> ​​
> nb.5.html <http://openvswitch.org/support/dist-docs/ovn-nb.5.html>
>
> And the ovn-nbctl man page has details about the command-line interface
> for setting DHCP options:
>
>     http://openvswitch.org/support/dist-docs/ovn-nbctl.8.html
>
> I have very little experience using OVN's DHCP support, I've copied Numan
> in case I've left anything out.
>
>     Lance
> ----- Original Message -----
> > From: "Marcin Mirecki" <mmirecki at redhat.com>
> > To: "Devin Acosta" <devin at pabstatencio.com>
> > Cc: "users" <Users at ovirt.org>, "Lance Richardson" <lrichard at redhat.com>
> > Sent: Monday, December 12, 2016 4:35:51 AM
> > Subject: Re: oVirt / OVN / MTU
> >
> > Devin,
> >
> > oVirt does not currently support changing external network mtu from
> within
> > ovirt (it rather relies on the provider handling this internally).
> >
> > If you are using OVN DHCP (have subnets defined for a network), you can
> > modify the OVN DHCP options directly in the OVN database.
> > I have never actually tested this myself, but looking at the OVN
> > documentation, it should do the job on the ports.
> >
> > The standard OVN way to do so is to use the "ovn-vsctl set DHCP_Options
> ..."
> > command.
> > (Unfortunately as I am trying it now it tells me that modifying
> DHCP_Options
> > is not supported)
> > Alternatively, you can use the OVS python API (let me know if you need
> any
> > help on this).
> >
> > Lance,
> > Would changing the dhcp:options:mtu suffice?
> > Could you please comment on how to modify the DHCP MTU using the OVN cmd
> > line?
> >
> > Thanks,
> > Marcin
> >
> >
> >
> > ----- Original Message -----
> > > From: "Devin Acosta" <devin at pabstatencio.com>
> > > To: "Marcin Mirecki" <mmirecki at redhat.com>, "users" <Users at ovirt.org>,
> > > "Lance Richardson" <lrichard at redhat.com>
> > > Sent: Monday, December 12, 2016 1:20:59 AM
> > > Subject: Fwd: oVirt / OVN / MTU
> > >
> > > Marcin / Lance,
> > >
> > > Not sure if the list was working correctly, I couldn't see that my
> message
> > > below made it to the list. If I need to change the MTU settings for
> OVN /
> > > OpenVSwitch to something lower than 1500, what is the best way to do
> this?
> > > We noticed that some instances (ie: Windows 2012R2) are having issues
> with
> > > the default MTU of 1500, I think there is an issue at the upper
> layers, and
> > > we can get it to work if we manually set the MTU on the instance to say
> > > 1400. Is there an easy way to do this so that any VM's that come up
> > > automatically get MTU of 1400?
> > >
> > > Devin
> > >
> > > ---------- Forwarded message ----------
> > > From: Devin Acosta <devin at pabstatencio.com>
> > > Date: Fri, Dec 9, 2016 at 2:02 PM
> > > Subject: oVirt / OVN / MTU
> > > To: users <Users at ovirt.org>
> > >
> > >
> > >
> > > We are running oVirt 4.0.5 and we have OVN working to provide a Virtual
> > > Layer 2 network. We are noticing that because the OVN is using Geneve
> and
> > > between all the firewalls and networks it crosses we are running into
> an
> > > MTU issue. What is the best suggested way to lower say the entire OVN
> > > network to say MTU of 1400, and also allow for fragmenting packets?
> > >
> > >
> > > --
> > >
> > > Devin Acosta
> > > Red Hat Certified Architect, LinuxStack
> > > 602-354-1220 || devin at linuxguru.co
> > >
> > >
> > >
> > > --
> > >
> > > Devin Acosta
> > > Red Hat Certified Architect, LinuxStack
> > > 602-354-1220 || devin at linuxguru.co
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20161212/e8672269/attachment-0001.html>


More information about the Users mailing list