cn »

Assignment 2 - Mininet Topology


The goal of this assignment is to familiarize yourself with Mininet. You will modify a Mininet topology using Python and then observe the throughput and latency measurements to understand how the simulator works.

In the directions below, you might not be able to cut and paste into your virtualbox terminal window, but you should be able to if you use ssh mininet@ip_address from (Terminal on Mac OSX, Putty on Windows and xterm on Linux) as you did at the end of the first assignment.



  1. Clone the project starter code from Github into the Mininet virtual machine git clone

  2. Update the repository locations by issuing the following command (be sure to copy and paste exactly):

    sudo sed -i "s/" /etc/apt/sources.list
    sudo sed -i "s/" /etc/apt/sources.list
    sudo apt-get update
  3. From here, issue the following command to get apt-get working again: sudo apt-get update

  4. Install two libraries necessary to run the measurement code sudo apt-get install bwm-ng python-matplotlib.

  5. You can now run the example topology provided to simulate a host communicating with another host. Change into the assignment directory cd gt-cs6250/assignment-2. Then run the topology: sudo ./ The script produces a time-stamped results folder as well as a couple graphs, one of the TCP congestion window and another of the bandwidth in megabits per second. To view the graphs, start a simple web server and navigate to the IP address of the virtual machine. Find the IP address which should be associated with the ‘eth0’ interface: sudo ifconfig . Then start the server python -m SimpleHTTPServer. On the host machine in a browser navigate to http://ip_address:8000 . You can then browse to the results folder and view the graphs.
    Screen Shot 2013-12-20 at 1.57.01 PM.png

  6. Now you will modify the Mininet topology to add more switches. The current topology is setup as shown below. You will modify the topology to the second topology shown below (2 hosts, 3 switches, 4 links). To modify the topology, you should edit the Mininet topology file The file is imported by the script which adds logging code to the topology. You should add two new switch and three new links. Refer to the Mininet documentation to piece apart the topology file. When you have modified the topology, re-run the topology test script sudo ./ The graphs should be similar to the graphs produced in your earlier test run. The similarity should come as no surprise because the new switch and links in the topology are adding a slight amount of total latency but have the same bandwidth properties as the other links.
    Screen Shot 2013-12-20 at 1.30.50 PM.png

  7. The next two steps involve tweaking topology parameters and observing their outputs. First we will modify the latency of the topology. Before we modify the latency, we will test the current latency using the ping command. Run the following from the assignment folder sudo python ./ To modify the latency we will adjust the delay on the links in the file. Adjust the delay in the linkConfig dictionary to 10ms. Then run ping script again sudo python ./ The output from the first run should take approximately 9 ms, the time for one packet to traverse three links to the receiver and the acknowledgement three links back to the sender. The packet latency is the fourth column of the ping output and note you should discard the first result as it is an outlier from the command starting up.  Once you’ve increased the latency you should see the latency increase to approximately 90-100 ms as expected adding the individual latencies of the links for one round trip. The beauty of Mininet is these configuration parameters allow us to emulate real network events without modifying common network tools like ping.

  8. Now we will modify the bandwidth and observe the change in the topology. Adjust the bw in the linkConfig dictionary to 50 which will adjust the bandwidth along each link to 50Mbits per second. To confirm Mininet performs this correctly run sudo ./ And view the rate.png output graph using the Python web server as in step 5.

  9. Take the time now to answer the quiz questions below. Place the answers in a text file (not Word, not PDF). The answers should be one per line, and in the format 1. X where X is the answer.

  10. To complete this assignment, submit your, the bwm.txt file generated in step 8, rate.png from step 8, and quiz1.txt to T-Square as four separate files. Do not submit tarballs or zip files, and do not modify the names of those files or else grading will be affected and you may receive a zero.

Quiz Questions

  1. Which of the following protocols can be used by hosts on the public internet to communicate with machines behind a NAT?

    A. STUN

    B. ICE

    C. SMTP

    D. SONET

  2. By using a protocol to allow machines in the global internet communicate directly with machines behind a NAT, can we claim that NAT does not violate the End to End principle?

    A. True

    B. False

  3. Which of the following problem(s) are prevalent for internet traffic over High speed intercontinental paths

    A. Long delays.

    B. Intermittent connectivity.

    C. Insufficient dynamic range for congestion control.

  4. TCP and UDP uses “circuit switching”.

    A. True

    B. False  

  5. BGP configuration is required to be the same across all networks.

    A. True

    B. False

  6. Which of these violates the End-to-End principle?

    A. Email, Spam, Cache

    B. Email, Congestion control, TCP splitting

    C. TCP splitting, email, cache

    D. Congestion control, cache, spam

    E. Cache, TCP splitting, congestion control

  7. Which of these is not a private IP address?






  8. How can systems outside a home network route to devices within the network if the home network is shielded with a NAT.

    A. NAT IP address.

    B. NAT IP address and device port address.

    C. Device’s local IP address.

    D. Device local IP address and device port address.

  9. After reading the End-to-End Argument in System Design by Saltzer, Reed, and Clark, Which of these summarizes the main theme for the paper?

    A. Having a highly reliable network communication system (like within an enterprise network) refutes the requirement of an End-to-End check on communications.

    B. Low level functions included in a network communication system provide the required guarantee for a successful End-to-End communication and improve performance.

    C. Despite performance penalties and extensive use of highly efficient low-level functions, end-to-end checks are necessary.

    D. Implementing lower level functions satisfies their value-for-money by providing end-to-end delivery and performance guarantees.

  10. Which of these is a valid point in SUPPORT for the end-to-end argument in terms of guaranteeing secure transmission of data across a network?

    A. Communication links across the network are secure.

    B. Data being sent is encrypted.

    C. Authenticity of the data needs to be verified by the receiver.


This rubric is here to help you understand the expectations for the assignment. It is the same rubric that the person evaluating your project will use. We recommend you look at the rubric before you begin working on your project and again before you decide to submit it.

CriteriaDoes Not Meet ExpectationsMeets Expectations Exceeds Expectations
Topology code
Topology is as described above.Topology is not as described.Topology is as described with three switches and two hosts.There is no “Exceeds Expectations” option for this criteria.
Bandwidth output
Output looks reasonable.Output does not pass the sanity check when it is submitted.Output does pass the sanity check and the rate log matches the 50Mbits per second specified above.There is no “Exceeds Expectations” option for this criteria.