Assignment (JAVA)
Assignment (JAVA)
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 software-
based, 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, and the Javadoc of Floodlight is available at
http://floodlight.github.io/floodlight/javadoc/floodlight/index.html.
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:
1
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”.
H1 9M S1 S4 9M H4
H2 9M S2 5M S3 9M H3
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.
3
e. When an IP packet is received, print the source and destination IP addresses. A
sample output is attached.
f. Implement Dijkstra’s algorithm. The cost of each link is assigned as follows:
g. Calculate the path from the source to the destination, and print the switch IDs
on the path. A sample output is attached.
h. 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.
i. Press enter in the Mininet console to clean up and exit the Python testing script.
Sample output.
With proper implementation, the Mininet console should print an output like below:
mininet@mininet-vm:~$ sudo python test.py
*** Adding controller
*** Adding switches
*** Adding hosts
*** Adding links
(9.00Mbit) (9.00Mbit) (9.00Mbit) (9.00Mbit) (9.00Mbit) (9.00Mbit)
(9.00Mbit) (9.00Mbit) (9.00Mbit) (9.00Mbit) (7.00Mbit) (7.00Mbit)
(5.00Mbit) (5.00Mbit) (3.00Mbit) (3.00Mbit) (1.00Mbit) (1.00Mbit)
*** Starting network
*** Configuring hosts
h1 h2 h3 h4
*** Starting controller
*** Starting switches
(9.00Mbit) (9.00Mbit) (7.00Mbit) (9.00Mbit) (9.00Mbit) (5.00Mbit)
(3.00Mbit) (9.00Mbit) (7.00Mbit) (5.00Mbit) (1.00Mbit) (9.00Mbit)
(3.00Mbit) (1.00Mbit)
*** Testing
*** Iperf: testing TCP bandwidth between h1 and h2
*** Results: ['8.61 Mbits/sec', '9.07 Mbits/sec']
*** Iperf: testing TCP bandwidth between h1 and h3
*** Results: ['6.70 Mbits/sec', '7.97 Mbits/sec']
*** Iperf: testing TCP bandwidth between h1 and h4
*** Results: ['957 Kbits/sec', '1.27 Mbits/sec']
!!! Press return to exit
4
The Floodlight console should print an output like below:
*** Print topology
switch 1 neighbors: 2, 3
switch 2 neighbors: 1, 3, 4
switch 3 neighbors: 1, 2, 4
switch 4 neighbors: 2, 3
*** New flow packet
srcIP: 10.0.1.1
dstIP: 10.0.2.2
route: 1 2
*** New flow packet
srcIP: 10.0.1.1
dstIP: 10.0.3.3
route: 1 3
*** New flow packet
srcIP: 10.0.1.1
dstIP: 10.0.4.4
route: 1 3 4
References:
[1] OpenFlow Protocol specification, https://opennetworking.org/wp-
wontent/uploads/2014/10/openflow-spec-v1.3.0.pdf
[2] Floodlight,
https://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/overview
[3] Mininet, http://mininet.org/
[4] Dijkstra’s algorithm, Chapter 5.2.1 of textbook
Group:
You may work in a group of up to three. Only one submission is necessary for a group.
Submission:
Submit a copy of your MyRouting.java file to Canvas, with the following information
at the top of the file:
1. Member names and IDs
Grading:
Item Percentage
Print all switches 20%
Print all links 20%
Print source and destination IP addresses 20%
Print the correct path 20%
Successfully install the path (i.e. packets are routed in 20%
the correct path as seen by iperf output)
5
Code plagiarism will be reported for academic dishonesty.