LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Assign Multiple NICs to 1 Virtual Machine (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/assign-multiple-nics-to-1-virtual-machine-4175551045/)

inforeqd 08-18-2015 10:19 AM

Assign Multiple NICs to 1 Virtual Machine
 
I have a server with 4 physical nics (eth0, 1,2,3). I bridge eth0 and eth1 to be used by my 4 virtual machines (the load of network traffic is light so I put 2 VMs to each bridge. I have the additional two physical nics (2,3) available and I need to assign them to 2 of my virtual machines in order for the VMs to connect to devices directly on a private subnet (the devices are software defined radios and they pass a ton of traffic).

The layout just to ensure I have it right is this

VM 1 ---- bridge0 (Public IPs)
VM 2 ---- bridge0 (Public IPs)
VM 3 ---- bridge1 (Public IPs)
VM 4 ---- bridge1 (Public IPs)

VM3 requires connection to 1st SDR through physical nic eth2 (Private IP space)/ Requires both a public and private IP
VM4 requires connection to 2nd SDR through physicl nic eth3 (Private IP space)/ Requires both a public and private IP

Any ideas??? Bridge the other two?? If so how do I assign multiple nics to the VMs??

Slax-Dude 08-19-2015 09:53 AM

So, you are saying "I have a vehicle. Can you guys tell me how to pop the trunk open?"...
...it would help us greatly if you told us exactly what vehicle you have.

Read this, and try again ;-)

dyasny 08-19-2015 10:10 AM

What you're doing wrong in the first place, is direct NIC assignment to VMs. 99 of the use cases, this is wasteful.

If you want to use all the NICs you have, you might want to bond them, but unless there's a very specific need, do not assign them directly.

Now, the standard networking scheme for KVM and other hypervisors, is to create a virtual switch, connect it to a physical NIC or bond, for physical network access, and plug VMs into that switch, so they can interconnect as well as reach the physical network. In Linux, a simple bridge works as a switch, unless you need more features, and go with OVS

jefro 08-21-2015 02:49 PM

I'll chime in with a hello and welcome to LQ.


All times are GMT -5. The time now is 04:04 PM.