2

I am trying to run a dhcp server in a virtual machine using Parallels Desktop.

I have the dhcp server running in Ubuntu on a virtual machine, if I give the virtual machine its own network interface on the host machine then everything works as expected.

However, when I have the virtual machine share a network interface with the host machine then the dhcp server never responds to dhcp requests.

I have enabled port forwarding for port 67 and when I use tcpdump in the virtual machine I can see the dhcp requests arriving.

Any ideas as to what is preventing the responses?

Thanks

3 Answers 3

2

If you set up a machine that you're trying to get DHCP requests to as a static IP, can you ping from the VM to the physical system? I.e., can your VM see the machines you're trying to reply out to?

Are you using NAT or bridged networking? Normally anything but bridged can cause some wonky behavior.

4
  • The VM can see the machines its trying to reply to, it can ping them ok. NAT is being used so that the host and guest OSs can share the same network interface. Using bridged networking, everything works OK, I wanted to avoid using up one of the interfaces on the host machine.
    – Richard
    Aug 10, 2009 at 9:05
  • I think the NAT is blocking the ability to hand out addresses in a different subnet than the NAT network allows the server to use, from the sounds of it. Aug 10, 2009 at 11:48
  • Bridged networking doesn't take up the IP on the host's NIC. It's shared. Your VM and your host both have their own IP's. You just lose an IP on your network since your one host has two IP's. Aug 10, 2009 at 11:48
  • Doh! I had totally misunderstood bridged networking. Thanks Bart, problem solved.
    – Richard
    Aug 11, 2009 at 8:53
0

I have a dhcp server running on KVM, serving a few subnets. Try to disable iptables on the VM, or the v-host

0

You're definitely going to need to configure the interface in bridged mode (transparent network bridging) as Bart pointed out. If it's in host-only (isolated network segment with host) mode or NAT (routing between isolated network segments) mode, the interface won't be on the same network segment as the rest of the hosts you might want to assign addresses to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .