I tried to change VNI from 5002 to 5003, return code 200, but value not changed.... remains 5002.
PUT https://MyNsxMGR/api/2.0/vdn/virtualwires/virtualwire-2
<virtualWire>
<extendedAttributes/>
<vdnId>5003</vdnId>
<controlPlaneMode>UNICAST_MODE</controlPlaneMode>
</virtualWire>
- Status Code: 200 OK
- Cache-Control: private, no-cache
- Content-Type: application/xml
- Date: Wed, 17 May 2017 18:01:47 GMT
- Expires: Thu, 01 Jan 1970 00:00:00 GMT
- Strict-Transport-Security: max-age=31536000; includeSubDomains
- Transfer-Encoding: chunked
- X-Frame-Options: SAMEORIGIN
Hi Stanley,
You cannot change the VNI of a Logical Switch. As specified in the NSX API Guide (https://pubs.vmware.com/nsx-63/topic/com.vmware.ICbase/PDF/nsx_63_api.pdf ) there is no vnId field, so the API ignored your input in your call and modified the fields that were accepted (which is why you got a 200 code).
Also why would you want to? It's an arbitrary ID which only serves purposes inside NSX/VXLAN itself. You don't have keep records, input it anywhere else. The only situation where you need that ID is if you were doing hardware VTEPs.
Hi Stanley,
You cannot change the VNI of a Logical Switch. As specified in the NSX API Guide (https://pubs.vmware.com/nsx-63/topic/com.vmware.ICbase/PDF/nsx_63_api.pdf ) there is no vnId field, so the API ignored your input in your call and modified the fields that were accepted (which is why you got a 200 code).
Also why would you want to? It's an arbitrary ID which only serves purposes inside NSX/VXLAN itself. You don't have keep records, input it anywhere else. The only situation where you need that ID is if you were doing hardware VTEPs.
Logical Switch gets its vxlan vni or segment ID from (Segment ID pool). So its auto field and hence can not be modified, you can delete LS with specific VNI and that VNI gets reused as soon as you create new one.
in case of HWvTEP same vni is required by HwTunnel on your fabric or switch.
-Saurabh jain
Thanks for the reply and yes, we are exploring to integrate with hardware VTEP and see what we could do to integrate. What we want to do is to assign different range of VNI to different tenants, such that we could preprovision everything at hardware VTEPs. It looks like we have no choice but follow whatever NSX created for us :smileycry:
Maybe it would be useful: https://www.settlersoman.com/ftf-008-how-to-enumerate-change-nsx-logical-switch-vni/