I have below topology on mininet:
Host1:10.0.0.1/24 mac :aa:00:00:00:00:01 Host2:10.0.0.2/24 mac :aa:00:00:00:00:02 Host3:10.0.0.3/24 mac :aa:00:00:00:00:03
I want to redirect traffic as below:
When host1 ping host 2 the traffic should be redirected to host3.
I have implemented below rule on osv switch and ryu controller:
sudo ovs-ofctl add-flow br0 "table=0,priority=100,ip,in_port=1,dl_src=aa:00:00:00:00:01,nw_dst=10.0.0.2,actions=mod_dl_src:aa:00:00:00:00:03,mod_nw_dst:10.0.0.3,output:3"
sudo ovs-ofctl add-flow br0 "table=0,priority=100,ip,in_port=3,dl_src=aa:00:00:00:00:03,nw_dst=10.0.0.1,actions=mod_dl_src:aa:00:00:00:00:02,mod_nw_dst:10.0.0.2,output:1"
The host 3 is receiving ICMP request but not replying. I believe its an ARP problem.
Can anyone help please help for this redirection?