The VXLAN teaming policy and MTU settings can be changed on prepared hosts and clusters, but the changes apply only when preparing new hosts and clusters for VXLAN. Existing virtual port groups for VTEP VMkernel can be changed only by manually preparing the hosts and clusters again. You can change the teaming policy and MTU settings using API.

Problem

Incorrect MTU setting is chosen for the VTEPs.

Solution

  1. Retrieve information about all the VXLAN prepared switches using the GET https://<NSX-Manager-IP-Address>/api/2.0/vdn/switches API.
    In the output of the API , locate the switch that you would like to modify and note the name. For example,  dvs-35.
  2. Now query with the specific vSphere Distributed Switch that you noted earlier.
    For example, GET https://<NSX-Manager-IP-Address>/api/2.0/vdn/switches/dvs-35 API.

    Output similar to the following example should appear:

    <vdsContext>
    <switch>
     <objectId>dvs-35</objectId>
     <objectTypeName>VmwareDistributedVirtualSwitch</objectTypeName>
     <vsmUuid>423A993F-BEE6-1285-58F1-54E48D508D90</vsmUuid>
     <nodeId>916287b3-761d-430b-8ab2-83878dfe3e7f</nodeId>
     <revision>6</revision>
     <type>
      <typeName>VmwareDistributedVirtualSwitch</typeName>
     </type>
     < name>vds-site-a</name>
     <scope>
      <id>datacenter-21</id>
      <objectTypeName>Datacenter</objectTypeName>
      < name>Datacenter Site A</name>
     </scope>
     <clientHandle/>
     <extendedAttributes/>
     <isUniversal>false</isUniversal>
     <universalRevision>0</universalRevision>
    </switch>
    <mtu>1600</mtu>
    <teaming>FAILOVER_ORDER</teaming>
    <uplinkPortName>Uplink 4</uplinkPortName>
    <promiscuousMode>false</promiscuousMode
    </vdsContext>
  3. You can modify the parameters such as teaming policy and/or MTU on a vSphere Distributed Switch using the API call. The following example shows changing the teaming policy of  dvs-35 from FAILOVER_ORDER to LOADBALANCE_SRCMAC and MTU from 1600 to 9000 .
    • For NSX: PUT https://<NSX-Manager-IP-Address>/api/2.0/vdn/switches 

    Output similar to the following example should appear:
    <vdsContext>
    <switch>
     <objectId>dvs-35</objectId>
     <objectTypeName>VmwareDistributedVirtualSwitch</objectTypeName>
     <vsmUuid>423A993F-BEE6-1285-58F1-54E48D508D90</vsmUuid>
     <nodeId>916287b3-761d-430b-8ab2-83878dfe3e7f</nodeId>
     <revision>6</revision>
     <type> 
      <typeName>VmwareDistributedVirtualSwitch</typeName>
     </type>
     <name>vds-site-a</name>
     <scope>
     <id>datacenter-21</id>
     <objectTypeName>Datacenter</objectTypeName>
     <name>Datacenter Site A</name>
     </scope>
     <clientHandle/>
     <extendedAttributes/>
     <isUniversal>false</isUniversal>
     <universalRevision>0</universalRevision>
    </switch>
     <mtu>9000</mtu>
     <teaming>LOADBALANCE_SRCMAC</teaming>
     <uplinkPortName>Uplink 4</uplinkPortName>
     <promiscuousMode>false</promiscuousMode>
    </vdsContext>
    
    Note: Following is a list of valid teaming policy entries for the  <teaming> parameter:
    • FAILOVER_ORDER
    • ETHER_CHANNEL
    • LACP_ACTIVE
    • LACP_PASSIVE
    • LOADBALANCE_LOADBASED
    • LOADBALANCE_SRCID
    • LOADBALANCE_SRCMAC LACP_V2
  4. Verify the syntax used is correct and the change is active for the vSphere Distributed Switch you are working with using the GET command. For example, GET https://<NSX-Manager-IP-Address>/api/2.0/vdn/switches/dvs-35.
  5. Open the vSphere Web Client and confirm that the configuration changes are reflected.