Search the VMware Knowledge Base (KB)
View by Article ID

Modifying the interface configuration for an already deployed DLR/ESG fails with a blank error message (2151153)

  • 0 Ratings

Symptoms

  • Distributed Logical Router/ Edge Services Gateway is pre-deployed.
  • Adding/Modifying interface level parameters fail with a blank error message similar to:


Cause

This issue occurs because of a deprecated Long field in VnicAddressDto and while accessing it in the vSphere Java layer, it throws a null pointer exception.

Resolution

This issue is resolved in VMware NSX for vSphere 6.3.3, available at VMware Downloads.

To work around this issue if you do not want to upgrade, use REST API to configure/edit the interface settings for the affected releases.

Notes: Before performing the steps, ensure that:
  • You have basic authorization with the NSX Manager web credentials such as the admin user, or any vCenter Server user granted NSX privileges.
  • Headers Content-type: application/xml and Accept: application/xml are used.
  • API call to add/modify an interface configuration for a Distributed Logical Router is different from the one used for Edge Services Gateway.
To Add/Edit the interface configuration of a Distributed Logical Router, use the following sample API call:

Request:
POST https://<NSXMGR_IP>/api/4.0/edges/edgeId/interfaces/?action=patch

Request Body:
<interfaces>
<interface>
<name>interface1</name>
<addressGroups>
<addressGroup>
<primaryAddress>192.168.10.1</primaryAddress>
<subnetMask>255.255.255.0</subnetMask>
</addressGroup>
</addressGroups>
<mtu>1500</mtu>
<type>uplink</type>
<isConnected>true</isConnected>
<connectedToId>dvportgroup-39</connectedToId>
</interface>
<interface>
<addressGroups>
<addressGroup>
<primaryAddress>192.168.20.1</primaryAddress>
<subnetMask>255.255.255.0</subnetMask>
</addressGroup>
</addressGroups>
<mtu>1500</mtu>
<type>internal</type>
<isConnected>true</isConnected>
<connectedToId>dvportgroup-40</connectedToId>
</interface>
<interface>
<addressGroups>
<addressGroup>
<primaryAddress>192.168.50.1</primaryAddress>
<subnetMask>255.255.255.0</subnetMask>
</addressGroup>
</addressGroups>
<mtu>1500</mtu>
<type>internal</type>
<isConnected>true</isConnected>
<connectedToId>dvportgroup-37</connectedToId>
</interface>
</interfaces>


To Add/Edit the interface configuration of an Edge Services Gateway, use the following sample API call:

Request:
POST https://<NSXMGR_IP>/api/4.0/edges/edgeId/vnics/?action=patch


Request Body:
<addressGroup> <!-- Vnic can be configured to have more than one addressGroup/subnets -->
<primaryAddress>192.168.12.240</primaryAddress> <!-- This is mandatory for an addressGroup -->
<secondaryAddresses> <!-- Optional. Should be used to add/defined other IPs used for NAT, LB, VPN, etc -->
<ipAddress>192.168.3.2</ipAddress>
<ipAddress>192.168.3.3</ipAddress> <!-- Optional. This way multiple IP
Addresses can be assigned to a vnic/interface -->
</secondaryAddresses>
<subnetMask>255.255.255.0</subnetMask> <!-- either subnetMask or
subnetPrefixLength should be provided. If both then subnetprefixLength is ignored -->
</addressGroup>
<addressGroup> <!-- Vnic can be configured to have more than one
addressGroup/subnets -->
<primaryAddress>192.168.4.1</primaryAddress> <!-- This is mandatory for an addressGroup -->
<secondaryAddresses> <!-- Optional. Should be used to add/defined other IPs used for NAT, LB, VPN, etc -->
<ipAddress>192.168.4.2</ipAddress>
<ipAddress>192.168.4.3</ipAddress> <!-- Optional. This way multiple IP Addresses can be assigned to a vnic/interface -->
</secondaryAddresses>
<subnetPrefixLength>24</subnetPrefixLength>
</addressGroup>
<addressGroup> <!-- ipv6 addressGroup -->
<primaryAddress>ffff::1</primaryAddress> <!-- This is mandatory for an addressGroup -->
<secondaryAddresses> <!-- Optional. Should be used to add/defined other IPs used for NAT, LB, VPN, etc -->
<ipAddress>ffff::2</ipAddress>
</secondaryAddresses>
<subnetPrefixLength>64</subnetPrefixLength> <!-- prefixLength valid values
1-128 -->
</addressGroup>
</addressGroups>
<mtu>1500</mtu> <!-- optional. Default is 1600 for type "TRUNK" and 1500 for others-->
<type>uplink</type> <!-- optional. Default is internal. Other possible value is "uplink" and "TRUNK" -->
<index>0</index>
<portgroupId>network-12</portgroupId> <!-- Possible values here are portgroupIds or virtualWire-id. portgroupId needs to be defined if isConnected=true. For vnic of type "TRUNK" logical switch cannot be used -->
<portgroupName>VM Network</portgroupName>
<macAddress> <!-- optional. When not specified, macAddresses will be managed by VC -->
<edgeVmHaIndex>0</edgeVmHaIndex> <!-- possible values 0 or 1 when HA is
enabled -->
<value>00:50:56:01:03:23</value> <!-- optional. User must ensure that macAddresses provided are unique within the given layer 2 domain. -->
</macAddress>
<fenceParameter> <!-- optional -->
<key>ethernet0.filter1.param1</key>
<value>1</value>
</fenceParameter>
<enableProxyArp>false</enableProxyArp> <!-- optional. Default is false -->
<enableSendRedirects>true</enableSendRedirects> <!-- optional. Default is true -->
<enableBridgeMode>false</enableBridgeMode> <!-- optional. Default is false -->
<isConnected>true</isConnected> <!-- optional. Default is false -->
<inShapingPolicy> <!-- optional -->
<averageBandwidth>200000000</averageBandwidth>
<peakBandwidth>200000000</peakBandwidth>
<burstSize>0</burstSize>
<enabled>true</enabled>
<inherited>false</inherited>
</inShapingPolicy>
<vnics> <!-- mamimum 10 interfaces index:0-9 can be configured. Until one connected vnic is configured, none of the configured features will serve the network -->
<vnic>
<name>EXT</name> <!-- optional. System has default Names. format vNic0 ... vNic7 -->
<addressGroups>


For more information on how to make API calls to the NSX Manager, see the Using the NSX REST API section in the VMware NSX for vSphere API Guide.

Additional Information

To be alerted when this article is updated, click Subscribe to Document in the Actions box.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 0 Ratings
Actions
KB: