Hi guys,
I've been mostly using different VMWare products when it comes to virtualization and can't quite understand the logic behind NAT function in VirtualBox.
As comparison, in VMWare, when using NAT, every guest would get access to the outside world using the virtual interface from the host as gateway. Also, every guest would get an unique, internal network IP assigned to its own interface.
On VBox, on the other hand, it works pretty much the same way except the fact that every guest gets the same internal address (10.0.0.15 in my case). Because of this, if guests are supposed to reach each other, one must create an additional, host-only interface to all guests. Same goes out to if the actual host needs to communicate with the guests (unless port forwarding in Vbox is used).
I'm simply wondering why is it done this way in Vbox and whether there is possibility to override this during creation of guest VMs, or at least modify the existing VMs - so I can give them an unique 10.0.0.0/24 address on NAT - thus make them able to reach the outside world AND communicate with eachother with no need of an additional host-only interface?
NAT functionality of VBox compared to VMWare
-
kebabbert
- Volunteer
- Posts: 321
- Joined: 31. May 2008, 10:00
- Primary OS: OpenSolaris 11
- VBox Version: OSE other
- Guest OSses: WinXP, RedHat, Ubuntu
Re: NAT functionality of VBox compared to VMWare
Bridged network doesnt suffice?
-
MheAd
- Posts: 6
- Joined: 17. Apr 2010, 14:22
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: CentOS, Debian, Solaris, WinXP
Re: NAT functionality of VBox compared to VMWare
Not for my needs. And, essentially, NAT and Bridged networking are two different things.kebabbert wrote:Bridged network doesnt suffice?
-
Sm0k1n
- Posts: 18
- Joined: 31. Mar 2010, 12:37
- Primary OS: openSUSE
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows,Linux
- Contact:
Re: NAT functionality of VBox compared to VMWare
I was wondering the same thing, but unfortunately I was not able to get any machines on the same NAT. My solution is to have them all on an internal network and get another VM to act as a router between the internal network and the outside world. It works just like a regular private network even though it's a bit of an overkill to have another VM that just routes traffic...
VBox WMI - Web application for managing multiple VirtualBox servers (http://code.google.com/p/vbox-wmi/)
-
MheAd
- Posts: 6
- Joined: 17. Apr 2010, 14:22
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: CentOS, Debian, Solaris, WinXP
Re: NAT functionality of VBox compared to VMWare
Strange indeed.Sm0k1n wrote:I was wondering the same thing, but unfortunately I was not able to get any machines on the same NAT. My solution is to have them all on an internal network and get another VM to act as a router between the internal network and the outside world. It works just like a regular private network even though it's a bit of an overkill to have another VM that just routes traffic...
I solve the problem by letting all VMs using NAT function as their main interface (the same 10.0.2.15 IP address that they get) and also add an additional Host-only interface with an unique static address (or let built in DHCP handle this on that network). That way, all of the VMs are able to reach the outside world (via NAT), communicate with eachother (via Host-only network) and even reach to / be reached by the actual physical host (which also gets vboxnet0 interface with an address on the same host-only net). That way I eliminate the need of an extra VM that acts as gateway - but it's a cool experiment - I've done that too
Basically, the main difference in networking logic between VMWare and Vbox is this NAT-thing.
By _only_ using NAT on VMware I get directly the effect above - with no need for extra host-only interface, as every NAT-ed VM gets an individual internal network IP and can do all the things I mentioned above.
So the question still remains how the developers of VBox were thinking. The NAT on VMWare lives more up to its name/function.
-
Sm0k1n
- Posts: 18
- Joined: 31. Mar 2010, 12:37
- Primary OS: openSUSE
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows,Linux
- Contact:
Re: NAT functionality of VBox compared to VMWare
I think it's a matter of security and ease of use. By just clicking on NAT in the networking options you get internet access and you don't have to worry about any of the machines messing around with each other.MheAd wrote:...
So the question still remains how the developers of VBox were thinking. The NAT on VMWare lives more up to its name/function.
It would be best if there is the option to have NAT networks behave kind of like the internal networking thing. You just add the name of the network to each vm and it's done.
VBox WMI - Web application for managing multiple VirtualBox servers (http://code.google.com/p/vbox-wmi/)
-
MheAd
- Posts: 6
- Joined: 17. Apr 2010, 14:22
- Primary OS: Fedora other
- VBox Version: OSE Fedora
- Guest OSses: CentOS, Debian, Solaris, WinXP
Re: NAT functionality of VBox compared to VMWare
Sm0k1n wrote:I think it's a matter of security and ease of use. By just clicking on NAT in the networking options you get internet access and you don't have to worry about any of the machines messing around with each other.MheAd wrote:...
So the question still remains how the developers of VBox were thinking. The NAT on VMWare lives more up to its name/function.
It would be best if there is the option to have NAT networks behave kind of like the internal networking thing. You just add the name of the network to each vm and it's done.Or... the devs could add an option to enable/disable external access to the internal network.
Well, that's exactly how NAT function in VMWare works. It's not more complicated in any way - it gives you direct connection to the internet + it adds these features that nobody forces you to use. You don't have to mess with networking / IP addresses in any way (if you don't want to) - everything is done automatically (internal DHCP function) in VMware. So VMWares NAT works pretty much the way you wish VBox should
And I hope devs will make it that way in future. I mean, until not that long time ago even the bridged networking forced one to do a lot of work. But now it works just like the one on VMWare. Hopefully, in one of these days, same will happen to NAT.