Web Development

Tips on using DHCP for an ESXi host

Networking is one of the most common areas where VMware vSphere installations can go awry. IT pro Rick Vanover offers tips for using DHCP for an ESXi host.

Depending on the size and the scale of your VMware vSphere environment, you might consider having DHCP addresses assigned to an ESXi host. Larger scale installations will benefit from using the new scripted installation feature of vSphere 4.1 (see the ESXi installable setup guide). Regardless of whether DHCP is used, all installations will need to have a good handle on networking and, in particular, DNS.

For non-scripted installations, you can easily check to see if a default installation will resolve its host name with the DNS configuration. Figure A shows an ESXi 4.1 host installed with defaults, yet the host name is resolved. Figure A

If the host is not resolved in the DNS server(s) that is assigned by DHCP, the ESXi host will display http://localhost entry on the loader screen (the yellow screen) instead of the DNS A record assigned to that IP address. The example in Figure A has two things in place to ensure seamless resolution and a DHCP addressed assignment: The DNS A record is already assigned for the vesxi3 host in the RWVDEV.INTRA domain, and the ESXi server's MAC address has a DHCP reservation for the IP address used in the DNS A record.

Note that the second IP address is listed as DHCP and displays only the IP address; this is because a valid host profile (or vSphere Client configuration) has not applied the second vmnic interface for the default vSwitch (vSwitch0) to establish redundancy for the vSwitch. This ESXi server actually has four network interfaces; the third and fourth vmnic interfaces are not on a DHCP segment and are not displayed on the ESXi loader screen.

The planning phases of the vSphere installation should also include a standard for IP addressing and DNS nomenclature for the ESXi hosts. It's much simpler when there is only one DNS zone in use; if there are any additional DNS zones to be used, those zones will need to be configured in the DNS and Routing Configuration section of the vSphere Client. Figure B shows this with multiple DNS zones configured. Figure B

This can be configured via the scripted installation, the command line, the vSphere Client interface, or the vSphere host profiles features. DHCP cannot assign the DNS suffixes or search order for any operating system, so ensure that the host is configured correctly.

I use DHCP for my vCenter lab, which has four ESXi hosts and one vCenter server, all of which are DHCP clients. In the course of my lab work, there have been minimal issues; however, I am not sure if I would use DHCP for production workloads. If any development-only ESXi hosts are in use, DHCP may offer a good use case.

How have you used DHCP for ESXi hosts? Share your comments in the discussion.


Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.


I can see several reasons to leverage DHCP - it forces you to have your DNS solid and functional, an item many skip over when there are static IPs to hit. However, if you leverage virtualization to the hilt, as I do (Both my DC and vCenter server are guests within the environment, set for HA in a DRS cluster for resiliency of the environment) - your DNS will not be available unless you run it physically. For quick 'n dirty set-up, sure, DHCP does the trick.. but to be honest, I cannot see a circumstance where this is advantageous, since using a VM environment requires other components to function - it strikes me as 'smarter' to go ahead and use static IPs for hosts, at a minimum.


For production, I've preferred static - but have used DHCP in the lab. Curious if anyone uses DHCP for production.


I have a rogers cable with dynamic IP. I picked up a Netgear Firewall router FVS336G and a Netgear GS724Tv ProSafe 24-Port Gigabit Managed Switch to use with my home network, but more specifically with my esxi4 whitebox server. Currently I have connected up the cable modem to the Wan 1 in the firewall router, then used the Lan 1 to connect up to the switch to use for my home internal network. I have ran a direct line from my Firewall router lan 2 straight to the whitebox esxi4 server box. (I think this is set-up right) Here is where I am stuck... How do I set-up a static IP for the whitebox server if rogers only supplies dynamic IP, or is it possible to do it in the firewall router configuration? I want to use the server for storage first, then set-up a web server later on. Can anyone help here?


I can't see why you would want to choose DHCP over static, perhaps there are reasons I've not considered....

Editor's Picks