[Ryu-devel] Business Register 2017/2018

2017-06-25 Thread EU Business Register

Hello,

In order to have your company inserted in the EU Business Register for 
2017/2018, please print, complete and submit the attached form (PDF file) to 
the following address:

EU BUSINESS REGISTER
P.O. BOX 34
3700 AA ZEIST
THE NETHERLANDS

Fax: +31 205 248 107

You can also scan the completed form and attach it in a reply to this email.

Updating is free of charge.



EU-Business-Register.pdf
Description: Binary data
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


Re: [Ryu-devel] List to .csv in "port stats"

2017-06-25 Thread Iwase Yusuke


Hi,

Currently, Ryu does not provide such feature, but how about using "csv" module (Python standard 
library)?


e.g.)
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
index 3e7c598..f509b67 100644
--- a/ryu/app/simple_switch_13.py
+++ b/ryu/app/simple_switch_13.py
@@ -13,11 +13,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

+import csv
+
 from ryu.base import app_manager
 from ryu.controller import ofp_event
 from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER
 from ryu.controller.handler import set_ev_cls
 from ryu.ofproto import ofproto_v1_3
+from ryu.ofproto import ofproto_v1_3_parser
+from ryu.lib import hub
 from ryu.lib.packet import packet
 from ryu.lib.packet import ethernet
 from ryu.lib.packet import ether_types
@@ -30,6 +34,15 @@ class SimpleSwitch13(app_manager.RyuApp):
 super(SimpleSwitch13, self).__init__(*args, **kwargs)
 self.mac_to_port = {}

+self._f = open('port_stats.csv', 'w')
+self.csv_writer = csv.DictWriter(
+self._f, ofproto_v1_3_parser.OFPPortStats._fields)
+self.csv_writer.writeheader()
+
+def stop(self):
+super(SimpleSwitch13, self).stop()
+self._f.close()
+
 @set_ev_cls(ofp_event.EventOFPSwitchFeatures, CONFIG_DISPATCHER)
 def switch_features_handler(self, ev):
 datapath = ev.msg.datapath
@@ -48,6 +61,8 @@ class SimpleSwitch13(app_manager.RyuApp):
   ofproto.OFPCML_NO_BUFFER)]
 self.add_flow(datapath, 0, match, actions)

+hub.spawn(self.send_port_stats_request_loop, datapath)
+
 def add_flow(self, datapath, priority, match, actions, buffer_id=None):
 ofproto = datapath.ofproto
 parser = datapath.ofproto_parser
@@ -117,3 +132,21 @@ class SimpleSwitch13(app_manager.RyuApp):
 out = parser.OFPPacketOut(datapath=datapath, buffer_id=msg.buffer_id,
   in_port=in_port, actions=actions, data=data)
 datapath.send_msg(out)
+
+def send_port_stats_request_loop(self, datapath):
+while self.is_active:
+self._send_port_stats_request(datapath)
+
+hub.sleep(3)
+
+def _send_port_stats_request(self, datapath):
+ofp = datapath.ofproto
+ofp_parser = datapath.ofproto_parser
+
+req = ofp_parser.OFPPortStatsRequest(datapath, 0, ofp.OFPP_ANY)
+datapath.send_msg(req)
+
+@set_ev_cls(ofp_event.EventOFPPortStatsReply, MAIN_DISPATCHER)
+def port_stats_reply_handler(self, ev):
+for stat in ev.msg.body:
+self.csv_writer.writerow(stat._asdict())


$ cat port_stats.csv
port_no,rx_packets,tx_packets,rx_bytes,tx_bytes,rx_dropped,tx_dropped,rx_errors,tx_errors,rx_frame_err,rx_over_err,rx_crc_err,collisions,duration_sec,duration_nsec
4294967294,0,0,0,0,0,0,0,0,0,0,0,0,723,94000
1,8,32,648,4016,0,0,0,0,0,0,0,0,723,94400
2,8,32,648,4016,0,0,0,0,0,0,0,0,723,94400
4294967294,0,0,0,0,0,0,0,0,0,0,0,0,726,94400
1,8,32,648,4016,0,0,0,0,0,0,0,0,726,94800
2,8,32,648,4016,0,0,0,0,0,0,0,0,726,94800
...(snip)


Thanks,
Iwase


On 2017年06月25日 21:25, Sergio Silva wrote:

Dear friend,
Please, I would like to know if there is a possibility that the "port stats" files could be modified 
from list to default ".csv". This my suggestion is due to the fact that the standard 
"Comma-Separated Values" are files are widely used with numpy, pandas, database and others. For 
scientific analysis, statistical surveys with prediction and artificial intelligence. I think if Ryu 
would have a lot more to offer if the collected files had the format ".csv" than a list. I thank you.


2017-06-25 9:03 GMT-03:00 Sergio Silva >:

Dear friend,
Please, I would like to know if there is a possibility that the "port 
stats" files could be
modified from list to default ".csv". This my suggestion is due to the fact 
that the standard
"Comma-Separated Values" are files are widely used with numpy, pandas, 
database and others. For
scientific analysis, statistical surveys with prediction and artificial 
intelligence. I think if
Ryu would have a lot more to offer if the collected files had the format 
".csv" than a list. I
thank you.




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___

Re: [Ryu-devel] Testing BGP in ryu

2017-06-25 Thread Iwase Yusuke

Hi Pynbiang,

Excuse me for jumping in.

It's just my guess, is IPv6 disabled on your machine?
Mininet does disable IPv6 automatically on its installation.

https://github.com/mininet/mininet/blob/aa8901268dbb04e11d466732a354b3533e0e138e/util/install.sh#L615-L639

Could you confirm the IPv6 settings (e.g., "/etc/sysctl.conf" and 
"/etc/default/grub")
on your machine?

Thanks,
Iwase


On 2017年06月24日 17:17, Pynbiang Hadem wrote:

Hi, Fujimoto

Tried with as you suggested.
sudo ryu-manager ryu/services/protocols/bgp/application.py --bgp-app-config-file 
ryu/services/protocols/bgp/bgp_sample_conf.py


However, the output is still the same.

what could be the issue?.

Thanks
Hadem

On Fri, Jun 23, 2017 at 5:33 AM, Fujimoto Satoshi > wrote:


Hi, Pynbiang

Thank you for sending your log messages!
In the messages, I've found:


Error creating socket: [Errno 13] Permission denied

So, "ryu-manager" may not have authority to use well-known port 179,
which is used for BGP protocol.

Please run your command with "sudo", that is:
sudo ryu-manager ryu/services/protocols/bgp/application.py 
--bgp-app-config-file
ryu/services/protocols/bgp/bgp_sample_conf.py


Thanks,
Fujimoto


On 2017年06月22日 21:50, Pynbiang Hadem wrote:

Hi Fujimoto,

*Pls ignore the last mail. I have corrected the command as below as pointed 
out by you in one
of the other Forum blogs:*
ryu-manager ryu/services/protocols/bgp/application.py --bgp-app-config-file
ryu/services/protocols/bgp/bgp_sample_conf.py

*Output:*
lzma module is not available
Registered VCS backend: git
Registered VCS backend: hg
Registered VCS backend: svn
Registered VCS backend: bzr
loading app ryu/services/protocols/bgp/application.py
instantiating app ryu/services/protocols/bgp/application.py of RyuBGPSpeaker
ryu/services/protocols/bgp/bgp_sample_conf.py:1: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  import os
ryu/services/protocols/bgp/bgp_sample_conf.py:3: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import RF_VPN_V4
ryu/services/protocols/bgp/bgp_sample_conf.py:4: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import RF_VPN_V6
ryu/services/protocols/bgp/bgp_sample_conf.py:5: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import RF_L2_EVPN
ryu/services/protocols/bgp/bgp_sample_conf.py:6: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import RF_VPNV4_FLOWSPEC
ryu/services/protocols/bgp/bgp_sample_conf.py:7: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import RF_VPNV6_FLOWSPEC
ryu/services/protocols/bgp/bgp_sample_conf.py:8: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import RF_L2VPN_FLOWSPEC
ryu/services/protocols/bgp/bgp_sample_conf.py:9: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import EVPN_MAX_ET
ryu/services/protocols/bgp/bgp_sample_conf.py:10: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import ESI_TYPE_LACP
ryu/services/protocols/bgp/bgp_sample_conf.py:11: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import ESI_TYPE_MAC_BASED
ryu/services/protocols/bgp/bgp_sample_conf.py:12: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import EVPN_ETH_AUTO_DISCOVERY
ryu/services/protocols/bgp/bgp_sample_conf.py:13: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import EVPN_MAC_IP_ADV_ROUTE
ryu/services/protocols/bgp/bgp_sample_conf.py:14: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from ryu.services.protocols.bgp.bgpspeaker import TUNNEL_TYPE_VXLAN
ryu/services/protocols/bgp/bgp_sample_conf.py:15: RuntimeWarning: Parent 
module
'bgpspeaker.application' not found while handling absolute import
  from 

Re: [Ryu-devel] ryu action for outputing to input port

2017-06-25 Thread Iwase Yusuke

Hi Mahdieh,

Excuse me for jumping in.


On 2017年06月24日 03:16, Mahdieh Shariat wrote:

Hi, ​Fujimoto

Thank you very much for the prompt reply. It works.

But I have another problem in developing my app. In my app when I'm installing rules on tables, I 
have a rule for two situations in a switch:

1. when a packet is incoming to in_port_1 and will go to out_port_2
2. when a packet is incoming to in_port_2 and will go to out_port_2

should I have two separate rules for these situations? May I have a common action for them? Is there 
any ryu action for changing the input_port field in ovs switch, like this:


» ovs-ofctl add-flow br0 in_port=2,actions=load:0->NXM_OF_IN_PORT[],2


How about using OFPActionSetField?
This action is almost equivalent to "load" action of OVS.

http://ryu.readthedocs.io/en/latest/ofproto_v1_3_ref.html#ryu.ofproto.ofproto_v1_3_parser.OFPActionSetField

If you want to use "load" action of OVS via Ryu, please refer to the following 
document.

http://ryu.readthedocs.io/en/latest/nicira_ext_ref.html#ryu.ofproto.ofproto_v1_3_parser.NXActionRegLoad

Thanks,
Iwase




Thanks

On Thu, Jun 22, 2017 at 12:25 PM, Fujimoto Satoshi > wrote:


Hi, Mahdieh

You can use "ofproto.OFPP_IN_PORT" to do it.

 actions = [parser.OFPActionOutput(ofproto.OFPP_IN_PORT)]
 self.add_flow(datapath, 0, match, actions)

Then, the flow shown below will be installed.

 $ovs-ofctl -O OpenFlow13 dump-flows s1
 OFPST_FLOW reply (OF1.3) (xid=0x2): cookie=0x0, duration=2.975s, 
table=0, n_packets=13,
n_bytes=1026, priority=0 actions=IN_PORT


Thanks,
Fujimoto


On 2017年06月22日 16:30, Mahdieh Shariat wrote:


Hi,
I want an ovs switch outputs a packet to its receiving port, but in ovs doc 
I read:

actions=[action][,action...]
  port
  output:port
 Outputs the packet to OpenFlow port number port.  If 
port is the packet's
input port, the packet is not output.

so with bellow Ryu code:
»   actions = [ofproto_parser.OFPActionOutput(output_port)]
when input_port== output_port, the packet is dropped.

I find a new action in ovs :
  in_port
 Outputs  the  packet  on  the  port  from which  it  
was
 received.
but I can't find this action in Ryu... could you please help me to write a 
code like this:
» if (in_port == port):
actions=[ofproto_parser.OFPActionInPort()]

I'm using ovs 2.7 and openflow 1.3

Thanks in advance




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot


___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/ryu-devel






--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


Re: [Ryu-devel] groups

2017-06-25 Thread Iwase Yusuke

Hi Edison,

Sorry, I misunderstood.


On 2017年06月24日 01:21, Edison Albuquerque wrote:

It's a single switch with more than one FlowTable.
Consider that I need to insert a group (with it's buckets) after Table_id = 0 
and Table_id = 1.


You want to insert the same group entry into table:1 and table:2, right?

To insert a flow into the specified table (which has table_id), please add 
"table_id" argument
to FlowMod class.
e.g.)
# insert into Table_id = 0
mod = parser.OFPFlowMod(
datapath=datapath,
table_id=0,  # Table ID which you want to insert your flow into
...
instructions=instructions)  # instructions include your group action
datapath.send_msg(mod)

# insert into Table_id = 1
mod = parser.OFPFlowMod(
datapath=datapath,
table_id=1,  # Table ID which you want to insert your flow into
...
instructions=instructions)  # Note: the same "instructions" instance 
can be reused.
datapath.send_msg(mod)


Thanks,
Iwase


Sorry if my English isn't good enough to provide a crystal clear question.
Bests.
Edison.

2017-06-22 21:00 GMT-03:00 Iwase Yusuke >:

Hi Edison,


On 2017年06月22日 19:03, Edison Albuquerque wrote:
> Hi.
> I'd like to learn how to insert a group between two flowtables.

What does "between two flowtables" exactly mean?
You mean "how to insert the same group action into two OpenFlow switches"?
Or, "how to insert the same group entry into two OpenFlow switches"?

Thanks,
Iwase


 > Thanks.
 > Edison.
 >
 > --
 > /_Todos querem um mundo melhor. Poucos colaboram.
 > _/
>
> Prof. Edison de Queiroz Albuquerque, BSc, Msc, Dr.
> Adjunto da Escola Politécnica de Pernambuco, Universidade de Pernambuco 
(POLI/UPE)
> Professor do Curso de Engenharia de Computação
> Líder do Grupo de Pesquisa em Protocolos de  Redes de Computadores
> Membro do IEEE (ComSoc), do SBrT, do IECOM e da APEET
>
> Universidade de Pernambuco/Escola Politécnica de Pernambuco
> Rua Benfica, 455 (Bl. 'C' 2. andar) - Bairro: Madalena
> CEP 50720-001 - Recife, Pernambuco - Brasil
> Fone: +55 81 3184-7542  - Fax: +55 81 3184-7581 

>
>
>
 > 
--
 > Check out the vibrant tech community on one of the world's most
 > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
 >
 >
 >
 > ___
 > Ryu-devel mailing list
 > Ryu-devel@lists.sourceforge.net 
 > https://lists.sourceforge.net/lists/listinfo/ryu-devel

 >




--
/_Todos querem um mundo melhor. Poucos colaboram.
_/

Prof. Edison de Queiroz Albuquerque, BSc, Msc, Dr.
Adjunto da Escola Politécnica de Pernambuco, Universidade de Pernambuco 
(POLI/UPE)
Professor do Curso de Engenharia de Computação
Líder do Grupo de Pesquisa em Protocolos de  Redes de Computadores
Membro do IEEE (ComSoc), do SBrT, do IECOM e da APEET

Universidade de Pernambuco/Escola Politécnica de Pernambuco
Rua Benfica, 455 (Bl. 'C' 2. andar) - Bairro: Madalena
CEP 50720-001 - Recife, Pernambuco - Brasil
Fone: +55 81 3184-7542 - Fax: +55 81 3184-7581



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


Re: [Ryu-devel] Ryu Controller Question

2017-06-25 Thread Iwase Yusuke

Hi Hosseini,

Yes, we welcome your questions!
 https://github.com/osrg/ryu#support

FYI, you can find the mail archive, and search the similar posts/discussions on 
here:
 http://dir.gmane.org/gmane.network.ryu.devel

Thanks,
Iwase

On 2017年06月23日 18:49, Farshad Hosseini nezhad wrote:

Hello

My Name is Farshad Hosseini From Iran. I am working on my Master Thesis.
I have some questions about this controller. 
May i ask them here?


Thank you

Best wishes

Hosseini


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


[Ryu-devel] List to .csv in "port stats"

2017-06-25 Thread Sergio Silva
Dear friend,
Please, I would like to know if there is a possibility that the "port
stats" files could be modified from list to default ".csv". This my
suggestion is due to the fact that the standard "Comma-Separated Values"
are files are widely used with numpy, pandas, database and others. For
scientific analysis, statistical surveys with prediction and artificial
intelligence. I think if Ryu would have a lot more to offer if the
collected files had the format ".csv" than a list. I thank you.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel


Re: [Ryu-devel] List to .csv in "port stats"

2017-06-25 Thread Sergio Silva
Dear friend,
Please, I would like to know if there is a possibility that the "port
stats" files could be modified from list to default ".csv". This my
suggestion is due to the fact that the standard "Comma-Separated Values"
are files are widely used with numpy, pandas, database and others. For
scientific analysis, statistical surveys with prediction and artificial
intelligence. I think if Ryu would have a lot more to offer if the
collected files had the format ".csv" than a list. I thank you.

2017-06-25 9:03 GMT-03:00 Sergio Silva :

> Dear friend,
> Please, I would like to know if there is a possibility that the "port
> stats" files could be modified from list to default ".csv". This my
> suggestion is due to the fact that the standard "Comma-Separated Values"
> are files are widely used with numpy, pandas, database and others. For
> scientific analysis, statistical surveys with prediction and artificial
> intelligence. I think if Ryu would have a lot more to offer if the
> collected files had the format ".csv" than a list. I thank you.
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel