[ovs-dev] How to set VXLAN VNI?
Kyle Mestery (kmestery)
kmestery at cisco.com
Tue Feb 26 02:53:06 UTC 2013
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
More information about the dev
mailing list