Thank you very much Iwase for your suggestion.
I tried to do the same. I used "s1.cmd('ovs-vsctl set bridge s1
protocols=OpenFlow13 stp-enable=true')" to enable the STP in Mininet. And
started controller using "ryu-manager ryupp.rest_router ".
I am still not able to ping hosts and the packets are dropped in the
middle.
I checked the flows at the routers using POSTMAN, but I see flows from
host1 to host 2 but not vice versa, although I have set the routes for h2
to h1 as well.
I am *setting the interfaces addresses* *Example (there are 3 interfaces at
router s1 in my topology).*
# ======================s1===========================
url = 'http://localhost:8080/router/0000000000000001'
payload = {"address":"172.16.20.1/24"}
r = requests.post(url, data=json.dumps(payload))
print (r.status_code)
url = 'http://localhost:8080/router/0000000000000001'
payload = {'address':'172.16.30.1/30'}
r = requests.post(url, data=json.dumps(payload))
print (r.status_code)
url = 'http://localhost:8080/router/0000000000000001'
payload = {'address':'172.10.10.1/30'}
r = requests.post(url, data=json.dumps(payload))
print (r.status_code)
I am *setting the routes* using requests for *Example:*
------------------------------------------------s1-----------------------------------------------------------------
#*s1(router s1) *
"url = 'http://localhost:8080/router/0000000000000001'
payload = {'destination': '192.168.30.0/24', 'gateway': '172.16.30.2' }
r = requests.post(url, data=json.dumps(payload))
url = 'http://localhost:8080/router/0000000000000003'
payload = {'destination': '172.16.20.0/24','gateway': '172.16.20.1' }
r = requests.post(url, data=json.dumps(payload))"
## where h1: '172.16.20.0/24'
h2: '192.168.30.0/24'
My *requests statuscode* are *success* every time.
Could you suggest what could possibly is going wrong.
Thanks!
Taha
On Tue, Nov 21, 2017 at 9:16 PM, Iwase Yusuke <iwase.yusu...@gmail.com>
wrote:
> Hi Taha,
>
> I haven't investigate the further though...
> If simple_switch_stp_13 can work on the Flow Table 0 and then rest_router
> can work on the Table 1,
> they can work together, but we need to implement them to do so.
>
> BTW, if you just need to avoid the topology loop, how about using the STP
> features of switch side?
> OVS can handle the STP with "stp_enable" option for its Bridge and Port.
>
> Thanks,
> Iwase
>
>
> On 2017年11月22日 01:35, Taha Khan wrote:
>
>>
>> Hi Iwase, Thanks for the reply.
>>
>> But Sometimes i was able to ping the interfaces two hops away from
>> source but later it fades
>> away. Also, I was not able to see the routes set but only addresses
>> using the API
>> call(/8080/router/0000000000000001). I also doubt the conflict
>> because stp is layer 2 whereas
>> rest_router is layer3, hence I assume they should act independently.
>> Although, if that’s the
>> case what could be the alternative?
>>
>> Thanks!
>>
>>
>> -------- Original message --------
>> From: Iwase Yusuke <iwase.yusu...@gmail.com <mailto:
>> iwase.yusu...@gmail.com>>
>> Date: 2017/11/21 01:38 (GMT-05:00)
>> To: mailfort...@gmail.com <mailto:mailfort...@gmail.com>
>> Cc: ryu-devel@lists.sourceforge.net <mailto:ryu-devel@lists.source
>> forge.net>
>> Subject: Re: [Ryu-devel] Setting Default Routes in custom topology.
>>
>> Hi Taha,
>>
>> I guess simple_switch_stp_13 and rest_router cannot work together
>> because these apps are just
>> sample applications for Ryu-Book (http://osrg.github.io/ryu-boo
>> k/en/html/index.html
>> <http://osrg.github.io/ryu-book/en/html/index.html>).
>> For example, rest_router assumes packets should be process in the
>> pipeline, but does not aware
>> of the flow entries of the other applications and might conflict with
>> each other.
>>
>> Thanks,
>> Iwase
>>
>> On 2017年11月21日 15:29, Taha Khan wrote:
>> > Hi,
>> > I am trying to set default routes in routers in my custom
>> topology. My topology has loops, so to
>> > start the controller in using the command "ryu-manager
>> ryu.app.simple_switch_stp_13
>> > ryu.app.rest_router ryu.app.ofctl_rest"
>> >
>> > I am using python requests to make REST requests, specifying the
>> destination ip address and the
>> > gateway address in each router in my topology.
>> >
>> > While pinging hosts ( 2 host in my custom topology) I am not able
>> to ping and the packets
>> are lost
>> > in the middle (checked using ip traceroute).
>> >
>> > Can you please suggest what could have possibly gone wrong.
>> >
>> > Thanks!
>> > Taha.
>> >
>> >
>> > ------------------------------------------------------------
>> ------------------
>> > 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>
>> >
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> 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
>>
>>
------------------------------------------------------------------------------
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