How to use Edge DHCP service for subnets behind DLR

Bacalov, Damian

Since NSX version 6.2.1, you can configure DHCP pools in an Edge for networks behind DLR.

If you have the latest version of vSphere Client (6.0.0 or newest), you can do this directly from the console filling the form below:


But if you have vSphere Client version 5.5 or older, this cannot be done. If you see the form, it has the “Subnet Mask” parameter missing.


And if you try to submit the form without the parameter, you get an error:



You can configure this pools using the NSX API. In this article, I will show how to do it using Firefox with RestClient add-on.


Before we start, we need:

  • NSX Manager URL (https://nsxHost/)
  • NSX Manager administrative credentials
  • The id of the Edge we want configure
  • Desired network dhcp pools data

You can find the Edge Id in the vSphere Client as you can see in the following image:


Creating the API call content

In this example we will create two DHCP pools for the networks and in both cases, the “.1” address is the default gateway. In order to do that, we need to create an XML like the following:

    <staticBindings />

Using RestClient

In the RestClient, we add a Basic Authentication and add the proper credentials.


Add the Content-Type header and set xml:


Add the Accept header and set xml:


Select the PUT Method, paste the XML with the configuration in the Body and set the URL to:
We need to replate “{nsxHost}” for the actual NSX host and “{edge-Id}” for the Id of the Edge.

Click “send” and that’s it. The new configuration is up and running.


If you have something configured in the Edge DHCP service, first you need to get the current configuration and add the new pools nodes in the XML.

To get the current configuration, you need to use the GET method (instead of PUT).

DHCP Relay

The last thing to do is to set the DHCP Relay in the Logical Router and set the appropriate firewall rules, but you can do this using vSphere Client.


Escriba un comentario

Usted debe estar registrado escribir un comentario.