[ovs-discuss] Ovs-ofctl ´set-actions on Userspace OVS
Ben Pfaff
blp at ovn.org
Mon Mar 6 16:11:34 UTC 2017
On Mon, Mar 06, 2017 at 04:00:16PM +0100, Advith Nagappa wrote:
> Is it possible to add set-actions to userspace OVS?
>
> For example:
>
> ovs-ofctl add-flow br0
> priority=1111,dl_type=0x0800,nw_proto=17,nw_dst=10.1.1.1,tp_dst=9876,actions=mod_dl_dst:9877,
> Does this work on userspace OVS as well?
>
> And if i am correct, the packet tp_dst to 9877, provided the rule matches,
> right?
Yes. But your question just prompted me to add another item to the FAQ:
Q: I added a flow to a redirect packets for TCP port 80 to port 443,
like so::
$ ovs-ofctl add-flow br0 tcp,tcp_dst=123,actions=mod_tp_dst:443
but the packets are getting dropped instead. Why?
A: This set of actions does change the TCP destination port to 443, but
then it does nothing more. It doesn't, for example, say to continue to
another flow table or to output the packet. Therefore, the packet is
dropped.
To solve the problem, add an action that does something with the modified
packet. For example::
$ ovs-ofctl add-flow br0 tcp,tcp_dst=123,actions=mod_tp_dst:443,normal
See also the preceding question.
More information about the discuss
mailing list