Issue with OpenFlow13 model with external controller

90 views
Skip to first unread message

Mohammed Alenazi

unread,
Jan 11, 2020, 7:15:14 AM1/11/20
to ofswitch13-users

Dear all,
I run the openflow13 model, located in this link http://www.lrc.ic.unicamp.br/ofswitch13/.

It works fine with all the example scripts. However, when I try to use with an external controller( Ryu https://osrg.github.io/ryu/.), it works for the first attempt as shown in the attachment file. In the controller, I can see that the switches are connected correctly. However, when I try to re-run it, the switches do not connect the controller and the ping application does not work. 


I am not really sure if this issue is with OpenFlow code or the tap-bridge model.
Any suggestions.




Best regards,
-Mohammed
runs.PNG
sdn_controller.png

sana mahmood

unread,
Jan 12, 2020, 9:21:09 AM1/12/20
to ofswitch13-users
Hi,

This happens because your first run makes tcp connection between the openflow switch (in simulation) and your host machine on your listening port (assuming default 6653). When simulation stops, the openflow switch seizes to exist. However, ryu application is unaware of it and keeps the connection (with switch) established for certain amount of time. If you check tcp connections on listening port, you will be able to see it. When you re-run, the openflow switch sends a connection request with same socket (ip and port) as previous connection which is still established at host machine, as a result the connection fails between switch and controller.

As mentioned in the documentation about external controller "Consistent behavior was observed once sufficient time elapses (say 3 to 5 minutes) between any two executions". So you need to wait a certain amount of time to rerun your code. There are two quick fixes that can be helpful if you want to avoid the long wait between runs. Either change the port number of ryu controller, or change the ip address assigned to switch, either will result in a new/different tuple to solve the problem.

Regards,
Sana Mahmood

Mohammed Alenazi

unread,
Jan 12, 2020, 6:01:59 PM1/12/20
to ofswitch13-users
Thank you Sana,
Very informative. 
Is there a way to explicitly close the controller TCP connection at the end of the simulation.
Reply all
Reply to author
Forward
0 new messages