Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I set up two machines in VirtualBox via NAT mode each machine gets the same IP from the virtual DHCP server, why is that?? Makes no sense to me. Both have the Gateway which is fine, but they also get the same IP

According to the answers it seems to be correct, well I didn't expect something else.

But then what if I want to create a whole subnet for 4 hosts in a NAT environment?

BTW VMware Workstation does it, it has ONE large NAT for all hosts out of the box. One big advantage over VB

share|improve this question

That's correct because in NAT mode every virtual machine stays in a separated network.

share|improve this answer
But then what if I want to create a whole subnet for 4 hosts in a NAT environment? – JohnnyFromBF Sep 19 '11 at 14:56
@Ian - try the "internal" option rather than NAT. – Joel Coel Sep 19 '11 at 16:23
@PsyStyle - separated network is relative, cause if you set up 4 hosts they all have the same IP & subnet... I guess VB acts as if they where different NAT Networks. – JohnnyFromBF Sep 19 '11 at 17:50

I think you need to create an internal network, selecting internal network an then create a virtual machine with 2 nics one of which connects in nat mode and the other to the intnet (default name for internal network). This virtual machine will act as a router for your NATed network.

share|improve this answer
k thanks, but thats pretty complicated - why didn't they put a routing function into VB? – JohnnyFromBF Sep 19 '11 at 17:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.