Hi, Mine doesn't work with Mininet. Which version do you use? I downloaded 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. Thanks, Tsogbayar On Mon, Jun 1, 2015 at 10:11 AM, Yusuke Iwase <[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 > *** 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]>> 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]>>> 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>('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>('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]>>>> 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]>>> > > > > > 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
