List of commands for Day 3
Here is the list of commands we shall be needing for Day 3:
To open putty:
sudo putty
Inside the putty terminal:
openflow
show flows
To run the Ryu controller:
cd ryu
ryu-manager ryu.app.ofctl_rest ryu.app.simple_switch_13
ryu-manager ryu.app.ofctl_rest ryu.app.rest_router
Curl Commands:
curl -X GET http://localhost:8080/stats/switches
curl -X POST -d '{"dpid": 123917682136693,"priority": 1030 , "match" : { "ipv4_src" : "192.168.1.30", "ipv4_dst":"192.168.1.40"},"actions":[{"type": "SET_FIELD","field": "ipv4_src","value": "192.168.1.50" },{"type": "SET_FIELD","field": "eth_type" , "value" : 2048}, {"type":"OUTPUT","port": 3}]}' http://localhost:8080/stats/flowentry/add
To create a DDoS attack:
hping3 -c 10000 -d 120 -S -w 64 --flood --rand-source 192.168.1.40
To know and understand more about the above command you can look at the below link:
https://www.blackmoreops.com/2015/04/21/denial-of-service-attack-dos-using-hping3-with-spoofed-ip-in-kali-linux/
To detect the DDoS attack:
python ryu/ryu/app/detect.py
cd ryu
ryu-manager ryu.app.ofctl_rest ryu/app/detect
The above is more or less an exhaustive list, will append more to the same when need required.
We shall also be executing an already written code today. To code your own network application in the Ryu controller, you could refer to this link:
https://ryu.readthedocs.io/en/latest/developing.html
Happy Networking!
To open putty:
sudo putty
Inside the putty terminal:
openflow
show flows
To run the Ryu controller:
cd ryu
ryu-manager ryu.app.ofctl_rest ryu.app.simple_switch_13
ryu-manager ryu.app.ofctl_rest ryu.app.rest_router
Curl Commands:
curl -X GET http://localhost:8080/stats/switches
curl -X POST -d '{"dpid": 123917682136693,"priority": 1030 , "match" : { "ipv4_src" : "192.168.1.30", "ipv4_dst":"192.168.1.40"},"actions":[{"type": "SET_FIELD","field": "ipv4_src","value": "192.168.1.50" },{"type": "SET_FIELD","field": "eth_type" , "value" : 2048}, {"type":"OUTPUT","port": 3}]}' http://localhost:8080/stats/flowentry/add
To create a DDoS attack:
hping3 -c 10000 -d 120 -S -w 64 --flood --rand-source 192.168.1.40
To know and understand more about the above command you can look at the below link:
https://www.blackmoreops.com/2015/04/21/denial-of-service-attack-dos-using-hping3-with-spoofed-ip-in-kali-linux/
To detect the DDoS attack:
python ryu/ryu/app/detect.py
cd ryu
ryu-manager ryu.app.ofctl_rest ryu/app/detect
The above is more or less an exhaustive list, will append more to the same when need required.
We shall also be executing an already written code today. To code your own network application in the Ryu controller, you could refer to this link:
https://ryu.readthedocs.io/en/latest/developing.html
Happy Networking!
Comments
Post a Comment