Bridged connection fails if NIC is unplugged

Discussions related to using VirtualBox on Windows hosts.

Bridged connection fails if NIC is unplugged

Postby hangerglide » 15. Aug 2019, 18:02

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.
hangerglide
 
Posts: 165
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

Postby scottgus1 » 15. Aug 2019, 18:11

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.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 4262
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: Bridged connection fails if NIC is unplugged

Postby hangerglide » 15. Aug 2019, 18:29

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: 165
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

Postby hangerglide » 15. Aug 2019, 18:43

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).
hangerglide
 
Posts: 165
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

Postby scottgus1 » 15. Aug 2019, 19:23

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.
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 4262
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Re: Bridged connection fails if NIC is unplugged

Postby hangerglide » 15. Aug 2019, 19:28

Thanks Scott can't try those now but will when I can. Your help is greatly appreciated!
hangerglide
 
Posts: 165
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

Postby hangerglide » 17. Aug 2019, 21:23

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: 165
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

Postby hangerglide » 17. Aug 2019, 22:44

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?
hangerglide
 
Posts: 165
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

Postby socratis » 18. Aug 2019, 08:04

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.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25232
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Bridged connection fails if NIC is unplugged

Postby hangerglide » 18. Aug 2019, 13:05

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: 165
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

Postby hangerglide » 18. Aug 2019, 13:09

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: 165
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

Postby hangerglide » 18. Aug 2019, 13:35

...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.
hangerglide
 
Posts: 165
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

Postby socratis » 19. Aug 2019, 05:33

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.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25232
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Bridged connection fails if NIC is unplugged

Postby hangerglide » 19. Aug 2019, 09:43

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 195 times
hangerglide
 
Posts: 165
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

Postby scottgus1 » 19. Aug 2019, 19:35

Please run thess commands in a command prompt and post the results:
Code: Select all   Expand viewCollapse view
cd "C:\Program Files\Oracle\VirtualBox"
vboxmanage list hostonlyifs

Also start your guest and run & post this command:
Code: Select all   Expand viewCollapse view
ipconfig /all
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 4262
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Win7

Next

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Google [Bot], saran and 54 guests