1

I have already read What is the difference between NAT / Bridged / Host-Only networking? for VMWare, but here I'm interested in some details for VirtualBox, see note below for why it is different.


During VirtualBox installation, I remember that when checking the 2 checkboxes:

  • Bridged Networking,
  • Host-Only Networking,

then some Oracle drivers are installed on the host machine. I don't especially want this, so I did an install with these 2 checkboxes unchecked.

Surprisingly, networking is still working in the guest VM.

How is called this mode when Bridged and Host-Only are disabled?

What happens exactly to make the networking work in the VM? Are there any drawbacks to use this mode in VirtualBox, in comparison to Bridged and Host-Only?

enter image description here


Note: according to my tests, it seems that none of the 3 options listed on What is the difference between NAT / Bridged / Host-Only networking? applies because I see this:

  • host computer on home router: 192.168.1.10
  • accessing Wikipedia on Firefox from guest VM on this host: I see the connections are made ... from 192.168.1.10 as well. So the IP is the same. None of the 3 options listed in the linked answer applies.

1 Answer 1

1

It is working in NAT mode in that case.
Virtualbox will act as a virtual router/dhcp server and the VM will connect to the LAN side of that virtual router.
The WAN side of the router is NAT'ted onto whatever LAN interface of the host you specified (and thus uses the same ip-address as the host, as you already noticed).
If you for the local ip-address in teh VM it will probably be something like 10.0.0.2 and its defautl gateway will be 10.0.0.1 which is the VirtualBox supplied virtual router. (You can change the ip-ranges if you want. The VirtualBox manual has an entire chapter dedicated to possible LAN configurations. It is extremely flexible and configurable in that regard.)

The 2 drivers you mention are only needed to enable the bridged and host-only modes and if you don't need those for your VM you can safely leave them out.
In fact: due to possible incompatibilities with other low-level LAN drivers it is recommended to only install them if you really need them.

4
  • Thank you for your answer. On this answer superuser.com/questions/227505/… it is said there a different IP will be used in NAT mode. However in my case, when I use Nirsoft cports.exe, I see requests made from host or guest VM use the same IP from my home network, for example both 192.168.1.10.
    – Basj
    Commented May 3, 2022 at 18:50
  • @Basj That is because you are only looking at the WAN side of the NAT setup. Perfectly normal for any NAT configuration.
    – Tonny
    Commented May 3, 2022 at 18:51
  • Also, are there drawbacks (in terms of security or host/guest isolation) to use the mode I describe?
    – Basj
    Commented May 3, 2022 at 18:51
  • "That is because you are only looking at the WAN side of the NAT setup. Perfectly normal for any NAT configuration". Thanks, can you elaborate a little bit? Why is it normal that requests seen in host's cports.exe in "Local address" are the same both for host and guest?
    – Basj
    Commented May 3, 2022 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .