How to make 2 different Auto IPs in same range? Virtual Box is making them both 10.0.2.15

Err0r_Head

Reputable
Jan 20, 2016
8
0
4,510
I setup 2 VMs on my desktop. 1 is running Win Server 2008 R2. The other Win 7 Pro. My server VM is setup with a DHCP and set with scopes between 10.0.2.100-200. The problem is Virtual box is making both VMs use the same 10.0.2.15 address. The server is setup to use it, and setup as the gateway with it.

How can I make the Win 7 have a auto ip in the same range but not .15 also?
 
If you have your VM act as a DHCP server, it has to be connected to an isolated (or virtual) network segment. You can't have more than one DHCP server per network segment.

The VirtualBox itself does not assign IP addresses. But you might have assigned same MAC address to both machines.

Last but not least - why not use static IP addresses?
 

Err0r_Head

Reputable
Jan 20, 2016
8
0
4,510
I'm simulating a setup in a workplace environment where multiple PCs will connect to a server running a database with a console program that allows for inventory management software that all clients use together. A real server with the same software is about $6000 for every real server I build.

So i have a server running on one VM that has DHCP setup in it to serve scopes between 10.0.2.100-200 to client pcs set to auto assign. So the Win 7 Pro client running on the other VM can connect to it the same IP range and be assigned an IP address from the server VM's DHCP.

When I set the Win 7 Pro to a different mac address from the VM network settings menu. It is in a whole different IP range (eg: 10.0.3.15). Is there no way to allow for the Server VM's DHCP to reassign the Win 7 Pro VM; when i leave the network adapter in it set to auto?

When i try to set the Win 7 Pro VM to the same domain as the Server VM it cant even see it. Which is probably because the something is making the IPs not letting it auto assign like its set to do within the network adapter settings in Win 7 Pro that i set it to do.

I've already simulated static ip, this is for a DHCP Server simulation.
 

Err0r_Head

Reputable
Jan 20, 2016
8
0
4,510
I resolved the issue. In Virtual Box you just set both adapters to Internal Network . Set name to intnet. Then run each VM and set the client PC back to auto config on the adapter settings in the clients OS. Then it uses the servers DHCP setup on the other VM.