I have a setup with 4 VMs. There are two servers: VM1, VM2, one router: VM3, and one client: VM4.
VM3 is connected directly to all other VMs and routes traffic between them.
VM3 has 3 different Interfaces. Let's call them i1,i2,i3. Each of them is connected to one of the VMs and has its own IP address, range, and network.
However, I'm having trouble connecting these three interfaces to OvS for flow controls, examples and demos show one network and a couple of Veth with the same prefix.
How should I connect these three interfaces to OvS? I want this connection to be transparent for other VMs.
Real ranges and names:
i1: enp0s3, 10.0.7.5/24
i2: enp0s8, 10.0.8.5/24
i3: enp0s9, 10.0.9.5/24
When I connect the interfaces to OvS I lose connection to everything and can't find any solution for multi-interface cases. (I've successfully connected one interface to OvS alongside a couple of containers but they belong to the same network).
Edit (More details):
This is a school project.
I'm running 4 VMs on VirtualBox.
I want to do things like mirroring traffic coming from Client to both server VMs, and dropping some packets.
My main question is if this is even possible with OvS? If not what is the workaround.
I add each interface as a port to OvS:
ovs-vsctl add-br mybr
ovs-vsctl add-port mybr enp0s3 ofport=1
ovs-vsctl add-port mybr enp0s8 ofport=2
ovs-vsctl add-port mybr enp0s9 ofport=3
then:
ovs-ofctl add-flow mybr in_port=1,action=output:2,3
I tested this with Veths connecting to the same network prefix and it worked well.