Hi Iwase,
It didn't work because I used loop topology.
s1
/ \
/ \
s2----s3
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]>
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]>> 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>('EventLinkAdd =
> %s', ev)
> > ...
> >
> > @set_ev_cls(EventLinkDelete, MAIN_DISPATCHER)
> > def _link_del_handler(self, ev):
> > 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]>>> 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]>>
> > > > 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