NAT - Two guests, same IP

Discussions related to using VirtualBox on Windows hosts.
Post Reply
mirk
Posts: 7
Joined: 29. May 2012, 21:26

NAT - Two guests, same IP

Post by mirk »

I have two guests (Server 2008 R2 and Windows 7) both set to NAT but when I boot them, they both end up with the same IP, 10.0.2.15. How is that possible if VirtualBox has a built in dhcp server?

I want them to be able to see each other on the network but when I change one to static (10.0.2.16) and use the correct subnet mask and dg, it just doesn't see the other computer that is clearly in the same network which is 10.0.2.15. Why can't they see each other?
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: NAT - Two guests, same IP

Post by noteirak »

NAT is a virtual network that only exist for the guest itself. It is not a global network for every guest connected to a NAT interface.
So for every virtual NIC that is in NAT mode, Virtualbox creates a separated network that only exist for that guest.

If you want the guests to only talk to each other but not to the "outside" world, use Internal
If you want the guest to talk to each other and to the "outside" world, use either Host-only with routing in the host, or Bridged.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mirk
Posts: 7
Joined: 29. May 2012, 21:26

Re: NAT - Two guests, same IP

Post by mirk »

Thanks.
Post Reply