Score:0

OVS switch and Tap interface- Connecting two vm using tap interface-ubuntu

by flag

I want to connect 2 VM together using tap interface on Ubuntu. VM2 will connect to VM1 by a tap interface on VM1. I will use OVS switch to forward traffic from VM1 to VM2.

Scenario:

Router from ISP provide IP subnet dhcp: 192.168.100.2-192.168.100.255

VM 1: has OVS switch, ryu controller with flow manager and 1 tap interface.(Ubuntu 20.04) and interface name ens33 VM 2: has IIS server running on host.(Windows 8) I want traffic to pass through the OVS switch and then go to the backend of Vm2 webserver. I will use ryu controller to redirect web traffic to the web backend of VM1.

Find below my setup on OVS VM 1: At start vm had already 1 interface as default ens33 with IP 192.168.100.112. Create a bridge br1 add to controller ryu localhost. Create a tap interface and connect to br1. Provide IP to tap interface 192.168.100.25

Add nat to allow traffic through ens33 for internet connection : -A POSTROUTING -s 192.168.100.0/24 -o ens33 -j MASQUERADE

VM2: IP address : 192.168.100.115 Gateway:192.168.100.25 (Tap interface) DNS:8.8.8.8

VM2 will get internet connection only if VM1 has connection.

Does anymore has a better solution, how to connect VM2 to VM1 ? I will pass all traffic through VM1 in the ovs switch then forward to VM2? VM1 will be a central switch for traffic and hence I cam use ryu controller in the future to redirect traffic. My VM2 will have a web server port 80 in the future.

Thank you

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.