Re: [nox-dev] gathering status of Openflow Switch
Hi, I was actually referring to netapps/monitoring/montoring.py, which is a more complete (and complicated) monitoring component, but it is the same idea. However the one you looked at might actually be a better example exactly because it is simpler, but still shows how to create and send switch query packets. The output you pasted looks okay 2011/6/19 Min-Hyup KANG kang-min-h...@hanmail.net Hi, after I found monitoring.py, There is existing /src/nox/coreapps/examples/monitor.py. I think what you mean is /src/nox/coreapps/examples/monitor.py. right ? so, I excuted monitor component. I can check Table stats and Port stats, Aggregate stats as a below. 00072|openflow-event|DBG:received stats reply from 002320ca92e0 Table stats in from datapath 00:23:20:ca:92:e0 hash2 : 0 linear : 2 00073|openflow-event|DBG:received stats reply from 002320ca92e0 Port stats in from datapath 00:23:20:ca:92:e0 1 : 4 2 : 4 00074|openflow-event|DBG:received stats reply from 002320ca92e0 Aggregate stats in from datapath 00:23:20:ca:92:e0 {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L} - 원본 메일 - *보낸사람*: Kyriakos Zarifis kyr.zari...@gmail.com *받는사람* : Min-Hyup KANG kang-min-h...@hanmail.net *참조* : nox-dev@noxrepo.org *날짜*: 2011년 6월 20일 월요일, 00시 35분 26초 +0900 *제목*: Re: [nox-dev] gathering status of Openflow Switch Hi, the 'monitoring' component I was referring to, is under: ** / src / nox / netapps / monitoring / monitoring.py** but on the Destiny branch of the repository (not Zaku which is the master branch). Follow the instructions here http://noxrepo.org/noxwiki/index.php/NOX_Installation#Installation (where it says For a branch other than master...) to switch to Destiny. - you mean pyswitch can gather status of flow, port in switch, right ? and I think I should use ofp_stats_request, ofp_stats_reply, ofp_desc_stats, ofp_port_stats_request, ofp_ports_stats etc of struct in openflow.h and core.py Exactly. You can see some example of how to build some messages in 'monitoring.py' Best Regards, Min-Hyup KANG kang-min-h...@hanmail.net ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] gathering status of Openflow Switch
Hi,after I found monitoring.py,There is existing /src/nox/coreapps/examples/monitor.py.I think what you mean is /src/nox/coreapps/examples/monitor.py. right ?so, I excuted monitor component.I can check Table stats and Port stats, Aggregate stats as a below.00072|openflow-event|DBG:received stats reply from 002320ca92e0Table stats in from datapath 00:23:20:ca:92:e0 hash2 : 0 linear : 200073|openflow-event|DBG:received stats reply from 002320ca92e0Port stats in from datapath 00:23:20:ca:92:e0 1 : 4 2 : 400074|openflow-event|DBG:received stats reply from 002320ca92e0Aggregate stats in from datapath 00:23:20:ca:92:e0 {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L}- 원본 메일 -보낸사람: Kyriakos Zarifis kyr.zari...@gmail.com받는사람 : Min-Hyup KANG kang-min-h...@hanmail.net참조 : nox-dev@noxrepo.org날짜: 2011년 6월 20일 월요일, 00시 35분 26초 +0900제목: Re: [nox-dev] gathering status of Openflow Switch Hi,the 'monitoring' component I was referring to, is under:/src/nox/netapps/monitoring/monitoring.py but on the Destiny branch of the repository (not Zaku which is the master branch). Follow the instructions here http://noxrepo.org/noxwiki/index.php/NOX_Installation#Installation (where it says "For a branch other than master"...) to switch to Destiny. - you mean pyswitch can gather status of flow, port in switch, right ? and I think I should use ofp_stats_request, ofp_stats_reply, ofp_desc_stats, ofp_port_stats_request, ofp_ports_stats etc of struct in openflow.h and core.py Exactly. You can see some example of how to build some messages in 'monitoring.py' Best Regards, Min-Hyup KANG ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] gathering status of Openflow Switch
Thanks for your kindness.But there is not exsisting monitoring.py of netapps/so there is existing some derectory in netapps as a below.""""src/nox/netapps# lsMakefile.am __init__.py bindings_storage discovery hoststate networkstate routing switch_management tablog topologyMakefile.in authenticator data flow_fetcher laviroute storage switchstatstests user_event_log""""additionally, I re-write some code(0xfff) in monitor.py refering mail. as a below,"""def aggregate_timer(self, dpid):flow = ofp_match()#flow.wildcards = 0xflow.wildcards = 0xself.ctxt.send_aggregate_stats_request(dpid, flow, 0xff)self.post_callback(MONITOR_TABLE_PERIOD, lambda : self.aggregate_timer(dpid))"""1.What does 0xfff mean ?and then, I re-run command.So, I can check below message.00086|openflow-event|DBG:received stats reply from 002320c2f7b4Aggregate stats in from datapath 00:23:20:c2:f7:b4{'packet_cout' : 39L, 'byte_cout' : 3822L, 'flow_count':2L }- 원본 메일 -보낸사람: Kyriakos Zarifis kyr.zari...@gmail.com받는사람 : Min-Hyup KANG kang-min-h...@hanmail.net참조 : nox-dev@noxrepo.org날짜: 2011년 6월 20일 월요일, 15시 34분 01초 +0900제목: Re: [nox-dev] gathering status of Openflow Switch Hi,I was actually referring to netapps/monitoring/montoring.py, which is a more complete (and complicated) monitoring component, but it is the same idea. However the one you looked at might actually be a better example exactly because it is simpler, but still shows how to create and send switch query packets. The output you pasted looks okay2011/6/19 Min-Hyup KANG kang-min-h...@hanmail.net Hi,after I found monitoring.py,There is existing /src/nox/coreapps/examples/monitor.py.I think what you mean is /src/nox/coreapps/examples/monitor.py. right ? so, I excuted monitor component.I can check Table stats and Port stats, Aggregate stats as a below.00072|openflow-event|DBG:received stats reply from 002320ca92e0 Table stats in from datapath 00:23:20:ca:92:e0 hash2 : 0 linear : 200073|openflow-event|DBG:received stats reply from 002320ca92e0 Port stats in from datapath 00:23:20:ca:92:e0 1 : 4 2 : 400074|openflow-event|DBG:received stats reply from 002320ca92e0 Aggregate stats in from datapath 00:23:20:ca:92:e0 {'packet_count': 0L, 'byte_count': 0L, 'flow_count': 0L} - 원본 메일 - 보낸사람: Kyriakos Zarifis kyr.zari...@gmail.com받는사람 : Min-Hyup KANG kang-min-h...@hanmail.net 참조 : nox-dev@noxrepo.org날짜: 2011년 6월 20일 월요일, 00시 35분 26초 +0900제목: Re: [nox-dev] gathering status of Openflow Switch Hi,the 'monitoring' component I was referring to, is under:/src/nox/netapps/monitoring/monitoring.py but on the Destiny branch of the repository (not Zaku which is the master branch). Follow the instructions here http://noxrepo.org/noxwiki/index.php/NOX_Installation#Installation (where it says "For a branch other than master"...) to switch to Destiny. - you mean pyswitch can gather status of flow, port in switch, right ? and I think I should use ofp_stats_request, ofp_stats_reply, ofp_desc_stats, ofp_port_stats_request, ofp_ports_stats etc of struct in openflow.h and core.py Exactly. You can see some example of how to build some messages in 'monitoring.py' Best Regards, Min-Hyup KANG Best Regards, Min-Hyup KANG ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] gathering status of Openflow Switch
Hi, the 'monitoring' component I was referring to, is under: / src / nox / netapps / monitoring / monitoring.py but on the Destiny branch of the repository (not Zaku which is the master branch). Follow the instructions here http://noxrepo.org/noxwiki/index.php/NOX_Installation#Installation (where it says For a branch other than master...) to switch to Destiny. - you mean pyswitch can gather status of flow, port in switch, right ? and I think I should use ofp_stats_request, ofp_stats_reply, ofp_desc_stats, ofp_port_stats_request, ofp_ports_stats etc of struct in openflow.h and core.py Exactly. You can see some example of how to build some messages in 'monitoring.py' ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev
Re: [nox-dev] gathering status of Openflow Switch
Thank you for your kindness.I am using Openflow Switch(v.1.0) based on PC box. and I am using NOX zaku.1.You can look at the 'monitoring' component in the netapps folder- do you mean switchstats.py and pycswitchstats.py in /netapps ?additionally, I test using "./nox_core -i ptcp:6633 -v pyswitch packetdump switchstats pycswitchstats "and then I can see this message.00076|openflow-event|DBG:received stats reply from 002320c576d600077|reactor|ERR:Unhandled Error Traceback (most recent call last): --- exception caught here --- File "./nox/coreapps/pyrt/pyoxidereactor.py", line 86, in __call__ self.func(*self.args, **self.kw); File "./nox/netapps/switchstats/switchstats.py", line 123, in lambda lambda : self.port_timer(dp)) File "./nox/netapps/switchstats/switchstats.py", line 88, in port_timer self.ctxt.send_port_stats_request(dp) File "./nox/coreapps/pyrt/pycomponent.py", line 538, in send_port_stats_request def send_port_stats_request(self, *args): return _pycomponent.PyContext_send_port_stats_request(self, *args) exceptions.TypeError: PyContext_send_port_stats_request() takes exactly 3 arguments (2 given)00078|openflow-event|DBG:received stats reply from 002320c576d62.(or, if you prefer, you can modify pyswitch to send such queries)- you mean pyswitch can gather status of flow, port in switch, right ?and I think I should use ofp_stats_request, ofp_stats_reply, ofp_desc_stats, ofp_port_stats_request, ofp_ports_stats etc of struct in openflow.h and core.pyBut, It is difficult to use . so I need your help.can you give some tips ?Many Thanks,- ¿øº» ¸ÞÀÏ -º¸³½»ç¶÷: Kyriakos Zarifis kyr.zari...@gmail.com¹Þ´Â»ç¶÷ : Min-Hyup KANG kang-min-h...@hanmail.netÂüÁ¶ : nox-dev@noxrepo.org³¯Â¥: 2011³â 6¿ù 19ÀÏ ÀÏ¿äÀÏ, 18½Ã 10ºÐ 32ÃÊ +0900Á¦¸ñ: Re: [nox-dev] gathering status of Openflow Switch Hi,no, pyswitch does not show information about establish flows. You need to write a component that does that by sending query packets from NOX to the switch. (or, if you prefer, you can modify pyswitch to send such queries) You can look at the 'monitoring' component in the netapps folder, which gather statistics from switches, as an example for how to construct and send such query packets. From what I can tell, you are mostly interested in the "flow_stats" message 2011/6/18 Min-Hyup KANG kang-min-h...@hanmail.net Hi. allI would like to gather through pyswitch.py a little status information of flow in Openflow Switch(v.10) I think I should use Openflow protocol that can gather their some status of flow between OpenflowSwitch and NOX controller.so Is it possible with pyswitch.py ?or Should I write a new C++ component ? Thanks, Best Regards, Min-Hyup KANG ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev Best Regards, Min-Hyup KANG ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev