[ovs-discuss] {Disarmed} Re: VXLAN support in OVS 2.5.0

Raymond Burkholder ray at oneunified.net
Fri Jan 13 16:41:27 UTC 2017


Following along with Scott’s thoughts, I have a Vagrant project at https://github.com/rburkholder/vagrant which I use for testing various kernels, openvswitch versions, and configurations.

 

The OVN test setup provides the ability to configure and connect multiple guests, much like mininet does.  And with Vagrant’s snapshot ability, it is easy to rollback and redo tests.

 

So…. if you run out of luck on getting what you want in mininet, there is that alternate mechanism in VirtualBox and you don’t have to re-invent the wheel to get started.

 

From: ovs-discuss-bounces at openvswitch.org [mailto:ovs-discuss-bounces at openvswitch.org] On Behalf Of Michael Ben-Ami via discuss
Sent: Friday, January 13, 2017 12:21
To: O'Reilly, Darragh <darragh.oreilly at hpe.com>
Cc: ovs-discuss at openvswitch.org
Subject: {Disarmed} Re: [ovs-discuss] VXLAN support in OVS 2.5.0

 

I'm in a very similar boat as Shravan. The utility for me is to be able to test flow sets on arbitrary mininet topologies that simulate real world topologies that may or may not use VXLAN. The root cause as I see it is that mininet must put all OVS bridges in the same namespace. This is probably an OVS limitation not mininet. Has been discussed a little here: https://mail.openvswitch.org/pipermail/ovs-discuss/2015-September/038543.html

 

Of course you could start mininet itself in different namespaces, but that defeats a lot of the purpose of building topologies within a mininet.

 

Shravan, if you find a workable solution please let me know.

 

Thanks,

Michael

 

On Fri, Jan 13, 2017 at 7:07 AM, O'Reilly, Darragh <darragh.oreilly at hpe.com <mailto:darragh.oreilly at hpe.com> > wrote:

 

Not sure what you are trying to do. But if you just want to connect two bridges on the same host, then you can use patches or veths.

But if you really want to use vxlan, then maybe the loopback (lo  <http://127.0.0.1/8> MailScanner warning: numerical links are often malicious: 127.0.0.1/8) can be used, something like this:

 

ovs-vsctl add-br br0

ovs-vsctl add-port br0 vxlan0 -- set interface vxlan0 type=vxlan options:local_ip=127.1.1.1 options:remote_ip=127.2.2.2

 

ovs-vsctl add-br br1

ovs-vsctl add-port br1 vxlan1 -- set interface vxlan1 type=vxlan options:local_ip=127.2.2.2 options:remote_ip=127.1.1.1

 

 

From: ovs-discuss-bounces at openvswitch.org <mailto:ovs-discuss-bounces at openvswitch.org>  [mailto:ovs-discuss-bounces at openvswitch.org <mailto:ovs-discuss-bounces at openvswitch.org> ] On Behalf Of Shravan S K
Sent: 13 January 2017 10:21


To: Scott Lowe <scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >
Cc: ovs-discuss at openvswitch.org <mailto:ovs-discuss at openvswitch.org> 
Subject: Re: [ovs-discuss] VXLAN support in OVS 2.5.0

 

My motive is to simulate VXLAN functionality on a bigger topology using mininet.
My plan - As Mininet uses OVS bridges to simulate vswitch functionality, we can use ovs-vsctl to configure VXLAN functionality on the bridges. I thought let me try for a simple topology without using Mininet and just using OVS on a single host and 2 VMs. If it works, then I can make a similar configuration for a bigger topology using mininet. 

 

OVS on a single host and 2 VMs : vm1-----br1-------br2-----vm2 

I am confused on how to perform the vxlan config for the above setup. 

 

If the above one works, I could try on the mininet topologies. 

For the mininet topology ( --topo=linear,2 )

h1 ----- s1 ------ s2 -------- h2 (h1,h2 are hosts, s1,s2 are switches - actually ovs bridges)

$ ovs-vsctl show 
ad172f01-511d-46fe-9022-d23de31e06e2
    Bridge "s2"
        Controller "ptcp:6635"
        fail_mode: standalone
        Port "s2-eth2"
            Interface "s2-eth2"
        Port "s2"
            Interface "s2"
                type: internal
        Port "s2-eth1"
            Interface "s2-eth1"
    Bridge "s1"
        Controller "ptcp:6634"
        fail_mode: standalone
        Port "s1-eth2"
            Interface "s1-eth2"
        Port "s1"
            Interface "s1"
                type: internal
        Port "s1-eth1"
            Interface "s1-eth1"
    ovs_version: "2.5.0"

In the mininet console,

mininet>net
h1 h1-eth0:s1-eth1
h2 h2-eth0:s2-eth1
s1 lo:  s1-eth1:h1-eth0 s1-eth2:s2-eth2
s2 lo:  s2-eth1:h2-eth0 s2-eth2:s1-eth2

As the vxlan configuration part is related to OVS, I am asking in this forum, rather than the mininet forum. 

Thanks. 

 

 




Shravan

 

On 13 January 2017 at 11:08, Scott Lowe <scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> > wrote:

I would still echo Raymond's suggestion: use VirtualBox to create two "hosts" running OVS and connect them via a VXLAN tunnel over standard VBox networking. You can use network namespaces (as Justin suggested) on the VMs running OVS to simulate connecting to OVS since VBox doesn't support nested virtualization.

 

You can take a look at <https://github.com/lowescott/learning-tools> to see if there is a Vagrant environment I've already created that might help you in this situation.


-- 

Scott

 

Sent from my mobile device


On Jan 12, 2017, at 9:46 PM, Shravan S K <sra9449 at gmail.com <mailto:sra9449 at gmail.com> > wrote:

I know that. But I wanted to experiment with OVS bridges first, and then if it worked I wanted to re-create the config for a larger topology using Mininet(which uses OVS bridges(for switches) using OVS).

Thanks.




Shravan

 

On 13 January 2017 at 08:06, Raymond Burkholder <ray at oneunified.net <mailto:ray at oneunified.net> > wrote:

Try running VirtualBox, and build two guests with shared networking.   That will get you an appropriate simulation of computer to computer vxlan mechanisms.

 

From: ovs-discuss-bounces at openvswitch.org <mailto:ovs-discuss-bounces at openvswitch.org>  [mailto:ovs-discuss-bounces at openvswitch.org <mailto:ovs-discuss-bounces at openvswitch.org> ] On Behalf Of Shravan S K
Sent: Thursday, January 12, 2017 22:34
To: Scott Lowe <scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >
Cc: ovs-discuss at openvswitch.org <mailto:ovs-discuss at openvswitch.org> 
Subject: Re: [ovs-discuss] VXLAN support in OVS 2.5.0

 

Because of lack of hardware, I'm trying a vxlan setup on a single computer. 

On 13-Jan-2017 04:47, "Scott Lowe" <scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> > wrote:

Please don't drop the list.

Before we go down that path, can you help me understand what you're
trying to achieve by building a VXLAN tunnel between two VMs on the same
host?



On 01/12/2017 10:15 AM, Shravan S K wrote:
> I am not sure how to do the config for what you said.
> Can you please explain how to configure the setup that you're suggesting ?
>
> Shravan
>
> On 12 January 2017 at 02:17, Scott Lowe <scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> 
> <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >> wrote:
>
>     On 01/11/2017 03:54 AM, Shravan S K wrote:
>     > Like this?
>     > vm01-------------------|
>     > |------------------vm03
>     >
>     > br1(vxlanport1)------------br-int1=================br-int2----------(vxlanport2)br2
>     > vm02-------------------|
>     > |-------------------vm04
>     >
>     > What is the need for the bridges br-int1 and br-int2? Why is it not
>     > possible without them(as the topology shown earlier in this thread)?
>
>
>     [SL] No, I don't think this is the configuration you'd want to use. The
>     "br-int" bridges aren't strictly required; you could use br1 and br2.
>     The trick here---as you're trying to create a VXLAN tunnel within a
>     host---would be that you'll need 2 IP endpoints (one for each end of the
>     tunnel), and you'd need each bridge with a VXLAN port to be associated
>     with one of those IP endpoints.
>
>     As I said, though, I haven't tested a configuration like this. Further,
>     to be honest, I'm not really sure what you're trying to accomplish with
>     such a configuration.
>
>
>     > Shravan
>     >
>     > On 11 January 2017 at 11:59, Scott Lowe <scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org>  <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >
>     > <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org>  <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >>> wrote:
>     >
>     > Please see my response inline, prefixed with [SL].
>     >
>     >
>     > On 01/10/2017 09:50 PM, Shravan S K wrote:
>     >> I am asking if that can be done on a single physical host having
>     >> OVS. Say, as mininet creates bridges which act as switches. Can
>     >> vxlan be setup using Mininet?
>     >
>     >
>     > [SL] I don't know if it's possible for Mininet to set up VXLAN;
>     > that's a question best asked on a Mininet-related forum.
>     >
>     > As for whether it can be done on a single host, I suppose if you were
>     > to use 2 separate bridges for physical connectivity along with 2
>     > separate bridges for the tunnels, it might work. I've never tried it,
>     > though, so this is just conjecture.
>     >
>     >
>     >> Shravan
>     >>
>     >> On 10 January 2017 at 23:33, Scott Lowe <scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org>  <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >
>     <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org>  <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >>
>     >> <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> 
>     <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> > <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> 
>     <mailto:scott.lowe at scottlowe.org <mailto:scott.lowe at scottlowe.org> >>>> wrote:
>     >>
>     >> Please see my response below.
>     >>
>     >>
>     >> On 01/10/2017 02:26 AM, Shravan S K wrote:
>     >>> Is it possible to create a VXLAN setup using just bridges created
>     >>> by OVS? (using ovs-vsctl to create these bridges,ports and vxlan
>     >>> config)
>     >>>
>     >>> vm01-------------------|             |------------------vm03
>     >>>                           br1-------br2
>     >>> vm02-------------------|             |-------------------vm04
>     >>
>     >>
>     >> Yes, this is possible. On each hypervisor where OVS is running and
>     >> where you have VMs you'd like to connect over VXLAN tunnels, create
>     >> a bridge ("br-tun", for example). Create and configure a VXLAN port
>     >> appropriately on br-tun on each hypervisor, and then connect your
>     >> VMs. You should be good to go. My website has an example of doing
>     >> this with GRE; VXLAN should be nearly identical.
>     >>
>     >> Hope this helps,
>
>
>     --
>     Scott
>
>
>


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 

 

_______________________________________________
discuss mailing list
discuss at openvswitch.org <mailto:discuss at openvswitch.org> 
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

 


_______________________________________________
discuss mailing list
discuss at openvswitch.org <mailto:discuss at openvswitch.org> 
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

 


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170113/0c86cca9/attachment-0001.html>


More information about the discuss mailing list