Host and guest using separate internet connections?

This is for discussing general topics about how to use VirtualBox.
Post Reply
Markie
Posts: 15
Joined: 23. Sep 2015, 16:56

Host and guest using separate internet connections?

Post by Markie »

I have 3 independent internet connections in the house, all 3 can connect via cable as well as via WiFi.
Now if my host (usually Win10 pro) is using the whole bandwidth of one of the connections for a download or something it would be quite useful if the guest (usually some other version of Windows) could use one of the other two.
So the question is, is that possible at all and if yes then how?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Host and guest using separate internet connections?

Post by mpack »

Markie wrote: is that possible at all and if yes then how?
Maybe, and same way you'd do it with any non-virtual PC.
Markie
Posts: 15
Joined: 23. Sep 2015, 16:56

Re: Host and guest using separate internet connections?

Post by Markie »

With a non virtual PC I have 3 independent computers on 3 independent internet connections, the need to have two connections on one computer doesn't exist there.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Host and guest using separate internet connections?

Post by mpack »

I'm not sure that responds to my point, which is that a virtual PC is the same as any other PC.

If you give one PC access to all three networks, and if you have appropriate software in the PC to detect congestion on one channel, then sure, I can see how it could decide to use another. I guess what I'm not getting is why you assume that being virtual changes the task that you need the PC needs to perform.
Markie
Posts: 15
Joined: 23. Sep 2015, 16:56

Re: Host and guest using separate internet connections?

Post by Markie »

Problem is that I never tried 2 connections on one computer.
Furthermore I do not want any of my computers to use more than one connection.
Only if a VM could use a connection independent from the host while it's for sure that neither of them could by some automatic switch to the other connection in case it's own connection is down or something, I could get rid of one of my 3 computers.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Host and guest using separate internet connections?

Post by scottgus1 »

See Virtualbox Networks: In Pictures

Essentially you need multiple separate network connections to your house networks: two Ethernets, ethernet and Wi-Fi, another USB Wi-Fi adapter, something like that. You can use one network adapter tied to one internet connection by your setup for the host PC, and Bridge the VM to another network connection that is tied by your setup to another internet connection. Then the VM would have a separate internet connection.

How to get the separate networks to your computer is your setup. It would be really easy if you have three routers, each tied to an internet connection, so you have three independent LANs in the house. Connect each host network adapter to one of the LANs, and Bridge the VM to one of the network adapters, voila!

If the three internet connections come on the same LAN, then it gets more complicated, and I don't know how to set that kind of thing up. Essentially each host network adapter has to connect to a different internet service somehow, then you Bridge one to the VM.

Note that Bridged does not always work with Wi-Fi, per the link above. If you must use Wi-Fi for the VM and Bridged does not connect, a work-around in your setup is to use a USB Wi-Fi adapter and pass the device into the VM with a Virtualbox USB filter. Then the VM has direct control over the Wi-Fi device, no Bridging needed.
Markie
Posts: 15
Joined: 23. Sep 2015, 16:56

Re: Host and guest using separate internet connections?

Post by Markie »

scottgus1 wrote:It would be really easy if you have three routers, each tied to an internet connection, so you have three independent LANs in the house. Connect each host network adapter to one of the LANs, and Bridge the VM to one of the network adapters, voila!
That's what I have and it sounds easy, I even have a mainboard with two network cards on board, meaning I have no problem plugging in two cables.
What I'm not sure about is what Windows does with the two connections, especially on the host.
With WiFi on two separate computers that's not a problem, I simply give the password only to the computer I want to use that connection.
The guest won't have a problem either as it isn't even aware of the second connection on the host, but what if my hosts internet connection goes down? Wouldn't windows automatically try to use the second connection and if yes, then can I prevent that and reserve the second connection for the guest?
Last edited by Markie on 27. May 2021, 21:04, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Host and guest using separate internet connections?

Post by scottgus1 »

Markie wrote:what if my hosts internet connection goes down? Wouldn't windows automatically try to use the second connection
It may. I haven't had a PC with two internet connections, so I don't know what happens. But I have had Windows complain about two gateways, and may shut one of them down.

But there is a way to keep the Windows host off the desired connection:
Open the network adapter's Windows Properties, to this box:
Image
If you uncheck all the boxes except Virtualbox NDIS# Bridged Networking Driver, then the host can't use that adapter but Virtualbox can. If you wan the VM to use only this adapter, then open the other adapter's Properties and uncheck only the Bridged Networking Driver checkbox, then that adapter won't appear as a possible adapter to Bridge to.
Markie
Posts: 15
Joined: 23. Sep 2015, 16:56

Re: Host and guest using separate internet connections?

Post by Markie »

That sounds easy to do, I'll give it a try.
Thank you very much for the help.
Post Reply