Score:0

Redirect Traffic on OVS switch

by flag

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?

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.