Hi,

Excuse me for jumping in.

As knet solutions said, the OpenFlow Spec 1.3 does not provide "tcp_flags"
match field, so ofctl_rest does not support it.
https://github.com/osrg/ryu/blob/6456711a343bd9999491bee2eb059c218170cc50/ryu/lib/ofctl_v1_3.py#L194

On the other hand, ovs-ofctl implements "tcp_flags" match field by using
OVS's own extension match field(Nicira Extended Match), so you can install
"tcp_flaga" via ovs-ofctl.
In Ryu, you can refer the OVS version "tcp_flags" math as "tcp_flags_nxm".
https://ryu.readthedocs.io/en/latest/nicira_ext_ref.html#module-ryu.ofproto.nicira_ext

But written in the above, ofctl_rest does not support the Nicira Extended
Match yet.


2019年6月23日(日) 20:50 Alon Dotan <alon.do...@bullguard.com>:

> ovs-ofctl add-flow br-dp0
> priority=20478,tcp,in_port=1,tcp_flags=2,table=0,actions=mod_dl_dst:00:00:00:00:00:01,output:3
> Im using ubuntu ovs 2.9.2 and didnt set manually the openflow version so I
> guess the default is 1.3
>
> this is the table0 dump:
>  cookie=0x5adc15c0, duration=3874.646s, table=0, n_packets=279,
> n_bytes=22481, priority=20480,udp,in_port=ens4,tp_dst=53
> actions=mod_dl_dst:00:00:00:00:00:01,output:vethb73cf48a
>  cookie=0x5adc15c0, duration=3874.645s, table=0, n_packets=0, n_bytes=0,
> priority=20479,udp6,in_port=ens4,tp_dst=53
> actions=mod_dl_dst:00:00:00:00:00:01,output:vethb73cf48a
>  cookie=0x5adc15c0, duration=3874.644s, table=0, n_packets=530,
> n_bytes=43639, priority=20478,tcp,in_port=ens4,tp_dst=80
> actions=mod_dl_dst:00:00:00:00:00:01,output:vethb73cf48a
>  cookie=0x5adc15c0, duration=3874.644s, table=0, n_packets=0, n_bytes=0,
> priority=20477,tcp6,in_port=ens4,tp_dst=80
> actions=mod_dl_dst:00:00:00:00:00:01,output:vethb73cf48a
>  cookie=0x5adc15c0, duration=3874.646s, table=0, n_packets=277,
> n_bytes=43823, priority=20480,udp,in_port=ens5,tp_src=53
> actions=mod_dl_dst:00:00:00:00:00:02,output:veth91fe926b
>  cookie=0x5adc15c0, duration=3874.645s, table=0, n_packets=0, n_bytes=0,
> priority=20479,udp6,in_port=ens5,tp_src=53
> actions=mod_dl_dst:00:00:00:00:00:02,output:veth91fe926b
>  cookie=0x5adc15c0, duration=3874.644s, table=0, n_packets=507,
> n_bytes=747670, priority=20478,tcp,in_port=ens5,tp_src=80
> actions=mod_dl_dst:00:00:00:00:00:02,output:veth91fe926b
>  cookie=0x5adc15c0, duration=3874.644s, table=0, n_packets=0, n_bytes=0,
> priority=20477,tcp6,in_port=ens5,tp_src=80
> actions=mod_dl_dst:00:00:00:00:00:02,output:veth91fe926b
>  cookie=0x5adc15c0, duration=3874.640s, table=0, n_packets=0, n_bytes=0,
> priority=20474,icmp6,in_port=ens4,icmp_type=134 actions=drop
>  cookie=0x5adc15c0, duration=3874.645s, table=0, n_packets=891,
> n_bytes=798051, priority=20480,in_port=vethb73cf48a actions=resubmit(,1)
>  cookie=0x5adc15c0, duration=3874.645s, table=0, n_packets=1009,
> n_bytes=80696, priority=20480,in_port=veth91fe926b actions=resubmit(,1)
>  cookie=0x5adc15c0, duration=3874.640s, table=0, n_packets=6438,
> n_bytes=7853031, priority=20476,in_port=ens5 actions=resubmit(,1)
>  cookie=0x5adc15c0, duration=3874.640s, table=0, n_packets=6215,
> n_bytes=855625, priority=20473,in_port=ens4 actions=resubmit(,1)
>  cookie=0x0, duration=3864.277s, table=0, n_packets=410, n_bytes=31472,
> priority=20478,tcp,in_port=ens4,tcp_flags=syn
> actions=mod_dl_dst:00:00:00:00:00:01,output:vethb73cf48a
>  cookie=0x0, duration=3864.271s, table=0, n_packets=0, n_bytes=0,
> priority=20478,tcp,in_port=ens5,tcp_flags=syn
> actions=mod_dl_dst:00:00:00:00:00:02,output:veth91fe926b
>  cookie=0x5adc15c0, duration=3874.641s, table=0, n_packets=0, n_bytes=0,
> priority=20476,udp,in_port=ens4,tp_src=67,tp_dst=68 actions=drop
>  cookie=0x5adc15c0, duration=3874.640s, table=0, n_packets=0, n_bytes=0,
> priority=20475,udp6,in_port=ens4,tp_src=547,tp_dst=546 actions=drop
>  cookie=0x5adc15c0, duration=3874.622s, table=0, n_packets=0, n_bytes=0,
> priority=0 actions=drop
>
> Thanks,
> ------------------------------
> *From:* knet solutions <knetsolutio...@gmail.com>
> *Sent:* Sunday, June 23, 2019 2:28 PM
> *To:* Alon Dotan
> *Cc:* Ryu-devel
> *Subject:* Re: [Ryu-devel] ofctl_rest app tcp flags
>
> 1. could you share the  ovs-ofct command which you use?
> 2. Also paste the flows (dump-flows) output.
> 3. which openflow version are you using?.
>
> Thanks
> suresh
>
> On Sun, Jun 23, 2019 at 4:13 PM Alon Dotan <alon.do...@bullguard.com>
> wrote:
>
> not sure I understood..
> there is no problem to add it via the ovs-ofctl command line..
> ------------------------------
> *From:* knet solutions <knetsolutio...@gmail.com>
> *Sent:* Sunday, June 23, 2019 1:41 PM
> *To:* Alon Dotan
> *Cc:* Ryu-devel
> *Subject:* Re: [Ryu-devel] ofctl_rest app tcp flags
>
> TCP flags are not supported in openflow match field. Refer openflow
> specification.
>
>
>
> On Sun, 23 Jun 2019 15:00 Alon Dotan, <alon.do...@bullguard.com> wrote:
>
> Hey,
> Im triyng to configure rule that match by tcp flags like the following
> https://ryu.readthedocs.io/en/latest/library_packet_ref/packet_tcp.html
> but im unable to do so with the ofcl_rest app..
> I got invalid syntax error
>
> POST command:
> curl -X POST -d
> '{"dpid":1,"table_id":7,"cookie":1685023343,"priority":56000,"flags":1,"match":{"tcp_flags":
> 2, "ip_proto": 6, "eth_type": 2048},"actions":[]}'
> http://127.0.0.1:30002/stats/flowentry/add
>
> ERROR:
> Unknown match field: tcp_flags
>
> any ideas?
> Thanks,
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>
>
> --
>
> *Regards, *
> *Knet solutions.*
> Whatsapp/Mobile:  +919445042007
> website:  http://knetsolutions.in/
> Facebook Page :   https://www.facebook.com/sdntraining/
> youtube channel:  https://www.youtube.com/channel/UCTD6X9_oDqIYs_xpE7moFnQ
>
>
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to