Page 1 of 1

Running a DHCP server from a Virtual Machine

Posted: 1. Jul 2014, 03:59
by grizzly812
Hey Guys,

I am relatively new to VM and VirtualBox but I have spent hours researching how to pull off what I need. Hopefully someone can give me some insight on what I may be doing wrong with my configuration because at this point I am stuck...

Basically I want to run a DHCP server program (private application from my corporation) which will assign IP addresses to specific instruments (based upon their MAC address ranges) when they are plugged into my laptop via Ethernet. This application runs great on my Windows 7 x64 laptop and works as expected. However, when I try to run this application from within a VM of Windows 7 x64 on the same laptop I cannot get the DHCP server to assign IP addresses through my laptops Ethernet port. The DHCP server application I am running from my work operates by setting a static IP on the Ethernet card and creating a windows service .exe which runs and assigns the IPs as the MAC addresses are recognized.

I am running VirtualBox 4.3.6 on Windows 7 SP1 Pro x64.

I have set up a VM of Windows 7 x64 and tried to use the settings for a bridged adapter with my Ethernet card. This does not work. While running the VM I have tried setting the host Ethernet card to both a static and automatic IP but still the VM cannot recognize the instruments as I connect them via ethernet.

Can anyone offer some advise or insight? I feel like this is a fairly simple setup compared to what I have found when googling about my issues, but still I have not been successful in finding a solution.

Thanks in advance!

Re: Running a DHCP server from a Virtual Machine

Posted: 1. Jul 2014, 08:48
by BillG
I don't see what good changing the IP address of the host would do. If you are using bridged mode, the vm is connected to the physical network as far as the networking protocols are concerned. It is just another machine on the network.

Have you allocated a static IP to the vm itself?

To debug what is happening you would run a sniffer on the network. The fact that one machine is a vm should make no difference at all.

Re: Running a DHCP server from a Virtual Machine

Posted: 1. Jul 2014, 12:40
by noteirak
Set the Promiscious mode to "Allow all", else broadcast like DHCP request will be discarded.

Re: Running a DHCP server from a Virtual Machine

Posted: 25. Nov 2014, 17:37
by RahulBarhate
:D :D Thanks!! @noteirak. Enabling promiscous mode all worked for me.I was troubleshooting why VMs was not able to get DHCP IP from my router for long days.

Thanks again