VMware ·

NSXT - How to configure Gateway DHCP Service

I been busy setting up NSXT in my home lab for the past couple of weeks. I realized there isn't much post on configuring Gateway DHCP service on NSXT. The reason why I choose Gateway DHCP over Local DHCP service is because, you only need to configure a single DHCP server to perform IP assignment to all the segments connected to either Tier-0 or Tier-1.

Let us walk through the configuration below:


Let's create a DHCP profile. From NSXT manager page, navigate to Networking > IP management > DHCP. Click on "Add DHCP Profile"

NSX-T Manager, Networking, IP Management, DHCP page with the Add DHCP Profile button

Fill in the required information:
1. Name: <any name that you like>
2. Profile Type: "DHCP server"
3. Lease Time: 86400 (default)
4. Edge Cluster: <select your edge cluster>
You need not fill in the "Server IP address". It will be automatically assigned to the container IP.

Once you are done click "Save"

New NSX-T DHCP profile with profile type DHCP Server, lease time 86400 and an edge cluster selected

Go ahead and edit your Tier-0 or Tier-1 to configure the DHCP service. In my case I will be configuring my Tier-1.

Editing a Tier-1 gateway in NSX-T with the Set DHCP Configuration link highlighted

Select the following:
1. Type: "DHCP Server"
2. DHCP Server Profile: <select the DHCP profile created earlier on>
Click Save when you are done and close the editing.
Note: The server address is being automatically filled. It is using the internal container IP address.

Set DHCP Configuration dialog on the Tier-1 gateway with type DHCP Server, the DHCP profile and an auto-filled server address

Edit the segment that you want to configure the DHCP service. Please be reminded if you configure the DHCP service on Tier-1, then the segment that uses the DHCP service must be connected to Tier-1.
Click on "Set DHCP Config" button on the right side.

Editing an NSX-T segment connected to the Tier-1 gateway with the Set DHCP Config button highlighted

Perform the following:
1. DHCP Type: "Gateway DHCP server"
2. DHCP Ranges: <enter the IP address range to be assign>
3. Lease Time: (Optional)
4. DNS Server: <Your DNS server. Can be different subnet as long its routable>
Click Apply once you are done. Proceed to click Save and close editing.

Set DHCP Config for the segment with DHCP type Gateway DHCP Server, a DHCP range and a DNS server

You are all done. Proceed to try out the DHCP by connecting your VM to the segment.

VM network connection details showing an IPv4 address leased from the NSX-T gateway DHCP server

To delete the DHCP config, simply edit the Segment and click on the "Delete DHCP Config"

Editing the NSX-T segment with the Delete DHCP Config button highlighted