<div dir="ltr"><div class="gmail_default"><font face="arial, helvetica, sans-serif">Hi Devin,</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">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.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Lets say you have a network with cidr - <a href="http://10.0.0.0/24">10.0.0.0/24</a>.<br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">One example would be</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">$ovn-nbctl dhcp-options-create <a href="http://10.0.0.0/24">10.0.0.0/24</a></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Run the command ovn-nbctl dhcp-options-list and store the uuid of it in any variable (DHCP_UUID)<br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Now create the dhcp options for this DHCP_UUID just created.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">There are 4 dhcp options which needs to be defined (they are mandatory)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> - server_id</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> - <span style="color:rgb(0,0,0)">s</span><span style="color:rgb(0,0,0)">e</span><span style="color:rgb(0,0,0)">r</span><span style="color:rgb(0,0,0)">v</span><span style="color:rgb(0,0,0)">e</span><span style="color:rgb(0,0,0)">r</span><span style="color:rgb(0,0,0)">_</span><span style="color:rgb(0,0,0)">m</span><span style="color:rgb(0,0,0)">a</span><span style="color:rgb(0,0,0)">c</span></font></div><div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"> - router</font></span></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><span style="color:rgb(0,0,0)"> - </span><span style="color:rgb(0,0,0)">l</span><span style="color:rgb(0,0,0)">e</span><span style="color:rgb(0,0,0)">a</span><span style="color:rgb(0,0,0)">s</span><span style="color:rgb(0,0,0)">e</span><span style="color:rgb(0,0,0)">_</span><span style="color:rgb(0,0,0)">t</span><span style="color:rgb(0,0,0)">i</span><span style="color:rgb(0,0,0)">m</span><span style="color:rgb(0,0,0)">e</span></font></div><div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"><br></font></span></div><div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">since you want to add mtu option as well, you can add the dhcp options as </font></span></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">$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</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">The above is just an example. You can see the dhcp options set by running</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">$ovn-nbctl dhcp-options-get-options $DHCP_UUID</font></div><div class="gmail_extra"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_extra"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_extra"><div class="gmail_default"><font face="arial, helvetica, sans-serif">The dhcp options defined here have no value unless you associate these with the logical switch port.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">$ovn-nbctl lsp-set-dhcpv4-options $LPORT_NAME $DHCP_UUID<br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Suppose if you have 3 logical ports - lp1, lp2 and lp3, you can associate it as</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">$ovn-nbctl lsp-set-dhcpv4-options lp1 $DHCP_UUID<br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">$ovn-nbctl lsp-set-dhcpv4-options lp2 $DHCP_UUID<br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">$ovn-nbctl lsp-set-dhcpv4-options lp3 $DHCP_UUID<br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Please let us know if you have any more questions.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">You can refer to this blog to get some more inner details of how native DHCP is supported in ovn - <a href="https://numansiddiqueblog.wordpress.com/2016/08/09/native-dhcp-support-in-ovn/">https://numansiddiqueblog.wordpress.com/2016/08/09/native-dhcp-support-in-ovn/</a></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Thanks</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">Numan</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><br><div class="gmail_quote">On Mon, Dec 12, 2016 at 7:28 PM, Lance Richardson <span dir="ltr"><<a href="mailto:lrichard@redhat.com" target="_blank">lrichard@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Devin,<br>
<br>
This blog posting does a good job of explaining how to configure OVN<br>
DHCP support:<br>
<br>
<a href="http://blog.spinhirne.com/2016/09/an-introduction-to-ovn-routing.html" rel="noreferrer" target="_blank">http://blog.spinhirne.com/<wbr>2016/09/an-introduction-to-<wbr>ovn-routing.html</a><br>
<br>
The ovn-nb man page lists the DHCP options that can be provided, including<br>
mtu:<br>
<br>
<a href="http://openvswitch.org/support/dist-docs/ovn-nb.5.html" rel="noreferrer" target="_blank">http://openvswitch.org/<wbr>support/dist-docs/<div class="gmail_default" style="font-family:monospace,monospace;display:inline"></div>ovn-<div class="gmail_default" style="font-family:monospace,monospace;display:inline"></div>nb.5.<wbr>html</a><br>
<br>
And the ovn-nbctl man page has details about the command-line interface<br>
for setting DHCP options:<br>
<br>
<a href="http://openvswitch.org/support/dist-docs/ovn-nbctl.8.html" rel="noreferrer" target="_blank">http://openvswitch.org/<wbr>support/dist-docs/ovn-nbctl.8.<wbr>html</a><br>
<br>
I have very little experience using OVN's DHCP support, I've copied Numan<br>
in case I've left anything out.<br>
<br>
Lance<br>
----- Original Message -----<br>
> From: "Marcin Mirecki" <<a href="mailto:mmirecki@redhat.com">mmirecki@redhat.com</a>><br>
> To: "Devin Acosta" <<a href="mailto:devin@pabstatencio.com">devin@pabstatencio.com</a>><br>
> Cc: "users" <<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>>, "Lance Richardson" <<a href="mailto:lrichard@redhat.com">lrichard@redhat.com</a>><br>
> Sent: Monday, December 12, 2016 4:35:51 AM<br>
> Subject: Re: oVirt / OVN / MTU<br>
><br>
> Devin,<br>
><br>
> oVirt does not currently support changing external network mtu from within<br>
> ovirt (it rather relies on the provider handling this internally).<br>
><br>
> If you are using OVN DHCP (have subnets defined for a network), you can<br>
> modify the OVN DHCP options directly in the OVN database.<br>
> I have never actually tested this myself, but looking at the OVN<br>
> documentation, it should do the job on the ports.<br>
><br>
> The standard OVN way to do so is to use the "ovn-vsctl set DHCP_Options ..."<br>
> command.<br>
> (Unfortunately as I am trying it now it tells me that modifying DHCP_Options<br>
> is not supported)<br>
> Alternatively, you can use the OVS python API (let me know if you need any<br>
> help on this).<br>
><br>
> Lance,<br>
> Would changing the dhcp:options:mtu suffice?<br>
> Could you please comment on how to modify the DHCP MTU using the OVN cmd<br>
> line?<br>
><br>
> Thanks,<br>
> Marcin<br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> > From: "Devin Acosta" <<a href="mailto:devin@pabstatencio.com">devin@pabstatencio.com</a>><br>
> > To: "Marcin Mirecki" <<a href="mailto:mmirecki@redhat.com">mmirecki@redhat.com</a>>, "users" <<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>>,<br>
> > "Lance Richardson" <<a href="mailto:lrichard@redhat.com">lrichard@redhat.com</a>><br>
> > Sent: Monday, December 12, 2016 1:20:59 AM<br>
> > Subject: Fwd: oVirt / OVN / MTU<br>
> ><br>
> > Marcin / Lance,<br>
> ><br>
> > Not sure if the list was working correctly, I couldn't see that my message<br>
> > below made it to the list. If I need to change the MTU settings for OVN /<br>
> > OpenVSwitch to something lower than 1500, what is the best way to do this?<br>
> > We noticed that some instances (ie: Windows 2012R2) are having issues with<br>
> > the default MTU of 1500, I think there is an issue at the upper layers, and<br>
> > we can get it to work if we manually set the MTU on the instance to say<br>
> > 1400. Is there an easy way to do this so that any VM's that come up<br>
> > automatically get MTU of 1400?<br>
> ><br>
> > Devin<br>
> ><br>
> > ---------- Forwarded message ----------<br>
> > From: Devin Acosta <<a href="mailto:devin@pabstatencio.com">devin@pabstatencio.com</a>><br>
> > Date: Fri, Dec 9, 2016 at 2:02 PM<br>
> > Subject: oVirt / OVN / MTU<br>
> > To: users <<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>><br>
> ><br>
> ><br>
> ><br>
> > We are running oVirt 4.0.5 and we have OVN working to provide a Virtual<br>
> > Layer 2 network. We are noticing that because the OVN is using Geneve and<br>
> > between all the firewalls and networks it crosses we are running into an<br>
> > MTU issue. What is the best suggested way to lower say the entire OVN<br>
> > network to say MTU of 1400, and also allow for fragmenting packets?<br>
> ><br>
> ><br>
> > --<br>
> ><br>
> > Devin Acosta<br>
> > Red Hat Certified Architect, LinuxStack<br>
> > 602-354-1220 || <a href="mailto:devin@linuxguru.co">devin@linuxguru.co</a><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> ><br>
> > Devin Acosta<br>
> > Red Hat Certified Architect, LinuxStack<br>
> > 602-354-1220 || <a href="mailto:devin@linuxguru.co">devin@linuxguru.co</a><br>
> ><br>
><br>
</blockquote></div><br></div></div>