Hi,

the bug has been fixed in current version.
please try Ryu 3.6.

thanks.

On Fri, 7 Feb 2014 12:16:44 +0800
jalee <[email protected]> wrote:

> Hi Yuichi,
> Do you have fix version can resolve ofctl_rest bug?
> Thanks,
> 
> Jalee
> 
> 
> -----Original Message-----
> From: Yuichi Ito [mailto:[email protected]] 
> Sent: Thursday, January 23, 2014 12:03 PM
> To: jalee
> Cc: [email protected]
> Subject: Re: [Ryu-devel] About restAPI question for more actions at one flow
> entry
> 
> Hi.
> 
>> So, ryu controller just do push mpls ethertype right? the set-field 
>> actions can we do that?
> 
> yes.
> "PUSH_MPLS" only pushes the mpls header.
> to set a new mpls label on it, use "SET_FIELD".
> 
>> curl -d '{"cookie": 1,
>>           "dpid": "0000000000000034",
>>           "priority": "101",
>>           "match": {"in_port": "7",
>>                   "mpls_label": "111"},
>>           "actions": [{"type": "OUTPUT", "port": "8"},
>>                    {"type": "PUSH_MPLS", "ethertype": "34887"}]}'
>> http://10.1.25.52:8080/stats/flowentry/add
> 
> "mpls_label" in match conditions prerequires "eth_type".
> 
> https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-sp
> ecifications/openflow/openflow-spec-v1.3.3.pdf#56
> 
> curl -d '{"cookie": "1,
>           "dpid": "0000000000000034",
>           "priority": "101",
>           "match": {"in_port": "7",
>                     "eth_type": "34887",
>                     "mpls_label": "111"},
>           "actions": [{"type": "PUSH_MPLS", "ethertype": "34887"},
>                       {"type": "SET_FIELD", "field": "mpls_label", "value":
> "777}",
>                       {"type": "OUTPUT", "port": "8"}]}'
> http://localhost:8080/stats/flowentry/add
> 
> unfortunately, there are bugs in current version ofctl_rest.
> please wait for correction.
> 
> thanks.
> 
> 
> On Wed, 22 Jan 2014 19:19:10 +0800
> jalee <[email protected]> wrote:
> 
>> Hi Yuichi,
>> So, ryu controller just do push mpls ethertype right? the set-field 
>> actions can we do that?
>> Such as:
>> If I want to push new mpls label "777", could you tell me how can edit 
>> the restAPI as below.
>> Thanks,
>>
>> Jalee
>>
>> curl -d '{"cookie": 1,
>>           "dpid": "0000000000000034",
>>           "priority": "101",
>>           "match": {"in_port": "7",
>>                   "mpls_label": "111"},
>>           "actions": [{"type": "OUTPUT", "port": "8"},
>>                    {"type": "PUSH_MPLS", "ethertype": "34887"}]}'
>> http://10.1.25.52:8080/stats/flowentry/add
>>
>> -----Original Message-----
>> From: Yuichi Ito [mailto:[email protected]]
>> Sent: Wednesday, January 22, 2014 4:35 PM
>> To: jalee
>> Cc: [email protected]
>> Subject: Re: [Ryu-devel] About restAPI question for more actions at 
>> one flow entry
>>
>> Hi.
>>
>> PUSH_MPLS requires the ethertype '0x8847' or '0x8848' that mean MPLS.
>> they are 34887 and 34888 in decimal.
>>
>> {"type": "PUSH_MPLS", "ethertype": "34887"}
>>
>> please see below:
>>
>> https://www.opennetworking.org/images/stories/downloads/sdn-resources/
>> onf-sp
>> ecifications/openflow/openflow-spec-v1.3.3.pdf#26
>>
>> thanks.
>>
>>
>> On Wed, 22 Jan 2014 16:09:07 +0800
>> jalee <[email protected]> wrote:
>>
>>> Thanks Yuichi, is work.
>>>
>>> Other question, I want to push MPLS label but I don't how can I do 
>>> edit actions? Where is input label parameter? 884720001fff10000021 or
>>> 131073
>>>
>>> Such as:
>>>
>>>  
>>>
>>>           "actions": [{"type": "OUTPUT", "port": "8"},
>>>
>>>                       {"type": "PUSH_MPLS", "ethertype": 
>>> "884720001fff10000021"}]}' http://10.1.25.52:8080/stats/flowentry/add
>>>
>>>  
>>>
>>> Thanks
>>>
>>>  
>>>
>>> Jalee
>>>
>>>  
>>>
>>>  
>>>
>>> -----Original Message-----
>>> From: Yuichi Ito [mailto:[email protected]]
>>> Sent: Wednesday, January 22, 2014 2:14 PM
>>> To: jalee
>>> Cc: [email protected]
>>> Subject: Re: [Ryu-devel] About restAPI question for more actions at 
>>> one flow entry
>>>
>>>  
>>>
>>> Hi.
>>>
>>>  
>>>
>>>> curl -d
>>>
>>>> '{"cookie":"1","dpid":"0000000000000049","priority":"101","match":{"
>>>> i
>>>> n
>>>
>>>> _port":"7","dl_src":"00901a400011","dl_dst":"009099400001","dl_vlan":"
>>>
>>>> 101","dl_vlan_pcp":"0","dl_type":"2048","nw_tos":"0","nw_proto":"17","
>>>
>>>> nw_src":"30.0.0.1","nw_dst":"40.0.0.1","tp_src":"2001","tp_dst":"2001"
>>>
>>>> },"actions":[{"type":"OUTPUT","port":"8","port":"9","type":"SET_VLAN
>>>> _
>>>> V
>>>
>>>> ID","vlan_vid":"2","type":"SET_DL_DST","dl_dst":"01005e0a0a0a"}]}' 
>>>
>>>> http://10.1.25.52:8080/stats/flowentry/add
>>>
>>>  
>>>
>>> "actions" is a list of actions. please try this:
>>>
>>>  
>>>
>>> (improve readability)
>>>
>>>  
>>>
>>> curl -d '{"cookie": 1,
>>>
>>>           "dpid": "0000000000000049",
>>>
>>>           "priority": "101",
>>>
>>>           "match": {"in_port": "7",
>>>
>>>                     "dl_src": "00901a400011",
>>>
>>>                     "dl_dst": "009099400001",
>>>
>>>                     "dl_vlan": "101",
>>>
>>>                     "dl_vlan_pcp": "0",
>>>
>>>                     "dl_type": "2048",
>>>
>>>                     "nw_tos": "0",
>>>
>>>                     "nw_proto": "17",
>>>
>>>                     "nw_src": "30.0.0.1",
>>>
>>>                     "nw_dst": "40.0.0.1",
>>>
>>>                     "tp_src": "2001",
>>>
>>>                     "tp_dst": "2001"},
>>>
>>>           "actions": [{"type": "OUTPUT", "port": "8"},
>>>
>>>                       {"type": "OUTPUT", "port": "9"},
>>>
>>>                       {"type": "SET_VLAN_VID", "vlan_vid": "2"},
>>>
>>>                       {"type": "SET_DL_DST", "dl_dst": 
>>> "01005e0a0a0a"}]}' http://10.1.25.52:8080/stats/flowentry/add
>>>
>>>  
>>>
>>> thanks.
>>>
>>>  
>>>
>>>  
>>>
>>> On Wed, 22 Jan 2014 13:58:26 +0800
>>>
>>> jalee <[email protected] <mailto:[email protected]>> wrote:
>>>
>>>  
>>>
>>>> Dear All,
>>>
>>>>
>>>
>>>> Can you tell me how can I do use more actions on the restAPI at one 
>>>> flow
>> entry? Such as: Two output port, set vlan_vid, and set dl_dst...
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> curl -d
>>>
>>>> '{"cookie":"1","dpid":"0000000000000049","priority":"101","match":{"
>>>> i
>>>> n
>>>
>>>> _port":"7","dl_src":"00901a400011","dl_dst":"009099400001","dl_vlan":"
>>>
>>>> 101","dl_vlan_pcp":"0","dl_type":"2048","nw_tos":"0","nw_proto":"17","
>>>
>>>> nw_src":"30.0.0.1","nw_dst":"40.0.0.1","tp_src":"2001","tp_dst":"2001"
>>>
>>>> },"actions":[{"type":"OUTPUT","port":"8","port":"9","type":"SET_VLAN
>>>> _
>>>> V
>>>
>>>> ID","vlan_vid":"2","type":"SET_DL_DST","dl_dst":"01005e0a0a0a"}]}' 
>>>
>>>> http://10.1.25.52:8080/stats/flowentry/add
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> Thanks,
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> Jalee
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> *From:*jalee [mailto:[email protected]] 
>>>> <mailto:[mailto:[email protected]]>
>>>
>>>> *Sent:* Monday, January 20, 2014 1:07 AM
>>>
>>>> *To:* '[email protected]'
>>>
>>>> *Subject:* About restAPI question
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> DearAll,
>>>
>>>>
>>>
>>>> I used restAPI add flow entry, but I still see the 404 message on 
>>>> the
>> controller, could you tell me I miss something? Please see log as below.
>>>
>>>>
>>>
>>>> I will use openflow 1.0 and 1.3.1 API function.
>>>
>>>>
>>>
>>>> Thanks,
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> Jalee
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> ===================================== add flow entry
>>>
>>>>
>>>
>>>> lab@lab-virtual-machine:~/ryu/ryu/lib$ curl -d '{"dpid": 
>>>
>>>> "0000000000000031", "priority":"32768", "match":{"in_port":"1"},
>>>
>>>> "actions":[{"port":"3"}]}' http://127.0.0.1:8080/stats/flowentry/add
>>>
>>>>
>>>
>>>> lab@lab-virtual-machine:~/ryu/ryu/lib$
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> ===================================== controller log.
>>>
>>>>
>>>
>>>> lab@lab-virtual-machine:/usr/local/lib/python2.7/dist-packages/ryu/a
>>>> p
>>>> p
>>>> <mailto:lab@lab-virtual-machine:/usr/local/lib/python2.7/dist-packag
>>>> e
>>>> s/ryu/app>
>>>
>>>> $
>>>
>>>> <mailto:lab@lab-virtual-machine:/usr/local/lib/python2.7/dist-packag
>>>> e
>>>> s
>>>
>>>> /ryu/app$> ryu-manager ofctl_rest.py
>>>
>>>>
>>>
>>>> loading app ofctl_rest.py
>>>
>>>>
>>>
>>>> loading app ryu.controller.ofp_handler
>>>
>>>>
>>>
>>>> instantiating app None of DPSet
>>>
>>>>
>>>
>>>> creating context dpset
>>>
>>>>
>>>
>>>> creating context wsgi
>>>
>>>>
>>>
>>>> instantiating app ryu.controller.ofp_handler of OFPHandler
>>>
>>>>
>>>
>>>> instantiating app ofctl_rest.py of RestStatsApi
>>>
>>>>
>>>
>>>> (5400) wsgi starting up on http://0.0.0.0:8080/
>>>
>>>>
>>>
>>>> (5400) accepted ('127.0.0.1', 51382)
>>>
>>>>
>>>
>>>> 127.0.0.1 - - [20/Jan/2014 00:46:45] "POST /stats/flowentry/add
>>>
>>>> HTTP/1.1" 404 122 0.003066
>>>
>>>>
>>>
>>>> (5400) accepted ('127.0.0.1', 51383)
>>>
>>>>
>>>
>>>> 127.0.0.1 - - [20/Jan/2014 00:46:56] "POST /stats/flowentry/add
>>>
>>>> HTTP/1.1" 404 122 0.000631
>>>
>>>>
>>>
>>>>  
>>>
>>>>
>>>
>>>> lab@lab-virtual-machine:~$ netstat -tunlp
>>>
>>>>
>>>
>>>> (Not all processes could be identified, non-owned process info
>>>
>>>>
>>>
>>>> will not be shown, you would have to be root to see it all.)
>>>
>>>>
>>>
>>>> Active Internet connections (only servers)
>>>
>>>>
>>>
>>>> Proto Recv-Q Send-Q Local Address           Foreign Address
> State
>> PID/Program name
>>>
>>>>
>>>
>>>> tcp        0      0 0.0.0.0:6633            0.0.0.0:*
>> LISTEN      5400/python    
>>>
>>>>
>>>
>>>> tcp        0      0 0.0.0.0:8080            0.0.0.0:*
>> LISTEN      5400/python    
>>>
>>>>
>>>
>>>> tcp        0      0 0.0.0.0:22              0.0.0.0:*
>> LISTEN      -              
>>>
>>>>
>>>
>>>> tcp        0      0 127.0.0.1:631           0.0.0.0:*
>> LISTEN      -              
>>>
>>>>
>>>
>>>> tcp6       0      0 :::22                   :::*
>> LISTEN      -              
>>>
>>>>
>>>
>>>> tcp6       0      0 ::1:631                 :::*
>> LISTEN      -              
>>>
>>>>
>>>
>>>> udp        0      0 0.0.0.0:37593           0.0.0.0:*
>> -              
>>>
>>>>
>>>
>>>> udp        0      0 0.0.0.0:5353            0.0.0.0:*
>> -              
>>>
>>>>
>>>
>>>> udp        0      0 0.0.0.0:68              0.0.0.0:*
>> -              
>>>
>>>>
>>>
>>>> udp6       0      0 :::5353                 :::*
>> -              
>>>
>>>>
>>>
>>>> udp6       0      0 :::34974                :::*
>> -              
>>>
>>>>
>>>
>>>> lab@lab-virtual-machine:~$
>>>
>>>>
>>>
>>>>
>>>
>>>> ====================================================================
>>>> =
>>>> =
>>>
>>>> ============== 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.
>>>
>>>> ====================================================================
>>>> =
>>>> =
>>>
>>>> ==============
>>>
>>>>
>>>
>>>>
>>>
>>>> --------------------------------------------------------------------
>>>> -
>>>> -
>>>
>>>> -------- CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>>>
>>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For 
>>>> Critical
>>>
>>>> Workloads, Development Environments & Everything In Between.
>>>
>>>> Get a Quote or Start a Free Trial Today. 
>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.
>>>
>>>> clktrk
>>>
>>>>
>>>
>>>>
>>>
>>>>
>>>
>>>> _______________________________________________
>>>
>>>> Ryu-devel mailing list
>>>
>>>> [email protected]
>>>> <mailto:[email protected]>
>>>
>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>
>>>>
>>>
>>>  
>>>
>>>  
>>>
>>>
>>> =====================================================================
>>> = ============== 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.
>> ======================================================================
>> ==============
>>
>>
> 
> 
>  
> 
> 
> 
> 
> ====================================================================================
> 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.
> ====================================================================================
>  
> 
> 

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to