VMware NSX

 View Only
  • 1.  Can I change existing Logical Switch VXLAN ID using NSX API??

    Posted May 17, 2017 10:12 AM

    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>

    1. Status Code: 200 OK
    2. Cache-Control: private, no-cache
    3. Content-Type: application/xml
    4. Date: Wed, 17 May 2017 18:01:47 GMT
    5. Expires: Thu, 01 Jan 1970 00:00:00 GMT
    6. Strict-Transport-Security: max-age=31536000; includeSubDomains
    7. Transfer-Encoding: chunked
    8. X-Frame-Options: SAMEORIGIN


  • 2.  RE: Can I change existing Logical Switch VXLAN ID using NSX API??
    Best Answer

    Posted May 17, 2017 01:35 PM

    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.



  • 3.  RE: Can I change existing Logical Switch VXLAN ID using NSX API??

    Posted May 18, 2017 06:50 AM

    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:



  • 4.  RE: Can I change existing Logical Switch VXLAN ID using NSX API??



  • 5.  RE: Can I change existing Logical Switch VXLAN ID using NSX API??

    Posted May 17, 2017 06:00 PM

    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