Alan Deikman | 9 Feb 00:27 2016

Utility to convert to JSON?

Is there a technique/utility that is used to convert a Ryu class instance into JSON and possibly back again?  
For example an OFPFlowMod.  

I have been writing dual track: one in Python and one in JSON.  It would be a big labor saver if there were some
programmatic way to do this.  

----------------------------
Alan Deikman
ZNYX Networks, Inc.

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
Jason Kölker | 8 Feb 18:02 2016
Picon
Gravatar

[PATCH] protocols/bgp: Log socket creation error

Helpful to track down why the bgp server is stopping when the user
running ryu does not have CAP_NET_BIND_SERVICE.

Signed-off-by: Jason Kölker <jason <at> koelker.net>
---
 ryu/services/protocols/bgp/base.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ryu/services/protocols/bgp/base.py b/ryu/services/protocols/bgp/base.py
index ed662d0..a8ef621 100644
--- a/ryu/services/protocols/bgp/base.py
+++ b/ryu/services/protocols/bgp/base.py
 <at>  <at>  -367,7 +367,9  <at>  <at>  class Activity(object):
                 sock.bind(sa)
                 sock.listen(50)
                 listen_sockets[sa] = sock
-            except socket.error:
+            except socket.error as e:
+                LOG.error('Error creating socket: %s', e)
+
                 if sock:
                     sock.close()

--

-- 
2.5.0

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
(Continue reading)

David Gabriel | 5 Feb 17:58 2016
Picon

Modifying an entry by adding one action

Dears

Is it possible to update/modify one entry by adding new action ?
Please tell me the how to ?

Thanks in advance.
Regards
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
David Gabriel | 5 Feb 17:54 2016
Picon

send to many ports - and not OFPP_FLOOD

Dears

I want to add an entry that allows the forwording to multiple ports.
Please note that I do not want to use the multicast OFPP_FLOOD.
Is it possible to do it this way or there is other solution ?

actions = [parser.OFPActionOutput(out_port1),
                parser.OFPActionOutput(out_port2),
                parser.OFPActionOutput(out_port3)]

Thanks in advance
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Picon
Picon

Create ICMP PKT in the Controller

Dear all,

 

I would like to CRAFT NOT REDIRECT the ICMP packet from the Ryu controller.

 

I did that:

<at> set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)

   def packet_in_handler(self, ev):

     

      msg = ev.msg

      datapath = msg.datapath

      ofproto = datapath.ofproto

      parser = datapath.ofproto_parser

      pkt = packet.Packet(msg.data)

      in_port = msg.match['in_port']

      # print "in_port--->", in_port

            

      #########   ICMP   ##############

      pkt2 = packet.Packet()

      pkt2.add_protocol(ethernet.ethernet(ethertype=0x0800,dst='00:00:00:00:01:02',src='00:00:00:00:01:01'))

      pkt2.add_protocol(ipv4.ipv4(ttl=255,csum=0,dst='192.168.10.2',src='192.168.10.1',proto=1,option=None))

      pkt2.add_protocol(icmp.icmp(type_=icmp.ICMP_ECHO_REQUEST,code=icmp.ICMP_ECHO_REPLY_CODE,csum=0,data=icmp.echo(id_=0, seq=0, data=None)))

    

      pkt2.serialize()

      self.logger.info("packet-out %s" % (pkt2,))

      data=pkt2.data

 

      actions = [parser.OFPActionOutput(port=2)]

      out = parser.OFPPacketOut(datapath=datapath,actions=actions,in_port=ofproto.OFPP_CONTROLLER,data=data)

      datapath.send_msg(out)

      #########   ICMP   ##############

 

 

When the controller has been called by Packet_In massage, I got the following error:

 

hub: uncaught exception: Traceback (most recent call last):

  File "/home/ubuntu/ryu/ryu/lib/hub.py", line 52, in _launch

    func(*args, **kwargs)

  File "/home/ubuntu/ryu/ryu/base/app_manager.py", line 275, in _event_loop

    handler(ev)

  File "/home/ubuntu/Desktop/2Ints-Client-2IP_GWRs-R-1Server-Ryu-ICMP.py", line 344, in packet_in_handler

    datapath.send_msg(out)

  File "/home/ubuntu/ryu/ryu/controller/controller.py", line 234, in send_msg

    msg.serialize()

  File "/home/ubuntu/ryu/ryu/ofproto/ofproto_parser.py", line 205, in serialize

    self._serialize_body()

  File "/home/ubuntu/ryu/ryu/ofproto/ofproto_v1_3_parser.py", line 2380, in _serialize_body

    assert self.buffer_id == 0xffffffff

AssertionError

 

 

I hope to get advice how to solve this problem

 

 

Anees AL-Najjar

RHD Student

School of Information Technology and Electrical Engineering (ITEE)

Office: 331, Building (78)

University of Queensland

Brisbane, QLD

Australia

 

Emails: 1- a.alnajjar1-6NCMjze5YvWHXe+LvDLADg@public.gmane.org

               2-anees.alnajjar-+rCbNqJDCeOHXe+LvDLADg@public.gmane.org

Mobile: +61420407168

 

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
David Gabriel | 4 Feb 17:49 2016
Picon

write metadata and goto table for the same entry

Dears

I want to write the metadata and set the goto table for the same match fields. Could you please confirm if the below code is fine ?

ofproto = datapath.ofproto
parser = datapath.ofproto_parser
inst = [parser.OFPInstructionWriteMetadata(metadata_value, metadata_mask), parser.OFPInstructionGotoTable(goto_table_id), ]
mod = parser.OFPFlowMod(datapath=datapath, priority=priority, match=match, instructions=inst,table_id=tab_id)

datapath.send_msg(mod)


Thanks in advance.
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Osman Titu | 4 Feb 15:03 2016
Picon

How to send packet on backup link

Hi

I am using mininet and RYU controller. 

For my project I need to forward packet through backup link when forwarding link goes down.

I am using NetworkX and shortest_path for path calculation. I have added EventLinkAdd and EventLinkDelete to update the graph when link goes down.

I can see the updated links when link goes down but shortest_path can not calculate new path when link goes down. The updated path is not reflected properly in shortest_path when link goes down.

Any suggestion would be appreciated.

Regards

Titu 

 
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Le Tran Duc | 3 Feb 11:46 2016
Picon
Gravatar

Re: Ryu-devel Digest, Vol 51, Issue 4

Thank you for replying.

I tried as you said with the command:

curl -X POST -d '{"dpid": 7, "match": {"ip_dscp": 46, "eth_type": 2048}, "actions": [{"type": "OUTPUT "," port ": 4 }]} ' http://localhost:8080/stats/flowentry/add

But still got that problem. :(

I tried to start up ofctl_rest too, but got the following information.



So I think ofctl_rest is started up already.



Sent with MailTrack

On Wed, Feb 3, 2016 at 10:11 AM, <ryu-devel-request-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> wrote:
Send Ryu-devel mailing list submissions to
        ryu-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/ryu-devel
or, via email, send a message with subject or body 'help' to
        ryu-devel-request-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

You can reach the person managing the list at
        ryu-devel-owner-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ryu-devel digest..."


Today's Topics:

   1. Re: Error when add a flow entry (Minoru TAKAHASHI)
   2. Re: Ryu-devel Digest, Vol 51, Issue 3 (Stas Kozlov)


----------------------------------------------------------------------

Message: 1
Date: Wed, 03 Feb 2016 11:21:33 +0900
From: Minoru TAKAHASHI <takahashi.minoru7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [Ryu-devel] Error when add a flow entry
To: Le Tran Duc <donghonguquen04-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
        ryu-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Message-ID: <56B1642D.7010409-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Content-Type: text/plain; charset=UTF-8

Hi,

I think, the connection with the controller may have gone wrong.
For example, ofctl_rest (ryu/app/ofctl_rest.py) app start-up already?

> curl -X POST -d '{"dpid": "7", "match": {"ip_dscp": "46"},
And, OFspec1.3says that OXM_OF_IP_DSCP is allowed only if it is preceded
by another entry with ETH TYPE=0x0800 or ETH TYPE=0x86dd.
So, please correct match field as follows.

for IPv4: "match":{"ip_dscp":46, "eth_type":2048}
 or
for IPv6: "match":{"ip_dscp":46, "eth_type":34525}

Just for your infomation, how to use ofctl_rest app(and exapmle of curl) is described in the following document.
https://ryu.readthedocs.org/en/latest/app/ofctl_rest.html

thanks,

On 2016?02?03? 09:10, Le Tran Duc wrote:
> Hello,
>
> I am trying to add a flow entry to a switch with following command:
>
> curl -X POST -d '{"dpid": "7", "match": {"ip_dscp": "46"}, "actions": [{"type": "OUTPUT "," port ":" 4 "}]} ' http://localhost:8080/stats/flowentry/add
>
> I just want to send the packets that have ip_dscp =46 to the out_port = 4.
>
> But I got the error:
>
>
> ?
>
> Please help me to solve it.
>
> Thank you.
>
> --
> Le Tran Duc
> The Bonch-Bruevich Saint - Petersburg State University of Telecommunications
>
>
>
> Sent with MailTrack <https://mailtrack.io/install?source=signature&lang=en&referral=donghonguquen04 <at> gmail.com&idSignature=22>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel-5NWGOfrQmneHXe+LvDLADg@public.gmane.orgrceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>



------------------------------

Message: 2
Date: Wed, 3 Feb 2016 10:11:32 +0300
From: Stas Kozlov <mancubus77 <at> gmail.com>
Subject: Re: [Ryu-devel] Ryu-devel Digest, Vol 51, Issue 3
To: donghonguquen04-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: ryu-devel-5NWGOfrQmnd4wTydcyPnfg@public.gmane.orgceforge.net
Message-ID:
        <CABiEHDo3fK6eBPO-OWSk+YhS=NMtjYdTPEvQvntP_UupAyVcYA <at> mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi,

You have to match eth_type with ip_dscp
Check openflow spec prerequisite for details.

 --
Stas

From: Le Tran Duc <donghonguquen04-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

> To: ryu-devel <at> lists.sourceforge.net
> Cc:
> Date: Wed, 3 Feb 2016 03:10:58 +0300
> Subject: [Ryu-devel] Error when add a flow entry
> Hello,
>
> I am trying to add a flow entry to a switch with following command:
>
> curl -X POST -d '{"dpid": "7", "match": {"ip_dscp": "46"}, "actions":
> [{"type": "OUTPUT "," port ":" 4 "}]} '
> http://localhost:8080/stats/flowentry/add
>
> I just want to send the packets that have ip_dscp =46 to the out_port = 4.
>
> But I got the error:
>
>
> ?
>
> Please help me to solve it.
>
> Thank you.
>
> --
> Le Tran Duc
> The Bonch-Bruevich Saint - Petersburg State University of
> Telecommunications
>
>
>
> Sent with MailTrack
> <https://mailtrack.io/install?source=signature&lang=en&referral=donghonguquen04-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org&idSignature=22>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> _______________________________________________
> Ryu-devel mailing list
> Ryu-devel-5NWGOfrQmneHXe+LvDLADg@public.gmane.orgrceforge.net
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture.JPG
Type: image/jpeg
Size: 42479 bytes
Desc: not available

------------------------------

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140

------------------------------

_______________________________________________
Ryu-devel mailing list
Ryu-devel-5NWGOfrQmnetEtDZOKyKiw@public.gmane.orgrge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


End of Ryu-devel Digest, Vol 51, Issue 4
****************************************



--
Le Tran Duc
The Bonch-Bruevich Saint - Petersburg State University of Telecommunications
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
IWAMOTO Toshihiro | 3 Feb 10:02 2016
Picon

[PATCH 0/3] Implement NXActionRegLoad

This set of patches are sort of low priority as Ryu 3.30 has
a fix for NXActionUnknown and OpenStack Neutron no longer
generates exceptions.

IWAMOTO Toshihiro (3):
  Implement NXActionRegLoad
  packet_data_generator3: generate an NXActionRegLoad packet
  test_parser: add an NXActionRegLoad test

 ryu/ofproto/nx_actions.py                          |  49 +++++++++++++++++
 .../ovs-ofctl-of13-match_load_nx_register.packet   | Bin 0 -> 104 bytes
 ryu/tests/packet_data_generator3/gen.py            |   8 +++
 ...s-ofctl-of13-match_load_nx_register.packet.json |  60 +++++++++++++++++++++
 4 files changed, 117 insertions(+)
 create mode 100644 ryu/tests/packet_data/of13/ovs-ofctl-of13-match_load_nx_register.packet
 create mode 100644 ryu/tests/unit/ofproto/json/of13/ovs-ofctl-of13-match_load_nx_register.packet.json

--

-- 
2.1.4

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
Stas Kozlov | 3 Feb 08:11 2016
Picon

Re: Ryu-devel Digest, Vol 51, Issue 3

Hi,

You have to match eth_type with ip_dscp
Check openflow spec prerequisite for details.

 --
Stas

From: Le Tran Duc <donghonguquen04-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: ryu-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: 
Date: Wed, 3 Feb 2016 03:10:58 +0300
Subject: [Ryu-devel] Error when add a flow entry
Hello,

I am trying to add a flow entry to a switch with following command:

curl -X POST -d '{"dpid": "7", "match": {"ip_dscp": "46"}, "actions": [{"type": "OUTPUT "," port ":" 4 "}]} ' http://localhost:8080/stats/flowentry/add

I just want to send the packets that have ip_dscp =46 to the out_port = 4.

But I got the error:




Please help me to solve it.

Thank you.

--
Le Tran Duc
The Bonch-Bruevich Saint - Petersburg State University of Telecommunications



Sent with MailTrack

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel-5NWGOfrQmnetEtDZOKyKiw@public.gmane.orgrge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel
Le Tran Duc | 3 Feb 01:10 2016
Picon
Gravatar

Error when add a flow entry

Hello,

I am trying to add a flow entry to a switch with following command:

curl -X POST -d '{"dpid": "7", "match": {"ip_dscp": "46"}, "actions": [{"type": "OUTPUT "," port ":" 4 "}]} ' http://localhost:8080/stats/flowentry/add

I just want to send the packets that have ip_dscp =46 to the out_port = 4.

But I got the error:




Please help me to solve it.

Thank you.

--
Le Tran Duc
The Bonch-Bruevich Saint - Petersburg State University of Telecommunications



Sent with MailTrack
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
Ryu-devel@...
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Gmane