[ovs-discuss] Add wildcard openflow rules
jpettit at nicira.com
Thu Nov 18 07:13:39 UTC 2010
Try looking at the "resubmit" action in ovs-ofctl. You could use the first lookup to match and modify the source address and the second to match and modify the destination, for example.
On Nov 17, 2010, at 11:02 PM, Yue ZHANG wrote:
> Dear staff,
> In my research, I want to do something like NAT, that modify both IP packets' src and dst address each to each.
> For example:
> ovs-ofctl add-flow br1 nw_src=192.168.1.2,nw_dst=192.168.2.2,idle_timeout=0,icmp,action=mod_nw_src:172.16.206.2,mod_nw_dst:172.16.121.2,output:0
> ovs-ofctl add-flow br1 nw_src=192.168.1.2,nw_dst=192.168.2.3,idle_timeout=0,icmp,action=mod_nw_src:172.16.206.2,mod_nw_dst:172.16.121.3,output:0
> These two rules could modify src from 192.168.1.x to 172.16.206.x, and dst from 192.168.2.y to 172.16.121.y, respectively.
> The question is:
> If I have 254 possible values for both x and y, then I need 254x254 openflow rules for each IP pair.
> Could I modify all the nw_src first, then modify nw_dst and output the packet, means only need 254+254 rules.
> Is there any simple way to do this? Thanks very much.
> Yue ZHANG
> cassidy.zy at gmail.com
> discuss mailing list
> discuss at openvswitch.org
More information about the discuss