Hi Iwase,

Looks like two ryu app file also doesnt work.  I think, RYU treated as a
single context.

=========================================================
loading app app1.py
loading app app2.py
instantiating app app2.py of BGPRouter2
API method core.start called with args: {'waiter': <ryu.lib.hub.Event
object at 0x7f0a1e821908>, 'cluster_id': None, 'bgp_server_port': 180,
'local_pref': 100, 'local_as': 65001, 'label_range': (100, 100000),
'refresh_max_eor_time': 0, 'bgp_server_hosts': ('0.0.0.0', '::'),
'refresh_stalepath_time': 0, 'router_id': '192.168.1.1',
'allow_local_as_in_count': 0}
starting ssh server at localhost:4999
instantiating app app1.py of BGPRouter1
API method core.start called with args: {'waiter': <ryu.lib.hub.Event
object at 0x7f0a1dce9ac8>, 'cluster_id': None, 'bgp_server_port': 179,
'local_pref': 100, 'local_as': 65001, 'label_range': (100, 100000),
'refresh_max_eor_time': 0, 'bgp_server_hosts': ('0.0.0.0', '::'),
'refresh_stalepath_time': 0, 'router_id': '192.168.1.1',
'allow_local_as_in_count': 0}
Traceback (most recent call last):
  File
"/usr/local/lib/python3.5/dist-packages/ryu/services/protocols/bgp/api/base.py",
line 209, in call
    return call(**kwargs)
  File
"/usr/local/lib/python3.5/dist-packages/ryu/services/protocols/bgp/api/core.py",
line 37, in start
    raise RuntimeConfigError('Current context has to be stopped to start '
ryu.services.protocols.bgp.rtconf.base.RuntimeConfigError: 200.1 - Current
context has to be stopped to start a new context.

==========================================================================

Let me try as a separate process..


Thanks
Suresh.


On Thu, Jun 14, 2018 at 12:28 PM, Yusuke Iwase <iwase.yusu...@gmail.com>
wrote:

> Hi Suresh,
>
> I think it should work if no confirmation with listen ports each other.
>
> Thanks,
> Iwase
>
>
> 2018/06/14 15:47、knet solutions <knetsolutio...@gmail.com>のメール:
>
> Hi Iwase,
>
> Thanks.
>
> I have seen in some reference projects, multiple ryuapps are used.
>
> Example:
>
> ryu-manager app1.py app2.py
>
>
> app1.py
> class Router1(app_manager.RyuApp):
>     # trigger bgpspeaker1 here
> app2.py
>
> class Router2(app_manager.RyuApp):
>     # trigger bgpspeaker2 here
>
>
> Will it work?
>
> Thanks
> Suresh
>
>
>
>
>
> On Thu, Jun 14, 2018 at 12:02 PM, Yusuke Iwase <iwase.yusu...@gmail.com>
> wrote:
>
>> Hi Suresh,
>>
>> Hmmm...
>> Ryu BGP Speaker seems to be a singleton per Python process, then we
>> cannot spawn multiple speakers from a single Ryu application.
>> Just an idea, how about spawning BGP Speakers as sub-processes of your
>> application?
>> And you can communicate with them via RPC API (this API does not seem to
>> be documented yet though). Or you can implement your own REST APIs.
>>
>> Thanks,
>> Iwase
>>
>>
>> 2018/06/14 13:10、knet solutions <knetsolutio...@gmail.com>のメール:
>>
>> Hi Iwase,
>>
>> Thanks.
>>
>> I am getting the below error, when i try to trigger 2 BGP Speakers from
>> app.py
>>
>> Traceback (most recent call last):
>>   File 
>> "/usr/local/lib/python3.5/dist-packages/ryu/services/protocols/bgp/api/base.py",
>> line 209, in call
>>     return call(**kwargs)
>>   File 
>> "/usr/local/lib/python3.5/dist-packages/ryu/services/protocols/bgp/api/core.py",
>> line 37, in start
>>     raise RuntimeConfigError('Current context has to be stopped to start '
>> ryu.services.protocols.bgp.rtconf.base.RuntimeConfigError: 200.1 -
>> Current context has to be stopped to start a new context.
>>
>> Any guidelines for implementation.
>>
>> Thanks
>> Surehs
>>
>>
>>
>>
>>
>> On Wed, Jun 13, 2018 at 1:00 PM, Iwase Yusuke <iwase.yusu...@gmail.com>
>> wrote:
>>
>>> Hi Suresh,
>>>
>>> Hmmm... I can not yet understand why you need to setup such topology
>>> though...
>>> You mean you need to spawn two BGP Speakers from a single Ryu
>>> application?
>>> If you need to maintain routes separately on SDN-Rtr1/SDN-Rtr2 and need
>>> to
>>> select the best path for each router, the per-peer local AS setting may
>>> not be
>>> suitable.
>>>
>>> Thanks,
>>> Iwase
>>>
>>> On 2018年06月12日 20:30, knet solutions wrote:
>>>
>>>> Hi Iwase,
>>>>
>>>> The use case is like below,
>>>>
>>>>
>>>> Rtr1-------SDN-Rtr1-------Rtr2------SDN-Rtr2-----Rtr3
>>>>
>>>>
>>>> Rtr1, Rtr2, Rtr3 are traditional BGP Routers
>>>> SDN-Rtr1, and SDN-Rtr2 are BGP Speakers.
>>>>
>>>>
>>>> SDN-Rtr1(RYU Bgp speaker) connects to  two neighbors Rtr1 and Rtr2.
>>>> SDN-Rtr2(RYU Bgp speaker) connects to  two neighbors Rtr2 and Rtr3.
>>>>
>>>> In this use case,  Any possibility of running with single BGP Speaker
>>>> instance?
>>>>
>>>> Thanks
>>>> Suresh
>>>>
>>>>
>>>> On Mon, Jun 11, 2018 at 7:30 AM, Iwase Yusuke <iwase.yusu...@gmail.com
>>>> <mailto:iwase.yusu...@gmail.com>> wrote:
>>>>
>>>>     Hi,
>>>>
>>>>     I think you need to specify the following options in order to avoid
>>>> the
>>>>     conflicts of listening ports.
>>>>
>>>>     - BGP listen host addresses (or port number)
>>>>     https://github.com/osrg/ryu/blob/c29c9019ac8ab862bbc0caad7d4
>>>> 9220f27ed0cf0/ryu/services/protocols/bgp/bgp_sample_conf.py#L51-L52
>>>>     <https://github.com/osrg/ryu/blob/c29c9019ac8ab862bbc0caad7d
>>>> 49220f27ed0cf0/ryu/services/protocols/bgp/bgp_sample_conf.py#L51-L52>
>>>>
>>>>     - RPC listen host address (or port number) for BGP
>>>>        $ ryu-manager -h
>>>>          ...(snip)...
>>>>          --bgp-app-rpc-host BGP-APP_RPC_HOST
>>>>                                IP for RPC server (default: 0.0.0.0)
>>>>          --bgp-app-rpc-port BGP-APP_RPC_PORT
>>>>                                Port for RPC server (default: 50002)
>>>>          ...(snip)...
>>>>
>>>>     - SSH console host address (or port number) for BGP
>>>>     https://github.com/osrg/ryu/blob/c29c9019ac8ab862bbc0caad7d4
>>>> 9220f27ed0cf0/ryu/services/protocols/bgp/bgp_sample_conf.py#L400-L401
>>>>     <https://github.com/osrg/ryu/blob/c29c9019ac8ab862bbc0caad7d
>>>> 49220f27ed0cf0/ryu/services/protocols/bgp/bgp_sample_conf.py#L400-L401>
>>>>
>>>>
>>>>     BTW, why you need to run multiple BGP Speakers at the same time?
>>>> Ryu BGP Speaker
>>>>     supports per-peer AS number configuration, you can setup multiple
>>>> connections
>>>>     with routers in different ASs. If this feature is sufficient for
>>>> your use-case,
>>>>     it should be more appropriate than running multiple BGP Speakers.
>>>>     http://ryu.readthedocs.io/en/latest/library_bgp_speaker_ref.
>>>> html#ryu.services.protocols.bgp.bgpspeaker.BGPSpeaker.neighbor_add
>>>>     <http://ryu.readthedocs.io/en/latest/library_bgp_speaker_ref
>>>> .html#ryu.services.protocols.bgp.bgpspeaker.BGPSpeaker.neighbor_add>
>>>>
>>>>
>>>>     Thanks,
>>>>     Iwase
>>>>
>>>>
>>>>     On 2018年06月07日 23:03, knet solutions wrote:
>>>>
>>>>         Can we run multiple  BGP Speakers in the RYU application?
>>>>
>>>>         --         */Regards,
>>>>         /*
>>>>         */Knet solutions./*
>>>>
>>>>         https://github.com/knetsolutions/KNet
>>>>         <https://github.com/knetsolutions/KNet>
>>>>         http://knet-topology-builder.readthedocs.io/
>>>>         <http://knet-topology-builder.readthedocs.io/>
>>>>         http://knetsolutions.in/
>>>>
>>>>
>>>>
>>>>         ------------------------------------------------------------
>>>> ------------------
>>>>         Check out the vibrant tech community on one of the world's most
>>>>         engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>
>>>>
>>>>
>>>>         _______________________________________________
>>>>         Ryu-devel mailing list
>>>>         Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.source
>>>> forge.net>
>>>>         https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>         <https://lists.sourceforge.net/lists/listinfo/ryu-devel>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> */Regards,
>>>> /*
>>>> */Knet solutions./*
>>>>
>>>> https://github.com/knetsolutions/KNet
>>>> http://knet-topology-builder.readthedocs.io/
>>>> http://knetsolutions.in/
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------
>>>> ------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Ryu-devel mailing list
>>>> Ryu-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>>
>>>>
>>
>>
>> --
>>
>> *Regards, *
>> *Knet solutions.*
>>
>> https://github.com/knetsolutions/KNet
>> http://knet-topology-builder.readthedocs.io/
>> http://knetsolutions.in/
>>
>>
>
>
> --
>
> *Regards, *
> *Knet solutions.*
>
> https://github.com/knetsolutions/KNet
> http://knet-topology-builder.readthedocs.io/
> http://knetsolutions.in/
>
>


-- 

*Regards, *
*Knet solutions.*

https://github.com/knetsolutions/KNet
http://knet-topology-builder.readthedocs.io/
http://knetsolutions.in/
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to