====== RYU ====== ==== Installation: ==== [[ne:sdn:ryu:ryu_install|Install]] ==== Tutorials: ==== * http://sdnhub.org/tutorials/ryu/ * https://thenewstack.io/sdn-series-part-iv-ryu-a-rich-featured-open-source-sdn-controller-supported-by-ntt-labs/ ==== Run with Mininet ==== * https://stackoverflow.com/questions/37998065/understanding-ryu-openflow-controller-mininet-wireshark-and-tcpdump * https://github.com/osrg/ryu/wiki/OpenFlow_Tutorial * https://dokuwiki.alu4u.com/doku.php?id=einstieg-in-sdn-mit-mininet-vm-und-ryu-controller * https://www.grotto-networking.com/SDNfun.html ==== First App Tutorial ==== * http://ryu.readthedocs.io/en/latest/writing_ryu_app.html * https://inside-openflow.com/2016/07/21/ryu-api-dissecting-simple-switch/ ==== Topology Discovery ==== * https://github.com/Ehsan70/RyuApps/blob/master/TopoDiscoveryInRyu.md * https://sdn-lab.com/2014/12/31/topology-discovery-with-ryu/ * https://sdn-lab.com/2014/12/25/shortest-path-forwarding-with-openflow-on-ryu/ * http://forums.northboundnetworks.com/index.php?topic=322.0 * http://ryu.readthedocs.io/en/latest/gui.html > sudo service openvswitch-testcontroller stop > sudo mn --topo linear,3 --switch ovsk --controller remote #oder > sudo mn --topo tree,depth=3 --switch ovsk --controller remote > ryu-manager --observe-links RyuApps/topo_learner_nx.py === Latency aware routing === * https://de.slideshare.net/KnightBaron/designing-of-sdnassisted-bandwidth-and-latency-aware-route-allocation ==== Paket Library ==== * http://ryu.readthedocs.io/en/latest/library_packet.html ==== Testing / Benchmarking ==== * https://sourceforge.net/p/ryu/mailman/message/35802984/ ==== Ryu als IPv6 ND Proxy ==== * [[https://www.hindawi.com/journals/scn/2017/5838657/|Paper: An SDN-Based Authentication Mechanism for Securing Neighbor Discovery Protocol in IPv6 ]] * https://osrg.github.io/ryu-book/en/html/traffic_monitor.html * https://osrg.github.io/ryu-book/en/html/switching_hub.html#implementation-of-switching-hub-using-ryu * https://stackoverflow.com/questions/40485109/matching-tcp-flows-based-on-tcp-ports-ryu-controller Matching * http://www.openvswitch.org//support/dist-docs/ovs-fields.7.pdf * https://stackoverflow.com/questions/40485109/matching-tcp-flows-based-on-tcp-ports-ryu-controller Scapy: * http://linton.tw/2015/01/26/saving-captured-packets-in-ryu-controller/ * https://www.sdnlab.com/17993.html * http://scapy.readthedocs.io/en/latest/extending.html ==== REST API ==== 1. run mininet $ sudo mn --topo single,2 --mac --switch ovsk --controller remote -x 2. set OpenFlow version to s1 s1> ovs-vsctl set Bridge s1 protocols=OpenFlow13 3. run application c0> ryu-manager ryu/app/simple_switch_13.py ryu/app/ofctl_rest.py 4. send ping mininet> h1 ping h2 5. get flow stats c0> curl -X GET http://localhost:8080/stats/flow/1 #(I got "OUTPUT:CONTROLLER", "OUTPUT:1", "OUTPUT:2") 6. clear flows c0> curl -X DELETE http://localhost:8080/stats/flowentry/clear/1 7. send ping again mininet> h1 ping h2 #(the ping is not reachable at this time) 8. get flow stats c0> curl -X GET http://localhost:8080/stats/flow/1 #(I got no flows) Source: https://sourceforge.net/p/ryu/mailman/message/35979349/ Noch ausprobieren: https://inside-openflow.com/2016/06/23/interactive-ryu-with-postman/