0

I have 3 Ubuntu 22.04 VMs created using Virtualbox. My host machine is Windows 10. One of them is running 5G core emulator, and the other one is running UEransim. I was able to connect UE to 5G network, but I need to have an additional VM in-between with the Open vSwitch and an SDN controller running on it to capture traffic and analyze it. If OVS was running on the hypervisor machine I could just simply create tap interfaces and set Virtualbox VMs to bridged mode using those interfaces. However, as OVS is also running on Virtualbox VM I have hard time making it work.

I've tried two approaches so far:

  • All 3 VMs configured in Virtualbox to have one adapter in the same 'internal Virtualbox network, subnet 10.0.1.0/24. Let's say VM1 has IP 10.0.1.1, VM2 has 10.0.1.2and VM3 with OVS running has10.0.1.100`. I created the OVS bridge, added port from internal network to this bridge (enp0s8) and assigned 10.0.1.100 to the OVS bridge I created. I can ping from OVS VM3 to other 2 VMs and between VM1 and VM2 of course (as in the VirtualBox internal network all 3 VMs are already connected to some other virtual switch). But traffic between VM1 and VM2 don't go through VM3 with OVS - so I thought I would make VM1 send traffic to VM3 (and from VM2 to VM3) and add flows to OVS bridge that would forward (replicate) traffic from VM1 that was destined to OVS VM3 to VM2 and vice versa. That haven't worked so far, but maybe I just haven't found correct flow action yet. However I'm unsure whether it's the right approach or maybe this can lead me to the dead end.
  • OVS VM3 has two adapters, one in the same VirtualBox internal network as VM1, and second in the same network as VM2. VM1 and VM2 are in different subnets, so they can't ping each other directly. I tried this solution: connecting open vswitch with two virtual machines Adding two OVS bridges (br0 and br1), and one interface to each of them (enp0s8 to br0, enp0s9 to br1), then making bridges as gateways (br0 for VM1, br1 for VM2), and adding patch interface between bridges. That didn't work. I was able to ping from VM1 to br0 for example, but not between VM1 and VM2. I also tried running POX controller and l3_learning module (both OVS bridges connected to controller) but it still didn't work.

Can you help me how it should be done in proper way? Am I missing something in above approaches or should I do something totally different?

0

You must log in to answer this question.