Computer Science Department
Courant Institute of Mathematical Sciences
Course Title: Data Communications & Networks
Course Number: CSCI-GA.2662-001
Assignment 8: Final Project
I. Due
Friday December 20, 2024 by 11:59 pm EST.
II. Objectives
Software-defined networking (SDN) is a recent paradigm for running networks. As per the networking layer topics covered in the course, the network is divided into the control and data planes. The control plane provides a set of protocols and configurations that set up the forwarding elements (hosts, switches, and routers) so that they can forward packets. This includes, for example, ARP resolution, DNS, DHCP, the Spanning Tree Protocol, MAC learning, NAT and access control configuration, as well as all of the routing protocols. Usually, switches and routers have to run all of these protocols, detect topology changes, issue heartbeats, manage caches, timeouts, etc. Meanwhile, in many cases network administrators achieve desired goals with the network indirectly, by tweaking parameters in the routing protocols like link weights and local BGP preference. While the data plane is nicely organized in the familiar layered scheme, the aggregate structure of the control plane is a lot less clean.
SDN is a radical departure from this organization. The main idea is a separation of the control plane from the forwarding elements. SDN switches and routers do not run control plane protocols and mostly only forward packets based on matching of packet predicates to a set of forwarding rules. They export a simple API to configure these rules, as well as some feedback about current and past packets. An accepted standard for this API is the OpenFlow protocol, which has been implemented by dozens of switch vendors and has fostered a rich software ecosystem. The intelligence of the control plane is (logically) centralized in a network controller. The controller decides which rules to install based on its configuration, and on a global view of the network topology and flows.
In this project, you will implement the logic in such a controller to manage the following:
1. A layer-3 routing application that installs rules in SDN switches to forward traffic to hosts using the shortest, valid path through the network. Your application logic will manage the efficient switching of packets among hosts in a large LAN with multiple switches and potential loops. You will write the code for a SDN controller application that will compute and install shortest path routes among all the hosts in your network. SDN as described is suitable for networks under a single administrative domain (e.g., the network in a single AS), but there are ongoing research projects to use its flexibility across domains, integrating with and perhaps even replacing BGP.
2. A distributed load balancer application that redirect new TCP connections to hosts in a round-robin order.
As always, the NYU and class policy about plagiarism must be followed in this project. If you use ANY code in your project that is not of your own creation, then you MUST attribute that code to the author, even if you modify it (ANY modification).
III. References
1. Slides and handouts posted on the course Web site
2. Textbook chapters as applicable
3. Mininet network emulator documentation (http://mininet.org/)
4. Openflow documentation (https://www.opennetworking.org/sdn-resources/onf– specifications/openflow)
5. Open vSwitch switch software documentation (http://openvswitch.org)
6. Floodlight Java-based SDN controller documentation
(https://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/overview)
7. If you have additional questions about SDN, OpenFlow, or Floodlight you may
want to consult: openflow-switch-v1.5.1.pdf (opennetworking.org) (sections 2, 3, and 5.1 – 5.4 are likely to be the most useful), and Floodlight-plus Javadoc
8. Additional readings:
Software Defined Networking Concepts
The Road to SDN: An Intellectual History of Programmable Networks
SDN Reading List
IV. Software Required
1. Microsoft Word
2. Win Zip as necessary
3. Oracle VirtualBox
4. Virtual Box Image with all necessary software provided
5. Java Programming language, Eclipse, and other development tools installed in Virtual Box Image provided
6. Additional code for Part 4
V. Assignment
This is a final take-home project that can be completed individually or as a team (only two students per team).
1. Background:
You will run the code for this project in an emulated network inside of a single Linux VM. You will use the Mininet network emulator, which is designed to emulate arbitrary topologies of emulated OpenFlow switches and Linux hosts. It uses container-based virtualization for very light-weight emulated nodes. The switches in your network run the open source Open vSwitch switch software, which implements the Openflow protocol. The switches connect to an Openflow network controller, and you will use Floodlight, a relatively mature Java-based controller. We will use OpenFlow version 1.0 for this project. Your SDN applications will be written in Java and run atop the Floodlight OpenFlow controller. You will use Mininet to emulate a variety of network topologies consisting of OpenFlow switches and hosts.
Code you run on Mininet is ready to run with no changes in real networks.
2. Environment Setup:
a. Install Oracle VirtualBox as necessary.
b. Download the Virtual Box Image with all necessary software provided. It is a .ova image that will enable you to run the necessary software on your computer using the latest version of Oracle VirtualBox. To install the .ova file goto File and Import Appliance on VirtualBox. This VM uses “mininet” as username and password.
c. To ssh into the VM from your host computer, log in first using the GUI, open a terminal, and type ifconfig. This will show you the IP addresses of the VM. You will be able to connect to one of them from your host computer via ssh. The VM also has Eclipse installed, which you can use inside the VirtualBox graphical console or remotely via X. Once you have ssh’d into the VM, you can go through the following steps to run your control applications.
d. Optional (see acknowledgement in item 8 below):
Refactor edu.brown.cs.sdn.apps.sps to edu.nyu.cs.sdn.apps.sps
e. Compile Floodlight and your applications:
$ cd ~/project3/ $ ant
This will produce a jar file FloodlightWithApps.jar that includes the compiled code for Floodlight and your SDN applications.
f. Start Floodlight and your SDN applications:
$ java -jar FloodlightWithApps.jar -cf l3routing.prop
The above command will start Floodlight and only your layer-3 routing application. The .prop file configures your application.
Note: For future reference when working on part 4, you can start both your layer-3 routing and load balancer applications by using loadbalancer.prop for the -cf (configuration file) argument. The loadbalancer application code is provided separately.
You should always start Floodlight and your SDN applications before starting Mininet. Also, we recommend that you restart Floodlight and your SDN applications whenever you restart Mininet.
Note: In the VirtualBox image, it is possible that the system will start an openvswitch-controller process by default, which means your Floodlight controller will not be able to bind to port 6633. To prevent it from starting the next time you boot up, do:
$ sudo update-rc.d -f openvswitch-controller remove When Floodlight starts, you should see output like the following:
23:18:45 .874 INFO [n .f .c .m .FloodlightModuleLoader:main] Loading modules from file shortestPathSwitching .prop 23:18:46 .277 INFO [n .f .c .i .Controller:main] Controller role set to MASTER
23:18:46 .285 INFO [n .f .c .i .Controller:main] Flush switches on reconnect — Disabled 23:18:46 .302 INFO [ArpServer:main] Initializing ArpServer . . .
23:18:46 .302 INFO [ShortestPathSwitching:main] Initializing ShortestPathSwitching . . .
23:18:48 .533 INFO [n .f .l .i .LinkDiscoveryManager:main] Setting autoportfast feature to OFF 23:18:48 .579 INFO [ArpServer:main] Starting ArpServer . . .
23:18:48 .580 INFO [ShortestPathSwitching:main] Starting ShortestPathSwitching . . .
23:18:48 .700 INFO [o .s .s .i .c .FallbackCCProvider:main] Cluster not yet configured; using fallback local configuration 23:18:48 .701 INFO [o .s .s .i .SyncManager:main] [32767] Updating sync configuration ClusterConfig
[allNodes={32767=Node [hostname=localhost, port=6642, nodeId=32767, domainId=32767]}, authScheme=NO_AUTH, keyStorePath=null, keyStorePassword is unset]
23:18:48 .790 INFO [o .s .s .i .r.RPCService:main] Listening for internal floodlight RPC on localhost/127 .0 .0 .1:6642 23:18:48 .978 INFO [n .f .c .i .Controller:main] Listening for switch connections on 0 .0 .0 .0/0 .0 .0 .0:6633
Keep the terminal with Floodlight open, as you will need to see the output for debugging. Use another terminal for the next step.
Reviews
There are no reviews yet.