Exercises pyretic debugging: Difference between revisions

 
Line 2: Line 2:
'''HINT:''' You might have to use the "$ dpctl dump-flows tcp:127.0.0.1:6634" or "mininet> dpctl dump-flows" command frequently.   
'''HINT:''' You might have to use the "$ dpctl dump-flows tcp:127.0.0.1:6634" or "mininet> dpctl dump-flows" command frequently.   
** In this debugging exercise, we take solutions available in the Internet for the gardenwall problem and try to fix bugs in it.
** In this debugging exercise, we take solutions available in the Internet for the gardenwall problem and try to fix bugs in it.
** The basic solution is taken from the Internet [https://dl.dropboxusercontent.com/u/1652374/SDN_Course/Exercises/pyretic_gardenwall_internetsolution1.py], test if it is able to block h1 when "infected". Note that we will only use the "infected == True" for this exercise.
** The basic solution is taken from the Internet [https://projects.gwdg.de/projects/mayutan-public/repository/raw/courses/SDN/2017_2018_WS/exercises/pyretic_gardenwall_internetsolution1.py], test if it is able to block h1 when "infected". Note that we will only use the "infected == True" for this exercise.
*** Copy the above code into /home/mininet/pyretic/pyretic/examples as pyretic_gardenwall_internetsolution.py
*** Copy the above code into /home/mininet/pyretic/pyretic/examples as pyretic_gardenwall_internetsolution.py
*** start controller (in /home/mininet/pyretic folder):  
*** start controller (in /home/mininet/pyretic folder):  
Line 21: Line 21:
* Now, check if the "exempt" case is working fine too (i.e if h1 is "infected" and "exempt", send it to h3 instead of blocking it)
* Now, check if the "exempt" case is working fine too (i.e if h1 is "infected" and "exempt", send it to h3 instead of blocking it)
   $ python json_sender.py -n exempt -l True --flow="{srcmac=00:00:00:00:00:01}" -a 127.0.0.1 -p 50001
   $ python json_sender.py -n exempt -l True --flow="{srcmac=00:00:00:00:00:01}" -a 127.0.0.1 -p 50001
** (Extra: Not Needed): Try fixing [https://dl.dropboxusercontent.com/u/1652374/SDN_Course/Exercises/pyretic_gardenwall_internetsolution.py this] code for the "infected" case.
** (Extra: Not Needed): Try fixing [https://projects.gwdg.de/projects/mayutan-public/repository/raw/courses/SDN/2017_2018_WS/exercises/pyretic_gardenwall_internetsolution.py this] code for the "infected" case.
783

edits