Hi. Im newbie at virtualbox. And I was thinking if these things are possible.
What: Separate the Internet Connection of Host and Guest
Purpose: Separate their WAN IP Address
Info:
- I have 2 modems here which has 2 different connection ( Let's say Smart Connection and Globe Connection)
- My laptop both supports Wireless connection and Lan connection
Desire:
- I wanted my Host to connect to Smart connection while my Guest will connect to the Globe connection
Ideas:
- first, I was thinking if I can enable the Wi-Fi on the guest so I can easily choose where to connect.
- second, connect the Host via Lan Cable (Lan Cable is connected to Smart Modem), and the Guest via Wi-Fi (Wi-Fi is connected to Globe Modem)
or vice versa, Guest via Lan (Lan Cable is connected to Globe Modem), and the Host via Wi-Fi (Wi-Fi is connected to Smart Modem)
Can anybody help me so I can implement this one on my VirtualBox Machine? Any suggestions will do. I really need to separate their connection.
Thanks in advance!
Separate Internet Connection of Host and Guest
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Separate Internet Connection of Host and Guest
Easy as pie, especially since you have two network paths & internet connections available.
Pick one network card for the guest, wireless or wired. In the guest Settings, attach the guest's virtual network via NAT to the chosen card. In the host, on that chosen card's properties, uncheck all the bindings that don't relate to Virtualbox. Now only Virtualbox will use that card, and only the guest will try to communicate through it. The host will use the other network card.
BTW, if you choose the wi-fi network adapter as the guest's network path, the guest's network will still appear to be wired when you're running the guest, since Virtualbox does not emulate a wi-fi adapter within the guest itself.
Pick one network card for the guest, wireless or wired. In the guest Settings, attach the guest's virtual network via NAT to the chosen card. In the host, on that chosen card's properties, uncheck all the bindings that don't relate to Virtualbox. Now only Virtualbox will use that card, and only the guest will try to communicate through it. The host will use the other network card.
BTW, if you choose the wi-fi network adapter as the guest's network path, the guest's network will still appear to be wired when you're running the guest, since Virtualbox does not emulate a wi-fi adapter within the guest itself.
-
Lord Kejote
- Posts: 4
- Joined: 13. Aug 2015, 15:20
Re: Separate Internet Connection of Host and Guest
Hi @scottgus1. Thank you for your response. Anyway can you teach it to me step by step, if that's okay? Sorry im really new about this one. I didn't actually get some of your instructions especially the 'uncheck all the bindings that don't relate to Virtualbox. Now only Virtualbox will use that card, and only the guest will try to communicate through it. The host will use the other network card.'scottgus1 wrote:Easy as pie, especially since you have two network paths & internet connections available.
Pick one network card for the guest, wireless or wired. In the guest Settings, attach the guest's virtual network via NAT to the chosen card. In the host, on that chosen card's properties, uncheck all the bindings that don't relate to Virtualbox. Now only Virtualbox will use that card, and only the guest will try to communicate through it. The host will use the other network card.
BTW, if you choose the wi-fi network adapter as the guest's network path, the guest's network will still appear to be wired when you're running the guest, since Virtualbox does not emulate a wi-fi adapter within the guest itself.
Is the network card same as the adapter type? I don't know which one to select, if it is wired or wireless.
Here's what's on the list of my virtualbox adapter type: Thanks again!
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Separate Internet Connection of Host and Guest
Honestly, I didn't get it myself until someone here said, "Uncheck the non-Virtualbox bindings on the network card", and I went googling around until I figured it out. See what you can come up with as your own teacher, and make good notes of what you do so you can undo if something doesn't work out. I'll give you a hint to start: the bindings are in Control Panel, Network and Sharing Center, then "Change adapter settings", then right-click the desired adapter and choose Properties.
The screenshot you posted shows the types of simulated network cards Virtualbox will present to your guest. The card chosen by the type-of-guest template you picked when you first started making your guest is the one your guest has drivers for built-in, so your guest can get on the network right away without having to install drivers. You shouldn't have to change this setting.
One thing I forgot, though, is that NAT network attachment doesn't allow you to pick which host network card to connect to. Bridged does. (In the dropdown where the screenshot says NAT, drop it down and you'll see Bridged as another style of connection.) Problem with Bridged is that some wi-fi network cards don't play well with Bridged, which may make the choice of which card to go with your guest for you. All you have to do though is to try it. If you want the wi-fi to connect your guest to the internet, choose Bridged, then choose the host wi-fi card in the dropdown which is now deactivated in the screenshot, but which will turn on when Bridged is chosen. Disconnect the LAN for this test. If you can get on the Web in your guest while it is Bridged to the host wi-fi card, you're good. If you can't, then you'll have to use the LAN for the guest and the wi-fi for the host. Whichever host card you end up using for the guest, use your googled skills to turn off the bindings that don't refer to Virtualbox on that card.
The screenshot you posted shows the types of simulated network cards Virtualbox will present to your guest. The card chosen by the type-of-guest template you picked when you first started making your guest is the one your guest has drivers for built-in, so your guest can get on the network right away without having to install drivers. You shouldn't have to change this setting.
One thing I forgot, though, is that NAT network attachment doesn't allow you to pick which host network card to connect to. Bridged does. (In the dropdown where the screenshot says NAT, drop it down and you'll see Bridged as another style of connection.) Problem with Bridged is that some wi-fi network cards don't play well with Bridged, which may make the choice of which card to go with your guest for you. All you have to do though is to try it. If you want the wi-fi to connect your guest to the internet, choose Bridged, then choose the host wi-fi card in the dropdown which is now deactivated in the screenshot, but which will turn on when Bridged is chosen. Disconnect the LAN for this test. If you can get on the Web in your guest while it is Bridged to the host wi-fi card, you're good. If you can't, then you'll have to use the LAN for the guest and the wi-fi for the host. Whichever host card you end up using for the guest, use your googled skills to turn off the bindings that don't refer to Virtualbox on that card.
-
Lord Kejote
- Posts: 4
- Joined: 13. Aug 2015, 15:20
Re: Separate Internet Connection of Host and Guest
I kinda get it but somehow im still confused about the bindings :/
If this is what you're talking about, how would I know if it is a non-virtual box binding?
I'm sorry, I'm really noob with this. EDIT:
I've read something about this USB Wi-Fi Dongle. Is this also possible im my situation? So I can select which Wi-Fi network to connect inside my Guest VM?
If this is what you're talking about, how would I know if it is a non-virtual box binding?
I'm sorry, I'm really noob with this. EDIT:
I've read something about this USB Wi-Fi Dongle. Is this also possible im my situation? So I can select which Wi-Fi network to connect inside my Guest VM?
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: Separate Internet Connection of Host and Guest
Forget about USB dongles. As scottgus1 said, it is very simple using the settings in the host. You can also forget about wifi settings in the guest because the guest does not realise it is using wireless. They all look like Ethernet connections to the guest.
What you are really doing is dedicating one connection of the machine to the host OS and one to the guest OS. Which one you use for each is up to you. The first thing to do is to set up bridged networking for the vm and bridge it to the NIC you want to use for the vm.
Now go to the properties of each NIC in turn from the host OS Network & Sharing Center. For the NIC which is used by the vm, clear all of the checkboxes except the Virtualbox NDIS6 Bridged Networking Driver. This NIC can now only carry traffic for the vm. Then go to the other NIC's properties and clear only the VirtualBox NDIS6 Bridged Networking Driver. This NIC can now carry host network traffic only.
What you are really doing is dedicating one connection of the machine to the host OS and one to the guest OS. Which one you use for each is up to you. The first thing to do is to set up bridged networking for the vm and bridge it to the NIC you want to use for the vm.
Now go to the properties of each NIC in turn from the host OS Network & Sharing Center. For the NIC which is used by the vm, clear all of the checkboxes except the Virtualbox NDIS6 Bridged Networking Driver. This NIC can now only carry traffic for the vm. Then go to the other NIC's properties and clear only the VirtualBox NDIS6 Bridged Networking Driver. This NIC can now carry host network traffic only.
Bill
-
scottgus1
- Site Moderator
- Posts: 20945
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux
Re: Separate Internet Connection of Host and Guest
Lord Kejote, you have found the right place. Bill's instructions tell you what to do now. Once you have all the unnecessary checkboxes unchecked, then only Virtualbox will use that network card. In this case, based on the screenshot, you are setting the Ethernet (LAN) card to be Virtualbox-only. The host will use the wi-fi.
Keep in mind that this card will now only work with Virtualbox guests, not the host OS' network needs. So in the future if you want to access the network through this card with the host OS again, you'll need to come back to the network card Properties and re-check all those checkboxes. A reboot would probably be in order thereafter.
BTW, the USB wi-fi dongle you mention would simply give your host another network channel to use. You can use the USB filters in Virtualbox to take the USB dongle away from the host and give it to the guest, then the guest would see a wi-fi network card in its OS and use typical wi-fi network setups. In which case both host and guest could be on separate wi-fi channels and your laptop could become mobile again. (Only hitch is you'd need two wi-fi routers to keep your internet connections separate.)
Keep in mind that this card will now only work with Virtualbox guests, not the host OS' network needs. So in the future if you want to access the network through this card with the host OS again, you'll need to come back to the network card Properties and re-check all those checkboxes. A reboot would probably be in order thereafter.
BTW, the USB wi-fi dongle you mention would simply give your host another network channel to use. You can use the USB filters in Virtualbox to take the USB dongle away from the host and give it to the guest, then the guest would see a wi-fi network card in its OS and use typical wi-fi network setups. In which case both host and guest could be on separate wi-fi channels and your laptop could become mobile again. (Only hitch is you'd need two wi-fi routers to keep your internet connections separate.)
-
Lord Kejote
- Posts: 4
- Joined: 13. Aug 2015, 15:20
Re: Separate Internet Connection of Host and Guest
Alright, thanks to both of you.. anyway, last 2 questions.
1) On the change adapter settings, I can also see Ethernet 2 VirtualBox Host-Only Ethernet Adapter, do I also need to uncheck some binds here? or i should just leave it as it is?
2) As you can see i'm going to use the Ethernet Adapter Realtek PCIe GBE FAmily Controller for my guest and the Wi-Fi adapter to my host. And as you've told me, I need to uncheck all boxes under
Ethernet except Virtualbox NDIS6 Bridged Networking Driver. Now, what about the Wi-Fi adapter? Do I need to uncheck Virtualbox NDIS6 Bridged Networking Driver to make sure that it won't give any connections to the guest?
Thanks again.
1) On the change adapter settings, I can also see Ethernet 2 VirtualBox Host-Only Ethernet Adapter, do I also need to uncheck some binds here? or i should just leave it as it is?
2) As you can see i'm going to use the Ethernet Adapter Realtek PCIe GBE FAmily Controller for my guest and the Wi-Fi adapter to my host. And as you've told me, I need to uncheck all boxes under
Ethernet except Virtualbox NDIS6 Bridged Networking Driver. Now, what about the Wi-Fi adapter? Do I need to uncheck Virtualbox NDIS6 Bridged Networking Driver to make sure that it won't give any connections to the guest?
Thanks again.
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: Separate Internet Connection of Host and Guest
1. That has no effect on your Internet access. Host only lets the guest see the host on a private network between them.
2. If you are using Ethernet for the guest, the only box checked is the NDIS6 Bridged Networking driver. For the host on Wifi, all boxes are checked except the NDIS6 bridged Networking driver. So yes, you uncheck it so that no vm can use it, only the host.
2. If you are using Ethernet for the guest, the only box checked is the NDIS6 Bridged Networking driver. For the host on Wifi, all boxes are checked except the NDIS6 bridged Networking driver. So yes, you uncheck it so that no vm can use it, only the host.
Bill