2 NIC's, dedicate 1 to Host and 1 to Guest?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Zer0
Posts: 3
Joined: 20. Mar 2014, 03:37

2 NIC's, dedicate 1 to Host and 1 to Guest?

Post by Zer0 »

Ok my setup is pretty simple but i have been scouring the internet for days trying to find a solution to this

Host: Windows Server 2012 R2 Essentials
nics: Intel I217V gigabit ethernet and a Broadcom wifi adapter (came with Asrock Z87E-ITX board)
Guest: Windows 8.1 Pro (If i get this working a Ubuntu Guest in the future as well, tho only every running 1 or the other at any single time)

What i am hoping to accomplish is to have my host utilize the Intel Nic and for the guest to use the wifi adapter only.

I have tried:

NAT in vbox and bridging the vbox and wifi adapter on the host. No dice
Bridged and selecting the wifi adapter by its name from the drop down in vbox. Uses the Intel Nic anyway or at least the task manager in the host OS seems to indicate traffic on only the Intel Nic.

I have tried various other silly/outrageous configs to try and get this to work, most result in no connection.

Question:
So is there a point to doing this or should i just use my Intel nic for both and disable the wifi?
If its worth while, as in there would be a technical benefit in doing this, is it possible?

Thanks in advance

As a side note:
I am not using Hyper-V because it prevents sleep even though the MS documentation says it shouldn't. I will never leave the VM running so there isnt an issue with the server sleeping (Saves me electric).
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: 2 NIC's, dedicate 1 to Host and 1 to Guest?

Post by mpack »

NAT mode piggybacks the VM on the hosts network connection, so that obviously isn't going to work if you want host and guest networks to be different.

The obvious solution is bridged, with host TCP/IP disabled on the NIC the guest bridges too. However, bridging to a wireless NIC is not always successful. It would be more reliable the other way round - host using wireless, guest bringing to wired NIC. An alternative is to give the guest its own wireless dongle via USB.
Zer0
Posts: 3
Joined: 20. Mar 2014, 03:37

Re: 2 NIC's, dedicate 1 to Host and 1 to Guest?

Post by Zer0 »

Thanks for the info. Yes i believe i had tried bridged and on the host disabled tcp/ip for the wifi card. I wasn't able to get it working that way. I do have a handful of usb wifi adapters i could try.

First off is there a benefit to using separate nics for the host/guest or is it pointless?

If its worth while whats the process like to use a USB wifi card for a guest? I hadn't researched this yet and can look into it but any guidance would be great. Thanks
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: 2 NIC's, dedicate 1 to Host and 1 to Guest?

Post by mpack »

Zer0 wrote:First off is there a benefit to using separate nics for the host/guest or is it pointless?
That depends on what you were trying to achieve by having separate networks. In the past I've done that at work because the work IT guys won't allow me to connect VMs arbitrarily to the company server - they would want to configure each one, with full antivirus etc etc, which is inconvenient for me because I think of VMs as temporary disposable things. So what I did instead was bridge to a wireless NIC and connect to the company's guest wireless network to get basic internet in the VM, which of course is useful for many things such as software updates, OS activation etc.

If you were thinking that separate networks give greater security... I wouldn't bother. The host can't be infected by a guest just because they are on the same network. It can only happen if they share executables, e.g. if you put an infected executable in a shared folder then run it on the host. I never do that with executables from untrusted sources, and even that would require user intervention to complete the vector. Plus I'm a software engineer so I know that the scare stories about viruses in JPEGs etc are all BS.
Zer0 wrote:If its worth while whats the process like to use a USB wifi card for a guest? I hadn't researched this yet and can look into it but any guidance would be great.
Wireless NICs can't always be bridged to reliably. In that case it might be worthwhile to use a USB wireless dongle, which would of course give the guest a networking capability independant of the host. The host wouldn't even know. There's no particular trick to it, just create a USB filter (see VM settings|USB) which matches the dongle, and install the correct drivers inside the guest. However virtual USB carries its own set of problems - trying to get a virtual machine to use real hardware always does - but if you can borrow one or get a cheap one then it might be worth trying.
Zer0
Posts: 3
Joined: 20. Mar 2014, 03:37

Re: 2 NIC's, dedicate 1 to Host and 1 to Guest?

Post by Zer0 »

Cool thanks again.

I guess i should have stated my reasoning for wanting to use 2 separate network adapters. Actually i am of the same mindset as you. Both the Win 8.1 and Ubuntu guest will be "throw away" in that i will be using them to test software prior to using them on my actual computers, so i will likely be wiping/restoring them from time to time any how. I wanted to use 2 nics with the hopes that my host server could still operate and utilize its full gigabit ethernet for its main purposes of file sharing and streaming, and that instead of sharing that bandwidth i could have the guest run off a separate card as to not interfere/slow down the host. As an example id like to, if possible, avoid a situation where i may be xfering a large file from server/main computer (normally ~110MB/s) and then because the guest starts downloading updates or is also xfering a file on the network that suddenly the xfer from server to main computer drops its speed.

Hopefully i explained that well enough. If it makes sense and it can actually work like that, then i have 3-4 USB wifi adapters i can try. If its not worth it ill just have it NAT. Thanks
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: 2 NIC's, dedicate 1 to Host and 1 to Guest?

Post by mpack »

What you're describing should be fine in principle, if you can find a USB wireless dongle that doesn't mind VM latencies. Incidentally, a 3G dongle also works, and then you don't even require a public network AP in the building.
Post Reply