Software Project: Assignment 1

*** Due date: Feb 10 (before start of class) ***


  1. Setup Mininet in a VirtualBox VM
  2. Familiarize with linux and basic networking tools in linux
  3. Complete Mininet walkthrough tutorial
  4. Basic familiarity with OpenVSwitch commands ovs-ofctl and ovs-vsctl

Procedure and information sources

1. Setting up Mininet VM

We will setup mininet as a VM inside virtualbox. We will login to the VM via ssh from your laptop.
    1. Download latest mininet VM image. Download mininet
    2. Download and install virtualbox on your laptop. Download virtualbox
    3. Start the virtual box application and import the mininet VM image in virtual box. You can either click on the VM image or import via the menu in virtual box window.
    4. Click on the imported VM image to start it.  Login to the mininet VM using username: mininet and password: mininet
    5. Note that the virtualbox terminal window takes control of your mouse/keyboard as well. To release the keyboard/mouse, press the key shown in the bottom right corner. On MAC, is left-command.
SSH into VM: While it is possible to use mininet from this terminal window it is more convenient to be able to ssh into the running VM from your machine. You can follow the approach available at this link link1 (using DHCP) or at this link link2 (using static IP).  But, this is not necessary for the first assignment.

Basic networking commands in linux

At this state, it is important to know of some basic linux networking commands shown below. These are helpful in debugging and checking the status of your progress.
  1. ifconfig
  2. ping
  3. arp
  4. nslookup
  5. whois
  6. traceroute
  7. hostname
  8. route
  9. netstat
  10. tcpdump
An authoritative source of information about these commands are the manual pages (e.g., man <command>). To quickly get you going, follow these links and try the above commands in the mininet-vm terminal. Repeat these commands after you have created a network in mininet below. I will review these commands in class as well.

13 Linux Network Configuration and Troubleshooting Commands
Network commands
List of Linux Networking and Troubleshooting Commands for Beginners

Mininet walkthrough

We will review the mininet walkthrough tutorial in class. Tutorial.  Repeat the walkthrough tutorial on your own after you have setup the mininet VM and gained some familiarity with the commands above. 

OpenVSwitch  (OVS)

OVS introduction: Mininet uses OpenVSwitch (OVS) as its software switch. It understands the OpenFlow protocol and communicates with an OpenFlow SDN controller to determine its packet forwarding rules.   A diagrammatic representation of its architecture is shown below. In our context, VM1 ..  VM n represent different mininet hosts (h1 .. hn).  OpenVSwitch architecture consists of three main components:


ovs-ofctl and ovs-vsctl: In general, an SDN controller (e.g., OpenDaylight, POX) can be used for configuring the ovs-vswitchd. However, OVS provides a number of command line utilities to directly configure ovs-vswitchd without running an SDN controller. We will use two utilities ovs-ofctl and ovs-vsctl that respectively install configuration (i.e. OVSDB) and openflow rules  in the ovs-vswitchd as shown in the figure below.

The man pages for these commands provide the most complete information on these sources. You can access them by typing: (man ovs-vsctl), (man ovs-ofctl). I will discuss some sample commands in class to give you a flavor.

Homework questions

To demonstrate that you have successfully completed the above tasks, submit the answers to the following questions.

A. Basic networking commands

  1. Print the list of network interfaces, their MAC addresses and their assigned IP addresses, if any.
  2. Calculate the latency between mininet vm and for 10 packets. Repeat the result for and and compare the difference in latency.
  3. List the routers between mininet vm and Can you explain where are the first two routers in the path located?
  4. Go to website and obtain the list of name servers for the domain
B. Mininet

Create a simple two node network using "sudo mn" and do the following exercises.
  1. Print the MAC address of host h1. Print the MAC addresses of switch s1. Explain the different interfaces that s1 has.
  2. Ping h1 from h2 and view the ARP entries stored at hosts h1 and h2.
  3. Measure the TCP throughput from h1 to h2 using iperf.
  4. Delete the mininet topology and recreate a custom topology in which links have capacity 10 Mbps and latency 100 ms. 
  5. In the new topology, measure the average ping latency for five pings. Why does the first ping take longer than others?
  6. In the new topology, measure the throughput from h1 to h2 using iperf. Would the throughput be different if link latencies were 20 ms instead of 100 ms?
C. ovs-ofctl and ovs-vsctl

Review the man page for the following commands: ovs-ofctl and ovs-vsctl.

Submission instructions

Prepare a Word (or Latex) file with the answers. Where the questions asks for the output on the terminal, you can either copy paste the screen output (or take a screenshot). Email the submission to the instructor's winlab account.