Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

3 Answers 3

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '09 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. –  Bart Silverstrim Aug 10 '09 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. –  Bart Silverstrim Aug 10 '09 at 11:48
    
Doh! I had totally misunderstood bridged networking. Thanks Bart, problem solved. –  Richard Aug 11 '09 at 8:53

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.