Looks, like I was giving a wrong command, I corrected it now and did the
following:

#ovs-ofctl add-flow s1 "ct_state=+new,icmp,in_port=1, actions=ct(commit,
zone=1, nat(src=10.0.0.240))"

I get the OFPT_ERROR, which means the cmd is not supported, so I guess the
OVS which I am using doesnt support NAT for connection.

So, what is the OVS and Kernel module for connection tracking I should use
so that it works.


Cureently, I have


abhijit@abhijit-vhost1:~/work/ovs$ modinfo openvswitch
filename:       /lib/modules/4.4.0-93-generic/kernel/net/openvswitch/
openvswitch.ko
license:        GPL
description:    Open vSwitch switching datapath
srcversion:     07E134FFF32332DE5699245
depends:        nf_conntrack,libcrc32c,nf_defrag_ipv6
intree:         Y
vermagic:       4.4.0-93-generic SMP mod_unload modversions
abhijit@abhijit-vhost1:~/work/ovs$ sudo ovs-ofctl add-flow s1
"ct_state=+new,icmp,in_port=1,actions=ct(commit,zone=1,nat(src=10.0.0.240))"
OFPT_ERROR (xid=0x4): OFPBAC_BAD_TYPE
NXT_FLOW_MOD (xid=0x4):
(***truncated to 64 bytes from 128***)
00000000  01 04 00 80 00 00 00 04-00 00 23 20 00 00 00 0d |..........# ....|
00000010  00 00 00 00 00 00 00 00-00 00 00 00 00 00 80 00 |................|
00000020  ff ff ff ff ff ff 00 00-00 1d 00 00 00 00 00 00 |................|
00000030  00 00 00 02 00 01 00 00-06 02 08 00 00 00 0c 01 |................|
abhijit@abhijit-vhost1:~/work/ovs$ ovs-vswitchd --version
ovs-vswitchd (Open vSwitch) 2.6.0


On Mon, Nov 13, 2017 at 2:34 PM, abhijit herekar <[email protected]>
wrote:

> hi,
>
> I new to the OVS connection tracking, I am trying to add the following
> flow and get the ERROR
>
> #ovs-ofctl add-flow s1 "in_port=1, actions=ct(commit,
> nat(src=10.0.0.240-10.0.0.254))"
> #ovs-ofctl: actions are invalid with specified match
> (OFPBAC_MATCH_INCONSISTENT)
>
> I am not able to figure out what is the correct match for the action, I
> want to SNAT all the packets coming on in_port=1.
>
> Please, let me know how to go about this.
>
> Thanks
>
>
> --
> Thanks
> Abhijit Herekar
> Trojan!!!! FIGHT ON!!!!!
>



-- 
Thanks
Abhijit Herekar
Trojan!!!! FIGHT ON!!!!!
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to