Search code examples
socketshttp-redirectudpopenvswitch

Redirecting the UDP packets but not able to print the data


I have this setup of systems where 3 VMs are connected to OVS.

On one system I am running UDP server on VM1 and VM3 and UDP client VM2.

In VM2, the packets from UDP client are destined to VM1 (destination address and port as mentioned in the code). But at the OVS, I have provided the rule where if the source IP is VM2 and destination is VM1, I am redirecting the UDP packets to VM3.

I am able to see the counter matching the rule and even I have observed the change of destination and port at the interface of the new destination in the wireshark.

But the problem is the I am not able to read the packets in the UDP server program in VM3

Can any one help please

EDIT : The below is the screen shot when trying to redirect packets from a TCP connection. I am not able to send the packet to the destination

enter image description here


Solution

  • For the virtual machine's networking stack to accept those redirected packets, you will have to rewrite the destination IP and Ethernet addresses as well.