What are the main differences between VirtualBox networking types? [closed]

I'm trying to use VirtualBox to host a couple of VMs.

Each VM should be able to connect to the Internet (this is needed primarily to install software) My Host browser should be able to connect to the Guest VMs. Also I need to be able to ssh to the Guest VMs. This is why I want each VM to have a static IP address. This will also allow the VMs to connect to each other, say for database connectivity.

I have done this with VMware Fusion. However, VMware has lately bitten me too often and destroyed so much work that I want to try VirtualBox.

But I'm not a network guru and don't know which type of networking I want. So what I'm asking is simple:

What are the main differences between networking types. This could help me find out which type of networking I should use in my case.

And of course if anyone has a link to any documentation of how to do what I want, that would be greatly appreciated.

Thanks, ge


Solution 1:

This page : http://www.virtualbox.org/manual/ch06.html

covers the virtualbox networking quite well.

NAT - Your host will act as a router (firewall) and your guests will be on a private subnet. Use this if you are not running servers on the guests.

Bridged - Your guests will get a ip address on the same subnet as your host. Use this if you are running servers on the guest and wish to connect from other computers on the LAN.

Host Only - Sort of a hybrid. As the name implies, with this option you can connect to the guest servers from the host only. Use this for "private" (host only) servers. I use this if I am running a test web server.

To make a long story short, assuming you have a router, I would use bridged networking. 

Solution 2:

You want to use bridged networking.

NAT is Network Address Translation - this is a VM-internet connection, as opposed to Bridged Networking, which is (from the network point of view) the same thing as having a physical machine connected - as such, with Bridged networking, you can have it be both ways - your VM gets an IP address, which can then be used for SSH, telnet etc.