VMware Cloud Community
daasohn
Contributor
Contributor

DHCP on all VMkernels?

i have just started a new job and i have discovered that all hosts are configured with DHCP.  Along with that, the host has an additional script that registers the host with DDNS.  Kind of nice, but not that nice.

I like static on all hosts.  EVERWHERE.

Here is the crazy part. On each host, there is an additional vmkernel for iSCSI connectivity.  THOSE vmkernels are set to DHCP!  I couldn't believe it.

So, i noticed that i was having connectivity problems on some of the hosts.  Turns out, i am having duplicate IP address conflicts in all the clusters.

It seems like a false positive, because in each error, it clames "A duplicate IP address was detected for 192.168.x.x on the interface vmk1.  The current owner is ##:##:##:##:##:##:##:##,  the mac address.  The actual mac address on each error is the mac address of vmk0!!!

Let's just cut to the chase.  Should we EVER use DHCP in a production environment on a second and third vmkernel?  This sounds insane to me.

I can live with the vmk0 being used for DHCP, although i don't want that.  I will pick and choose my battles for now.

0 Kudos
3 Replies
AKostur
Hot Shot
Hot Shot

What I don't know is how close ESXi conforms to the DHCP specs, particularly surrounding storing lease state to non-volatile storage.

There's no particular reason why you couldn't use DHCP on all of your interfaces.  I'm in a much smaller shop, and my ESXi hosts will be starting before the DHCP server does (mostly because the DHCP server is a VM in the ESXi host...).  As a result, I must do static addressing, at least for the iSCSI interfaces.

If in your environment the DHCP servers are going to be alive before you ESX hosts will be, there shouldn't be a problem.

If your two vmkernels are conflicting with each other, that seems to suggest a different problem is happening.

0 Kudos
Josh26
Virtuoso
Virtuoso

I've seen this same configuration.

Certainly in the iSCSI world, I cannot imagine how you would discover targets from ESXi, or map LUNs from your SAN, where any level of DHCP was involved. Datastores need to be up before anything else, having your SAN delayed by a DHCP server is a disaster.

To answer your question, yes. Auto deploy based networks are often built using DHCP. However, even those best practices involve your infrastructure having static configuration - enough that you can get into your vCenter and repair something if needed.

0 Kudos
chriswahl
Virtuoso
Virtuoso

DHCP adds a layer of complexity, in the form of a reliance on a service, where it is not needed. I typically advise using statically assigned IPs from specific VLANs and subnets for the server vmkernel ports. This holds especially true when the DHCP server is virtualized on the host(s).

This has been brought up various times over the years, and is ultimately still a choice. Crusty admins like myself will always view DHCP as something for workstations. Smiley Happy

VCDX #104 (DCV, NV) ஃ WahlNetwork.com ஃ @ChrisWahl ஃ Author, Networking for VMware Administrators
0 Kudos