Running a DHCP server from a Virtual Machine

Discussions related to using VirtualBox on Windows hosts.
Post Reply
grizzly812
Posts: 1
Joined: 1. Jul 2014, 03:41

Running a DHCP server from a Virtual Machine

Post 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!
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Running a DHCP server from a Virtual Machine

Post 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.
Bill
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Running a DHCP server from a Virtual Machine

Post by noteirak »

Set the Promiscious mode to "Allow all", else broadcast like DHCP request will be discarded.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
RahulBarhate
Posts: 1
Joined: 25. Nov 2014, 17:35

Re: Running a DHCP server from a Virtual Machine

Post 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
Post Reply