You configure your edge gateways to provide Dynamic Host Configuration Protocol (DHCP) services to VMs connected to the associated organization virtual data center (VDC) networks in VMware Cloud Director.
As described in the NSX documentation, an NSX edge gateway capabilities include IP address pooling, one-to-one static IP address allocation, and external DNS server configuration. Static IP address binding is based on the managed object ID and interface ID of the requesting client virtual machine.
- Listens on the internal interface of the edge gateway for DHCP discovery.
- Uses the IP address of the internal interface of the edge gateway as the default gateway address for all clients.
- Uses the broadcast and subnet mask values of the internal interface for the container network.
- You changed or deleted a DHCP pool, default gateway, or DNS server.
- You changed the internal IP address of the edge gateway instance.
Add a DHCP IP Pool on an NSX Data Center for vSphere Edge Gateway in the VMware Cloud Director Tenant Portal
You can configure the IP pools needed for a DHCP service of an NSX Data Center for vSphere edge gateway. DHCP automates IP address assignment to virtual machines connected to organization virtual data center networks.
As described in the NSX Administration documentation, the DHCP service requires a pool of IP addresses. An IP pool is a sequential range of IP addresses within the network. Virtual machines protected by the edge gateway that do not have an address binding are allocated an IP address from this pool. IP pool ranges cannot intersect one another, thus one IP address can belong to only one IP pool.
Procedure
Results
Add DHCP Bindings To an NSX Data Center for vSphere Edge Gateway in the VMware Cloud Director Tenant Portal
If you have services running on a virtual machine and do not want the IP address to be changed, you can bind the virtual machine MAC address to the IP address. The IP address you bind must not overlap a DHCP IP pool.
Prerequisites
Procedure
- Open Edge Gateway Services.
- From the primary left navigation panel, select Networking and from the page top navigation bar, select Edge Gateways.
- Select the edge gateway that you want to edit, and click Services.
- On the Create () button, specify the details for the binding, and click Keep.
tab, click the
Option Description MAC Address Type the MAC address of the virtual machine that you want bound to the IP address. Host Name Type the host name you want set for that virtual machine when the virtual machine requests a DHCP lease. IP Address Type the IP address you want bound to the MAC address. Subnet Mask Type the subnet mask of the edge gateway interface. Domain Name Type the domain name of the DNS server. Auto Configure DNS Enable this toggle to use the DNS service configuration for this DNS binding. If enabled, the Primary Name Server and Secondary Name Server are set to Auto.
Primary Name Server When you do not select Auto Configure DNS, type your primary DNS server IP address of your primary DNS server. This IP address is used for hostname-to-IP address resolution.
Secondary Name Server When you do not select Auto Configure DNS, type your secondary DNS server IP address. This IP address is used for hostname-to-IP address resolution.
Default Gateway Type the default gateway address. When you do not specify the default gateway IP address, the internal interface of the edge gateway instance is taken as the default gateway.
Lease Never Expires Enable this toggle to keep the IP address bound to that MAC address forever. When you select this option, Lease Time is set to infinite.
Lease Time (Seconds) Length of time (in seconds) that the DHCP-assigned IP addresses are leased to the clients. The default lease time is one day (86400 seconds).
Note: You cannot specify a lease time when you select Lease never expires. - Click Save changes.
Configuring DHCP Relay for NSX Data Center for vSphere Edge Gateways in the VMware Cloud Director Tenant Portal
You can use the DHCP relay capability that NSX provides in your VMware Cloud Director environment to leverage your existing DHCP infrastructure from within your VMware Cloud Director environment without any interruption to the IP address management in your existing DHCP infrastructure.
DHCP messages are relayed from virtual machines to the designated DHCP servers in your physical DHCP infrastructure, which allows IP addresses controlled by the NSX software to continue to be synchronized with IP addresses in the rest of your DHCP-controlled environments.
The DHCP relay configuration of an edge gateway can list several DHCP servers. Requests are sent to all listed servers. While relaying the DHCP request from the VMs, the edge gateway adds a gateway IP address to the request. The external DHCP server uses this gateway address to match a pool and allocate an IP address for the request. The gateway address must belong to a subnet of the edge gateway interface.
You can specify a different DHCP server for each edge gateway and can configure multiple DHCP servers on each edge gateway to provide support for multiple IP domains.
- DHCP relay does not support overlapping IP address spaces.
- DHCP relay and DHCP service cannot run on the same vNIC at the same time. If a relay agent is configured on a vNIC, a DHCP pool cannot be configured on the subnets of that vNIC. See the NSX Administration Guide for details.
Specify a DHCP Relay Configuration for an NSX Data Center for vSphere Edge Gateway in the VMware Cloud Director Tenant Portal
The NSX software in your VMware Cloud Director environment provides the capability for the edge gateway to relay DHCP messages to DHCP servers external to your VMware Cloud Director organization virtual data center. You can configure the DHCP relay capability of the edge gateway.
As described in the NSX Administration documentation, the DHCP servers can be specified using an existing IP set, IP address block, domain, or a combination of all of these. DHCP messages are relayed to every specified DHCP server.
You must also configure at least one DHCP relay agent. A DHCP relay agent is an interface on the edge gateway from which the DHCP requests are relayed to the external DHCP servers.