DIffernet IPs for Virtual Boxes

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
patroitguards
Posts: 2
Joined: 24. Nov 2017, 09:56

DIffernet IPs for Virtual Boxes

Post by patroitguards »

Hi everyone, I desperately try to establish virtual boxes with different ip addresses than my host system.
Unfortunately it doesn't seem to work with a Dynamic IP address. I use a WLAN router and the IP address is refreshed every 24h by the internet provider. Can someone help me out. I already checked all tutorials, but none worked for me. Thanks everyone :D
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: DIffernet IPs for Virtual Boxes

Post by mpack »

What are you trying to do? Your "household IP" is set by your internet provider. To the outside world all traffic coming from your LAN will have that same external IP. The local IPs dished out to PCs on your local LAN is not relevant to the outside world - those IPs are stripped off and replaced by the external IP as soon as the messages cross into the outside world.

The only way for your PCs to have different IPs as seem by the outside world is for each PC to use a different VPN connection, i.e. relay the messages through an external site which has its own IP.

If you are talking about your LAN then your PCs already get unique IPs from DHCP, otherwise your LAN couldn't possibly be working.
patroitguards
Posts: 2
Joined: 24. Nov 2017, 09:56

Re: DIffernet IPs for Virtual Boxes

Post by patroitguards »

I totally understand, what I try to do is to give every virtualbox a private ip inside the network. How can I achieve this on a Mac Host?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: DIffernet IPs for Virtual Boxes

Post by mpack »

Which "the network" do you mean? VirtualBox allows you to attach a VM to several different and separate networks, and each one has its own means of obtaining IP addresses.

Bridged: VM is just another PC on your host network. Normally your home router or business server provides the DHCP service.
NAT: VirtualBox provides a DHCP server for this.
NAT network: VirtualBox provides a DHCP server for this.
Host only: VirtualBox provides a DHCP server for this.
Internal network: you have to provide your own DHCP for this, or use fixed addressing.

If your VMs are clones then make sure they have unique MAC addresses, otherwise the DHCP server will be confused.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: DIffernet IPs for Virtual Boxes

Post by BillG »

Why do you need to know these addresses? Are you trying to contact the vms from the Internet? If not, what exactly are you trying to achieve?

There is probably a solution to your problem if we know what that problem is.
Bill
Post Reply