Hi,

Please check the mail address to Ryu-devel.
 [email protected]

On 2014年10月31日 01:58, Jalee Lee wrote:
> Dear All,
> I have a question about get flow stats, I use two flow entry for this time 
> test, one is L2+3+4 flow entry another flow entry have include MPLS function.
> I found out get L2+3+4 flow entry is ok, but get include MPLS function will 
> be fail.
> In attached file, you can saw switch had output message to controller, can 
> you help verify this issue?
> Thanks,
> 
> 
> Jalee
> 
> ========================================== log
> 
> lab@lab-hackertools:~$ 
> 
> lab@lab-hackertools:~$ curl -X GET http://10.1.25.52:8080/stats/flow/9
> 
> {"9": [{"actions": ["SET_FIELD: {eth_dst:0e:00:5e:0a:0a:0a}", "SET_FIELD: 
> {eth_src:00:08:11:0a:0a:0a}", "SET_FIELD: {vlan_pcp:1}", "SET_FIELD: 
> {vlan_vid:102}", "SET_FIELD: {ipv4_src:100.0.0.1}", "SET_FIELD: 
> {ipv4_dst:200.0.0.1}", "SET_FIELD: {tcp_src:3333}", "SET_FIELD: 
> {tcp_dst:4444}", "OUTPUT:2", "OUTPUT:48"], "idle_timeout": 0, "cookie": 1, 
> "packet_count": 0, "hard_timeout": 0, "byte_count": 0, "length": 312, 
> "duration_nsec": 750505000, "priority": 23999, "duration_sec": 19, 
> "table_id": 0, "flags": 0, "match": {"dl_type": 2048, "nw_dst": "40.0.0.1", 
> "vlan_pcp": 0, "dl_src": "00:90:22:22:22:22/ff:ff:ff:ff:ff:ff", "nw_proto": 
> 6, "tp_dst": 22222, "tp_src": 11111, "dl_dst": 
> "00:90:11:11:11:11/ff:ff:ff:ff:ff:ff", "dl_vlan": 4095, "nw_src": "30.0.0.1", 
> "in_port": 46}}]}lab@lab-hackertools:~$ 
> 
> lab@lab-hackertools:~$ 
> 
> lab@lab-hackertools:~$ 
> 
> lab@lab-hackertools:~$ curl -d '{"cookie": "1",
>>           "dpid": "9",
>>           "priority": "1024",
>>           "match": {"in_port": "24",
>>                     "eth_type": 0x800},
>>           "actions": [{"type":"PUSH_MPLS","ethertype":0x8847},
>>                       {"type":"SET_FIELD", "field": "mpls_label", 
>> "value":16},
>>                       {"type": "SET_FIELD", "field":"eth_dst", 
>> "value":"00:00:00:11:22:33"},
>>                       {"type": "OUTPUT", "port": "26"}]}' 
>> http://10.1.25.52:8080/stats/flowentry/add


Hmm, I could add the flow entry like as follows.

============================================================================================
Ryu: ryu 3.14
Switch: (Open vSwitch) 2.3.90
============================================================================================
$ curl -d '{
>             "dpid": "9",
>             "actions": [
>                 {"type": "SET_FIELD", "field": "eth_dst", "value": 
> "0e:00:5e:0a:0a:0a"}, 
>                 {"type": "SET_FIELD", "field": "eth_src", "value": 
> "00:08:11:0a:0a:0a"}, 
>                 {"type": "SET_FIELD", "field": "vlan_pcp", "value": 1}, 
>                 {"type": "SET_FIELD", "field": "vlan_vid", "value": 4198}, 
>                 {"type": "SET_FIELD", "field": "ipv4_src", "value": 
> "100.0.0.1"}, 
>                 {"type": "SET_FIELD", "field": "ipv4_dst", "value": 
> "200.0.0.1"}, 
>                 {"type": "SET_FIELD", "field": "tcp_src", "value": 3333}, 
>                 {"type": "SET_FIELD", "field": "tcp_dst", "value": 4444}, 
>                 {"type": "OUTPUT", "port": 2}, 
>                 {"type": "OUTPUT", "port": 48}
>             ], 
>             "byte_count": 0, 
>             "cookie": 1,
>             "cookie_mask": 1,
>             "match": {
>                 "dl_dst": "00:90:11:11:11:11/ff:ff:ff:ff:ff:ff", 
>                 "dl_src": "00:90:22:22:22:22/ff:ff:ff:ff:ff:ff", 
>                 "dl_type": 2048, 
>                 "dl_vlan": 4095, 
>                 "in_port": 46, 
>                 "nw_dst": "40.0.0.1", 
>                 "nw_proto": 6, 
>                 "nw_src": "30.0.0.1", 
>                 "tp_dst": 22222, 
>                 "tp_src": 11111, 
>                 "vlan_pcp": 0
>             }, 
>             "priority": 23999
>         }' http://localhost:8080/stats/flowentry/add
$ 
$ curl -X GET http://localhost:8080/stats/flow/9
{"9": [{"actions": ["SET_FIELD: {eth_dst:0e:00:5e:0a:0a:0a}", "SET_FIELD: 
{eth_src:00:08:11:0a:0a:0a}", "SET_FIELD: {vlan_pcp:1}", "SET_FIELD: 
{vlan_vid:4198}", "SET_FIELD: {ipv4_src:100.0.0.1}", "SET_FIELD: 
{ipv4_dst:200.0.0.1}", "SET_FIELD: {tcp_src:3333}", "SET_FIELD: 
{tcp_dst:4444}", "OUTPUT:2", "OUTPUT:48"], "idle_timeout": 0, "cookie": 1, 
"packet_count": 0, "hard_timeout": 0, "byte_count": 0, "length": 304, 
"duration_nsec": 13000000, "priority": 23999, "duration_sec": 0, "table_id": 0, 
"flags": 0, "match": {"dl_type": 2048, "nw_dst": "40.0.0.1", "vlan_pcp": 0, 
"dl_src": "00:90:22:22:22:22", "nw_proto": 6, "tp_dst": 22222, "tp_src": 11111, 
"dl_dst": "00:90:11:11:11:11", "dl_vlan": 4095, "nw_src": "30.0.0.1", 
"in_port": 46}}]}$
$ 
$ curl -d '{"cookie": "1",
>           "dpid": "9",
>           "priority": "1024",
>           "match": {"in_port": "24",
>                     "eth_type": 2048},
>           "actions": [{"type":"PUSH_MPLS","ethertype":34887},
>                       {"type":"SET_FIELD", "field": "mpls_label", "value":16},
>                       {"type": "SET_FIELD", "field":"eth_dst", 
> "value":"00:00:00:11:22:33"},
>                       {"type": "OUTPUT", "port": "26"}]}' 
> http://localhost:8080/stats/flowentry/add
$ 
$ 
$ curl -X GET http://localhost:8080/stats/flow/9
{"9": [{"actions": ["PUSH_MPLS:34887", "SET_FIELD: {mpls_label:16}", 
"SET_FIELD: {eth_dst:00:00:00:11:22:33}", "OUTPUT:26"], "idle_timeout": 0, 
"cookie": 1, "packet_count": 0, "hard_timeout": 0, "byte_count": 0, "length": 
136, "duration_nsec": 863000000, "priority": 1024, "duration_sec": 0, 
"table_id": 0, "flags": 0, "match": {"dl_type": 2048, "in_port": 24}}, 
{"actions": ["SET_FIELD: {eth_dst:0e:00:5e:0a:0a:0a}", "SET_FIELD: 
{eth_src:00:08:11:0a:0a:0a}", "SET_FIELD: {vlan_pcp:1}", "SET_FIELD: 
{vlan_vid:4198}", "SET_FIELD: {ipv4_src:100.0.0.1}", "SET_FIELD: 
{ipv4_dst:200.0.0.1}", "SET_FIELD: {tcp_src:3333}", "SET_FIELD: 
{tcp_dst:4444}", "OUTPUT:2", "OUTPUT:48"], "idle_timeout": 0, "cookie": 1, 
"packet_count": 0, "hard_timeout": 0, "byte_count": 0, "length": 304, 
"duration_nsec": 906000000, "priority": 23999, "duration_sec": 0, "table_id": 
0, "flags": 0, "match": {"dl_type": 2048, "nw_dst": "40.0.0.1", "vlan_pcp": 0, 
"dl_src": "00:90:22:22:22:22", "nw_proto": 6, "tp_dst": 22222, "tp_sr

c": 11111, "dl_dst": "00:90:11:11:11:11", "dl_vlan": 4095, "nw_src": 
"30.0.0.1", "in_port": 46}}]}$
$
============================================================================================

Please check ryu and switch version, and attached file.


> 
> lab@lab-hackertools:~$ 
> 
> lab@lab-hackertools:~$ 
> 
> lab@lab-hackertools:~$ curl -X GET http://10.1.25.52:8080/stats/flow/9
> 
> {"9": []}lab@lab-hackertools:~$ 
> 
> 
> ====================================================================================
> This message may contain information which is private, privileged or 
> confidential of INNO-Tech Network & Service Inc.
> If you are not the intended recipient of this message, please notify the 
> sender and destroy/delete the message.
> Any review, retransmission, dissemination or other use of, or taking of any 
> action in reliance upon this information,
> by persons or entities other than the intended recipient is prohibited.
> ====================================================================================

Attachment: test.pcap
Description: application/vnd.tcpdump.pcap

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to