There are some different between VMware network connection with VirtualBox: for VMware, all clients will able to have interconnection in both NAT and internal mode, where clients will locate within save subnet; in case of VirtualBox, all NAT network will be handled individually, where only internal mode can communicate with each others (with same "network name", which will explain later). So how to build a effective internal network for your virtual clients? The main tips is: use 2 network adapters for your clients.
Let's review some background for VirtualBox's network setup. On or before VirtualBox 2.1.0, you will need to create a TUN/TAP interface for internal only network, and attach your virtual network card to it. BTW, since VirtualBox 2.1.0, you can only find 4 options (Not attached, NAT, Host Interface and Internal Network) under network card setup:
With NAT, it give you:
- DHCP services. Your client will have IP automatically.
- IP masquerade service. This is the key point of NAT so your client can access internet.
- DNS service. The default gateway will act as internal DNS server.
- Each NAT NIC will working within individual isolated subnet. This means Your NAT adapter 1 will not even able to communicate with that os NAT adapter 2.
With Internal Network, you can:
- Define a network as you like, and connect different NIC from different client to it. E.g. all NIC config with network name "br0" will locate within same subnet, so they can ping each other.
- No DHCP, DNS and NAT services. Internal network will just act like a switch, no extra feature will be provided.
So let's start with a case study. There are 2 virtual clients (Debian Lenny and Windows XP). I would like to keep them away from my real network (i.e. host interface is not suitable), having an isolated network for my development. BTW, I need some internet access for clients too. With 2 NIC, this is very simple
Configure the first NIC as NAT mode:
Configure the second NIC as Internal Network with network name "br0":
After boot into my Debian Lenny, configure /etc/network/interface as below:
For other clients, also preform similar setup as NAT (DHCP) + Internal Network (static IP). Therefore all outgoing traffic will go though NAT where intranet connection will go to Internal Network. That's it :D


















Software
is there any softwere that does those kind of connections instant without me troubling reading that kind of stuff. I am not very smart in network connections and it might be helpfull to achive at a reasonable price a softwere that is doing this job for me. Thankyou.
Sorry that I don't really
Sorry that I don't really understand your problem.
Are you using VirtualBox for visualization? Do you need to setup intranet connection between each clients? I will need more information in order to help you :S
----------------------------------------
Edison Wong
wow
exactly what i was looking for. fantabulastic! Thank you so so so much! :)
Post new comment