Hi,

On 2015年04月08日 15:00, 林彥宏 wrote:
> Hi, 
> 
>     It seems I forgot to run "python ./setup.py install ".
>     Thank you very much.
> 
>     When should I run this command ?  everytime I change  the code ?

> everytime I change  the code ?

Yes.

thanks.

> 
> thanks
>  
> 2015-04-08 13:51 GMT+08:00 Minoru TAKAHASHI <[email protected] 
> <mailto:[email protected]>>:
> 
>     Hi,
> 
>     On 2015年04月08日 14:36, 林彥宏 wrote:
>     > Hi,
>     >      I have tried it before.
>     >      I comment this line but the information still be printed.
>     >
>     > P.S. following file is two code which I use.
> 
>     Your fix is probably correct.
>     In my environment "packet in ..." did not appear.
> 
>     $ ryu-manager SimpleMonitor.py
>     loading app SimpleMonitor.py
>     loading app ryu.controller.ofp_handler
>     instantiating app SimpleMonitor.py of SimpleMonitor
>     instantiating app ryu.controller.ofp_handler of OFPHandler
>     datapath         in-port  eth-dst           out-port packets  bytes
>     ---------------- -------- ----------------- -------- -------- --------
>     datapath         tcp-src  in-port  eth-dst           out-port packets  
> bytes
>     ---------------- -------- -------- ----------------- -------- -------- 
> --------
>     datapath         port     rx-pkts  rx-bytes rx-error tx-pkts  tx-bytes 
> tx-error
>     ---------------- -------- -------- -------- -------- -------- -------- 
> --------
>     0000000000000001        1        7      598        0        9      746    
>     0
>     0000000000000001        2        7      598        0        9      746    
>     0
>     0000000000000001        3        7      598        0       10      836    
>     0
>     0000000000000001 fffffffe        0        0        0       14     1164    
>     0
>     datapath         in-port  eth-dst           out-port packets  bytes
>     ---------------- -------- ----------------- -------- -------- --------
>     datapath         tcp-src  in-port  eth-dst           out-port packets  
> bytes
>     ---------------- -------- -------- ----------------- -------- -------- 
> --------
>     datapath         port     rx-pkts  rx-bytes rx-error tx-pkts  tx-bytes 
> tx-error
>     ---------------- -------- -------- -------- -------- -------- -------- 
> --------
>     0000000000000001        1        9      738        0       13     1026    
>     0
>     0000000000000001        2        9      738        0       13     1026    
>     0
>     0000000000000001        3        9      738        0       14     1116    
>     0
>     0000000000000001 fffffffe        0        0        0       20     1584    
>     0
>     ...
> 
>     Did you try to reinstall ryu again by using setup.py ?
> 
>     thanks
> 
>     >
>     > thank you
>     >
>     > 2015-04-08 13:16 GMT+08:00 Minoru TAKAHASHI 
> <[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>>:
>     >
>     >     Hi,
>     >
>     >     Please keep the mailing list.
>     >
>     >     On 2015年04月08日 13:54, 林彥宏 wrote:
>     >     > Hi,
>     >     >
>     >     > I have a question want to ask you.
>     >     > When I run SimpleMonitor, i saw some information are displayed.
>     >     > information like " packet  in  1  00:00:00:00:00:01 
> ff:ff:ff:ff:ff:ff 1
>     >     >
>     >     > Which code or where can I find to stop printing these information 
> ?
>     >     >
>     >     > P.S. following picture is the result we got
>     >     >
>     >     > Thank you
>     >
>     >     SimpleMonitor is subclass of SimpleSwitch13.
>     >     
> https://github.com/osrg/ryu-book/blob/master/en/source/sources/simple_monitor.py#L10
>     >
>     >     Therefore, please delete(or comment-out) the following code in 
> SimpleSwitch13 and then reinstall Ryu.
>     >     
> https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_13.py#L87
>     >
>     >         self.logger.info <http://self.logger.info> 
> <http://self.logger.info>("packet in %s %s %s %s", dpid, src, dst, in_port)
>     >
>     >     thanks
>     >
>     >     >
>     >     > 2015-02-25 10:27 GMT+08:00 Minoru TAKAHASHI 
> <[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>>>:
>     >     >
>     >     >     Hi,
>     >     >
>     >     >     > However it only shows us mac address.
>     >     >
>     >     >     Do you mean the following?
>     >     >     
> https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_13.py#L79-L87
>     >     >
>     >     >     > If we want to see the IP address, which function or way I 
> can use.
>     >     >
>     >     >     Please refer to the following.
>     >     >     https://github.com/osrg/ryu/blob/master/ryu/lib/bfdlib.py#L863
>     >     >
>     >     >     Just for your infomation, how to use packet libraries are 
> described in the following pages.
>     >     >     http://osrg.github.io/ryu-book/en/html/packet_lib.html
>     >     >
>     >     >     On 2015年02月24日 17:39, 林彥宏 wrote:
>     >     >     > Hi,
>     >     >     >
>     >     >     > Thank your help for us to monitor specific port.
>     >     >     > However it only shows us mac address. If we want to see the 
> IP address, which function or way I can use.
>     >     >     > I am trying to see pkt data and i can't always get IPv4 
> data but arp.
>     >     >     >
>     >     >     > thanks for your help
>     >     >     >
>     >     >     > 2015-02-08 12:26 GMT+08:00 林彥宏 <[email protected] 
> <mailto:[email protected]> <mailto:[email protected] 
> <mailto:[email protected]>> <mailto:[email protected] 
> <mailto:[email protected]> <mailto:[email protected] 
> <mailto:[email protected]>>> <mailto:[email protected] 
> <mailto:[email protected]> <mailto:[email protected] 
> <mailto:[email protected]>> <mailto:[email protected] 
> <mailto:[email protected]> <mailto:[email protected] 
> <mailto:[email protected]>>>>>:
>     >     >     >
>     >     >     >     Hi,
>     >     >     >
>     >     >     >     Thank your help for us to monitor specific port.
>     >     >     >     However it only shows us mac address. If we want to see 
> the IP address, which function or way I can use.
>     >     >     >     I am trying to see pkt data and i can't
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     >     always get IPv4 data but arp.
>     >     >     >
>     >     >     >     thanks for your help
>     >     >     >
>     >     >     >     2015-01-22 8:27 GMT+08:00 Minoru TAKAHASHI 
> <[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>>>>:
>     >     >     >
>     >     >     >         Hi,
>     >     >     >
>     >     >     >         Please don't drop the mailing list of Ryu-devel.
>     >     >     >
>     >     >     >         On 2015年01月21日 18:27, 林彥宏 wrote:
>     >     >     >         > Thanks your helps
>     >     >     >         > But I don't know which function I have to add the 
> code you told me.
>     >     >     >         > When it run to "flow.match['tcp_src']", it will 
> show me an error.
>     >     >     >         > Could you send me a complete code?
>     >     >     >
>     >     >     >         OK.
>     >     >     >         Please check the attached files.
>     >     >     >
>     >     >     >         >
>     >     >     >         > Thank you a lot.
>     >     >     >         >
>     >     >     >         > 2015-01-15 14:01 GMT+08:00 Minoru TAKAHASHI 
> <[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>> 
> <mailto:[email protected]
>     <mailto:[email protected]> <mailto:[email protected] 
> <mailto:[email protected]>> <mailto:[email protected] 
> <mailto:[email protected]> <mailto:[email protected] 
> <mailto:[email protected]>>>>>>:
>     >     >     >         >
>     >     >     >         >     Hi,
>     >     >     >         >
>     >     >     >         >     On 2015年01月09日 18:15, 林彥宏 wrote:
>     >     >     >         >     > Hi,
>     >     >     >         >     >
>     >     >     >         >     > We got a problem to ask you.
>     >     >     >         >     >
>     >     >     >         >     > If we want to know which port that data 
> comes in, where can we find it?
>     >     >     >         >     > Is it wrapped in ev?
>     >     >     >         >     >
>     >     >     >         >     > We tested SimpleMonitor.py and 
> simple_switch_13.py using iperf.
>     >     >     >         >     > We can see ip and port while running 
> simple_switch_13.py.
>     >     >     >         >     > The output is like ip=10.0.0.1 port=5001.
>     >     >     >         >     >
>     >     >     >         >     > However, the result of ip and port in 
> SimpleMonitor.py is not what we want.
>     >     >     >         >     > We also use iperf to throw some data to a 
> specific ip and port.
>     >     >     >         >     > We print out body, then we get  flow 
> information inside body.
>     >     >     >         >     > The outcome of ip is correct, but port is 
> something like 1, 2, or 3, seem like its number.
>     >     >     >         >     > Is it possible to get the real port in 
> SimpleMonitor.py?
>     >     >     >         >     > Like http is 80, HTTPS is 8080.
>     >     >     >         >
>     >     >     >         >     Information that simple monitor to get is the 
> flow statistics and port statistics.
>     >     >     >         >     Details are described in the following.
>     >     >     >         >
>     >     >     >         >     OFSpec1.3.4
>     >     >     >         >       7.3.5.6 Port Statistics
>     >     >     >         >       7.3.5.2 Individual Flow Statistics
>     >     >     >         >
>     >     >     >         >     These statistics do not include transfer 
> packet own information (TCP/IP/ETH...).
>     >     >     >         >
>     >     >     >         >     > We are making a monitor that can track 
> traffic on http, ftp and bt three ports.
>     >     >     >         >     > Can SImpleMonitor do this job for us? Or is 
> there any better suggestions?
>     >     >     >         >
>     >     >     >         >     Just an idea, if you want to track a packet 
> of TCP_SRC=5001/8080,
>     >     >     >         >     and Why not try adding the following code.
>     >     >     >         >     (Sorry, this code is quick and dirty.)
>     >     >     >         >
>     >     >     >         >     @@ -98,6 +98,12 @@ class 
> SimpleSwitch13(app_manager.RyuApp):
>     >     >     >         >
>     >     >     >         >              # install a flow to avoid packet_in 
> next time
>     >     >     >         >              if out_port != ofproto.OFPP_FLOOD:
>     >     >     >         >     +
>     >     >     >         >     +            tcp_port = [5001,8080]
>     >     >     >         >     +            for port in tcp_port:
>     >     >     >         >     +                match = 
> parser.OFPMatch(in_port=in_port, eth_dst=dst, tcp_src=port, ip_proto=6, 
> eth_type=2048)
>     >     >     >         >     +                self.add_flow(datapath, 2, 
> match, actions)
>     >     >     >         >     +
>     >     >     >         >                  match = 
> parser.OFPMatch(in_port=in_port, eth_dst=dst)
>     >     >     >         >
>     >     >     >         >     @@ -63,6 +63,22 @@ class 
> SimpleMonitor(simple_switch_13.SimpleSwitch13):
>     >     >     >         >                                   
> stat.instructions[0].actions[0].port,
>     >     >     >         >
>     >     >     >         >                                   
> stat.packet_count, stat.byte_count)
>     >     >     >         >
>     >     >     >         >
>     >     >     >         >
>     >     >     >         >     +        self.logger.info 
> <http://self.logger.info> <http://self.logger.info> <http://self.logger.info> 
> <http://self.logger.info> <http://self.logger.info>('datapath         '
>     >     >     >         >
>     >     >     >         >     +                         'tcp-src  in-port  
> eth-dst           '
>     >     >     >         >
>     >     >     >         >     +                         'out-port packets  
> bytes')
>     >     >     >         >
>     >     >     >         >     +        self.logger.info 
> <http://self.logger.info> <http://self.logger.info> <http://self.logger.info> 
> <http://self.logger.info> <http://self.logger.info>('---------------- '
>     >     >     >         >
>     >     >     >         >     +                         '-------- -------- 
> ----------------- '
>     >     >     >         >
>     >     >     >         >     +                         '-------- -------- 
> --------')
>     >     >     >         >
>     >     >     >         >     +        for stat in sorted([flow for flow in 
> body if flow.priority == 2],
>     >     >     >         >
>     >     >     >         >     +                           key=lambda flow: 
> (flow.match['tcp_src'],
>     >     >     >         >
>     >     >     >         >     +                                             
> flow.match['in_port'],
>     >     >     >         >
>     >     >     >         >     +                                             
> flow.match['eth_dst'])):
>     >     >     >         >
>     >     >     >         >     +            self.logger.info 
> <http://self.logger.info> <http://self.logger.info> <http://self.logger.info> 
> <http://self.logger.info> <http://self.logger.info>('%016x %8d %8x %17s %8x 
> %8d %8d',
>     >     >     >         >
>     >     >     >         >     +                             
> ev.msg.datapath.id <http://ev.msg.datapath.id> <http://ev.msg.datapath.id> 
> <http://ev.msg.datapath.id> <http://ev.msg.datapath.id> 
> <http://ev.msg.datapath.id>,
>     >     >     >         >
>     >     >     >         >     +                             
> stat.match['tcp_src'], stat.match['in_port'], stat.match['eth_dst'],
>     >     >     >         >
>     >     >     >         >     +                             
> stat.instructions[0].actions[0].port,
>     >     >     >         >
>     >     >     >         >     +                             
> stat.packet_count, stat.byte_count)
>     >     >     >         >
>     >     >     >         >     +
>     >     >     >         >
>     >     >     >         >          
> @set_ev_cls(ofp_event.EventOFPPortStatsReply, MAIN_DISPATCHER)
>     >     >     >         >
>     >     >     >         >     Execution results are as follows.
>     >     >     >         >
>     >     >     >         >     $ ryu-manager ./ryu/app/SimpleMonitor.py
>     >     >     >         >     ...
>     >     >     >         >
>     >     >     >         >     datapath         in-port  eth-dst           
> out-port packets  bytes
>     >     >     >         >     ---------------- -------- ----------------- 
> -------- -------- --------
>     >     >     >         >     0000000000000001        1 00:00:00:00:00:02   
>      2        4      168
>     >     >     >         >     0000000000000001        2 00:00:00:00:00:01   
>      1  1208886 56447642468
>     >     >     >         >     datapath         tcp-src  in-port  eth-dst    
>        out-port packets  bytes
>     >     >     >         >     ---------------- -------- -------- 
> ----------------- -------- -------- --------
>     >     >     >         >     0000000000000001     5001        1 
> 00:00:00:00:00:02        2   582162 38491340
>     >     >     >         >     0000000000000001     5001        2 
> 00:00:00:00:00:01        1        0        0
>     >     >     >         >     0000000000000001     8080        1 
> 00:00:00:00:00:02        2        0        0
>     >     >     >         >     0000000000000001     8080        2 
> 00:00:00:00:00:01        1        0        0
>     >     >     >         >     ....
>     >     >     >         >
>     >     >     >         >
>     >     >     >         >     Thanks
>     >     >     >         >
>     >     >     >         >     >
>     >     >     >         >     > Code and screenshots are attached.
>     >     >     >         >     >
>     >     >     >         >     > thanks for your help!
>     >     >     >         >     >
>     >     >     >         >     > Best regards,
>     >     >     >         >     > David Lin
>     >     >     >         >     >
>     >     >     >         >     >
>     >     >     >         >     > 
> ------------------------------------------------------------------------------
>     >     >     >         >     > Dive into the World of Parallel 
> Programming! The Go Parallel Website,
>     >     >     >         >     > sponsored by Intel and developed in 
> partnership with Slashdot Media, is your
>     >     >     >         >     > hub for all things parallel software 
> development, from weekly thought
>     >     >     >         >     > leadership blogs to news, videos, case 
> studies, tutorials and more. Take a
>     >     >     >         >     > look and join the conversation now. 
> http://goparallel.sourceforge.net
>     >     >     >         >     >
>     >     >     >         >     >
>     >     >     >         >     >
>     >     >     >         >     > 
> _______________________________________________
>     >     >     >         >     > Ryu-devel mailing list
>     >     >     >         >     > [email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>> 
> <mailto:[email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>>> 
> <mailto:[email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>> 
> <mailto:[email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>>>> 
> <mailto:[email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>> 
> <mailto:[email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected]
>     <mailto:[email protected]>>> 
> <mailto:[email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>> 
> <mailto:[email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>>>>>
>     >     >     >         >     > 
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>     >     >     >         >     >
>     >     >     >         >
>     >     >     >         >
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >
>     >     >
>     >
>     >
> 
> 

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to