<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 16, 2017 at 4:49 PM, Gianluca Cecchi <span dir="ltr"><<a href="mailto:gianluca.cecchi@gmail.com" target="_blank">gianluca.cecchi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Feb 16, 2017 at 2:26 PM, Simone Tiraboschi <span dir="ltr"><<a href="mailto:stirabos@redhat.com" target="_blank">stirabos@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"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="m_-8284334869491443499gmail-">On Thu, Feb 16, 2017 at 2:20 PM, Gianluca Cecchi <span dir="ltr"><<a href="mailto:gianluca.cecchi@gmail.com" target="_blank">gianluca.cecchi@gmail.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"><div dir="ltr">Hello,<div>how do we manage routing between different OVN networks in oVirt? </div><div>And between OVN networks and physical ones?</div></div></blockquote><div><br></div></span><div>Take a look at this blog post:</div><div><a href="http://blog.spinhirne.com/2016/09/the-ovn-gateway-router.html" target="_blank">http://blog.spinhirne.com/2016<wbr>/09/the-ovn-gateway-router.<wbr>html</a></div></div></div></div></blockquote><div><br></div></span><div>Great!</div><div>Actually using the previous blog post of the series:</div><div><a href="http://blog.spinhirne.com/2016/09/an-introduction-to-ovn-routing.html" target="_blank">http://blog.spinhirne.com/<wbr>2016/09/an-introduction-to-<wbr>ovn-routing.html</a></div></div></div></div></blockquote><div><br></div><div>It was something I wished to show this Monday in the workshop but we were really out of time!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><br></div><div>I was able to complete routing between two different oVirt subnets:</div><div><br></div><div><div>In oVirt I have previously created:</div><div><br></div><div>ovn_net1 network with subnet subn1 (defined as <a href="http://172.16.10.0/24" target="_blank">172.16.10.0/24</a> with gw 172.16.10.1)</div><div>so that ip usable range is from 172.16.10.1 to 172.16.10.254</div><div><br></div><div>ovn_net2 network with subnet subn2 (defined as <a href="http://192.168.10.0/24" target="_blank">192.168.10.0/24</a> with gw 192.168.10.1)</div><div>so that ip usable range is from 192.168.10.1 to 192.168.10.254</div><div><br></div><div>I have to VMs defined on the two subnets:</div><div>vm1 172.16.10.2</div><div>vm2 192.168.10.101</div><div><br></div><div>on central server (that is my engine)</div><div># define the new logical switches</div><div># no, already created from inside oVirt: they are ovn_net1 and ovn_net2</div><div><br></div><div># add the router</div><div>ovn-nbctl lr-add net1net2</div><div><br></div><div># create router port for the connection to net1</div><div>ovn-nbctl lrp-add net1net2 net1 02:ac:10:ff:01:29 <a href="http://172.16.10.1/24" target="_blank">172.16.10.1/24</a></div><div><br></div><div># create the net1 switch port for connection to net1net2</div><div>ovn-nbctl lsp-add ovn_net1 net1-net1net2</div><div>ovn-nbctl lsp-set-type net1-net1net2 router</div><div>ovn-nbctl lsp-set-addresses net1-net1net2 02:ac:10:ff:01:29</div><div>ovn-nbctl lsp-set-options net1-net1net2 router-port=net1</div><div><br></div><div># create router port for the connection to net2</div><div>ovn-nbctl lrp-add net1net2 net2 02:ac:10:ff:01:93 <a href="http://192.168.10.1/24" target="_blank">192.168.10.1/24</a></div><div><br></div><div># create the net2 switch port for connection to net1net2</div><div>ovn-nbctl lsp-add ovn_net2 net2-net1net2</div><div>ovn-nbctl lsp-set-type net2-net1net2 router</div><div>ovn-nbctl lsp-set-addresses net2-net1net2 02:ac:10:ff:01:93</div><div>ovn-nbctl lsp-set-options net2-net1net2 router-port=net2</div><div><br></div><div># show config</div><div>ovn-nbctl show</div><div><br></div><div>[root@ractorshe ~]# ovn-nbctl show</div><div> switch 38cca50c-e8b2-43fe-b585-<wbr>2ee815191939 (ovn_net1)</div><div> port 5562d95d-060f-4c64-b535-<wbr>0e460ae6aa5a</div><div> addresses: ["00:1a:4a:16:01:52 dynamic"]</div><div> port 87fea70a-583b-4484-b72b-<wbr>030e2f175aa6</div><div> addresses: ["00:1a:4a:16:01:53 dynamic"]</div><div> port net1-net1net2</div><div> addresses: ["02:ac:10:ff:01:29"]</div><div> port 99f619fc-29d2-4d40-8c28-<wbr>4ce9291eb97a</div><div> addresses: ["00:1a:4a:16:01:51 dynamic"]</div><div> switch 6a0e7a92-8edc-44dd-970a-<wbr>2b1f5c07647d (ovn_net2)</div><div> port net2-net1net2</div><div> addresses: ["02:ac:10:ff:01:93"]</div><div> port 9b7a79a3-aa38-43b1-abd4-<wbr>58370171755e</div><div> addresses: ["00:1a:4a:16:01:54 dynamic"]</div><div> router 59d79312-a434-4150-be46-<wbr>285a9f37df8d (net1net2)</div><div> port net2</div><div> mac: "02:ac:10:ff:01:93"</div><div> networks: ["<a href="http://192.168.10.1/24" target="_blank">192.168.10.1/24</a>"]</div><div> port net1</div><div> mac: "02:ac:10:ff:01:29"</div><div> networks: ["<a href="http://172.16.10.1/24" target="_blank">172.16.10.1/24</a>"]</div><div>[root@ractorshe ~]# </div></div><div> </div></div></div><div class="gmail_extra">And now vm1 is able to ping both the gateways ip on subn1 and subn2 and to ssh into vm2</div><div class="gmail_extra">It remains a sort of spof the fact of the central ovn server, where the logical router lives... but for initial testing it is ok</div></div></blockquote><div><br></div><div>Are you sure? did you tried bringing it down?</div><div><br></div><div>AFAIU, OVN is already providing distributed routing since 2.6: if the node where you have the oVirt OVN provider and the OVN controller with northbound and southbound DB is down you cannot edit logical networks but the existing flows should still be there.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks again,</div><div class="gmail_extra">Gianluca</div></div>
</blockquote></div><br></div></div>