VMware Cloud Community
jmealins
Contributor
Contributor

dhcp doesn't work between vm's on a vswitch with no nic attached

I am trying to set up a little test between some windows machines using pxe boot and dhcp. However, I don't want the dhcp server and pxe server to interfere with the other virtual machines on the live network, so I have created a vswitch with no vmnic associated with it.

I can set all the VM's to have static ip's and they can all ping each other back and forth.

When I set a VM to have a dhcp server, and tell all the other VM's (total of 3) to obtain an IP address, the can't seem to see the dhcp server.

What am I doing wrong? Is it even possible to do what I want to?

It seems like I should be able to do what I want, unless the vswitch isn't emulating Layer 2 properly.

Any help is greatly appreciated!

0 Kudos
4 Replies
esiebert7625
Immortal
Immortal

That should work if they are on the same subnet. When the VM needs an address it'll send out a DHCP discovery packet to 255.255.255.255 which is a subnet-only broadcast and not forwarded. Are your VM IP's all on the same subnet, ie. 172.20.20.5, 172.20.20.6, etc. Are you sure your DHCP Server is setup correctly?

langonej
Enthusiast
Enthusiast

Do you see any errors in your DHCP log?

Using Ethereal, do you see DHCP requests going out?

My guess is that there's something up with your DHCP/PXE config as I would think this setup should work.

jmealins
Contributor
Contributor

I am sure the dhcp server has been set up correctly. it is configured in the most generic fashion possible. There is only 1 DHCP server that is on the network (on a server with a static ip) and I have currently two other vm's trying to fetch addresses, and they are not able to.

0 Kudos
jmealins
Contributor
Contributor

Whilst waiting on a response to my support ticket, I noticed that every other time, the dhcp server seemed to think that there wasn't a properly configured NIC on the system and would throw the error:

The DHCP service is not servicing any clients because none of the active network interfaces have statically configured IP addresses, or there are no active interfaces.

So after toying around for a while, and making sure mac addresses matched between interface and vmx file, I decided to remove the interface in add/remove programs, reboot, then add it again. After I did that, then assigned it a static IP, it started handing out DHCP addresses like a charm. Still can't figure out why I could communicate with static IP's between machines, but I am assuming it was a discrepancy on this server image from when I converted it from a vmware workstation 6 image to my esx machine.

Thanks for the quick responses everybody.

0 Kudos