I could achieve the desire behavior with following command. Earlier switch was normalizing the match criteria and order of output actions matters..
add-flow s1 "table=0, priority=200, nw_proto=17, dl_type=0x0800, nw_src=10.0.0.2, tp_dst=5690, actions=mod_nw_dst:10.0.0.6,mod_dl_dst=4e:86:75:c9:4a:3d,output:5" putting for sake of completion of the thread. Thanks. On 7 January 2014 10:37, hardik soni <[email protected]> wrote: > What needs to be done o change the route of packet by modifying > destination IP and MAC? > I have been able to match the flow based on src and dest MAC only. I want > to match is based on src IP and dest UDP port. > I am not able to do that because of flows added in response of pings. > > Thanks. > > > On 7 January 2014 10:33, hardik soni <[email protected]> wrote: > >> I tried to inject a flow using Open vswitch Command. >> I have been able to redirect it to proper Ethernet port. I checked >> through wireshark and I am also receiving UDP packets at the intended >> machine's receiver ethernet port. >> However, IP and mac dest are not changed in the packets. >> following is my added flow. >> >> root@my-lap:~/mininetScripts$ sudo ovs-ofctl add-flow s1 "table=0, >> priority=200, in_port=4, dl_vlan=65535, dl_src=9e:13:f8:e8:cb:c7 >> dl_dst=1e:f6:b5:ac:e9:b1, >> actions=output:5,mod_nw_dst:10.0.0.6,mod_dl_dst=ea:70:c4:0b:15:cb" >> root@my-lap:~/mininetScripts$ sudo ovs-ofctl dump-flows s1 >> NXST_FLOW reply (xid=0x4): >> cookie=0x0, duration=118.034s, table=0, n_packets=124, n_bytes=5680, >> idle_age=1, >> priority=200,in_port=4,vlan_tci=0x0000,dl_src=9e:13:f8:e8:cb:c7,dl_dst=1e:f6:b5:ac:e9:b1 >> actions=output:5,mod_nw_dst:10.0.0.6,mod_dl_dst:ea:70:c4:0b:15:cb >> root@my-lap:~/mininetScripts$ >> >> >> >> >> >> On 7 January 2014 01:23, hardik soni <[email protected]> wrote: >> >>> Thanks Justin for giving the specific command. >>> Thanks for L2 destination remark, I totally missed it. >>> >>> yes, I meant destination TCP/UDP port as destination transport. >>> >>> >>> On 7 January 2014 01:03, Justin Pettit <[email protected]> wrote: >>> >>>> If by "destination transport", you mean the TCP/UDP port, then you can >>>> do what you describe. It should be pretty clear how to do by reading the >>>> ovs-ofctl man page. Depending on where your new destination is, you may >>>> need to update the L2 destination address, too. >>>> >>>> --Justin >>>> >>>> >>>> >>>> >>>> On Mon, Jan 6, 2014 at 3:51 PM, hardik soni <[email protected]> wrote: >>>> >>>>> Hi All, >>>>> >>>>> I am using Open vSwitch with version 2.0.0 with mininet simulator. I >>>>> am trying to inject a flow which matches source IP and destination >>>>> transport of the packet and on successful match switch should change >>>>> destination IP and forward the packet to specified port. >>>>> >>>>> Does Open vSwitch support this? >>>>> >>>>> If anyone can tell me some command, such that I can check flows in the >>>>> switch directly, without any other software. >>>>> >>>>> -- >>>>> Regards, >>>>> Hardik Soni >>>>> >>>>> >>>>> _______________________________________________ >>>>> dev mailing list >>>>> [email protected] >>>>> http://openvswitch.org/mailman/listinfo/dev >>>>> >>>>> >>>> >>> >>> >>> -- >>> Regards, >>> Hardik Soni >>> >>> >> >> >> >> -- >> Regards, >> Hardik Soni >> >> > > > > -- > Regards, > Hardik Soni > > -- Regards, Hardik Soni
_______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
