Step by Step Test Ryu Controller with Simple Switch
Description: RYU controllers provide software components with precise APIs that make devise control applications and Software-Defined Network (SDN) management less simple. RYU permits an event-driven programming paradigm in which the program flow is resolute by events and supports numerous protocols for handling network configurations such as OpenFlow, Netcon, and OF-config. The Ryu controller OpenFlow switches can accomplish instructions from OpenFlow controllers. RYU rewrites the address of received packets or transfers the packets from the appropriated port, Transfers the received packets to the controller (Packet-In), and transfers the packets forwarded by the controller from the appropriated port (Packet-Out). The Ryu Controller can use OpenFlow or any other dissimilar protocols to mesh with the forwarding plane (switches, routers) to recast how the network handles and maintains traffic flows. To test the Ryu controller with a simple switch, follow the procedure provided in the sample.
First, open a terminal and run Mininet with the following command. This starts a network emulation environment with one switch and three hosts.
Second, open another new terminal and run a simple switch controller
This controller will flood a packet to all ports if the switching table has no record of the destination mac address and add a record that specifies the source mac address in the port.
$ ryu-manager ryu.app.simple_switch
After opening the Ryu controller, you can test the reachability between these three hosts.
mininet> pingall
In the terminal of the Ryu controller, you can see these packets in messages.