Page 1 of 1
redundant network adapters
Posted: 22. May 2013, 20:54
by macro
I understand that I can use NAT mode to create an internet connection from the VM through my router. I can also create this functionality by using a bridged mode for the network adapter, which allows the programs and OS of the VM to make an internet connection through the LAN's router. What, for example, might be a typical reason for someone using both of these adapter modes since apparently the bridged mode would already permit the functionality (i.e., Internet connectivity) provided by another adapter in NAT mode? Or would having both be an unnecessary redundancy?
Re: redundant network adapters
Posted: 22. May 2013, 21:42
by noteirak
I think you are confusing the purpose you are trying to achieve with the functional value of each networking mode.
Virtualbox provides four different networking modes to emulate four typical network infrastructure that would usually be put in place with physical machines.
- NAT will emulate PCs connected to a different router each doing NATing, each on their own distinct network, with a default gateway being the host itself.
- Bridged will emulate a direct connection to the switch onto which your host's NIC is connected.
You could very well require both, but in your case, yes it would be totally redundant.
You would typicaly choose NAT over Bridged if you would want to keep the guest isolated from your regular network (but not the other way around!), yet giving him normal web access (don't expect anything else to work).
Re: redundant network adapters
Posted: 22. May 2013, 23:52
by macro
Hi, noteirak
> "I think you are confusing the purpose you are trying to achieve with the functional value of each networking mode."
Well, I guess anything is possible at some point!

In any case, my question was indirectly related to the consequent benefit, if any, of using NAT mode, other than the one you stated, which granted is an important consideration, that the VM would be isolated from the rest of the LAN. I was wondering whether the NAT mode is any different in Windows than, for example, similarly configuring a Windows host "as if" it were doing ICS (internet connection sharing) with the VM. I mean, what other purpose or result could come from setting it up as the VM's gateway. In other words, what other association or functionality could these two machines share as a result of using the host as a default gateway? Thanks.
Re: redundant network adapters
Posted: 23. May 2013, 02:15
by BillG
I really don't understand your question. Each mode has a particular reason to be there, as noteirak said. It does not imply that more than one should be used, although there are valid reasons for using more than one in some cases. You seem to think that NAT mode is redundant because bridged does essentially the same thing, but that is only true if the host is on a LAN. If the host is a standalone with a direct connection to the Internet, bridged mode is not available and NAT is the only option to give the guest an Internet connection (which is why it is the default option).
Re: redundant network adapters
Posted: 23. May 2013, 08:47
by noteirak
macro wrote: similarly configuring a Windows host "as if" it were doing ICS (internet connection sharing) with the VM.
The difference is that in the VB NAT case, the host is not aware of the extra network. To the host, it all looks like the Virtualbox process is doing all the requests and listen on all the ports forwarded to the guest.
The possible use cases are very vast, and I am not sure we could cover them all

I can give you the typical usages for NAT :
- You are new to Virtualbox and only want to use your VM as a secondary desktop, and do not understand exactly how everything works (hence the NAT by default)
- You want to hide (as much as possible) a guest from the rest of the network and make it look like there is only the host
- You do not want to have to do extra configuration so a guest has access to the host's network
- If you have several guests, you want to fully isolate them (network perspective) yet retain "outside" network access
The sum-up of NAT mode is that you would use either if you just want a quick config, or you are not skilled in networking.
If you want any kind of non-default networking config, do not use NAT.