Bridged connection fails if NIC is unplugged

Discussions related to using VirtualBox on Windows hosts.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Bridged connection fails if NIC is unplugged

Post by hangerglide »

This may be my first use of virtualbox on a windows 10 pro host. The virtualbox version is 6.0.10. The guest os are windows 10 pro and windows 7 pro. What I've discovered is that while my notebook's nic is plugged in with a network cable, the vms get a hot network connection. When it's unplugged, the network connection fails on the vms. I've read a lot of posts about this and tried one fix so far: to install a service for the nic using the file in C:\Program Files\Oracle\VirtualBox\drivers\network\netlwf\. That install was successful but still no bridged network.

I'm about to head out of town for a while and am running out of time to try more experiments. I apologize for posting this here, I'm sure the solution is already discussed, but most of the posts seem to be from a few years ago, and there are many suggestions for a fix. Is there a known for sure way to get this right? The next thing I'd try would be to uninstall vbox and reinstall running at admin.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Bridged connection fails if NIC is unplugged

Post by scottgus1 »

If I recall correctly, Bridged depends on having a live network connection to work. Bridged acts like there's a virtual unmanaged switch between your PC guts and the network card, so your PC and the guests all can access whatever network is there on the other side of the jack on the back of the PC. Take the network away, and your guests and PC are left not knowing what to connect to.

If it is essential that the guests stay connected to the host PC while there is no network, you can use Host-Only. This is a private network between all guests connected to it and the host PC. There is no Internet or LAN access out of the PC on Host-Only.

If you also want the guests to have internet access when the host PC is network-connected, add another network card connected to NAT to each guest needing internet.

It may also be possible to connect all your guests to a NAT network, so they guests can all communicate, and the host can get into the guests' network via port-forwarding in the NAT network. Internet to the guests would be available when the host has it, but the guests would be behind a "router", so port-forwarding from the host would be necessary. (I don't know if access to the guest network is possible when the host network card is unplugged on this setup.)

See the Virtualbox manual, section 6, for more info and some other network styles.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

I'll try that, thanks for the pointer, sounds about right. It may also be the first time I've run vms on a host where the physical nic can be disconnected.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

Hmm, can't create a host only adapter. In the images I've seen of the host only adapter setup, there are two tabs, NAT Network and Host-Only Network. But I only see the NAT entry and am not able to configure a valid IP or settings for it (tried to configure it thinking that it might be a unified dialog now).
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Bridged connection fails if NIC is unplugged

Post by scottgus1 »

In my 6.0.4 host, there's a File menu, Preferences, Network for NAT networks. There's also a File menu, Host Network Manager, that makes Host-Only networks. The Host-Only networks can also be accessed from the main page Tools 3-point-list icon.

I don't know if they have changed this arrangement in later versions.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

Thanks Scott can't try those now but will when I can. Your help is greatly appreciated!
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

I'm at a location that has wifi now so I have tried bridged networks on both of the vms, and neither vm connects to the network. I created new bridged network interfaces for each of the vms that utilize the wireless nic in this notebook. I can't understand why they don't fire up...I have read the relevant sections of chapter 6 (which does a good job of explaining things imo).

I can't recall if I ever ran a vm on my old notebook using wireless; this could be the first time that I've ever tried setting up a bridged netwok on a wireless nic. But it doesn't look any more complex than setting up a bridged network on a wired nic. I have disabled the other two interfaces that were configured - the wired nic and the host only network adapter (is there a way to actually delete an interface once created? I only see the option to disable it.)
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

I've read a few writeups of how to enable a network interface with a wireless adapter now. I don't see anything difficult about it, or different from what I have set up. It makes me wonder if there is something else is broken about this virtualbox installation? Is there something else than I can check?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged connection fails if NIC is unplugged

Post by socratis »

A couple of basic rules:
  1. Bridged networking requires the host to have network connectivity. There's no way around it, it's simple physics.
  2. Bridged-over-WiFi might work. In theory it's not supposed to work. Only if the combination of router/adapter/software is bending the rules, only then it will work. If it fails, it's not a surprise. If it works, it's a welcomed bonus.
hangerglide wrote:I'm at a location that has wifi now so I have tried bridged networks on both of the vms, and neither vm connects to the network
You're unlucky. The router where you are isn't cooperating.
hangerglide wrote:I created new bridged network interfaces for each of the vms
Why? You simply modify the VM Settings » Network » Adapter #n » Name. This dictates which of your host's NIC the bridging will use, no need to create new ones.
hangerglide wrote:is there a way to actually delete an interface once created? I only see the option to disable it.
That's the same as deleting it from your VM.

The basic question is simple; why do you need the Bridged option? Or better, why do you think that you need the Bridged option? Answer this and we'll have a better understanding of the situation. Tell us what you want to do, instead of telling us all your attempts to find a solution to a problem that you haven't fully described yet.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

Bridged because the vm has to talk to the sql server that is running on the host. The host profile and the vm profile (windows) are domain based.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

And you're correct about the router causing the wifi nic to not work as the vm's network interface. The location I'm in today has wifi too, and the vm connected to the network (wifi nic) immediately.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

...but even though I do have a viable network connection at this new location, it turns out that the local router here apparently it set up to block some types of traffic. Network still can't connect the host and vms file systems, and the sql server on the host is not reachable from the vm.

This is all unexpected. It looks like what is needed is the host only adapter, which so far after hours of trying I can't get to fly.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridged connection fails if NIC is unplugged

Post by socratis »

hangerglide wrote:This is all unexpected. It looks like what is needed is the host only adapter, which so far after hours of trying I can't get to fly.
Just add a 2nd network card to your VM and bind it to the Host-only network. Then configure your VM to access your host via that network and not via the Bridged one. That should do it.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
hangerglide
Posts: 183
Joined: 29. Mar 2009, 00:53
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: ubuntu 8.10

Re: Bridged connection fails if NIC is unplugged

Post by hangerglide »

Yeah, I've been trying host only adapter for days and I can't get it to work. I'd never heard of them until the original person that responded to this post; they do seem to be the ticket.

I've tried multiple times, creating a host only network using the defaults, and assigning that interface to the vm, and also followed some guidance in various posts re ip settings etc. Never works. Currently I have the host only adapter set to dhcp; and the vm setting for it are shown in the attached image. In the vm, the os is set to use dhcp. What am I missing?
Attachments
2019-08-19 09_37_21-Oracle VM VirtualBox Manager.png
2019-08-19 09_37_21-Oracle VM VirtualBox Manager.png (30.01 KiB) Viewed 5806 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Bridged connection fails if NIC is unplugged

Post by scottgus1 »

Please run thess commands in a command prompt and post the results:

Code: Select all

cd "C:\Program Files\Oracle\VirtualBox"
vboxmanage list hostonlyifs
Also start your guest and run & post this command:

Code: Select all

ipconfig /all
Post Reply