Dear All, I verify again, I found out use restful-api get flow state, the controller had output error message and no output flow state. In attached file(packets number:11), you can saw switch had output message to controller, Can you help check this again. Thanks,
Jalee
================================ ryu error message
lab@lab-hackertools:~$ (12852) accepted ('10.1.25.52', 52413)
10.1.25.52 - - [12/Nov/2014 17:23:46] "POST /stats/flowentry/add HTTP/1.1"
200 115 0.001836
(12852) accepted ('10.1.25.52', 52414)
Error in the datapath 0000000000000009 from ('10.1.25.24', 38998)
EVENT ofp_event->switches EventOFPStateChange
EVENT ofp_event->dpset EventOFPStateChange
hub: uncaught exception: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/ryu/lib/hub.py", line 52,
in _launch
func(*args, **kwargs)
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
line 306, in datapath_connection_factory
datapath.serve()
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
line 226, in serve
self._recv_loop()
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
line 102, in deactivate
method(self)
File
"/usr/local/lib/python2.7/dist-packages/ryu/controller/controller.py",
line 157, in _recv_loop
version, msg_type, msg_len, xid, buf)
File
"/usr/local/lib/python2.7/dist-packages/ryu/ofproto/ofproto_parser.py",
line 63, in msg
version, msg_type, msg_len, xid, utils.bytearray_to_hex(buf))
File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 103, in
bytearray_to_hex
return ' '.join(hex(ord(byte)) for byte in data)
File "/usr/local/lib/python2.7/dist-packages/ryu/utils.py", line 103, in
<genexpr>
return ' '.join(hex(ord(byte)) for byte in data)
TypeError: ord() expected string of length 1, but int found
<ryu.controller.controller.Datapath object at 0x3a5f550>
unregister Switch<dpid=9, Port<dpid=9, port_no=1, DOWN> Port<dpid=9,
port_no=2, DOWN> Port<dpid=9, port_no=3, DOWN> Port<dpid=9, port_no=4,
DOWN> Port<dpid=9, port_no=5, DOWN> Port<dpid=9, port_no=6, DOWN>
Port<dpid=9, port_no=7, DOWN> Port<dpid=9, port_no=8, DOWN> Port<dpid=9,
port_no=9, DOWN> Port<dpid=9, port_no=10, DOWN> Port<dpid=9, port_no=11,
DOWN> Port<dpid=9, port_no=12, DOWN> Port<dpid=9, port_no=13, DOWN>
Port<dpid=9, port_no=14, DOWN> Port<dpid=9, port_no=15, DOWN> Port<dpid=9,
port_no=16, DOWN> Port<dpid=9, port_no=17, DOWN> Port<dpid=9, port_no=18,
DOWN> Port<dpid=9, port_no=19, DOWN> Port<dpid=9, port_no=20, DOWN>
Port<dpid=9, port_no=21, DOWN> Port<dpid=9, port_no=22, DOWN> Port<dpid=9,
port_no=23, DOWN> Port<dpid=9, port_no=24, DOWN> Port<dpid=9, port_no=25,
DOWN> Port<dpid=9, port_no=26, DOWN> Port<dpid=9, port_no=27, DOWN>
Port<dpid=9, port_no=28, DOWN> Port<dpid=9, port_no=29, DOWN> Port<dpid=9,
port_no=30, DOWN> Port<dpid=9, port_no=31, DOWN> Port<dpid=9, port_no=32,
DOWN> Port<dpid=9, port_no=33, DOWN> Port<dpid=9, port_no=34, DOWN>
Port<dpid=9, port_no=35, DOWN> Port<dpid=9, port_no=36, DOWN> Port<dpid=9,
port_no=37, DOWN> Port<dpid=9, port_no=38, DOWN> Port<dpid=9, port_no=39,
DOWN> Port<dpid=9, port_no=40, DOWN> Port<dpid=9, port_no=41, DOWN>
Port<dpid=9, port_no=42, DOWN> Port<dpid=9, port_no=43, DOWN> Port<dpid=9,
port_no=44, DOWN> Port<dpid=9, port_no=45, DOWN> Port<dpid=9, port_no=46,
LIVE> Port<dpid=9, port_no=47, DOWN> Port<dpid=9, port_no=48, LIVE> >
DPSET: unregister datapath <ryu.controller.controller.Datapath object at
0x3a5f550>
10.1.25.52 - - [12/Nov/2014 17:24:08] "GET /stats/flow/9 HTTP/1.1" 200 131
1.000700
lab@lab-hackertools:~$
======================== flow entry log.
curl -d '{"cookie": "1",
"dpid": "9",
"priority": "1024",
"match": {"in_port": "46",
"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": "48"}]}'
http://10.1.25.52:8080/stats/flowentry/add
lab@lab-hackertools:~$
lab@lab-hackertools:~$ curl -d '{"cookie": "1",
> "dpid": "9",
> "priority": "1024",
> "match": {"in_port": "46",
> "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": "48"}]}'
>http://10.1.25.52:8080/stats/flowentry/add
lab@lab-hackertools:~$
lab@lab-hackertools:~$ curl -X GET http://10.1.25.52:8080/stats/flow/9
{"9": []}lab@lab-hackertools:~$
於 11/7/14, 19:25,"Jalee Lee" <[email protected]> 寫道:
>Got it, I think is my switch issue.
>Thanks,
>
>Jalee
>
>於 10/31/14, 15:11,"Yusuke Iwase" <[email protected]> 寫道:
>
>>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.
>>>
>>>========================================================================
>>>=
>>>===========
====================================================================================
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.
====================================================================================
nw250.4-5.pcap
Description: Binary data
------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
