openflow tutorial theophilus benson. outline components in an openflow testbed setting up a testbed...
TRANSCRIPT
![Page 1: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/1.jpg)
OpenFlow Tutorial
Theophilus Benson
![Page 2: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/2.jpg)
Outline
• Components in an OpenFlow testbed• Setting up a testbed• Writing a new component– C++ components version– Python components version
![Page 3: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/3.jpg)
OpenFlow Components• Controller• Openflow switches• Traffic generators
End host1
End host2
End host3
OpenFlow Controller
OpenFlow Enabled Switches
![Page 4: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/4.jpg)
Virtual Testbed
• Directions available online– http://noxrepo.org/manual/using.html#setting-
up-a-noxnetwork• Requirements– Linux system– Qemu – Python– Nox code– Other linux libraries
![Page 5: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/5.jpg)
Testbed Setup
• Compile Nox code• Set up virtual machines• Connect topology• Start controller– Use appropriate components
• Connect switches to controller
![Page 6: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/6.jpg)
Writing Components• Two languages; c++ and python– More information found:
http://noxrepo.org/manual/app.html• Components are stored in src/nox/apps– Separate each component into a distinct directory
• Component Structure– You must inherit from class Component– You must include a call to the REGISTER_COMPONENT
macro – You must include the following methods
• Void configure(const Configuration *)• Void install()
![Page 7: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/7.jpg)
Component Paradigm• Register for events and specify handlers– register_handler<eventtype>(boost::bind(handling_metho
d, this, _1));– register_handler<Packet_in_event>(boost::bind(&Hub::ha
ndler, this, _1));• All work done in handler– Return either CONTINUE or END– NOTE: you can start the controller with a list of
components, event get passed from one to the other– Returning CONTINUE means the next component handles
the packet– Returning END means no other components handle the
packets
![Page 8: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/8.jpg)
Demo
• Run component in openflow controller• Ping from endhost A• Should observe printouts in controller’s
console
![Page 9: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/9.jpg)
Resources
• Nox website– http://noxrepo.org
• OpenFlow Site– http://www.openflowswitch.org/wp/documents
![Page 10: OpenFlow Tutorial Theophilus Benson. Outline Components in an OpenFlow testbed Setting up a testbed Writing a new component – C++ components version –](https://reader035.vdocuments.site/reader035/viewer/2022072011/56649e2d5503460f94b1c51b/html5/thumbnails/10.jpg)
Questions