Overview:
The goal of this project is to practice Layer 3 routing in a Software-Defined Networking (SDN) environment, and develop the skills to read and modify open-source software. You will implement Dijkstraâs algorithm in an open-source SDN environment consisting of: 1) Mininet, a virtual machine (VM) based network simulator; 2) FloodLight, an SDN controller in Java.Â
Â
Background:
Software-Defined Networking (SDN) is an emerging architecture that uses a softwarebased, centralized approach to control network traffic. SDN decouples the network control and forwarding functions enabling the network control to become directly programmable via the OpenFlow [1] protocol. Floodlight [2] is a Java-based implementation of the SDN controller.
Â
Mininet [3] is a virtual testbed enabling the development and testing of network tools and protocols. Mininet works by creating a virtual network on your desktop or laptop. By incorporating the Open vSwitch, a software virtual SDN switch, Mininet supports the OpenFlow protocol and can talk to an SDN controller such as Floodlight.Â
Â
Instructions:Â
Â
Step 1: Set up Mininet.Â
Â
a. Download Virtualbox
b. Download the Mininet 2.3.0 VM image (Ubuntu 18.04.5 version)
c. In VirtualBox, click âFile > Import Applianceâ¦â to import the Mininet VM.
d. The Mininet VM runs as a guest system with a NAT based private IP address in the hypervisor, port forwarding must be enabled to access Mininet from the host system. To enable port forwarding in Virtualbox, select the Mininet VM, click âSettings -> Network -> Adapter 1 Tab -> Advanced -> Port Forwardingâ, and add a rule as follows:
e. Start the Mininet VM in Virtualbox.
f. Use SSH to connect to the Mininet VM at mininet@localhost:2222, and login with the password âmininetâ.
Â
Step 2: Set up Floodlight.Â
Â
a. Download Eclipse, a Java IDE. Note that you will need the Java JRE to run Eclipse. If Java is not currently installed, download and install it first.
b. Download the zipped Floodlight repo from Canvas.
c. Import the pre-compiled Floodlight project into Eclipse as follows:
⢠Click âFile -> Import -> General -> Existing Projects into Workspaceâ, then click âNextâ.
⢠From âSelect root directoryâ click âBrowseâ¦â, and select the Floodlight directory.
⢠Check the box for âfloodlightâ. No other Projects should be present and none should be selected.
⢠Click âFinishâ.
d. In Eclipse, create the FloodlightLaunch target and run it as follows:
⢠Click âRun -> Run Configurationsâ.
⢠Right-click âJava Applicationâ and select âNew Configurationâ.
⢠For Name, use âFloodlightLaunchâ.
⢠For Project, use âfloodlightâ.
⢠For Main, use ânet.floodlightcontroller.core.Mainâ
⢠Click âApplyâ.
⢠Click âRunâ.
⢠Ignore the following Python error in Floodlight if you see one
Exception in thread "debugserver" Traceback (most recent call last):
File "", line 1, in
ImportError: No module named debugserver
e. Optional: The pre-compiled Floodlight should work out of the box. If it does not, compile it using Apache Ant as follows.
⢠Download the Ant binary
⢠Enter the Floodlight root directory, and type â
Â
Step 3: Implement Dijkstraâs algorithm in Floodlight.Â
Â
a. When a switch receives a new packet that does not match any existing rule, it will forward the packet to Floodlight using the OpenFlow protocol, and Floodlight will tell the switch how to process the packet also using OpenFlow. Your routing module will process only IP packets, and leave other packets such as ARP to the existing Floodlight modules. When a new IP packet is received, the receive() method of your module will be called, in which you should use Dijkstraâs algorithm to calculate the path, and install the routing rules on the switches of the calculated path.
b. In Eclipse Package Explorer, navigate to âFloodlight -> src/main/java -> net.floodlightconroller.myrouting -> MyRouting.javaâ, where a module skeleton has been provided.
c. Use vi or nano to copy the âtest.pyâ script from the Floodlight root directory to the Mininet VM. Type âsudo python test.pyâ in Mininet to run the script. It will create the following topology.
d. As the first step of Dijkstraâs algorithm, collect the network topology in your module. Print all the switches and links. A sample output is attached.
e. When an IP packet is received, print the source and destination IP addresses. A sample output is attached.
f. Calculate the path from the source to the destination, and print the switch IDs on the path. A sample output is attached.
g. Install the path from the source to the destination to the corresponding switches. Since the iperf testing tool uses TCP to measure bandwidth, you will need to install another path from the destination back to the source to deliver the acknowledgements.
h. Press enter in the Mininet console to clean up and exit the Python testing script.