Software Project: Assignment 1
*** Due date: Feb 10 (before start of class) ***
- Setup Mininet in a VirtualBox VM
- Familiarize with linux and basic networking tools in linux
- Complete Mininet walkthrough tutorial
- 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.
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
- Download latest mininet VM image. Download
- Download and install virtualbox on your laptop. Download
- 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.
- Click on the imported VM image to start it. Login to the
mininet VM using username: mininet and password: mininet
- 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.
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.
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.
Linux Network Configuration and Troubleshooting Commands
of Linux Networking and Troubleshooting Commands for Beginners
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.
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
- ovs-vswitchd: A user-space component that implements the OpenFlow
protocol and can be configured by an SDN controller to forward packets.
- kernel module: A kernel level cache of packet forwarding rules
computed by ovs-vswitchd As a result, packets arriving at NIC do not
need to cross the (costly) kernel-userspace boundary and can be directly
forwarded to the appropriate VM. Kernel module is invisible to
controller and is simply a performance enhancement.
- ovsdb-server: Maintains configuration database for the switch, e.g.,
ports, OpenFlow versions supported, controller IP:port.
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
To demonstrate that you have successfully completed the above tasks,
submit the answers to the following questions.
A. Basic networking commands
- Print the list of network interfaces, their MAC addresses and their
assigned IP addresses, if any.
- Calculate the latency between mininet vm and www.rutgers.edu for 10
packets. Repeat the result for stanford.edu and www.iitkgp.ac.in and
compare the difference in latency.
- List the routers between mininet vm and rutgers.edu. Can you explain
where are the first two routers in the path located?
- Go to website https://whois.icann.org and obtain the list of name
servers for the domain cnn.com
Create a simple two node network using "sudo mn" and do the following
C. ovs-ofctl and ovs-vsctl
- Print the MAC address of host h1. Print the MAC addresses of switch
s1. Explain the different interfaces that s1 has.
- Ping h1 from h2 and view the ARP entries stored at hosts h1 and h2.
- Measure the TCP throughput from h1 to h2 using iperf.
- Delete the mininet topology and recreate a custom topology in which
links have capacity 10 Mbps and latency 100 ms.
- In the new topology, measure the average ping latency for five pings.
Why does the first ping take longer than others?
- 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?
Review the man page for the following commands: ovs-ofctl and ovs-vsctl.
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