Page 1 of 1
Is there a way to "attach" ethernet same as one does usb?
Posted: 17. Jan 2016, 05:08
by HarryMan
With USB, VirtualBox allows a VM to "attach" one or more USB ports for exclusive use by that VM (unless one attaches same USB to multiple VMs).
Is there a way to do the same for ethernet ports? I mean wired ports specifically, but it could apply to wireless also (I don't really need that at the moment as my host is hardwired).
IOW, I'd like to attach a host ethernet port to a VM for its own exclusive use. I don't want the host to be able to use it.
What I am thinking of is having a VM running something like IPCop and then routing packets over an internal or hostonly network.
Re: Is there a way to "attach" ethernet same as one does usb
Posted: 17. Jan 2016, 12:02
by mpack
HarryMan wrote:With USB, VirtualBox allows a VM to "attach" one or more USB ports for exclusive use by that VM (unless one attaches same USB to multiple VMs).
I'm not aware of that being the case. To my knowledge VirtualBox grabs the
device, not the port it's attached to - which in any case could be connected together with other ports inside the PC.
HarryMan wrote:Is there a way to do the same for ethernet ports?
That would be bridged networking (see user manual). And then if you don't want the host OS to use the selected NIC then you disable host OS networking on that device.
Re: Is there a way to "attach" ethernet same as one does usb
Posted: 18. Jan 2016, 22:02
by HarryMan
Disabling host networking will not disable the guest VM's use of networking on that device?
As far as USB port vs device, I wasn't meaning to be that specific. I understand the difference. Here, I only attach one physical device to each USB port connected directly to the mainboard (knowing, of course, that there is a hub driving all the ports anyway). So when I talk about access to a "port" I really mean the device.
Thanks.
Re: Is there a way to "attach" ethernet same as one does usb
Posted: 18. Jan 2016, 22:54
by mpack
HarryMan wrote:Disabling host networking will not disable the guest VM's use of networking on that device?
Not with bridged networking. With Bridged networking the VM connects to the host NIC at a very low (device) level. All software protocol elements are implemented by the guest OS.
Had it been NAT mode then yes, the guest would be communicating via the host's protocol stack.
Re: Is there a way to "attach" ethernet same as one does usb
Posted: 18. Jan 2016, 23:30
by HarryMan
Then it sounds like I am good to go. I'll be trying to implement this over the next several weeks, in between other projects.
Thank you for the info. Sorry I mixed up port and device there. It makes a difference to realize this fact.