Hi,

On 2015年06月01日 17:22, Hm Balarama wrote:
> Hi Iwase,
> 
> Please make me clear.
> I've got 2 options. First, I should write a Ryu application.
> Or, I could use the simple_switch_stp.py.
> Is that right? Do you think there is no way except above 2 options.

Yes, I think so.
If you want to evaluate the "detection time" of the link failure,
simple_switch_stp.py is easy to use.
But if you want to evaluate the "recovery time" of link failure,
you need to write your own Ryu application.
Because simple_switch_stp.py is the sample application which
emulates STP protocol.

Thanks,
Iwase

> 
> Thanks,
> Tsogbayar.
> 
> On Mon, Jun 1, 2015 at 5:07 PM, Yusuke Iwase <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     Hi,
> 
> 
>     On 2015年06月01日 15:09, Hm Balarama wrote:
>     > Hi,
>     >
>     > Mine doesn't work with Mininet.
>     > Which version do you use?
>     > I downloaded github.com/osrg/ryu.git <http://github.com/osrg/ryu.git> 
> <http://github.com/osrg/ryu.git> and installed it. Git branch is the master.
>     > I could get link events when I run $ ryu-manager --observe-links 
> --verbose ryu.app.gui_topology.gui_topology
>     >
>     > EVENT switches->WebSocketTopology EventLinkAdd
>     > EVENT ofp_event->switches EventOFPPacketIn
>     > EVENT ofp_event->switches EventOFPPacketIn
>     > EVENT switches->WebSocketTopology EventLinkAdd
>     > EVENT switches->WebSocketTopology EventLinkAdd
>     > EVENT ofp_event->switches EventOFPPacketIn
>     > EVENT switches->WebSocketTopology EventLinkAdd
>     > EVENT ofp_event->switches EventOFPPacketIn
>     > EVENT ofp_event->switches EventOFPPacketIn
>     > EVENT ofp_event->switches EventOFPPacketIn
>     >
>     > But h1 can't reach to other hosts.
>     > In your case, was same.
> 
>     The same.
> 
>     $ sudo python test_topo.py
>     *** Configuring hosts
>     h1 h2 h3
>     *** Starting CLI:
>     mininet> h1 ping h2
>     ^CPING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
> 
>     --- 10.0.0.2 ping statistics ---
>     3 packets transmitted, 0 received, 100% packet loss, time 2016ms
> 
>     mininet>
> 
>     Because gui_topology is the sample application, installs the flow for 
> link discovery only,
>     but does not install the flow for the communications between hosts.
> 
>     If you want to discover links and enable to communicate each other at the 
> same time,
>     I recommend you to write your Ryu application.
> 
>     Thanks,
>     Iwase
> 
>     >
>     > Thanks,
>     > Tsogbayar
>     >
>     >
>     > On Mon, Jun 1, 2015 at 10:11 AM, Yusuke Iwase <[email protected] 
> <mailto:[email protected]> <mailto:[email protected] 
> <mailto:[email protected]>>> wrote:
>     >
>     >     Hi,
>     >
>     >     On 2015年05月29日 17:46, Hm Balarama wrote:
>     >     > Hi Iwase,
>     >     >
>     >     > It didn't work because I used loop topology.
>     >     >        s1
>     >     >        / \
>     >     >       /   \
>     >     >    s2----s3
>     >     >
>     >
>     >     On my mininet environment, I made a looped topology,
>     >     gui_topology worked fine and I could get 
> EventLinkAdd/EventLinkDelete events.
>     >
>     >
>     >     $ sudo python test_topo.py
>     >     Unable to contact the remote controller at 127.0.0.1:6633 
> <http://127.0.0.1:6633> <http://127.0.0.1:6633>
>     >     *** Configuring hosts
>     >     h1 h2 h3
>     >     *** Starting CLI:
>     >     mininet> net
>     >     h1 h1-eth0:s1-eth1
>     >     h2 h2-eth0:s2-eth1
>     >     h3 h3-eth0:s3-eth1
>     >     s1 lo:  s1-eth1:h1-eth0 s1-eth2:s2-eth2 s1-eth3:s3-eth3
>     >     s2 lo:  s2-eth1:h2-eth0 s2-eth2:s1-eth2 s2-eth3:s3-eth2
>     >     s3 lo:  s3-eth1:h3-eth0 s3-eth2:s2-eth3 s3-eth3:s1-eth3
>     >     c0
>     >     mininet>
>     >
>     >
>     >     $ ryu-manager --observe-links --verbose 
> ryu.app.gui_topology.gui_topology
>     >      ...
>     >
>     >
>     >     # input 'ifconfig s1-eth2 down' on s1:
>     >     ---
>     >     EVENT ofp_event->switches EventOFPPortStatus
>     >     EVENT ofp_event->dpset EventOFPPortStatus
>     >     EVENT switches->WebSocketTopology EventLinkDelete
>     >     EVENT switches->WebSocketTopology EventLinkDelete
>     >     DPSET: A port was modified.(datapath id = 0000000000000001, port 
> number = 2)
>     >     EVENT ofp_event->switches EventOFPPortStatus
>     >     EVENT ofp_event->dpset EventOFPPortStatus
>     >     DPSET: A port was modified.(datapath id = 0000000000000002, port 
> number = 2)
>     >     ---
>     >
>     >     Thanks,
>     >     Iwase
>     >
>     >
>     >     > I'm sorry if I didn't let you know.
>     >     > In this case, what should I do?
>     >     >
>     >     > Thanks,
>     >     > Tsogbayar.
>     >     >
>     >     >
>     >     > On Fri, May 29, 2015 at 2:10 PM, Yusuke Iwase 
> <[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>> 
> <mailto:[email protected] <mailto:[email protected]> 
> <mailto:[email protected] <mailto:[email protected]>>>> wrote:
>     >     >
>     >     >     Hi,
>     >     >
>     >     >     How about using gui_topology.py with --verbose option?
>     >     >
>     >     >     $ ryu-manager --observe-links --verbose 
> ryu.app.gui_topology.gui_topology
>     >     >
>     >     >     With --verbose option, you will get many messages,
>     >     >     but please check only EventLinkAdd/EventLinkDelete events,
>     >     >     when a link goes up or down.
>     >     >
>     >     >     eg.)
>     >     >     EVENT switches->WebSocketTopology EventLinkDelete
>     >     >     EVENT switches->WebSocketTopology EventLinkDelete
>     >     >
>     >     >     Thanks,
>     >     >     Iwase
>     >     >
>     >     >
>     >     >     On 2015年05月29日 13:54, Hm Balarama wrote:
>     >     >     > Hi Iwase,
>     >     >     >
>     >     >     > I purposed just using Ryu's official apps. Not user's 
> developed one.
>     >     >     > Are there anyway to test a link failure in Ryu?
>     >     >     >
>     >     >     > Thanks,
>     >     >     > Tsogbayar.
>     >     >     >
>     >     >     > On Fri, May 29, 2015 at 1:23 PM, Yusuke Iwase 
> <[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]>>>>> wrote:
>     >     >     >
>     >     >     >     Hi,
>     >     >     >
>     >     >     >     > So, did you mean I should run like that ryu-manager 
> simple_switch_stp.py --observe-links?
>     >     >     >
>     >     >     >     No, you don't have to use simple_switch_stp.py,
>     >     >     >     but you should write your Ryu application and
>     >     >     >     catch EventLinkAdd/EventLinkDelete events as followings.
>     >     >     >
>     >     >     >     -----------------
>     >     >     >     Snippet of code:
>     >     >     >     -----------------
>     >     >     >     ...
>     >     >     >     from ryu.topology import api
>     >     >     >     from ryu.topology.event import EventLinkAdd, 
> EventLinkDelete
>     >     >     >     ...
>     >     >     >
>     >     >     >     class SampleApp(app_manager.RyuApp):
>     >     >     >         ...
>     >     >     >         @set_ev_cls(EventLinkAdd, MAIN_DISPATCHER)
>     >     >     >         def _link_add_handler(self, ev):
>     >     >     >             self.logger.info <http://self.logger.info> 
> <http://self.logger.info> <http://self.logger.info> 
> <http://self.logger.info>('EventLinkAdd = %s', ev)
>     >     >     >             ...
>     >     >     >
>     >     >     >         @set_ev_cls(EventLinkDelete, MAIN_DISPATCHER)
>     >     >     >         def _link_del_handler(self, ev):
>     >     >     >             self.logger.info <http://self.logger.info> 
> <http://self.logger.info> <http://self.logger.info> 
> <http://self.logger.info>('EventLinkDelete = %s', ev)
>     >     >     >             ...
>     >     >     >     -----------------
>     >     >     >
>     >     >     >     And start your app with --observe-links option.
>     >     >     >
>     >     >     >     $ ryu-manager --observe-links ryu.app.sample_app
>     >     >     >     loading app ryu.app.sample_app
>     >     >     >     loading app ryu.topology.switches
>     >     >     >     loading app ryu.controller.ofp_handler
>     >     >     >     instantiating app ryu.app.sample_app of SampleApp
>     >     >     >     instantiating app ryu.topology.switches of Switches
>     >     >     >     instantiating app ryu.controller.ofp_handler of 
> OFPHandler
>     >     >     >     ...
>     >     >     >
>     >     >     >     if you input "ifconfig s1-eth2 down" on switch, your 
> app will show the following messages.
>     >     >     >     ...
>     >     >     >     EventLinkDelete = EventLinkDelete<Link: Port<dpid=1, 
> port_no=2, DOWN> to Port<dpid=2, port_no=2, LIVE>>
>     >     >     >     EventLinkDelete = EventLinkDelete<Link: Port<dpid=2, 
> port_no=2, LIVE> to Port<dpid=1, port_no=2, LIVE>>
>     >     >     >     ...
>     >     >     >
>     >     >     >
>     >     >     >     For more information about developing your app,
>     >     >     >     please refer to the Ryu-Documentation.
>     >     >     >      http://ryu.readthedocs.org/en/latest/developing.html
>     >     >     >
>     >     >     >
>     >     >     >     Thanks,
>     >     >     >     Iwase
>     >     >     >
>     >     >     >
>     >     >     >     On 2015年05月29日 12:26, Hm Balarama wrote:
>     >     >     >     > Thank you, Iwase.
>     >     >     >     > Yes, I used simple_switch_stp.py.
>     >     >     >     > I see timeout_check_period and others in switches.py.
>     >     >     >     > So, did you mean I should run like that ryu-manager 
> simple_switch_stp.py --observe-links?
>     >     >     >     > I'm sorry, I'm a newbee in Ryu.
>     >     >     >     >
>     >     >     >     > Thank you,
>     >     >     >     > Tsogbayar.
>     >     >     >     >
>     >     >     >     > On Fri, May 29, 2015 at 11:16 AM, Yusuke Iwase 
> <[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]>>>>>> wrote:
>     >     >     >     >
>     >     >     >     >     Hi,
>     >     >     >     >
>     >     >     >     >     First, what Ryu application are you using? 
> simple_switch_stp.py?
>     >     >     >     >     If so, simple_switch_stp.py is one of the sample 
> application of Ryu.
>     >     >     >     >     In other words, Ryu does not require to use BPDU,
>     >     >     >     >     just performing like STP switch by using 
> simple_switch_stp.py.
>     >     >     >     >
>     >     >     >     >     If you want to recover a link failure with Ryu,
>     >     >     >     >     I recommend you to use ryu.topology modules with 
> --observe-links option of ryu-manager.
>     >     >     >     >      
> https://github.com/osrg/ryu/tree/master/ryu/topology
>     >     >     >     >
>     >     >     >     >     Thanks,
>     >     >     >     >     Iwase
>     >     >     >     >
>     >     >     >     >     On 2015年05月29日 10:55, Hm Balarama wrote:
>     >     >     >     >     > Hello,
>     >     >     >     >     >
>     >     >     >     >     > I tested Ryu with loop topology. I used 3 
> switches and those are OF enabled.
>     >     >     >     >     > I wanted how much time does Ryu recover a link 
> failure when I remove cable.
>     >     >     >     >     > So I changed DEFAULT_MAX_AGE in bpdu.py. Also I 
> set DEFAULT_HELLO_TIME=1.
>     >     >     >     >     > I tested 4 times.
>     >     >     >     >     > DEFAULT_MAX_AGE =1 and average recovery time 
> was 74 seconds
>     >     >     >     >     > DEFAULT_MAX_AGE =2 and average recovery time 
> was 72 seconds
>     >     >     >     >     > DEFAULT_MAX_AGE =3 and average recovery time 
> was 71 seconds
>     >     >     >     >     > DEFAULT_MAX_AGE =5 and average recovery time 
> was 74 seconds
>     >     >     >     >     > It seems to me a little bit strange. I don't 
> know why.
>     >     >     >     >     > I expected DEFAULT_MAX_AGE=1 takes very short 
> time than DEFAULT_MAX_AGE =2,3,5 but it doesn't.
>     >     >     >     >     > Could you please tell me why it happened?
>     >     >     >     >     >
>     >     >     >     >     > Thank you,
>     >     >     >     >     > Tsogbayar.
>     >     >     >     >     >
>     >     >     >     >     >
>     >     >     >     >     > 
> ------------------------------------------------------------------------------
>     >     >     >     >     >
>     >     >     >     >     >
>     >     >     >     >     >
>     >     >     >     >     > _______________________________________________
>     >     >     >     >     > 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
>     >     >     >     >     >
>     >     >     >     >
>     >     >     >     >
>     >     >     >     >
>     >     >     >     >
>     >     >     >     > 
> ------------------------------------------------------------------------------
>     >     >     >     >
>     >     >     >     >
>     >     >     >     >
>     >     >     >     > _______________________________________________
>     >     >     >     > 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]>>>>
>     >     >     >     > https://lists.sourceforge.net/lists/listinfo/ryu-devel
>     >     >     >     >
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     > 
> ------------------------------------------------------------------------------
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >     > _______________________________________________
>     >     >     > 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]>>>
>     >     >     > https://lists.sourceforge.net/lists/listinfo/ryu-devel
>     >     >     >
>     >     >
>     >     >
>     >     >
>     >     >
>     >     > 
> ------------------------------------------------------------------------------
>     >     >
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     > Ryu-devel mailing list
>     >     > [email protected] 
> <mailto:[email protected]> 
> <mailto:[email protected] 
> <mailto:[email protected]>>
>     >     > https://lists.sourceforge.net/lists/listinfo/ryu-devel
>     >     >
>     >
>     >
>     >
>     >
>     > 
> ------------------------------------------------------------------------------
>     >
>     >
>     >
>     > _______________________________________________
>     > Ryu-devel mailing list
>     > [email protected] <mailto:[email protected]>
>     > https://lists.sourceforge.net/lists/listinfo/ryu-devel
>     >
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to