[ovs-dev] How to set VXLAN VNI?

Changbin Liu changbin.liu at gmail.com
Tue Feb 26 15:21:28 UTC 2013


On Tue, Feb 26, 2013 at 9:54 AM, Kyle Mestery (kmestery) <kmestery at cisco.com
> wrote:

> On Feb 25, 2013, at 10:00 PM, Changbin Liu <changbin.liu at gmail.com> wrote:
> >
> > Hi Kyle,
> >
> > Thanks so much for your reply!
> >
> > To clarify, I noticed the code was broken recently and have been using
> > "3b6f2889400fd340b851c2d36356457559ae6e81", where you fixed one VXLAN
> bug in early Jan.
> >
> > I tried your first way:
> >
> > ovs-vsctl add-port br5 vxlan5 -- set interface vxlan5 type=vxlan
> options:remote_ip=192.168.5.14 options:key=<VNI> options:dst_port=9999
> >
> > It works! I used an integer as VNI and via Wireshark I can see it is
> correctly set in the packets . Just curious: it works even without
> "options:dst_port=9999". Is it necessary to set dst_port here?
> >
> Great, glad it works! It's not necessary to set the destination port
> there, that's useful if you'd like to change it from the default. I had
> copied and pasted that from a prior example of mine.
>
>
I see. Thanks!


> > Another (less relevant) question is that, has OpenvSwitch's VXLAN
> supported STP or similar protocols to avoid loops? We are now using hub and
> spoke network topology to get around this issue.
> >
> I'm not following you here. Do you mean does VXLAN encapsulate STP
> packets? Or are you looking for how VXLAN interacts with STP?
>
>
My understanding/experience is that when we create VXLAN tunnels, currently
we have to be careful to make sure that the constructed network is
loop-free. Is that right? To ensure a loop-free layer-2 network, does
OpenvSwitch provide things like STP or users have to implement their own
via OpenFlow?


> > Changbin
> >
> >
> > On Mon, Feb 25, 2013 at 9:53 PM, Kyle Mestery (kmestery) <
> kmestery at cisco.com> wrote:
> > On Feb 25, 2013, at 8:40 PM, Changbin Liu <changbin.liu at gmail.com>
> >  wrote:
> > > Hi folks,
> > >
> > > I have been using OpenvSwtich for a while and the VXLAN feature is
> awesome. We are able to run OpenStack on top of it now. During deployment,
> I have one question: how to set the VNI (VXLAN Network ID) of VXLAN
> tunnels? I have checked the content of packets, and seems like the VNI
> field is all set to zero. I believe VXLAN's VNI (up to 16M in total) is a
> great selling point compared to VLAN. I have Googled around but had no luck
> finding any useful document. I would really appreciate your help. Thanks!
> > >
> > > Changbin
> > > _______________________________________________
> > > dev mailing list
> > > dev at openvswitch.org
> > > http://openvswitch.org/mailman/listinfo/dev
> >
> > Hi Changbin:
> >
> > There are 2 ways to do it:
> >
> > Per port, you can use it when creating the VXLAN port like this:
> >
> > ovs-vsctl add-port br5 vxlan5 -- set interface vxlan5 type=vxlan
> options:remote_ip=192.168.5.14 options:key=<VNI> options:dst_port=9999
> >
> > This limits you to that particular port having only that VNI when
> packets hit it. A more dynamic way to do it is to set the key to "flow" and
> program VNIs using flow programming like this:
> >
> > ovs-vsctl add-port br5 vxlan5 -- set interface vxlan5 type=vxlan
> options:remote_ip=192.168.5.14 options:key=flow options:dst_port=9999
> >
> > Then you create flows with actions of "set_tunnel" to set the VNI. This
> is how OpenStack Quantum with the OVS plugin does things, for example.
> >
> > BTW: Which version of OVS VXLAN code are you running? The current code
> in master is slightly broken waiting for a few commits to go in to fix
> things.
> >
> > Thanks,
> > Kyle
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130226/0d8e9435/attachment-0003.html>


More information about the dev mailing list